From reid at x10sys.com Mon Nov 29 00:23:30 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 00:23:30 -0600 Subject: [llvm-commits] CVS: llvm/tools/Makefile.JIT Message-ID: <200411290623.AAA02012@zion.cs.uiuc.edu> Changes in directory llvm/tools: Makefile.JIT updated: 1.6 -> 1.7 --- Log message: Make sure the program's symbols can be dlsym'd as well. --- Diffs of the changes: (+2 -0) Index: llvm/tools/Makefile.JIT diff -u llvm/tools/Makefile.JIT:1.6 llvm/tools/Makefile.JIT:1.7 --- llvm/tools/Makefile.JIT:1.6 Thu Nov 25 14:22:07 2004 +++ llvm/tools/Makefile.JIT Mon Nov 29 00:23:19 2004 @@ -64,3 +64,5 @@ USEDLIBS += LLVMInterpreter $(JITLIBS) $(ARCHLIBS) LLVMScalarOpts \ LLVMAnalysis.a LLVMTransformUtils.a LLVMBCReader LLVMCore \ LLVMSupport.a LLVMTarget.a LLVMbzip2 LLVMSystem.a + +LDFLAGS += -dlopen self From reid at x10sys.com Mon Nov 29 01:17:18 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 01:17:18 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200411290717.BAA02359@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.240 -> 1.241 --- Log message: Incorporate tools/Makefile.JIT --- Diffs of the changes: (+57 -0) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.240 llvm/Makefile.rules:1.241 --- llvm/Makefile.rules:1.240 Sun Nov 28 23:00:33 2004 +++ llvm/Makefile.rules Mon Nov 29 01:17:07 2004 @@ -619,6 +619,63 @@ ifdef TOOLNAME #--------------------------------------------------------- +# Handle the special "JIT" value for LLVM_LIBS which is a +# shorthand for a bunch of libraries that get the correct +# JIT support for a tool that runs JIT. +#--------------------------------------------------------- +ifeq ($(LLVMLIBS),JIT) + +# Make sure we can get our own symbols in the tool +Link += -dlopen self + +# Generic JIT libraries +JIT_LIBS := LLVMInterpreter LLVMJIT LLVMCodeGen LLVMExecutionEngine + +# You can enable the X86 JIT on a non-X86 host by setting the flag +# ENABLE_X86_JIT on the make command line. If not, it will still be +# enabled automagically on an X86 host. +ifeq ($(ARCH), x86) + ENABLE_X86_JIT = 1 +endif + +# What the X86 JIT requires +ifdef ENABLE_X86_JIT + JIT_LIBS += LLVMX86 LLVMSelectionDAG +endif + +# You can enable the SparcV9 JIT on a non-SparcV9 host by setting the flag +# ENABLE_SPARCV9_JIT on the make command line. If not, it will still be +# enabled automagically on an SparcV9 host. +ifeq ($(ARCH), Sparc) + ENABLE_SPARCV9_JIT = 1 +endif + +# What the Sparc JIT requires +ifdef ENABLE_SPARCV9_JIT + JIT_LIBS += LLVMSparcV9 LLVMSparcV9ModuloSched LLVMSparcV9InstrSched \ + LLVMSparcV9LiveVar LLVMInstrumentation.a LLVMProfilePaths \ + LLVMBCWriter LLVMTransforms.a LLVMipo.a LLVMipa.a \ + LLVMDataStructure.a LLVMSparcV9RegAlloc +endif + +# You can enable the PowerPC JIT on a non-PowerPC host by setting the flag +# ENABLE_PPC_JIT on the make command line. If not, it will still be +# enabled automagically on an PowerPC host. +ifeq ($(ARCH), PowerPC) + ENABLE_PPC_JIT = 1 +endif + +# What the PowerPC JIT requires +ifdef ENABLE_PPC_JIT + JIT_LIBS += LLVMPowerPC +endif + +LLVMLIBS := $(JIT_LIBS) LLVMScalarOpts LLVMAnalysis.a LLVMTransformUtils.a \ + LLVMBCReader LLVMCore LLVMSupport.a LLVMTarget.a LLVMbzip2 \ + LLVMSystem.a $(PLATFORMLIBDL) +endif + +#--------------------------------------------------------- # Set up variables for building a tool. #--------------------------------------------------------- ifdef EXAMPLE_TOOL From reid at x10sys.com Mon Nov 29 01:17:30 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 01:17:30 -0600 Subject: [llvm-commits] CVS: llvm/tools/llvm-db/Makefile Message-ID: <200411290717.BAA02385@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-db: Makefile updated: 1.7 -> 1.8 --- Log message: Use LLVMLIBS=JIT to get JIT libraries --- Diffs of the changes: (+1 -7) Index: llvm/tools/llvm-db/Makefile diff -u llvm/tools/llvm-db/Makefile:1.7 llvm/tools/llvm-db/Makefile:1.8 --- llvm/tools/llvm-db/Makefile:1.7 Wed Oct 27 18:18:45 2004 +++ llvm/tools/llvm-db/Makefile Mon Nov 29 01:17:19 2004 @@ -12,12 +12,6 @@ USEDLIBS = LLVMDebugger # Enable JIT support -include ../Makefile.JIT - -# Have gcc tell the linker to export symbols from the program so that -# dynamically loaded modules can be linked against them. -# -TOOLLINKOPTS = $(PLATFORMLIBDL) +LLVMLIBS = JIT include $(LEVEL)/Makefile.common - From reid at x10sys.com Mon Nov 29 01:17:30 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 01:17:30 -0600 Subject: [llvm-commits] CVS: llvm/tools/lli/Makefile Message-ID: <200411290717.BAA02394@zion.cs.uiuc.edu> Changes in directory llvm/tools/lli: Makefile updated: 1.47 -> 1.48 --- Log message: Use LLVMLIBS=JIT to get JIT libraries --- Diffs of the changes: (+3 -9) Index: llvm/tools/lli/Makefile diff -u llvm/tools/lli/Makefile:1.47 llvm/tools/lli/Makefile:1.48 --- llvm/tools/lli/Makefile:1.47 Thu Oct 14 14:00:33 2004 +++ llvm/tools/lli/Makefile Mon Nov 29 01:17:19 2004 @@ -6,15 +6,9 @@ # the University of Illinois Open Source License. See LICENSE.TXT for details. # ##===----------------------------------------------------------------------===## -LEVEL = ../.. -TOOLNAME = lli +LEVEL := ../.. +TOOLNAME := lli +LLVMLIBS := JIT # Enable JIT support -include ../Makefile.JIT - -# Have gcc tell the linker to export symbols from the program so that -# dynamically loaded modules can be linked against them. -# -TOOLLINKOPTS = $(PLATFORMLIBDL) - include $(LEVEL)/Makefile.common From reid at x10sys.com Mon Nov 29 01:17:30 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 01:17:30 -0600 Subject: [llvm-commits] CVS: llvm/examples/HowToUseJIT/Makefile Message-ID: <200411290717.BAA02388@zion.cs.uiuc.edu> Changes in directory llvm/examples/HowToUseJIT: Makefile updated: 1.7 -> 1.8 --- Log message: Use LLVMLIBS=JIT to get JIT libraries --- Diffs of the changes: (+1 -1) Index: llvm/examples/HowToUseJIT/Makefile diff -u llvm/examples/HowToUseJIT/Makefile:1.7 llvm/examples/HowToUseJIT/Makefile:1.8 --- llvm/examples/HowToUseJIT/Makefile:1.7 Thu Nov 18 04:03:47 2004 +++ llvm/examples/HowToUseJIT/Makefile Mon Nov 29 01:17:19 2004 @@ -11,6 +11,6 @@ EXAMPLE_TOOL = 1 # Enable JIT support -include $(LEVEL)/tools/Makefile.JIT +LLVMLIBS := JIT include $(LEVEL)/Makefile.common From reid at x10sys.com Mon Nov 29 01:17:30 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 01:17:30 -0600 Subject: [llvm-commits] CVS: llvm/examples/Fibonacci/Makefile Message-ID: <200411290717.BAA02389@zion.cs.uiuc.edu> Changes in directory llvm/examples/Fibonacci: Makefile updated: 1.6 -> 1.7 --- Log message: Use LLVMLIBS=JIT to get JIT libraries --- Diffs of the changes: (+1 -1) Index: llvm/examples/Fibonacci/Makefile diff -u llvm/examples/Fibonacci/Makefile:1.6 llvm/examples/Fibonacci/Makefile:1.7 --- llvm/examples/Fibonacci/Makefile:1.6 Thu Nov 18 04:03:47 2004 +++ llvm/examples/Fibonacci/Makefile Mon Nov 29 01:17:19 2004 @@ -12,6 +12,6 @@ EXAMPLE_TOOL = 1 # Enable JIT support -include $(LEVEL)/tools/Makefile.JIT +LLVMLIBS := JIT include $(LEVEL)/Makefile.common From llvm at cs.uiuc.edu Mon Nov 29 01:17:42 2004 From: llvm at cs.uiuc.edu (LLVM) Date: Mon, 29 Nov 2004 01:17:42 -0600 Subject: [llvm-commits] CVS: llvm/tools/Makefile.JIT Message-ID: <200411290717.BAA02403@zion.cs.uiuc.edu> Changes in directory llvm/tools: Makefile.JIT (r1.7) removed --- Log message: No longer necessary, moved Makefile.rules --- Diffs of the changes: (+0 -0) From gaeke at cs.uiuc.edu Mon Nov 29 01:36:10 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Mon, 29 Nov 2004 01:36:10 -0600 (CST) Subject: [llvm-commits] CVS: reopt/lib/TraceJIT/TraceJITEmitter.cpp Message-ID: <200411290736.BAA10484@kain.cs.uiuc.edu> Changes in directory reopt/lib/TraceJIT: TraceJITEmitter.cpp updated: 1.5 -> 1.6 --- Log message: Add relocation support. --- Diffs of the changes: (+50 -38) Index: reopt/lib/TraceJIT/TraceJITEmitter.cpp diff -u reopt/lib/TraceJIT/TraceJITEmitter.cpp:1.5 reopt/lib/TraceJIT/TraceJITEmitter.cpp:1.6 --- reopt/lib/TraceJIT/TraceJITEmitter.cpp:1.5 Sun Nov 21 17:01:06 2004 +++ reopt/lib/TraceJIT/TraceJITEmitter.cpp Mon Nov 29 01:35:58 2004 @@ -27,7 +27,9 @@ #include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineConstantPool.h" +#include "llvm/CodeGen/MachineRelocation.h" #include "llvm/Target/TargetData.h" +#include "llvm/Target/TargetJITInfo.h" #include "llvm/Support/Debug.h" #include "llvm/Support/DynamicLinker.h" using namespace llvm; @@ -47,6 +49,10 @@ // ConstantPoolAddresses - Contains the location for each entry in the // constant pool. std::vector ConstantPoolAddresses; + + /// Relocations - These are the relocations that the function needs, as + /// emitted. + std::vector Relocations; public: TraceJITEmitter (TraceJIT *JIT_) : TheJIT (JIT_) { // Re-use the existing DummyFunction area for code emission in the @@ -65,26 +71,19 @@ virtual void* finishFunctionStub(const Function *F) { abort (); } - virtual void addRelocation(const MachineRelocation &) { - assert(0 && "Relocations not supported!"); + virtual void addRelocation(const MachineRelocation &MR) { + Relocations.push_back(MR); } virtual void emitByte(unsigned char B); virtual void emitWord(unsigned W); virtual void emitWordAt(unsigned W, unsigned *Ptr); - virtual uint64_t getGlobalValueAddress(GlobalValue *V); - virtual uint64_t getGlobalValueAddress(const char *Name); - virtual uint64_t getConstantPoolEntryAddress(unsigned Entry); virtual uint64_t getCurrentPCValue(); virtual uint64_t getCurrentPCOffset(); - - // forceCompilationOf - Force the compilation of the specified function, and - // return its address, because we REALLY need the address now. - // - // FIXME: This is JIT specific! - // - virtual uint64_t forceCompilationOf(Function *F); + virtual uint64_t getConstantPoolEntryAddress(unsigned Entry); + private: + void *getPointerToGlobal(GlobalValue *GV, uint64_t Reference, bool NoNeedStub); }; } // end anonymous namespace @@ -96,6 +95,22 @@ } // end namespace llvm +void *TraceJITEmitter::getPointerToGlobal(GlobalValue *V, uint64_t Reference, + bool DoesntNeedStub) { + // Try looking up the function to see if it is already compiled, if not + // return 0. + if (isa(V)) { + if (V->hasExternalLinkage () && V->hasName ()) { + void *where = GetAddressOfSymbol (V->getName ()); + if (where) + return where; + } + return TheJIT->getPointerToGlobalIfAvailable(V); + } else { + return TheJIT->getOrEmitGlobalVariable(cast(V)); + } +} + void TraceJITEmitter::startFunction(MachineFunction &F) { // Round up to a 64-bit word boundary. CurBlock = (CurFunctionPtr + 7) & ~7; @@ -108,12 +123,32 @@ void TraceJITEmitter::finishFunction(MachineFunction &F) { assert(CurByte > CurFunctionPtr); CurFunctionPtr = CurByte; - ConstantPoolAddresses.clear(); - DEBUG(std::cerr << "Finished CodeGen of [" << (void*)CurBlock + if (!Relocations.empty()) { + // Resolve the relocations to concrete pointers. + for (unsigned i = 0, e = Relocations.size(); i != e; ++i) { + MachineRelocation &MR = Relocations[i]; + void * ResultPtr; + if (MR.isString()) + ResultPtr = TheJIT->getPointerToNamedFunction(MR.getString()); + else + ResultPtr = getPointerToGlobal(MR.getGlobalValue(), + CurBlock+MR.getMachineCodeOffset(), + MR.doesntNeedFunctionStub()); + MR.setResultPointer(ResultPtr); + } + + TheJIT->getJITInfo().relocate((void*)CurBlock, &Relocations[0], + Relocations.size()); + } + + DEBUG(std::cerr << "JIT: Finished CodeGen of [" << (void*)CurBlock << "] Function: " << F.getFunction()->getName() - << ": " << CurByte-CurBlock << " bytes of text\n"); + << ": " << CurByte-CurBlock << " bytes of text, " + << Relocations.size() << " relocations\n"); + Relocations.clear(); + } void TraceJITEmitter::emitConstantPool(MachineConstantPool *MCP) { @@ -176,25 +211,6 @@ (uint64_t) Ptr + sizeof (unsigned)); } -uint64_t TraceJITEmitter::getGlobalValueAddress(GlobalValue *V) { - // Try looking up the function to see if it is already compiled, if not return - // 0. - if (isa(V)) { - if (V->hasExternalLinkage () && V->hasName ()) { - uint64_t where = (uint64_t) GetAddressOfSymbol (V->getName ()); - if (where) - return where; - } - return (uint64_t)TheJIT->getPointerToGlobalIfAvailable(V); - } else { - return (uint64_t)TheJIT->getOrEmitGlobalVariable(cast(V)); - } -} - -uint64_t TraceJITEmitter::getGlobalValueAddress(const char *Name) { - return (uint64_t)TheJIT->getPointerToNamedFunction(Name); -} - // getConstantPoolEntryAddress - Return the address of the 'ConstantNum' entry // in the constant pool that was last emitted with the 'emitConstantPool' // method. @@ -215,7 +231,3 @@ uint64_t TraceJITEmitter::getCurrentPCOffset() { return CurByte-CurFunctionPtr; } - -uint64_t TraceJITEmitter::forceCompilationOf(Function *F) { - return (uint64_t)TheJIT->getPointerToFunction(F); -} From gaeke at cs.uiuc.edu Mon Nov 29 01:36:09 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Mon, 29 Nov 2004 01:36:09 -0600 (CST) Subject: [llvm-commits] CVS: reopt/include/reopt/TraceJIT.h Message-ID: <200411290736.BAA10482@kain.cs.uiuc.edu> Changes in directory reopt/include/reopt: TraceJIT.h updated: 1.4 -> 1.5 --- Log message: Update TraceJIT data structure to match recent JIT changes. --- Diffs of the changes: (+4 -0) Index: reopt/include/reopt/TraceJIT.h diff -u reopt/include/reopt/TraceJIT.h:1.4 reopt/include/reopt/TraceJIT.h:1.5 --- reopt/include/reopt/TraceJIT.h:1.4 Mon Nov 8 14:59:38 2004 +++ reopt/include/reopt/TraceJIT.h Mon Nov 29 01:35:57 2004 @@ -47,6 +47,10 @@ public: ~TraceJIT(); + /// getJITInfo - Return the target JIT information structure. + /// + TargetJITInfo &getJITInfo() const { return TJI; } + /// create - Create an return a new TraceJIT compiler if there is one available /// for the current target. Otherwise, return null. If the TraceJIT is created /// successfully, it takes responsibility for deleting the specified From reid at x10sys.com Mon Nov 29 01:45:02 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 01:45:02 -0600 Subject: [llvm-commits] CVS: llvm/docs/MakefileGuide.html Message-ID: <200411290745.BAA02556@zion.cs.uiuc.edu> Changes in directory llvm/docs: MakefileGuide.html updated: 1.14 -> 1.15 --- Log message: * Document how to turn on doxygen documentation generation * Document the new "LLVMLIBS=JIT" feature to make building JIT programs super easy. --- Diffs of the changes: (+51 -4) Index: llvm/docs/MakefileGuide.html diff -u llvm/docs/MakefileGuide.html:1.14 llvm/docs/MakefileGuide.html:1.15 --- llvm/docs/MakefileGuide.html:1.14 Thu Nov 25 14:21:53 2004 +++ llvm/docs/MakefileGuide.html Mon Nov 29 01:44:51 2004 @@ -30,6 +30,9 @@
  1. Libraries
  2. Tools
  3. +
      +
    1. JIT Tools
    2. +
  • Targets Supported @@ -267,6 +270,41 @@

    + + +
    +

    Many tools will want to use the JIT features of LLVM. However, getting the + right set of libraries to link with is tedious, platform specific, and error + prone. Additionally, the JIT has special linker switch options that it needs. + Consequently, to make it easier to build tools that use the JIT, you can + use a special value for the LLVMLIBS> variable:

    +
    
    +      TOOLNAME = my_jit_tool
    +      USEDLIBS = mylib
    +      LLVMLIBS = JIT
    +  
    +

    Using a value of JIT for LLVMLIBS tells the makefile + system to construct a special value for LLVMLIBS that gives the program all + the LLVM libraries needed to run the JIT. Any additional libraries needed can + still be specified with USEDLIBS. To get a full understanding of how + this changes the linker command, it is recommended that you:

    +
    
    +      cd examples/Fibonacci
    +      make VERBOSE=1
    +  
    +

    By default, using LLVMLIBS=JIT will link in enough to support JIT + code generation for the architecture on which the tool is linked. If you need + additional target architectures linked in, you may specify them on the command + line or in your Makefile. For example:

    +
    
    +      ENABLE_X86_JIT=1
    +      ENABLE_SPARCV9_JIT=1
    +      ENALBE_PPC_JIT=1
    +  
    +

    will cause the tool to be able to generate code for all three platforms. +

    +
    + @@ -411,9 +449,18 @@

    This target finalizes shared objects and executables and copies all - libraries, headers and executables to the directory given with the - --prefix option to configure. When completed, the prefix - directory will have everything needed to use LLVM.

    + libraries, headers, executables and documentation to the directory given + with the --prefix option to configure. When completed, + the prefix directory will have everything needed to use LLVM.

    +

    The LLVM makefiles can generate complete internal documentation + for all the classes by using doxygen. By default, this feature is + not enabled because it takes a long time and generates a massive + amount of data (>100MB). If you want this feature, you must configure LLVM + with the --enable-doxygen switch and ensure that a modern version of doxygen + (1.3.7 or later) is available in your PATH. You can download + doxygen from + + here.

    @@ -847,7 +894,7 @@ Reid Spencer
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/11/25 20:21:53 $ + Last modified: $Date: 2004/11/29 07:44:51 $ From reid at x10sys.com Mon Nov 29 01:47:27 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 01:47:27 -0600 Subject: [llvm-commits] CVS: llvm/docs/MakefileGuide.html Message-ID: <200411290747.BAA02603@zion.cs.uiuc.edu> Changes in directory llvm/docs: MakefileGuide.html updated: 1.15 -> 1.16 --- Log message: Make it HTML 4.01 Strict compliant. --- Diffs of the changes: (+4 -3) Index: llvm/docs/MakefileGuide.html diff -u llvm/docs/MakefileGuide.html:1.15 llvm/docs/MakefileGuide.html:1.16 --- llvm/docs/MakefileGuide.html:1.15 Mon Nov 29 01:44:51 2004 +++ llvm/docs/MakefileGuide.html Mon Nov 29 01:47:16 2004 @@ -29,10 +29,11 @@
  • Tutorial
    1. Libraries
    2. -
    3. Tools
    4. +
    5. Tools
      1. JIT Tools
      +
  • Targets Supported @@ -277,7 +278,7 @@ right set of libraries to link with is tedious, platform specific, and error prone. Additionally, the JIT has special linker switch options that it needs. Consequently, to make it easier to build tools that use the JIT, you can - use a special value for the LLVMLIBS> variable:

    + use a special value for the LLVMLIBS variable:

    
           TOOLNAME = my_jit_tool
           USEDLIBS = mylib
    @@ -894,7 +895,7 @@
     
       Reid Spencer
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/11/29 07:44:51 $ + Last modified: $Date: 2004/11/29 07:47:16 $ From reid at x10sys.com Mon Nov 29 04:39:04 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 04:39:04 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/System/DynamicLibrary.h Message-ID: <200411291039.EAA04009@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/System: DynamicLibrary.h updated: 1.1 -> 1.2 --- Log message: Make the default constructor cause the program's symbols to be loaded as if it was a dynamic library. --- Diffs of the changes: (+10 -2) Index: llvm/include/llvm/System/DynamicLibrary.h diff -u llvm/include/llvm/System/DynamicLibrary.h:1.1 llvm/include/llvm/System/DynamicLibrary.h:1.2 --- llvm/include/llvm/System/DynamicLibrary.h:1.1 Wed Nov 17 22:33:40 2004 +++ llvm/include/llvm/System/DynamicLibrary.h Mon Nov 29 04:38:54 2004 @@ -32,10 +32,19 @@ /// @name Constructors /// @{ public: + /// Construct a DynamicLibrary that represents the currently executing + /// program. The program must have been linked with -export-dynamic or + /// -dlopen self for this to work. Any symbols retrieved with the + /// GetAddressOfSymbol function will refer to the program not to any + /// library. + /// @throws std::string indicating why the program couldn't be opened. + /// @brief Open program as dynamic library. + DynamicLibrary(); + /// This is the constructor for DynamicLibrary instances. It will open /// the dynamic library specified by the \filename Path. /// @throws std::string indicating why the library couldn't be opened. - /// @brief DynamicLibrary constructor + /// @brief Open a dynamic library. DynamicLibrary(const char* filename); /// After destruction, the symbols of the library will no longer be @@ -68,7 +77,6 @@ protected: void* handle; // Opaque handle for information about the library - DynamicLibrary(); ///< Do not implement DynamicLibrary(const DynamicLibrary&); ///< Do not implement DynamicLibrary& operator=(const DynamicLibrary&); ///< Do not implement /// @} From reid at x10sys.com Mon Nov 29 04:39:57 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 04:39:57 -0600 Subject: [llvm-commits] CVS: llvm/lib/System/Win32/DynamicLibrary.cpp Message-ID: <200411291039.EAA04035@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Win32: DynamicLibrary.cpp updated: 1.2 -> 1.3 --- Log message: Implement the default constructor which causes the current program to be opened as if it was a dynamic library so its symbols can be searched too. --- Diffs of the changes: (+10 -4) Index: llvm/lib/System/Win32/DynamicLibrary.cpp diff -u llvm/lib/System/Win32/DynamicLibrary.cpp:1.2 llvm/lib/System/Win32/DynamicLibrary.cpp:1.3 --- llvm/lib/System/Win32/DynamicLibrary.cpp:1.2 Sat Nov 20 17:30:55 2004 +++ llvm/lib/System/Win32/DynamicLibrary.cpp Mon Nov 29 04:39:46 2004 @@ -22,15 +22,21 @@ //=== and must not be UNIX code //===----------------------------------------------------------------------===// +DynamicLibrary::DynamicLibrary() : handle(0) { + handle = new HMODULE; + *((HMODULE*)handle) = GetModuleHandle(NULL); + + if (*((HMODULE*)handle) == 0) { + ThrowError("Can't GetModuleHandle: "); + } +} + DynamicLibrary::DynamicLibrary(const char*filename) : handle(0) { handle = new HMODULE; *((HMODULE*)handle) = LoadLibrary(filename); if (*((HMODULE*)handle) == 0) { - char Buffer[100]; - // FIXME: This should use FormatMessage - sprintf(Buffer, "Windows error code %d\n", GetLastError()); - throw std::string(Buffer); + ThrowError("Can't LoadLibrary: "); } } From reid at x10sys.com Mon Nov 29 04:39:57 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 04:39:57 -0600 Subject: [llvm-commits] CVS: llvm/lib/System/Unix/DynamicLibrary.cpp Message-ID: <200411291039.EAA04041@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Unix: DynamicLibrary.cpp updated: 1.1 -> 1.2 --- Log message: Implement the default constructor which causes the current program to be opened as if it was a dynamic library so its symbols can be searched too. --- Diffs of the changes: (+9 -1) Index: llvm/lib/System/Unix/DynamicLibrary.cpp diff -u llvm/lib/System/Unix/DynamicLibrary.cpp:1.1 llvm/lib/System/Unix/DynamicLibrary.cpp:1.2 --- llvm/lib/System/Unix/DynamicLibrary.cpp:1.1 Wed Nov 17 22:33:40 2004 +++ llvm/lib/System/Unix/DynamicLibrary.cpp Mon Nov 29 04:39:46 2004 @@ -16,8 +16,16 @@ namespace llvm { using namespace sys; +DynamicLibrary::DynamicLibrary() : handle(0) { +#if defined (HAVE_DLOPEN) + if ((handle = dlopen(0, RTLD_NOW | RTLD_GLOBAL)) == 0) + throw std::string( dlerror() ); +#else + assert(!"Dynamic object linking not implemented for this platform"); +#endif +} -DynamicLibrary::DynamicLibrary(const char *filename) { +DynamicLibrary::DynamicLibrary(const char *filename) : handle(0) { #if defined (HAVE_DLOPEN) if ((handle = dlopen (filename, RTLD_NOW | RTLD_GLOBAL)) == 0) throw std::string( dlerror() ); From reid at x10sys.com Mon Nov 29 04:39:57 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 04:39:57 -0600 Subject: [llvm-commits] CVS: llvm/lib/System/DynamicLibrary.cpp Message-ID: <200411291039.EAA04038@zion.cs.uiuc.edu> Changes in directory llvm/lib/System: DynamicLibrary.cpp updated: 1.1 -> 1.2 --- Log message: Implement the default constructor which causes the current program to be opened as if it was a dynamic library so its symbols can be searched too. --- Diffs of the changes: (+10 -0) Index: llvm/lib/System/DynamicLibrary.cpp diff -u llvm/lib/System/DynamicLibrary.cpp:1.1 llvm/lib/System/DynamicLibrary.cpp:1.2 --- llvm/lib/System/DynamicLibrary.cpp:1.1 Wed Nov 17 22:33:40 2004 +++ llvm/lib/System/DynamicLibrary.cpp Mon Nov 29 04:39:46 2004 @@ -28,6 +28,16 @@ #ifdef HAVE_LT_DLOPEN +DynamicLibrary::DynamicLibrary() : handle(0) { + if (0 != lt_dlinit()) + throw std::string(lt_dlerror()); + + handle = lt_dlopen(0); + + if (handle == 0) + throw std::string("Can't open program as dynamic library"); +} + DynamicLibrary::DynamicLibrary(const char*filename) : handle(0) { if (0 != lt_dlinit()) throw std::string(lt_dlerror()); From reid at x10sys.com Mon Nov 29 04:56:56 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 04:56:56 -0600 Subject: [llvm-commits] CVS: llvm/autoconf/m4/ltdl.m4 Message-ID: <200411291056.EAA04142@zion.cs.uiuc.edu> Changes in directory llvm/autoconf/m4: ltdl.m4 added (r1.1) --- Log message: This file contains macros that allow us to incorporate the ltdl source into our own library so that it is magically hidden and we don't have to depend on linking with -lltdl option. --- Diffs of the changes: (+430 -0) Index: llvm/autoconf/m4/ltdl.m4 diff -c /dev/null llvm/autoconf/m4/ltdl.m4:1.1 *** /dev/null Mon Nov 29 04:56:55 2004 --- llvm/autoconf/m4/ltdl.m4 Mon Nov 29 04:56:45 2004 *************** *** 0 **** --- 1,430 ---- + ## ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*- + ## Copyright (C) 1999-2000 Free Software Foundation, Inc. + ## + ## 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 of the License, 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. + + # serial 6 AC_LIB_LTDL + + # AC_WITH_LTDL + # ------------ + # Clients of libltdl can use this macro to allow the installer to + # choose between a shipped copy of the ltdl sources or a preinstalled + # version of the library. + AC_DEFUN([AC_WITH_LTDL], + [AC_REQUIRE([AC_LIB_LTDL]) + AC_SUBST([LIBLTDL]) + AC_SUBST([INCLTDL]) + + # Unless the user asks us to check, assume no installed ltdl exists. + use_installed_libltdl=no + + AC_ARG_WITH([included_ltdl], + [ --with-included-ltdl use the GNU ltdl sources included here]) + + if test "x$with_included_ltdl" != xyes; then + # We are not being forced to use the included libltdl sources, so + # decide whether there is a useful installed version we can use. + AC_CHECK_HEADER([ltdl.h], + [AC_CHECK_LIB([ltdl], [lt_dlcaller_register], + [with_included_ltdl=no], + [with_included_ltdl=yes]) + ]) + fi + + if test "x$enable_ltdl_install" != xyes; then + # If the user did not specify an installable libltdl, then default + # to a convenience lib. + AC_LIBLTDL_CONVENIENCE + fi + + if test "x$with_included_ltdl" = xno; then + # If the included ltdl is not to be used. then Use the + # preinstalled libltdl we found. + AC_DEFINE([HAVE_LTDL], 1, + [Define this if a modern libltdl is already installed]) + LIBLTDL=-lltdl + fi + + # Report our decision... + AC_MSG_CHECKING([whether to use included libltdl]) + AC_MSG_RESULT([$with_included_ltdl]) + + AC_CONFIG_SUBDIRS([libltdl]) + ])# AC_WITH_LTDL + + + # AC_LIB_LTDL + # ----------- + # Perform all the checks necessary for compilation of the ltdl objects + # -- including compiler checks and header checks. + AC_DEFUN([AC_LIB_LTDL], + [AC_PREREQ(2.50) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_C_CONST]) + AC_REQUIRE([AC_HEADER_STDC]) + AC_REQUIRE([AC_HEADER_DIRENT]) + AC_REQUIRE([_LT_AC_CHECK_DLFCN]) + AC_REQUIRE([AC_LTDL_ENABLE_INSTALL]) + AC_REQUIRE([AC_LTDL_SHLIBEXT]) + AC_REQUIRE([AC_LTDL_SHLIBPATH]) + AC_REQUIRE([AC_LTDL_SYSSEARCHPATH]) + AC_REQUIRE([AC_LTDL_OBJDIR]) + AC_REQUIRE([AC_LTDL_DLPREOPEN]) + AC_REQUIRE([AC_LTDL_DLLIB]) + AC_REQUIRE([AC_LTDL_SYMBOL_USCORE]) + AC_REQUIRE([AC_LTDL_DLSYM_USCORE]) + AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS]) + AC_REQUIRE([AC_LTDL_FUNC_ARGZ]) + + AC_CHECK_HEADERS([assert.h ctype.h errno.h malloc.h memory.h stdlib.h \ + stdio.h unistd.h]) + AC_CHECK_HEADERS([dl.h sys/dl.h dld.h mach-o/dyld.h]) + AC_CHECK_HEADERS([string.h strings.h], [break]) + + AC_CHECK_FUNCS([strchr index], [break]) + AC_CHECK_FUNCS([strrchr rindex], [break]) + AC_CHECK_FUNCS([memcpy bcopy], [break]) + AC_CHECK_FUNCS([memmove strcmp]) + AC_CHECK_FUNCS([closedir opendir readdir]) + ])# AC_LIB_LTDL + + + # AC_LTDL_ENABLE_INSTALL + # ---------------------- + AC_DEFUN([AC_LTDL_ENABLE_INSTALL], + [AC_ARG_ENABLE([ltdl-install], + [AC_HELP_STRING([--enable-ltdl-install], [install libltdl])]) + + AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) + AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno) + ])])# AC_LTDL_ENABLE_INSTALL + + + # AC_LTDL_SYS_DLOPEN_DEPLIBS + # -------------------------- + AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], + [AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CACHE_CHECK([whether deplibs are loaded by dlopen], + [libltdl_cv_sys_dlopen_deplibs], + [# PORTME does your system automatically load deplibs for dlopen? + # or its logical equivalent (e.g. shl_load for HP-UX < 11) + # For now, we just catch OSes we know something about -- in the + # future, we'll try test this programmatically. + libltdl_cv_sys_dlopen_deplibs=unknown + case "$host_os" in + aix3*|aix4.1.*|aix4.2.*) + # Unknown whether this is true for these versions of AIX, but + # we want this `case' here to explicitly catch those versions. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + aix[[45]]*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + darwin*) + # Assuming the user has installed a libdl from somewhere, this is true + # If you are looking for one http://www.opendarwin.org/projects/dlcompat + libltdl_cv_sys_dlopen_deplibs=yes + ;; + gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) + # GNU and its variants, using gnu ld.so (Glibc) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + hpux10*|hpux11*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + irix[[12345]]*|irix6.[[01]]*) + # Catch all versions of IRIX before 6.2, and indicate that we don't + # know how it worked for any of those versions. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + irix*) + # The case above catches anything before 6.2, and it's known that + # at 6.2 and later dlopen does load deplibs. + libltdl_cv_sys_dlopen_deplibs=yes + ;; + netbsd*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + openbsd*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + osf[[1234]]*) + # dlopen did load deplibs (at least at 4.x), but until the 5.x series, + # it did *not* use an RPATH in a shared library to find objects the + # library depends on, so we explictly say `no'. + libltdl_cv_sys_dlopen_deplibs=no + ;; + osf5.0|osf5.0a|osf5.1) + # dlopen *does* load deplibs and with the right loader patch applied + # it even uses RPATH in a shared library to search for shared objects + # that the library depends on, but there's no easy way to know if that + # patch is installed. Since this is the case, all we can really + # say is unknown -- it depends on the patch being installed. If + # it is, this changes to `yes'. Without it, it would be `no'. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + osf*) + # the two cases above should catch all versions of osf <= 5.1. Read + # the comments above for what we know about them. + # At > 5.1, deplibs are loaded *and* any RPATH in a shared library + # is used to find them so we can finally say `yes'. + libltdl_cv_sys_dlopen_deplibs=yes + ;; + solaris*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + esac + ]) + if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then + AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1], + [Define if the OS needs help to load dependent libraries for dlopen().]) + fi + ])# AC_LTDL_SYS_DLOPEN_DEPLIBS + + + # AC_LTDL_SHLIBEXT + # ---------------- + AC_DEFUN([AC_LTDL_SHLIBEXT], + [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) + AC_CACHE_CHECK([which extension is used for loadable modules], + [libltdl_cv_shlibext], + [ + module=yes + eval libltdl_cv_shlibext=$shrext_cmds + ]) + if test -n "$libltdl_cv_shlibext"; then + AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext", + [Define to the extension used for shared libraries, say, ".so".]) + fi + ])# AC_LTDL_SHLIBEXT + + + # AC_LTDL_SHLIBPATH + # ----------------- + AC_DEFUN([AC_LTDL_SHLIBPATH], + [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) + AC_CACHE_CHECK([which variable specifies run-time library path], + [libltdl_cv_shlibpath_var], [libltdl_cv_shlibpath_var="$shlibpath_var"]) + if test -n "$libltdl_cv_shlibpath_var"; then + AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var", + [Define to the name of the environment variable that determines the dynamic library search path.]) + fi + ])# AC_LTDL_SHLIBPATH + + + # AC_LTDL_SYSSEARCHPATH + # --------------------- + AC_DEFUN([AC_LTDL_SYSSEARCHPATH], + [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) + AC_CACHE_CHECK([for the default library search path], + [libltdl_cv_sys_search_path], + [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"]) + if test -n "$libltdl_cv_sys_search_path"; then + sys_search_path= + for dir in $libltdl_cv_sys_search_path; do + if test -z "$sys_search_path"; then + sys_search_path="$dir" + else + sys_search_path="$sys_search_path$PATH_SEPARATOR$dir" + fi + done + AC_DEFINE_UNQUOTED(LTDL_SYSSEARCHPATH, "$sys_search_path", + [Define to the system default library search path.]) + fi + ])# AC_LTDL_SYSSEARCHPATH + + + # AC_LTDL_OBJDIR + # -------------- + AC_DEFUN([AC_LTDL_OBJDIR], + [AC_CACHE_CHECK([for objdir], + [libltdl_cv_objdir], + [libltdl_cv_objdir="$objdir" + if test -n "$objdir"; then + : + else + rm -f .libs 2>/dev/null + mkdir .libs 2>/dev/null + if test -d .libs; then + libltdl_cv_objdir=.libs + else + # MS-DOS does not allow filenames that begin with a dot. + libltdl_cv_objdir=_libs + fi + rmdir .libs 2>/dev/null + fi + ]) + AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) + ])# AC_LTDL_OBJDIR + + + # AC_LTDL_DLPREOPEN + # ----------------- + AC_DEFUN([AC_LTDL_DLPREOPEN], + [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) + AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], + [libltdl_cv_preloaded_symbols], + [if test -n "$lt_cv_sys_global_symbol_pipe"; then + libltdl_cv_preloaded_symbols=yes + else + libltdl_cv_preloaded_symbols=no + fi + ]) + if test x"$libltdl_cv_preloaded_symbols" = xyes; then + AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1, + [Define if libtool can extract symbol lists from object files.]) + fi + ])# AC_LTDL_DLPREOPEN + + + # AC_LTDL_DLLIB + # ------------- + AC_DEFUN([AC_LTDL_DLLIB], + [LIBADD_DL= + AC_SUBST(LIBADD_DL) + AC_LANG_PUSH([C]) + + AC_CHECK_FUNC([shl_load], + [AC_DEFINE([HAVE_SHL_LOAD], [1], + [Define if you have the shl_load function.])], + [AC_CHECK_LIB([dld], [shl_load], + [AC_DEFINE([HAVE_SHL_LOAD], [1], + [Define if you have the shl_load function.]) + LIBADD_DL="$LIBADD_DL -ldld"], + [AC_CHECK_LIB([dl], [dlopen], + [AC_DEFINE([HAVE_LIBDL], [1], + [Define if you have the libdl library or equivalent.]) + LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes"], + [AC_TRY_LINK([#if HAVE_DLFCN_H + # include + #endif + ], + [dlopen(0, 0);], + [AC_DEFINE([HAVE_LIBDL], [1], + [Define if you have the libdl library or equivalent.]) libltdl_cv_func_dlopen="yes"], + [AC_CHECK_LIB([svld], [dlopen], + [AC_DEFINE([HAVE_LIBDL], [1], + [Define if you have the libdl library or equivalent.]) + LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes"], + [AC_CHECK_LIB([dld], [dld_link], + [AC_DEFINE([HAVE_DLD], [1], + [Define if you have the GNU dld library.]) + LIBADD_DL="$LIBADD_DL -ldld"], + [AC_CHECK_FUNC([_dyld_func_lookup], + [AC_DEFINE([HAVE_DYLD], [1], + [Define if you have the _dyld_func_lookup function.])]) + ]) + ]) + ]) + ]) + ]) + ]) + + if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes + then + lt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBADD_DL" + AC_CHECK_FUNCS([dlerror]) + LIBS="$lt_save_LIBS" + fi + AC_LANG_POP + ])# AC_LTDL_DLLIB + + + # AC_LTDL_SYMBOL_USCORE + # --------------------- + # does the compiler prefix global symbols with an underscore? + AC_DEFUN([AC_LTDL_SYMBOL_USCORE], + [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) + AC_CACHE_CHECK([for _ prefix in compiled symbols], + [ac_cv_sys_symbol_underscore], + [ac_cv_sys_symbol_underscore=no + cat > conftest.$ac_ext < $ac_nlist) && test -s "$ac_nlist"; then + # See whether the symbols have a leading underscore. + if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then + ac_cv_sys_symbol_underscore=yes + else + if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then + : + else + echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC + fi + fi + else + echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC + fi + else + echo "configure: failed program was:" >&AC_FD_CC + cat conftest.c >&AC_FD_CC + fi + rm -rf conftest* + ]) + ])# AC_LTDL_SYMBOL_USCORE + + + # AC_LTDL_DLSYM_USCORE + # -------------------- + AC_DEFUN([AC_LTDL_DLSYM_USCORE], + [AC_REQUIRE([AC_LTDL_SYMBOL_USCORE]) + if test x"$ac_cv_sys_symbol_underscore" = xyes; then + if test x"$libltdl_cv_func_dlopen" = xyes || + test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then + AC_CACHE_CHECK([whether we have to add an underscore for dlsym], + [libltdl_cv_need_uscore], + [libltdl_cv_need_uscore=unknown + save_LIBS="$LIBS" + LIBS="$LIBS $LIBADD_DL" + _LT_AC_TRY_DLOPEN_SELF( + [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes], + [], [libltdl_cv_need_uscore=cross]) + LIBS="$save_LIBS" + ]) + fi + fi + + if test x"$libltdl_cv_need_uscore" = xyes; then + AC_DEFINE(NEED_USCORE, 1, + [Define if dlsym() requires a leading underscore in symbol names.]) + fi + ])# AC_LTDL_DLSYM_USCORE + + # AC_LTDL_FUNC_ARGZ + # ----------------- + AC_DEFUN([AC_LTDL_FUNC_ARGZ], + [AC_CHECK_HEADERS([argz.h]) + + AC_CHECK_TYPES([error_t], + [], + [AC_DEFINE([error_t], [int], + [Define to a type to use for `error_t' if it is not otherwise available.])], + [#if HAVE_ARGZ_H + # include + #endif]) + + AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify]) + ])# AC_LTDL_FUNC_ARGZ From reid at x10sys.com Mon Nov 29 05:27:22 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 05:27:22 -0600 Subject: [llvm-commits] CVS: llvm/autoconf/m4/ltdl.m4 Message-ID: <200411291127.FAA04324@zion.cs.uiuc.edu> Changes in directory llvm/autoconf/m4: ltdl.m4 updated: 1.1 -> 1.2 --- Log message: Converted with autoupdate for autoconf 2.50 -> 2.59 differences. --- Diffs of the changes: (+9 -12) Index: llvm/autoconf/m4/ltdl.m4 diff -u llvm/autoconf/m4/ltdl.m4:1.1 llvm/autoconf/m4/ltdl.m4:1.2 --- llvm/autoconf/m4/ltdl.m4:1.1 Mon Nov 29 04:56:45 2004 +++ llvm/autoconf/m4/ltdl.m4 Mon Nov 29 05:27:12 2004 @@ -75,7 +75,7 @@ # Perform all the checks necessary for compilation of the ltdl objects # -- including compiler checks and header checks. AC_DEFUN([AC_LIB_LTDL], -[AC_PREREQ(2.50) +[AC_PREREQ(2.59) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_C_CONST]) AC_REQUIRE([AC_HEADER_STDC]) @@ -110,7 +110,7 @@ # ---------------------- AC_DEFUN([AC_LTDL_ENABLE_INSTALL], [AC_ARG_ENABLE([ltdl-install], - [AC_HELP_STRING([--enable-ltdl-install], [install libltdl])]) + [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])]) AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno) @@ -313,14 +313,11 @@ [AC_DEFINE([HAVE_LIBDL], [1], [Define if you have the libdl library or equivalent.]) LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes"], - [AC_TRY_LINK([#if HAVE_DLFCN_H + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H # include #endif - ], - [dlopen(0, 0);], - [AC_DEFINE([HAVE_LIBDL], [1], - [Define if you have the libdl library or equivalent.]) libltdl_cv_func_dlopen="yes"], - [AC_CHECK_LIB([svld], [dlopen], + ]], [[dlopen(0, 0);]])],[AC_DEFINE([HAVE_LIBDL], [1], + [Define if you have the libdl library or equivalent.]) libltdl_cv_func_dlopen="yes"],[AC_CHECK_LIB([svld], [dlopen], [AC_DEFINE([HAVE_LIBDL], [1], [Define if you have the libdl library or equivalent.]) LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes"], @@ -372,15 +369,15 @@ if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then : else - echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC + echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD() fi fi else - echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC + echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD() fi else - echo "configure: failed program was:" >&AC_FD_CC - cat conftest.c >&AC_FD_CC + echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD() + cat conftest.c >&AS_MESSAGE_LOG_FD() fi rm -rf conftest* ]) From reid at x10sys.com Mon Nov 29 06:02:36 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 06:02:36 -0600 Subject: [llvm-commits] CVS: llvm/lib/System/ltdl.c Message-ID: <200411291202.GAA04509@zion.cs.uiuc.edu> Changes in directory llvm/lib/System: ltdl.c added (r1.1) --- Log message: Original version of ltdl.c from libtool 1.5.10 --- Diffs of the changes: (+4495 -0) Index: llvm/lib/System/ltdl.c diff -c /dev/null llvm/lib/System/ltdl.c:1.1 *** /dev/null Mon Nov 29 06:02:35 2004 --- llvm/lib/System/ltdl.c Mon Nov 29 06:02:25 2004 *************** *** 0 **** --- 1,4495 ---- + /* ltdl.c -- system independent dlopen wrapper + Copyright (C) 1998, 1999, 2000, 2004 Free Software Foundation, Inc. + Originally by Thomas Tanner + This file is part of GNU Libtool. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + As a special exception to the GNU Lesser General Public License, + if you distribute this file as part of a program or library that + is built using GNU libtool, you may include it under the same + distribution terms that you use for the rest of that program. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA + + */ + + #if HAVE_CONFIG_H + # include + #endif + + #if HAVE_UNISTD_H + # include + #endif + + #if HAVE_STDIO_H + # include + #endif + + /* Include the header defining malloc. On K&R C compilers, + that's , on ANSI C and ISO C compilers, that's . */ + #if HAVE_STDLIB_H + # include + #else + # if HAVE_MALLOC_H + # include + # endif + #endif + + #if HAVE_STRING_H + # include + #else + # if HAVE_STRINGS_H + # include + # endif + #endif + + #if HAVE_CTYPE_H + # include + #endif + + #if HAVE_MEMORY_H + # include + #endif + + #if HAVE_ERRNO_H + # include + #endif + + + #ifndef __WINDOWS__ + # ifdef __WIN32__ + # define __WINDOWS__ + # endif + #endif + + + #undef LT_USE_POSIX_DIRENT + #ifdef HAVE_CLOSEDIR + # ifdef HAVE_OPENDIR + # ifdef HAVE_READDIR + # ifdef HAVE_DIRENT_H + # define LT_USE_POSIX_DIRENT + # endif /* HAVE_DIRENT_H */ + # endif /* HAVE_READDIR */ + # endif /* HAVE_OPENDIR */ + #endif /* HAVE_CLOSEDIR */ + + + #undef LT_USE_WINDOWS_DIRENT_EMULATION + #ifndef LT_USE_POSIX_DIRENT + # ifdef __WINDOWS__ + # define LT_USE_WINDOWS_DIRENT_EMULATION + # endif /* __WINDOWS__ */ + #endif /* LT_USE_POSIX_DIRENT */ + + + #ifdef LT_USE_POSIX_DIRENT + # include + # define LT_D_NAMLEN(dirent) (strlen((dirent)->d_name)) + #else + # ifdef LT_USE_WINDOWS_DIRENT_EMULATION + # define LT_D_NAMLEN(dirent) (strlen((dirent)->d_name)) + # else + # define dirent direct + # define LT_D_NAMLEN(dirent) ((dirent)->d_namlen) + # if HAVE_SYS_NDIR_H + # include + # endif + # if HAVE_SYS_DIR_H + # include + # endif + # if HAVE_NDIR_H + # include + # endif + # endif + #endif + + #if HAVE_ARGZ_H + # include + #endif + + #if HAVE_ASSERT_H + # include + #else + # define assert(arg) ((void) 0) + #endif + + #include "ltdl.h" + + #if WITH_DMALLOC + # include + #endif + + + + + /* --- WINDOWS SUPPORT --- */ + + + #ifdef DLL_EXPORT + # define LT_GLOBAL_DATA __declspec(dllexport) + #else + # define LT_GLOBAL_DATA + #endif + + /* fopen() mode flags for reading a text file */ + #undef LT_READTEXT_MODE + #ifdef __WINDOWS__ + # define LT_READTEXT_MODE "rt" + #else + # define LT_READTEXT_MODE "r" + #endif + + #ifdef LT_USE_WINDOWS_DIRENT_EMULATION + + #include + + #define dirent lt_dirent + #define DIR lt_DIR + + struct dirent + { + char d_name[2048]; + int d_namlen; + }; + + typedef struct _DIR + { + HANDLE hSearch; + WIN32_FIND_DATA Win32FindData; + BOOL firsttime; + struct dirent file_info; + } DIR; + + #endif /* LT_USE_WINDOWS_DIRENT_EMULATION */ + + + /* --- MANIFEST CONSTANTS --- */ + + + /* Standard libltdl search path environment variable name */ + #undef LTDL_SEARCHPATH_VAR + #define LTDL_SEARCHPATH_VAR "LTDL_LIBRARY_PATH" + + /* Standard libtool archive file extension. */ + #undef LTDL_ARCHIVE_EXT + #define LTDL_ARCHIVE_EXT ".la" + + /* max. filename length */ + #ifndef LT_FILENAME_MAX + # define LT_FILENAME_MAX 1024 + #endif + + /* This is the maximum symbol size that won't require malloc/free */ + #undef LT_SYMBOL_LENGTH + #define LT_SYMBOL_LENGTH 128 + + /* This accounts for the _LTX_ separator */ + #undef LT_SYMBOL_OVERHEAD + #define LT_SYMBOL_OVERHEAD 5 + + + + + /* --- MEMORY HANDLING --- */ + + + /* These are the functions used internally. In addition to making + use of the associated function pointers above, they also perform + error handling. */ + static char *lt_estrdup LT_PARAMS((const char *str)); + static lt_ptr lt_emalloc LT_PARAMS((size_t size)); + static lt_ptr lt_erealloc LT_PARAMS((lt_ptr addr, size_t size)); + + /* static lt_ptr rpl_realloc LT_PARAMS((lt_ptr ptr, size_t size)); */ + #define rpl_realloc realloc + + /* These are the pointers that can be changed by the caller: */ + LT_GLOBAL_DATA lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size)) + = (lt_ptr (*) LT_PARAMS((size_t))) malloc; + LT_GLOBAL_DATA lt_ptr (*lt_dlrealloc) LT_PARAMS((lt_ptr ptr, size_t size)) + = (lt_ptr (*) LT_PARAMS((lt_ptr, size_t))) rpl_realloc; + LT_GLOBAL_DATA void (*lt_dlfree) LT_PARAMS((lt_ptr ptr)) + = (void (*) LT_PARAMS((lt_ptr))) free; + + /* The following macros reduce the amount of typing needed to cast + assigned memory. */ + #if WITH_DMALLOC + + #define LT_DLMALLOC(tp, n) ((tp *) xmalloc ((n) * sizeof(tp))) + #define LT_DLREALLOC(tp, p, n) ((tp *) xrealloc ((p), (n) * sizeof(tp))) + #define LT_DLFREE(p) \ + LT_STMT_START { if (p) (p) = (xfree (p), (lt_ptr) 0); } LT_STMT_END + + #define LT_EMALLOC(tp, n) ((tp *) xmalloc ((n) * sizeof(tp))) + #define LT_EREALLOC(tp, p, n) ((tp *) xrealloc ((p), (n) * sizeof(tp))) + + #else + + #define LT_DLMALLOC(tp, n) ((tp *) lt_dlmalloc ((n) * sizeof(tp))) + #define LT_DLREALLOC(tp, p, n) ((tp *) lt_dlrealloc ((p), (n) * sizeof(tp))) + #define LT_DLFREE(p) \ + LT_STMT_START { if (p) (p) = (lt_dlfree (p), (lt_ptr) 0); } LT_STMT_END + + #define LT_EMALLOC(tp, n) ((tp *) lt_emalloc ((n) * sizeof(tp))) + #define LT_EREALLOC(tp, p, n) ((tp *) lt_erealloc ((p), (n) * sizeof(tp))) + + #endif + + #define LT_DLMEM_REASSIGN(p, q) LT_STMT_START { \ + if ((p) != (q)) { if (p) lt_dlfree (p); (p) = (q); (q) = 0; } \ + } LT_STMT_END + + + /* --- REPLACEMENT FUNCTIONS --- */ + + + #undef strdup + #define strdup rpl_strdup + + static char *strdup LT_PARAMS((const char *str)); + + static char * + strdup(str) + const char *str; + { + char *tmp = 0; + + if (str) + { + tmp = LT_DLMALLOC (char, 1+ strlen (str)); + if (tmp) + { + strcpy(tmp, str); + } + } + + return tmp; + } + + + #if ! HAVE_STRCMP + + #undef strcmp + #define strcmp rpl_strcmp + + static int strcmp LT_PARAMS((const char *str1, const char *str2)); + + static int + strcmp (str1, str2) + const char *str1; + const char *str2; + { + if (str1 == str2) + return 0; + if (str1 == 0) + return -1; + if (str2 == 0) + return 1; + + for (;*str1 && *str2; ++str1, ++str2) + { + if (*str1 != *str2) + break; + } + + return (int)(*str1 - *str2); + } + #endif + + + #if ! HAVE_STRCHR + + # if HAVE_INDEX + # define strchr index + # else + # define strchr rpl_strchr + + static const char *strchr LT_PARAMS((const char *str, int ch)); + + static const char* + strchr(str, ch) + const char *str; + int ch; + { + const char *p; + + for (p = str; *p != (char)ch && *p != LT_EOS_CHAR; ++p) + /*NOWORK*/; + + return (*p == (char)ch) ? p : 0; + } + + # endif + #endif /* !HAVE_STRCHR */ + + + #if ! HAVE_STRRCHR + + # if HAVE_RINDEX + # define strrchr rindex + # else + # define strrchr rpl_strrchr + + static const char *strrchr LT_PARAMS((const char *str, int ch)); + + static const char* + strrchr(str, ch) + const char *str; + int ch; + { + const char *p, *q = 0; + + for (p = str; *p != LT_EOS_CHAR; ++p) + { + if (*p == (char) ch) + { + q = p; + } + } + + return q; + } + + # endif + #endif + + /* NOTE: Neither bcopy nor the memcpy implementation below can + reliably handle copying in overlapping areas of memory. Use + memmove (for which there is a fallback implmentation below) + if you need that behaviour. */ + #if ! HAVE_MEMCPY + + # if HAVE_BCOPY + # define memcpy(dest, src, size) bcopy (src, dest, size) + # else + # define memcpy rpl_memcpy + + static lt_ptr memcpy LT_PARAMS((lt_ptr dest, const lt_ptr src, size_t size)); + + static lt_ptr + memcpy (dest, src, size) + lt_ptr dest; + const lt_ptr src; + size_t size; + { + const char * s = src; + char * d = dest; + size_t i = 0; + + for (i = 0; i < size; ++i) + { + d[i] = s[i]; + } + + return dest; + } + + # endif /* !HAVE_BCOPY */ + #endif /* !HAVE_MEMCPY */ + + #if ! HAVE_MEMMOVE + # define memmove rpl_memmove + + static lt_ptr memmove LT_PARAMS((lt_ptr dest, const lt_ptr src, size_t size)); + + static lt_ptr + memmove (dest, src, size) + lt_ptr dest; + const lt_ptr src; + size_t size; + { + const char * s = src; + char * d = dest; + size_t i; + + if (d < s) + for (i = 0; i < size; ++i) + { + d[i] = s[i]; + } + else if (d > s && size > 0) + for (i = size -1; ; --i) + { + d[i] = s[i]; + if (i == 0) + break; + } + + return dest; + } + + #endif /* !HAVE_MEMMOVE */ + + #ifdef LT_USE_WINDOWS_DIRENT_EMULATION + + static void closedir LT_PARAMS((DIR *entry)); + + static void + closedir(entry) + DIR *entry; + { + assert(entry != (DIR *) NULL); + FindClose(entry->hSearch); + lt_dlfree((lt_ptr)entry); + } + + + static DIR * opendir LT_PARAMS((const char *path)); + + static DIR* + opendir (path) + const char *path; + { + char file_specification[LT_FILENAME_MAX]; + DIR *entry; + + assert(path != (char *) NULL); + (void) strncpy(file_specification,path,LT_FILENAME_MAX-1); + (void) strcat(file_specification,"\\"); + entry = LT_DLMALLOC (DIR,sizeof(DIR)); + if (entry != (DIR *) 0) + { + entry->firsttime = TRUE; + entry->hSearch = FindFirstFile(file_specification,&entry->Win32FindData); + } + if (entry->hSearch == INVALID_HANDLE_VALUE) + { + (void) strcat(file_specification,"\\*.*"); + entry->hSearch = FindFirstFile(file_specification,&entry->Win32FindData); + if (entry->hSearch == INVALID_HANDLE_VALUE) + { + LT_DLFREE (entry); + return (DIR *) 0; + } + } + return(entry); + } + + + static struct dirent *readdir LT_PARAMS((DIR *entry)); + + static struct dirent *readdir(entry) + DIR *entry; + { + int + status; + + if (entry == (DIR *) 0) + return((struct dirent *) 0); + if (!entry->firsttime) + { + status = FindNextFile(entry->hSearch,&entry->Win32FindData); + if (status == 0) + return((struct dirent *) 0); + } + entry->firsttime = FALSE; + (void) strncpy(entry->file_info.d_name,entry->Win32FindData.cFileName, + LT_FILENAME_MAX-1); + entry->file_info.d_namlen = strlen(entry->file_info.d_name); + return(&entry->file_info); + } + + #endif /* LT_USE_WINDOWS_DIRENT_EMULATION */ + + /* According to Alexandre Oliva , + ``realloc is not entirely portable'' + In any case we want to use the allocator supplied by the user without + burdening them with an lt_dlrealloc function pointer to maintain. + Instead implement our own version (with known boundary conditions) + using lt_dlmalloc and lt_dlfree. */ + + /* #undef realloc + #define realloc rpl_realloc + */ + #if 0 + /* You can't (re)define realloc unless you also (re)define malloc. + Right now, this code uses the size of the *destination* to decide + how much to copy. That's not right, but you can't know the size + of the source unless you know enough about, or wrote malloc. So + this code is disabled... */ + + static lt_ptr + realloc (ptr, size) + lt_ptr ptr; + size_t size; + { + if (size == 0) + { + /* For zero or less bytes, free the original memory */ + if (ptr != 0) + { + lt_dlfree (ptr); + } + + return (lt_ptr) 0; + } + else if (ptr == 0) + { + /* Allow reallocation of a NULL pointer. */ + return lt_dlmalloc (size); + } + else + { + /* Allocate a new block, copy and free the old block. */ + lt_ptr mem = lt_dlmalloc (size); + + if (mem) + { + memcpy (mem, ptr, size); + lt_dlfree (ptr); + } + + /* Note that the contents of PTR are not damaged if there is + insufficient memory to realloc. */ + return mem; + } + } + #endif + + + #if ! HAVE_ARGZ_APPEND + # define argz_append rpl_argz_append + + static error_t argz_append LT_PARAMS((char **pargz, size_t *pargz_len, + const char *buf, size_t buf_len)); + + static error_t + argz_append (pargz, pargz_len, buf, buf_len) + char **pargz; + size_t *pargz_len; + const char *buf; + size_t buf_len; + { + size_t argz_len; + char *argz; + + assert (pargz); + assert (pargz_len); + assert ((*pargz && *pargz_len) || (!*pargz && !*pargz_len)); + + /* If nothing needs to be appended, no more work is required. */ + if (buf_len == 0) + return 0; + + /* Ensure there is enough room to append BUF_LEN. */ + argz_len = *pargz_len + buf_len; + argz = LT_DLREALLOC (char, *pargz, argz_len); + if (!argz) + return ENOMEM; + + /* Copy characters from BUF after terminating '\0' in ARGZ. */ + memcpy (argz + *pargz_len, buf, buf_len); + + /* Assign new values. */ + *pargz = argz; + *pargz_len = argz_len; + + return 0; + } + #endif /* !HAVE_ARGZ_APPEND */ + + + #if ! HAVE_ARGZ_CREATE_SEP + # define argz_create_sep rpl_argz_create_sep + + static error_t argz_create_sep LT_PARAMS((const char *str, int delim, + char **pargz, size_t *pargz_len)); + + static error_t + argz_create_sep (str, delim, pargz, pargz_len) + const char *str; + int delim; + char **pargz; + size_t *pargz_len; + { + size_t argz_len; + char *argz = 0; + + assert (str); + assert (pargz); + assert (pargz_len); + + /* Make a copy of STR, but replacing each occurence of + DELIM with '\0'. */ + argz_len = 1+ LT_STRLEN (str); + if (argz_len) + { + const char *p; + char *q; + + argz = LT_DLMALLOC (char, argz_len); + if (!argz) + return ENOMEM; + + for (p = str, q = argz; *p != LT_EOS_CHAR; ++p) + { + if (*p == delim) + { + /* Ignore leading delimiters, and fold consecutive + delimiters in STR into a single '\0' in ARGZ. */ + if ((q > argz) && (q[-1] != LT_EOS_CHAR)) + *q++ = LT_EOS_CHAR; + else + --argz_len; + } + else + *q++ = *p; + } + /* Copy terminating LT_EOS_CHAR. */ + *q = *p; + } + + /* If ARGZ_LEN has shrunk to nothing, release ARGZ's memory. */ + if (!argz_len) + LT_DLFREE (argz); + + /* Assign new values. */ + *pargz = argz; + *pargz_len = argz_len; + + return 0; + } + #endif /* !HAVE_ARGZ_CREATE_SEP */ + + + #if ! HAVE_ARGZ_INSERT + # define argz_insert rpl_argz_insert + + static error_t argz_insert LT_PARAMS((char **pargz, size_t *pargz_len, + char *before, const char *entry)); + + static error_t + argz_insert (pargz, pargz_len, before, entry) + char **pargz; + size_t *pargz_len; + char *before; + const char *entry; + { + assert (pargz); + assert (pargz_len); + assert (entry && *entry); + + /* No BEFORE address indicates ENTRY should be inserted after the + current last element. */ + if (!before) + return argz_append (pargz, pargz_len, entry, 1+ LT_STRLEN (entry)); + + /* This probably indicates a programmer error, but to preserve + semantics, scan back to the start of an entry if BEFORE points + into the middle of it. */ + while ((before > *pargz) && (before[-1] != LT_EOS_CHAR)) + --before; + + { + size_t entry_len = 1+ LT_STRLEN (entry); + size_t argz_len = *pargz_len + entry_len; + size_t offset = before - *pargz; + char *argz = LT_DLREALLOC (char, *pargz, argz_len); + + if (!argz) + return ENOMEM; + + /* Make BEFORE point to the equivalent offset in ARGZ that it + used to have in *PARGZ incase realloc() moved the block. */ + before = argz + offset; + + /* Move the ARGZ entries starting at BEFORE up into the new + space at the end -- making room to copy ENTRY into the + resulting gap. */ + memmove (before + entry_len, before, *pargz_len - offset); + memcpy (before, entry, entry_len); + + /* Assign new values. */ + *pargz = argz; + *pargz_len = argz_len; + } + + return 0; + } + #endif /* !HAVE_ARGZ_INSERT */ + + + #if ! HAVE_ARGZ_NEXT + # define argz_next rpl_argz_next + + static char *argz_next LT_PARAMS((char *argz, size_t argz_len, + const char *entry)); + + static char * + argz_next (argz, argz_len, entry) + char *argz; + size_t argz_len; + const char *entry; + { + assert ((argz && argz_len) || (!argz && !argz_len)); + + if (entry) + { + /* Either ARGZ/ARGZ_LEN is empty, or ENTRY points into an address + within the ARGZ vector. */ + assert ((!argz && !argz_len) + || ((argz <= entry) && (entry < (argz + argz_len)))); + + /* Move to the char immediately after the terminating + '\0' of ENTRY. */ + entry = 1+ strchr (entry, LT_EOS_CHAR); + + /* Return either the new ENTRY, or else NULL if ARGZ is + exhausted. */ + return (entry >= argz + argz_len) ? 0 : (char *) entry; + } + else + { + /* This should probably be flagged as a programmer error, + since starting an argz_next loop with the iterator set + to ARGZ is safer. To preserve semantics, handle the NULL + case by returning the start of ARGZ (if any). */ + if (argz_len > 0) + return argz; + else + return 0; + } + } + #endif /* !HAVE_ARGZ_NEXT */ + + + + #if ! HAVE_ARGZ_STRINGIFY + # define argz_stringify rpl_argz_stringify + + static void argz_stringify LT_PARAMS((char *argz, size_t argz_len, + int sep)); + + static void + argz_stringify (argz, argz_len, sep) + char *argz; + size_t argz_len; + int sep; + { + assert ((argz && argz_len) || (!argz && !argz_len)); + + if (sep) + { + --argz_len; /* don't stringify the terminating EOS */ + while (--argz_len > 0) + { + if (argz[argz_len] == LT_EOS_CHAR) + argz[argz_len] = sep; + } + } + } + #endif /* !HAVE_ARGZ_STRINGIFY */ + + + + + /* --- TYPE DEFINITIONS -- */ + + + /* This type is used for the array of caller data sets in each handler. */ + typedef struct { + lt_dlcaller_id key; + lt_ptr data; + } lt_caller_data; + + + + + /* --- OPAQUE STRUCTURES DECLARED IN LTDL.H --- */ + + + /* Extract the diagnostic strings from the error table macro in the same + order as the enumerated indices in ltdl.h. */ + + static const char *lt_dlerror_strings[] = + { + #define LT_ERROR(name, diagnostic) (diagnostic), + lt_dlerror_table + #undef LT_ERROR + + 0 + }; + + /* This structure is used for the list of registered loaders. */ + struct lt_dlloader { + struct lt_dlloader *next; + const char *loader_name; /* identifying name for each loader */ + const char *sym_prefix; /* prefix for symbols */ + lt_module_open *module_open; + lt_module_close *module_close; + lt_find_sym *find_sym; + lt_dlloader_exit *dlloader_exit; + lt_user_data dlloader_data; + }; + + struct lt_dlhandle_struct { + struct lt_dlhandle_struct *next; + lt_dlloader *loader; /* dlopening interface */ + lt_dlinfo info; + int depcount; /* number of dependencies */ + lt_dlhandle *deplibs; /* dependencies */ + lt_module module; /* system module handle */ + lt_ptr system; /* system specific data */ + lt_caller_data *caller_data; /* per caller associated data */ + int flags; /* various boolean stats */ + }; + + /* Various boolean flags can be stored in the flags field of an + lt_dlhandle_struct... */ + #define LT_DLGET_FLAG(handle, flag) (((handle)->flags & (flag)) == (flag)) + #define LT_DLSET_FLAG(handle, flag) ((handle)->flags |= (flag)) + + #define LT_DLRESIDENT_FLAG (0x01 << 0) + /* ...add more flags here... */ + + #define LT_DLIS_RESIDENT(handle) LT_DLGET_FLAG(handle, LT_DLRESIDENT_FLAG) + + + #define LT_DLSTRERROR(name) lt_dlerror_strings[LT_CONC(LT_ERROR_,name)] + + static const char objdir[] = LTDL_OBJDIR; + static const char archive_ext[] = LTDL_ARCHIVE_EXT; + #ifdef LTDL_SHLIB_EXT + static const char shlib_ext[] = LTDL_SHLIB_EXT; + #endif + #ifdef LTDL_SYSSEARCHPATH + static const char sys_search_path[] = LTDL_SYSSEARCHPATH; + #endif + + + + + /* --- MUTEX LOCKING --- */ + + + /* Macros to make it easier to run the lock functions only if they have + been registered. The reason for the complicated lock macro is to + ensure that the stored error message from the last error is not + accidentally erased if the current function doesn't generate an + error of its own. */ + #define LT_DLMUTEX_LOCK() LT_STMT_START { \ + if (lt_dlmutex_lock_func) (*lt_dlmutex_lock_func)(); \ + } LT_STMT_END + #define LT_DLMUTEX_UNLOCK() LT_STMT_START { \ + if (lt_dlmutex_unlock_func) (*lt_dlmutex_unlock_func)();\ + } LT_STMT_END + #define LT_DLMUTEX_SETERROR(errormsg) LT_STMT_START { \ + if (lt_dlmutex_seterror_func) \ + (*lt_dlmutex_seterror_func) (errormsg); \ + else lt_dllast_error = (errormsg); } LT_STMT_END + #define LT_DLMUTEX_GETERROR(errormsg) LT_STMT_START { \ + if (lt_dlmutex_seterror_func) \ + (errormsg) = (*lt_dlmutex_geterror_func) (); \ + else (errormsg) = lt_dllast_error; } LT_STMT_END + + /* The mutex functions stored here are global, and are necessarily the + same for all threads that wish to share access to libltdl. */ + static lt_dlmutex_lock *lt_dlmutex_lock_func = 0; + static lt_dlmutex_unlock *lt_dlmutex_unlock_func = 0; + static lt_dlmutex_seterror *lt_dlmutex_seterror_func = 0; + static lt_dlmutex_geterror *lt_dlmutex_geterror_func = 0; + static const char *lt_dllast_error = 0; + + + /* Either set or reset the mutex functions. Either all the arguments must + be valid functions, or else all can be NULL to turn off locking entirely. + The registered functions should be manipulating a static global lock + from the lock() and unlock() callbacks, which needs to be reentrant. */ + int + lt_dlmutex_register (lock, unlock, seterror, geterror) + lt_dlmutex_lock *lock; + lt_dlmutex_unlock *unlock; + lt_dlmutex_seterror *seterror; + lt_dlmutex_geterror *geterror; + { + lt_dlmutex_unlock *old_unlock = unlock; + int errors = 0; + + /* Lock using the old lock() callback, if any. */ + LT_DLMUTEX_LOCK (); + + if ((lock && unlock && seterror && geterror) + || !(lock || unlock || seterror || geterror)) + { + lt_dlmutex_lock_func = lock; + lt_dlmutex_unlock_func = unlock; + lt_dlmutex_geterror_func = geterror; + } + else + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_MUTEX_ARGS)); + ++errors; + } + + /* Use the old unlock() callback we saved earlier, if any. Otherwise + record any errors using internal storage. */ + if (old_unlock) + (*old_unlock) (); + + /* Return the number of errors encountered during the execution of + this function. */ + return errors; + } + + + + + /* --- ERROR HANDLING --- */ + + + static const char **user_error_strings = 0; + static int errorcount = LT_ERROR_MAX; + + int + lt_dladderror (diagnostic) + const char *diagnostic; + { + int errindex = 0; + int result = -1; + const char **temp = (const char **) 0; + + assert (diagnostic); + + LT_DLMUTEX_LOCK (); + + errindex = errorcount - LT_ERROR_MAX; + temp = LT_EREALLOC (const char *, user_error_strings, 1 + errindex); + if (temp) + { + user_error_strings = temp; + user_error_strings[errindex] = diagnostic; + result = errorcount++; + } + + LT_DLMUTEX_UNLOCK (); + + return result; + } + + int + lt_dlseterror (errindex) + int errindex; + { + int errors = 0; + + LT_DLMUTEX_LOCK (); + + if (errindex >= errorcount || errindex < 0) + { + /* Ack! Error setting the error message! */ + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_ERRORCODE)); + ++errors; + } + else if (errindex < LT_ERROR_MAX) + { + /* No error setting the error message! */ + LT_DLMUTEX_SETERROR (lt_dlerror_strings[errindex]); + } + else + { + /* No error setting the error message! */ + LT_DLMUTEX_SETERROR (user_error_strings[errindex - LT_ERROR_MAX]); + } + + LT_DLMUTEX_UNLOCK (); + + return errors; + } + + static lt_ptr + lt_emalloc (size) + size_t size; + { + lt_ptr mem = lt_dlmalloc (size); + if (size && !mem) + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); + return mem; + } + + static lt_ptr + lt_erealloc (addr, size) + lt_ptr addr; + size_t size; + { + lt_ptr mem = lt_dlrealloc (addr, size); + if (size && !mem) + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); + return mem; + } + + static char * + lt_estrdup (str) + const char *str; + { + char *copy = strdup (str); + if (LT_STRLEN (str) && !copy) + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); + return copy; + } + + + + + /* --- DLOPEN() INTERFACE LOADER --- */ + + + #if HAVE_LIBDL + + /* dynamic linking with dlopen/dlsym */ + + #if HAVE_DLFCN_H + # include + #endif + + #if HAVE_SYS_DL_H + # include + #endif + + #ifdef RTLD_GLOBAL + # define LT_GLOBAL RTLD_GLOBAL + #else + # ifdef DL_GLOBAL + # define LT_GLOBAL DL_GLOBAL + # endif + #endif /* !RTLD_GLOBAL */ + #ifndef LT_GLOBAL + # define LT_GLOBAL 0 + #endif /* !LT_GLOBAL */ + + /* We may have to define LT_LAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ + #ifndef LT_LAZY_OR_NOW + # ifdef RTLD_LAZY + # define LT_LAZY_OR_NOW RTLD_LAZY + # else + # ifdef DL_LAZY + # define LT_LAZY_OR_NOW DL_LAZY + # endif + # endif /* !RTLD_LAZY */ + #endif + #ifndef LT_LAZY_OR_NOW + # ifdef RTLD_NOW + # define LT_LAZY_OR_NOW RTLD_NOW + # else + # ifdef DL_NOW + # define LT_LAZY_OR_NOW DL_NOW + # endif + # endif /* !RTLD_NOW */ + #endif + #ifndef LT_LAZY_OR_NOW + # define LT_LAZY_OR_NOW 0 + #endif /* !LT_LAZY_OR_NOW */ + + #if HAVE_DLERROR + # define DLERROR(arg) dlerror () + #else + # define DLERROR(arg) LT_DLSTRERROR (arg) + #endif + + static lt_module + sys_dl_open (loader_data, filename) + lt_user_data loader_data; + const char *filename; + { + lt_module module = dlopen (filename, LT_GLOBAL | LT_LAZY_OR_NOW); + + if (!module) + { + LT_DLMUTEX_SETERROR (DLERROR (CANNOT_OPEN)); + } + + return module; + } + + static int + sys_dl_close (loader_data, module) + lt_user_data loader_data; + lt_module module; + { + int errors = 0; + + if (dlclose (module) != 0) + { + LT_DLMUTEX_SETERROR (DLERROR (CANNOT_CLOSE)); + ++errors; + } + + return errors; + } + + static lt_ptr + sys_dl_sym (loader_data, module, symbol) + lt_user_data loader_data; + lt_module module; + const char *symbol; + { + lt_ptr address = dlsym (module, symbol); + + if (!address) + { + LT_DLMUTEX_SETERROR (DLERROR (SYMBOL_NOT_FOUND)); + } + + return address; + } + + static struct lt_user_dlloader sys_dl = + { + # ifdef NEED_USCORE + "_", + # else + 0, + # endif + sys_dl_open, sys_dl_close, sys_dl_sym, 0, 0 }; + + + #endif /* HAVE_LIBDL */ + + + + /* --- SHL_LOAD() INTERFACE LOADER --- */ + + #if HAVE_SHL_LOAD + + /* dynamic linking with shl_load (HP-UX) (comments from gmodule) */ + + #ifdef HAVE_DL_H + # include + #endif + + /* some flags are missing on some systems, so we provide + * harmless defaults. + * + * Mandatory: + * BIND_IMMEDIATE - Resolve symbol references when the library is loaded. + * BIND_DEFERRED - Delay code symbol resolution until actual reference. + * + * Optionally: + * BIND_FIRST - Place the library at the head of the symbol search + * order. + * BIND_NONFATAL - The default BIND_IMMEDIATE behavior is to treat all + * unsatisfied symbols as fatal. This flag allows + * binding of unsatisfied code symbols to be deferred + * until use. + * [Perl: For certain libraries, like DCE, deferred + * binding often causes run time problems. Adding + * BIND_NONFATAL to BIND_IMMEDIATE still allows + * unresolved references in situations like this.] + * BIND_NOSTART - Do not call the initializer for the shared library + * when the library is loaded, nor on a future call to + * shl_unload(). + * BIND_VERBOSE - Print verbose messages concerning possible + * unsatisfied symbols. + * + * hp9000s700/hp9000s800: + * BIND_RESTRICTED - Restrict symbols visible by the library to those + * present at library load time. + * DYNAMIC_PATH - Allow the loader to dynamically search for the + * library specified by the path argument. + */ + + #ifndef DYNAMIC_PATH + # define DYNAMIC_PATH 0 + #endif + #ifndef BIND_RESTRICTED + # define BIND_RESTRICTED 0 + #endif + + #define LT_BIND_FLAGS (BIND_IMMEDIATE | BIND_NONFATAL | DYNAMIC_PATH) + + static lt_module + sys_shl_open (loader_data, filename) + lt_user_data loader_data; + const char *filename; + { + static shl_t self = (shl_t) 0; + lt_module module = shl_load (filename, LT_BIND_FLAGS, 0L); + + /* Since searching for a symbol against a NULL module handle will also + look in everything else that was already loaded and exported with + the -E compiler flag, we always cache a handle saved before any + modules are loaded. */ + if (!self) + { + lt_ptr address; + shl_findsym (&self, "main", TYPE_UNDEFINED, &address); + } + + if (!filename) + { + module = self; + } + else + { + module = shl_load (filename, LT_BIND_FLAGS, 0L); + + if (!module) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); + } + } + + return module; + } + + static int + sys_shl_close (loader_data, module) + lt_user_data loader_data; + lt_module module; + { + int errors = 0; + + if (module && (shl_unload ((shl_t) (module)) != 0)) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); + ++errors; + } + + return errors; + } + + static lt_ptr + sys_shl_sym (loader_data, module, symbol) + lt_user_data loader_data; + lt_module module; + const char *symbol; + { + lt_ptr address = 0; + + /* sys_shl_open should never return a NULL module handle */ + if (module == (lt_module) 0) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); + } + else if (!shl_findsym((shl_t*) &module, symbol, TYPE_UNDEFINED, &address)) + { + if (!address) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); + } + } + + return address; + } + + static struct lt_user_dlloader sys_shl = { + 0, sys_shl_open, sys_shl_close, sys_shl_sym, 0, 0 + }; + + #endif /* HAVE_SHL_LOAD */ + + + + + /* --- LOADLIBRARY() INTERFACE LOADER --- */ + + #ifdef __WINDOWS__ + + /* dynamic linking for Win32 */ + + #include + + /* Forward declaration; required to implement handle search below. */ + static lt_dlhandle handles; + + static lt_module + sys_wll_open (loader_data, filename) + lt_user_data loader_data; + const char *filename; + { + lt_dlhandle cur; + lt_module module = 0; + const char *errormsg = 0; + char *searchname = 0; + char *ext; + char self_name_buf[MAX_PATH]; + + if (!filename) + { + /* Get the name of main module */ + *self_name_buf = 0; + GetModuleFileName (NULL, self_name_buf, sizeof (self_name_buf)); + filename = ext = self_name_buf; + } + else + { + ext = strrchr (filename, '.'); + } + + if (ext) + { + /* FILENAME already has an extension. */ + searchname = lt_estrdup (filename); + } + else + { + /* Append a `.' to stop Windows from adding an + implicit `.dll' extension. */ + searchname = LT_EMALLOC (char, 2+ LT_STRLEN (filename)); + if (searchname) + sprintf (searchname, "%s.", filename); + } + if (!searchname) + return 0; + + #if __CYGWIN__ + { + char wpath[MAX_PATH]; + cygwin_conv_to_full_win32_path(searchname, wpath); + module = LoadLibrary(wpath); + } + #else + module = LoadLibrary (searchname); + #endif + LT_DLFREE (searchname); + + /* libltdl expects this function to fail if it is unable + to physically load the library. Sadly, LoadLibrary + will search the loaded libraries for a match and return + one of them if the path search load fails. + + We check whether LoadLibrary is returning a handle to + an already loaded module, and simulate failure if we + find one. */ + LT_DLMUTEX_LOCK (); + cur = handles; + while (cur) + { + if (!cur->module) + { + cur = 0; + break; + } + + if (cur->module == module) + { + break; + } + + cur = cur->next; + } + LT_DLMUTEX_UNLOCK (); + + if (cur || !module) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); + module = 0; + } + + return module; + } + + static int + sys_wll_close (loader_data, module) + lt_user_data loader_data; + lt_module module; + { + int errors = 0; + + if (FreeLibrary(module) == 0) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); + ++errors; + } + + return errors; + } + + static lt_ptr + sys_wll_sym (loader_data, module, symbol) + lt_user_data loader_data; + lt_module module; + const char *symbol; + { + lt_ptr address = GetProcAddress (module, symbol); + + if (!address) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); + } + + return address; + } + + static struct lt_user_dlloader sys_wll = { + 0, sys_wll_open, sys_wll_close, sys_wll_sym, 0, 0 + }; + + #endif /* __WINDOWS__ */ + + + + + /* --- LOAD_ADD_ON() INTERFACE LOADER --- */ + + + #ifdef __BEOS__ + + /* dynamic linking for BeOS */ + + #include + + static lt_module + sys_bedl_open (loader_data, filename) + lt_user_data loader_data; + const char *filename; + { + image_id image = 0; + + if (filename) + { + image = load_add_on (filename); + } + else + { + image_info info; + int32 cookie = 0; + if (get_next_image_info (0, &cookie, &info) == B_OK) + image = load_add_on (info.name); + } + + if (image <= 0) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); + image = 0; + } + + return (lt_module) image; + } + + static int + sys_bedl_close (loader_data, module) + lt_user_data loader_data; + lt_module module; + { + int errors = 0; + + if (unload_add_on ((image_id) module) != B_OK) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); + ++errors; + } + + return errors; + } + + static lt_ptr + sys_bedl_sym (loader_data, module, symbol) + lt_user_data loader_data; + lt_module module; + const char *symbol; + { + lt_ptr address = 0; + image_id image = (image_id) module; + + if (get_image_symbol (image, symbol, B_SYMBOL_TYPE_ANY, address) != B_OK) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); + address = 0; + } + + return address; + } + + static struct lt_user_dlloader sys_bedl = { + 0, sys_bedl_open, sys_bedl_close, sys_bedl_sym, 0, 0 + }; + + #endif /* __BEOS__ */ + + + + + /* --- DLD_LINK() INTERFACE LOADER --- */ + + + #if HAVE_DLD + + /* dynamic linking with dld */ + + #if HAVE_DLD_H + #include + #endif + + static lt_module + sys_dld_open (loader_data, filename) + lt_user_data loader_data; + const char *filename; + { + lt_module module = strdup (filename); + + if (dld_link (filename) != 0) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); + LT_DLFREE (module); + module = 0; + } + + return module; + } + + static int + sys_dld_close (loader_data, module) + lt_user_data loader_data; + lt_module module; + { + int errors = 0; + + if (dld_unlink_by_file ((char*)(module), 1) != 0) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); + ++errors; + } + else + { + LT_DLFREE (module); + } + + return errors; + } + + static lt_ptr + sys_dld_sym (loader_data, module, symbol) + lt_user_data loader_data; + lt_module module; + const char *symbol; + { + lt_ptr address = dld_get_func (symbol); + + if (!address) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); + } + + return address; + } + + static struct lt_user_dlloader sys_dld = { + 0, sys_dld_open, sys_dld_close, sys_dld_sym, 0, 0 + }; + + #endif /* HAVE_DLD */ + + /* --- DYLD() MACOSX/DARWIN INTERFACE LOADER --- */ + #if HAVE_DYLD + + + #if HAVE_MACH_O_DYLD_H + #if !defined(__APPLE_CC__) && !defined(__MWERKS__) && !defined(__private_extern__) + /* Is this correct? Does it still function properly? */ + #define __private_extern__ extern + #endif + # include + #endif + #include + + /* We have to put some stuff here that isn't in older dyld.h files */ + #ifndef ENUM_DYLD_BOOL + # define ENUM_DYLD_BOOL + # undef FALSE + # undef TRUE + enum DYLD_BOOL { + FALSE, + TRUE + }; + #endif + #ifndef LC_REQ_DYLD + # define LC_REQ_DYLD 0x80000000 + #endif + #ifndef LC_LOAD_WEAK_DYLIB + # define LC_LOAD_WEAK_DYLIB (0x18 | LC_REQ_DYLD) + #endif + static const struct mach_header * (*ltdl_NSAddImage)(const char *image_name, unsigned long options) = 0; + static NSSymbol (*ltdl_NSLookupSymbolInImage)(const struct mach_header *image,const char *symbolName, unsigned long options) = 0; + static enum DYLD_BOOL (*ltdl_NSIsSymbolNameDefinedInImage)(const struct mach_header *image, const char *symbolName) = 0; + static enum DYLD_BOOL (*ltdl_NSMakePrivateModulePublic)(NSModule module) = 0; + + #ifndef NSADDIMAGE_OPTION_NONE + #define NSADDIMAGE_OPTION_NONE 0x0 + #endif + #ifndef NSADDIMAGE_OPTION_RETURN_ON_ERROR + #define NSADDIMAGE_OPTION_RETURN_ON_ERROR 0x1 + #endif + #ifndef NSADDIMAGE_OPTION_WITH_SEARCHING + #define NSADDIMAGE_OPTION_WITH_SEARCHING 0x2 + #endif + #ifndef NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED + #define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED 0x4 + #endif + #ifndef NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME + #define NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME 0x8 + #endif + #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND + #define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND 0x0 + #endif + #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW + #define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW 0x1 + #endif + #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY + #define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY 0x2 + #endif + #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR + #define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR 0x4 + #endif + + + static const char * + lt_int_dyld_error(othererror) + char* othererror; + { + /* return the dyld error string, or the passed in error string if none */ + NSLinkEditErrors ler; + int lerno; + const char *errstr; + const char *file; + NSLinkEditError(&ler,&lerno,&file,&errstr); + if (!errstr || !strlen(errstr)) errstr = othererror; + return errstr; + } + + static const struct mach_header * + lt_int_dyld_get_mach_header_from_nsmodule(module) + NSModule module; + { + /* There should probably be an apple dyld api for this */ + int i=_dyld_image_count(); + int j; + const char *modname=NSNameOfModule(module); + const struct mach_header *mh=NULL; + if (!modname) return NULL; + for (j = 0; j < i; j++) + { + if (!strcmp(_dyld_get_image_name(j),modname)) + { + mh=_dyld_get_image_header(j); + break; + } + } + return mh; + } + + static const char* lt_int_dyld_lib_install_name(mh) + const struct mach_header *mh; + { + /* NSAddImage is also used to get the loaded image, but it only works if the lib + is installed, for uninstalled libs we need to check the install_names against + each other. Note that this is still broken if DYLD_IMAGE_SUFFIX is set and a + different lib was loaded as a result + */ + int j; + struct load_command *lc; + unsigned long offset = sizeof(struct mach_header); + const char* retStr=NULL; + for (j = 0; j < mh->ncmds; j++) + { + lc = (struct load_command*)(((unsigned long)mh) + offset); + if (LC_ID_DYLIB == lc->cmd) + { + retStr=(char*)(((struct dylib_command*)lc)->dylib.name.offset + + (unsigned long)lc); + } + offset += lc->cmdsize; + } + return retStr; + } + + static const struct mach_header * + lt_int_dyld_match_loaded_lib_by_install_name(const char *name) + { + int i=_dyld_image_count(); + int j; + const struct mach_header *mh=NULL; + const char *id=NULL; + for (j = 0; j < i; j++) + { + id=lt_int_dyld_lib_install_name(_dyld_get_image_header(j)); + if ((id) && (!strcmp(id,name))) + { + mh=_dyld_get_image_header(j); + break; + } + } + return mh; + } + + static NSSymbol + lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh) + const char *symbol; + const struct mach_header *mh; + { + /* Safe to assume our mh is good */ + int j; + struct load_command *lc; + unsigned long offset = sizeof(struct mach_header); + NSSymbol retSym = 0; + const struct mach_header *mh1; + if ((ltdl_NSLookupSymbolInImage) && NSIsSymbolNameDefined(symbol) ) + { + for (j = 0; j < mh->ncmds; j++) + { + lc = (struct load_command*)(((unsigned long)mh) + offset); + if ((LC_LOAD_DYLIB == lc->cmd) || (LC_LOAD_WEAK_DYLIB == lc->cmd)) + { + mh1=lt_int_dyld_match_loaded_lib_by_install_name((char*)(((struct dylib_command*)lc)->dylib.name.offset + + (unsigned long)lc)); + if (!mh1) + { + /* Maybe NSAddImage can find it */ + mh1=ltdl_NSAddImage((char*)(((struct dylib_command*)lc)->dylib.name.offset + + (unsigned long)lc), + NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED + + NSADDIMAGE_OPTION_WITH_SEARCHING + + NSADDIMAGE_OPTION_RETURN_ON_ERROR ); + } + if (mh1) + { + retSym = ltdl_NSLookupSymbolInImage(mh1, + symbol, + NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW + | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR + ); + if (retSym) break; + } + } + offset += lc->cmdsize; + } + } + return retSym; + } + + static int + sys_dyld_init() + { + int retCode = 0; + int err = 0; + if (!_dyld_present()) { + retCode=1; + } + else { + err = _dyld_func_lookup("__dyld_NSAddImage",(unsigned long*)<dl_NSAddImage); + err = _dyld_func_lookup("__dyld_NSLookupSymbolInImage",(unsigned long*)<dl_NSLookupSymbolInImage); + err = _dyld_func_lookup("__dyld_NSIsSymbolNameDefinedInImage",(unsigned long*)<dl_NSIsSymbolNameDefinedInImage); + err = _dyld_func_lookup("__dyld_NSMakePrivateModulePublic",(unsigned long*)<dl_NSMakePrivateModulePublic); + } + return retCode; + } + + static lt_module + sys_dyld_open (loader_data, filename) + lt_user_data loader_data; + const char *filename; + { + lt_module module = 0; + NSObjectFileImage ofi = 0; + NSObjectFileImageReturnCode ofirc; + + if (!filename) + return (lt_module)-1; + ofirc = NSCreateObjectFileImageFromFile(filename, &ofi); + switch (ofirc) + { + case NSObjectFileImageSuccess: + module = NSLinkModule(ofi, filename, + NSLINKMODULE_OPTION_RETURN_ON_ERROR + | NSLINKMODULE_OPTION_PRIVATE + | NSLINKMODULE_OPTION_BINDNOW); + NSDestroyObjectFileImage(ofi); + if (module) + ltdl_NSMakePrivateModulePublic(module); + break; + case NSObjectFileImageInappropriateFile: + if (ltdl_NSIsSymbolNameDefinedInImage && ltdl_NSLookupSymbolInImage) + { + module = (lt_module)ltdl_NSAddImage(filename, NSADDIMAGE_OPTION_RETURN_ON_ERROR); + break; + } + default: + LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_OPEN))); + return 0; + } + if (!module) LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_OPEN))); + return module; + } + + static int + sys_dyld_close (loader_data, module) + lt_user_data loader_data; + lt_module module; + { + int retCode = 0; + int flags = 0; + if (module == (lt_module)-1) return 0; + #ifdef __BIG_ENDIAN__ + if (((struct mach_header *)module)->magic == MH_MAGIC) + #else + if (((struct mach_header *)module)->magic == MH_CIGAM) + #endif + { + LT_DLMUTEX_SETERROR("Can not close a dylib"); + retCode = 1; + } + else + { + #if 1 + /* Currently, if a module contains c++ static destructors and it is unloaded, we + get a segfault in atexit(), due to compiler and dynamic loader differences of + opinion, this works around that. + */ + if ((const struct section *)NULL != + getsectbynamefromheader(lt_int_dyld_get_mach_header_from_nsmodule(module), + "__DATA","__mod_term_func")) + { + flags += NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED; + } + #endif + #ifdef __ppc__ + flags += NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES; + #endif + if (!NSUnLinkModule(module,flags)) + { + retCode=1; + LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_CLOSE))); + } + } + + return retCode; + } + + static lt_ptr + sys_dyld_sym (loader_data, module, symbol) + lt_user_data loader_data; + lt_module module; + const char *symbol; + { + lt_ptr address = 0; + NSSymbol *nssym = 0; + void *unused; + const struct mach_header *mh=NULL; + char saveError[256] = "Symbol not found"; + if (module == (lt_module)-1) + { + _dyld_lookup_and_bind(symbol,(unsigned long*)&address,&unused); + return address; + } + #ifdef __BIG_ENDIAN__ + if (((struct mach_header *)module)->magic == MH_MAGIC) + #else + if (((struct mach_header *)module)->magic == MH_CIGAM) + #endif + { + if (ltdl_NSIsSymbolNameDefinedInImage && ltdl_NSLookupSymbolInImage) + { + mh=module; + if (ltdl_NSIsSymbolNameDefinedInImage((struct mach_header*)module,symbol)) + { + nssym = ltdl_NSLookupSymbolInImage((struct mach_header*)module, + symbol, + NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW + | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR + ); + } + } + + } + else { + nssym = NSLookupSymbolInModule(module, symbol); + } + if (!nssym) + { + strncpy(saveError, lt_int_dyld_error(LT_DLSTRERROR(SYMBOL_NOT_FOUND)), 255); + saveError[255] = 0; + if (!mh) mh=lt_int_dyld_get_mach_header_from_nsmodule(module); + nssym = lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh); + } + if (!nssym) + { + LT_DLMUTEX_SETERROR (saveError); + return NULL; + } + return NSAddressOfSymbol(nssym); + } + + static struct lt_user_dlloader sys_dyld = + { "_", sys_dyld_open, sys_dyld_close, sys_dyld_sym, 0, 0 }; + + + #endif /* HAVE_DYLD */ + + + /* --- DLPREOPEN() INTERFACE LOADER --- */ + + + /* emulate dynamic linking using preloaded_symbols */ + + typedef struct lt_dlsymlists_t + { + struct lt_dlsymlists_t *next; + const lt_dlsymlist *syms; + } lt_dlsymlists_t; + + static const lt_dlsymlist *default_preloaded_symbols = 0; + static lt_dlsymlists_t *preloaded_symbols = 0; + + static int + presym_init (loader_data) + lt_user_data loader_data; + { + int errors = 0; + + LT_DLMUTEX_LOCK (); + + preloaded_symbols = 0; + if (default_preloaded_symbols) + { + errors = lt_dlpreload (default_preloaded_symbols); + } + + LT_DLMUTEX_UNLOCK (); + + return errors; + } + + static int + presym_free_symlists () + { + lt_dlsymlists_t *lists; + + LT_DLMUTEX_LOCK (); + + lists = preloaded_symbols; + while (lists) + { + lt_dlsymlists_t *tmp = lists; + + lists = lists->next; + LT_DLFREE (tmp); + } + preloaded_symbols = 0; + + LT_DLMUTEX_UNLOCK (); + + return 0; + } + + static int + presym_exit (loader_data) + lt_user_data loader_data; + { + presym_free_symlists (); + return 0; + } + + static int + presym_add_symlist (preloaded) + const lt_dlsymlist *preloaded; + { + lt_dlsymlists_t *tmp; + lt_dlsymlists_t *lists; + int errors = 0; + + LT_DLMUTEX_LOCK (); + + lists = preloaded_symbols; + while (lists) + { + if (lists->syms == preloaded) + { + goto done; + } + lists = lists->next; + } + + tmp = LT_EMALLOC (lt_dlsymlists_t, 1); + if (tmp) + { + memset (tmp, 0, sizeof(lt_dlsymlists_t)); + tmp->syms = preloaded; + tmp->next = preloaded_symbols; + preloaded_symbols = tmp; + } + else + { + ++errors; + } + + done: + LT_DLMUTEX_UNLOCK (); + return errors; + } + + static lt_module + presym_open (loader_data, filename) + lt_user_data loader_data; + const char *filename; + { + lt_dlsymlists_t *lists; + lt_module module = (lt_module) 0; + + LT_DLMUTEX_LOCK (); + lists = preloaded_symbols; + + if (!lists) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_SYMBOLS)); + goto done; + } + + /* Can't use NULL as the reflective symbol header, as NULL is + used to mark the end of the entire symbol list. Self-dlpreopened + symbols follow this magic number, chosen to be an unlikely + clash with a real module name. */ + if (!filename) + { + filename = "@PROGRAM@"; + } + + while (lists) + { + const lt_dlsymlist *syms = lists->syms; + + while (syms->name) + { + if (!syms->address && strcmp(syms->name, filename) == 0) + { + module = (lt_module) syms; + goto done; + } + ++syms; + } + + lists = lists->next; + } + + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); + + done: + LT_DLMUTEX_UNLOCK (); + return module; + } + + static int + presym_close (loader_data, module) + lt_user_data loader_data; + lt_module module; + { + /* Just to silence gcc -Wall */ + module = 0; + return 0; + } + + static lt_ptr + presym_sym (loader_data, module, symbol) + lt_user_data loader_data; + lt_module module; + const char *symbol; + { + lt_dlsymlist *syms = (lt_dlsymlist*) module; + + ++syms; + while (syms->address) + { + if (strcmp(syms->name, symbol) == 0) + { + return syms->address; + } + + ++syms; + } + + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); + + return 0; + } + + static struct lt_user_dlloader presym = { + 0, presym_open, presym_close, presym_sym, presym_exit, 0 + }; + + + + + + /* --- DYNAMIC MODULE LOADING --- */ + + + /* The type of a function used at each iteration of foreach_dirinpath(). */ + typedef int foreach_callback_func LT_PARAMS((char *filename, lt_ptr data1, + lt_ptr data2)); + + static int foreach_dirinpath LT_PARAMS((const char *search_path, + const char *base_name, + foreach_callback_func *func, + lt_ptr data1, lt_ptr data2)); + + static int find_file_callback LT_PARAMS((char *filename, lt_ptr data, + lt_ptr ignored)); + static int find_handle_callback LT_PARAMS((char *filename, lt_ptr data, + lt_ptr ignored)); + static int foreachfile_callback LT_PARAMS((char *filename, lt_ptr data1, + lt_ptr data2)); + + + static int canonicalize_path LT_PARAMS((const char *path, + char **pcanonical)); + static int argzize_path LT_PARAMS((const char *path, + char **pargz, + size_t *pargz_len)); + static FILE *find_file LT_PARAMS((const char *search_path, + const char *base_name, + char **pdir)); + static lt_dlhandle *find_handle LT_PARAMS((const char *search_path, + const char *base_name, + lt_dlhandle *handle)); + static int find_module LT_PARAMS((lt_dlhandle *handle, + const char *dir, + const char *libdir, + const char *dlname, + const char *old_name, + int installed)); + static int free_vars LT_PARAMS((char *dlname, char *oldname, + char *libdir, char *deplibs)); + static int load_deplibs LT_PARAMS((lt_dlhandle handle, + char *deplibs)); + static int trim LT_PARAMS((char **dest, + const char *str)); + static int try_dlopen LT_PARAMS((lt_dlhandle *handle, + const char *filename)); + static int tryall_dlopen LT_PARAMS((lt_dlhandle *handle, + const char *filename)); + static int unload_deplibs LT_PARAMS((lt_dlhandle handle)); + static int lt_argz_insert LT_PARAMS((char **pargz, + size_t *pargz_len, + char *before, + const char *entry)); + static int lt_argz_insertinorder LT_PARAMS((char **pargz, + size_t *pargz_len, + const char *entry)); + static int lt_argz_insertdir LT_PARAMS((char **pargz, + size_t *pargz_len, + const char *dirnam, + struct dirent *dp)); + static int lt_dlpath_insertdir LT_PARAMS((char **ppath, + char *before, + const char *dir)); + static int list_files_by_dir LT_PARAMS((const char *dirnam, + char **pargz, + size_t *pargz_len)); + static int file_not_found LT_PARAMS((void)); + + static char *user_search_path= 0; + static lt_dlloader *loaders = 0; + static lt_dlhandle handles = 0; + static int initialized = 0; + + /* Initialize libltdl. */ + int + lt_dlinit () + { + int errors = 0; + + LT_DLMUTEX_LOCK (); + + /* Initialize only at first call. */ + if (++initialized == 1) + { + handles = 0; + user_search_path = 0; /* empty search path */ + + #if HAVE_LIBDL + errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dl, "dlopen"); + #endif + #if HAVE_SHL_LOAD + errors += lt_dlloader_add (lt_dlloader_next (0), &sys_shl, "dlopen"); + #endif + #ifdef __WINDOWS__ + errors += lt_dlloader_add (lt_dlloader_next (0), &sys_wll, "dlopen"); + #endif + #ifdef __BEOS__ + errors += lt_dlloader_add (lt_dlloader_next (0), &sys_bedl, "dlopen"); + #endif + #if HAVE_DLD + errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dld, "dld"); + #endif + #if HAVE_DYLD + errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dyld, "dyld"); + errors += sys_dyld_init(); + #endif + errors += lt_dlloader_add (lt_dlloader_next (0), &presym, "dlpreload"); + + if (presym_init (presym.dlloader_data)) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INIT_LOADER)); + ++errors; + } + else if (errors != 0) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (DLOPEN_NOT_SUPPORTED)); + ++errors; + } + } + + LT_DLMUTEX_UNLOCK (); + + return errors; + } + + int + lt_dlpreload (preloaded) + const lt_dlsymlist *preloaded; + { + int errors = 0; + + if (preloaded) + { + errors = presym_add_symlist (preloaded); + } + else + { + presym_free_symlists(); + + LT_DLMUTEX_LOCK (); + if (default_preloaded_symbols) + { + errors = lt_dlpreload (default_preloaded_symbols); + } + LT_DLMUTEX_UNLOCK (); + } + + return errors; + } + + int + lt_dlpreload_default (preloaded) + const lt_dlsymlist *preloaded; + { + LT_DLMUTEX_LOCK (); + default_preloaded_symbols = preloaded; + LT_DLMUTEX_UNLOCK (); + return 0; + } + + int + lt_dlexit () + { + /* shut down libltdl */ + lt_dlloader *loader; + int errors = 0; + + LT_DLMUTEX_LOCK (); + loader = loaders; + + if (!initialized) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SHUTDOWN)); + ++errors; + goto done; + } + + /* shut down only at last call. */ + if (--initialized == 0) + { + int level; + + while (handles && LT_DLIS_RESIDENT (handles)) + { + handles = handles->next; + } + + /* close all modules */ + for (level = 1; handles; ++level) + { + lt_dlhandle cur = handles; + int saw_nonresident = 0; + + while (cur) + { + lt_dlhandle tmp = cur; + cur = cur->next; + if (!LT_DLIS_RESIDENT (tmp)) + saw_nonresident = 1; + if (!LT_DLIS_RESIDENT (tmp) && tmp->info.ref_count <= level) + { + if (lt_dlclose (tmp)) + { + ++errors; + } + } + } + /* done if only resident modules are left */ + if (!saw_nonresident) + break; + } + + /* close all loaders */ + while (loader) + { + lt_dlloader *next = loader->next; + lt_user_data data = loader->dlloader_data; + if (loader->dlloader_exit && loader->dlloader_exit (data)) + { + ++errors; + } + + LT_DLMEM_REASSIGN (loader, next); + } + loaders = 0; + } + + done: + LT_DLMUTEX_UNLOCK (); + return errors; + } + + static int + tryall_dlopen (handle, filename) + lt_dlhandle *handle; + const char *filename; + { + lt_dlhandle cur; + lt_dlloader *loader; + const char *saved_error; + int errors = 0; + + LT_DLMUTEX_GETERROR (saved_error); + LT_DLMUTEX_LOCK (); + + cur = handles; + loader = loaders; + + /* check whether the module was already opened */ + while (cur) + { + /* try to dlopen the program itself? */ + if (!cur->info.filename && !filename) + { + break; + } + + if (cur->info.filename && filename + && strcmp (cur->info.filename, filename) == 0) + { + break; + } + + cur = cur->next; + } + + if (cur) + { + ++cur->info.ref_count; + *handle = cur; + goto done; + } + + cur = *handle; + if (filename) + { + /* Comment out the check of file permissions using access. + This call seems to always return -1 with error EACCES. + */ + /* We need to catch missing file errors early so that + file_not_found() can detect what happened. + if (access (filename, R_OK) != 0) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); + ++errors; + goto done; + } */ + + cur->info.filename = lt_estrdup (filename); + if (!cur->info.filename) + { + ++errors; + goto done; + } + } + else + { + cur->info.filename = 0; + } + + while (loader) + { + lt_user_data data = loader->dlloader_data; + + cur->module = loader->module_open (data, filename); + + if (cur->module != 0) + { + break; + } + loader = loader->next; + } + + if (!loader) + { + LT_DLFREE (cur->info.filename); + ++errors; + goto done; + } + + cur->loader = loader; + LT_DLMUTEX_SETERROR (saved_error); + + done: + LT_DLMUTEX_UNLOCK (); + + return errors; + } + + static int + tryall_dlopen_module (handle, prefix, dirname, dlname) + lt_dlhandle *handle; + const char *prefix; + const char *dirname; + const char *dlname; + { + int error = 0; + char *filename = 0; + size_t filename_len = 0; + size_t dirname_len = LT_STRLEN (dirname); + + assert (handle); + assert (dirname); + assert (dlname); + #ifdef LT_DIRSEP_CHAR + /* Only canonicalized names (i.e. with DIRSEP chars already converted) + should make it into this function: */ + assert (strchr (dirname, LT_DIRSEP_CHAR) == 0); + #endif + + if (dirname_len > 0) + if (dirname[dirname_len -1] == '/') + --dirname_len; + filename_len = dirname_len + 1 + LT_STRLEN (dlname); + + /* Allocate memory, and combine DIRNAME and MODULENAME into it. + The PREFIX (if any) is handled below. */ + filename = LT_EMALLOC (char, dirname_len + 1 + filename_len + 1); + if (!filename) + return 1; + + sprintf (filename, "%.*s/%s", (int) dirname_len, dirname, dlname); + + /* Now that we have combined DIRNAME and MODULENAME, if there is + also a PREFIX to contend with, simply recurse with the arguments + shuffled. Otherwise, attempt to open FILENAME as a module. */ + if (prefix) + { + error += tryall_dlopen_module (handle, + (const char *) 0, prefix, filename); + } + else if (tryall_dlopen (handle, filename) != 0) + { + ++error; + } + + LT_DLFREE (filename); + return error; + } + + static int + find_module (handle, dir, libdir, dlname, old_name, installed) + lt_dlhandle *handle; + const char *dir; + const char *libdir; + const char *dlname; + const char *old_name; + int installed; + { + /* Try to open the old library first; if it was dlpreopened, + we want the preopened version of it, even if a dlopenable + module is available. */ + if (old_name && tryall_dlopen (handle, old_name) == 0) + { + return 0; + } + + /* Try to open the dynamic library. */ + if (dlname) + { + /* try to open the installed module */ + if (installed && libdir) + { + if (tryall_dlopen_module (handle, + (const char *) 0, libdir, dlname) == 0) + return 0; + } + + /* try to open the not-installed module */ + if (!installed) + { + if (tryall_dlopen_module (handle, dir, objdir, dlname) == 0) + return 0; + } + + /* maybe it was moved to another directory */ + { + if (tryall_dlopen_module (handle, + (const char *) 0, dir, dlname) == 0) + return 0; + } + } + + return 1; + } + + + static int + canonicalize_path (path, pcanonical) + const char *path; + char **pcanonical; + { + char *canonical = 0; + + assert (path && *path); + assert (pcanonical); + + canonical = LT_EMALLOC (char, 1+ LT_STRLEN (path)); + if (!canonical) + return 1; + + { + size_t dest = 0; + size_t src; + for (src = 0; path[src] != LT_EOS_CHAR; ++src) + { + /* Path separators are not copied to the beginning or end of + the destination, or if another separator would follow + immediately. */ + if (path[src] == LT_PATHSEP_CHAR) + { + if ((dest == 0) + || (path[1+ src] == LT_PATHSEP_CHAR) + || (path[1+ src] == LT_EOS_CHAR)) + continue; + } + + /* Anything other than a directory separator is copied verbatim. */ + if ((path[src] != '/') + #ifdef LT_DIRSEP_CHAR + && (path[src] != LT_DIRSEP_CHAR) + #endif + ) + { + canonical[dest++] = path[src]; + } + /* Directory separators are converted and copied only if they are + not at the end of a path -- i.e. before a path separator or + NULL terminator. */ + else if ((path[1+ src] != LT_PATHSEP_CHAR) + && (path[1+ src] != LT_EOS_CHAR) + #ifdef LT_DIRSEP_CHAR + && (path[1+ src] != LT_DIRSEP_CHAR) + #endif + && (path[1+ src] != '/')) + { + canonical[dest++] = '/'; + } + } + + /* Add an end-of-string marker at the end. */ + canonical[dest] = LT_EOS_CHAR; + } + + /* Assign new value. */ + *pcanonical = canonical; + + return 0; + } + + static int + argzize_path (path, pargz, pargz_len) + const char *path; + char **pargz; + size_t *pargz_len; + { + error_t error; + + assert (path); + assert (pargz); + assert (pargz_len); + + if ((error = argz_create_sep (path, LT_PATHSEP_CHAR, pargz, pargz_len))) + { + switch (error) + { + case ENOMEM: + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); + break; + default: + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (UNKNOWN)); + break; + } + + return 1; + } + + return 0; + } + + /* Repeatedly call FUNC with each LT_PATHSEP_CHAR delimited element + of SEARCH_PATH and references to DATA1 and DATA2, until FUNC returns + non-zero or all elements are exhausted. If BASE_NAME is non-NULL, + it is appended to each SEARCH_PATH element before FUNC is called. */ + static int + foreach_dirinpath (search_path, base_name, func, data1, data2) + const char *search_path; + const char *base_name; + foreach_callback_func *func; + lt_ptr data1; + lt_ptr data2; + { + int result = 0; + int filenamesize = 0; + size_t lenbase = LT_STRLEN (base_name); + size_t argz_len = 0; + char *argz = 0; + char *filename = 0; + char *canonical = 0; + + LT_DLMUTEX_LOCK (); + + if (!search_path || !*search_path) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); + goto cleanup; + } + + if (canonicalize_path (search_path, &canonical) != 0) + goto cleanup; + + if (argzize_path (canonical, &argz, &argz_len) != 0) + goto cleanup; + + { + char *dir_name = 0; + while ((dir_name = argz_next (argz, argz_len, dir_name))) + { + size_t lendir = LT_STRLEN (dir_name); + + if (lendir +1 +lenbase >= filenamesize) + { + LT_DLFREE (filename); + filenamesize = lendir +1 +lenbase +1; /* "/d" + '/' + "f" + '\0' */ + filename = LT_EMALLOC (char, filenamesize); + if (!filename) + goto cleanup; + } + + assert (filenamesize > lendir); + strcpy (filename, dir_name); + + if (base_name && *base_name) + { + if (filename[lendir -1] != '/') + filename[lendir++] = '/'; + strcpy (filename +lendir, base_name); + } + + if ((result = (*func) (filename, data1, data2))) + { + break; + } + } + } + + cleanup: + LT_DLFREE (argz); + LT_DLFREE (canonical); + LT_DLFREE (filename); + + LT_DLMUTEX_UNLOCK (); + + return result; + } + + /* If FILEPATH can be opened, store the name of the directory component + in DATA1, and the opened FILE* structure address in DATA2. Otherwise + DATA1 is unchanged, but DATA2 is set to a pointer to NULL. */ + static int + find_file_callback (filename, data1, data2) + char *filename; + lt_ptr data1; + lt_ptr data2; + { + char **pdir = (char **) data1; + FILE **pfile = (FILE **) data2; + int is_done = 0; + + assert (filename && *filename); + assert (pdir); + assert (pfile); + + if ((*pfile = fopen (filename, LT_READTEXT_MODE))) + { + char *dirend = strrchr (filename, '/'); + + if (dirend > filename) + *dirend = LT_EOS_CHAR; + + LT_DLFREE (*pdir); + *pdir = lt_estrdup (filename); + is_done = (*pdir == 0) ? -1 : 1; + } + + return is_done; + } + + static FILE * + find_file (search_path, base_name, pdir) + const char *search_path; + const char *base_name; + char **pdir; + { + FILE *file = 0; + + foreach_dirinpath (search_path, base_name, find_file_callback, pdir, &file); + + return file; + } + + static int + find_handle_callback (filename, data, ignored) + char *filename; + lt_ptr data; + lt_ptr ignored; + { + lt_dlhandle *handle = (lt_dlhandle *) data; + int notfound = access (filename, R_OK); + + /* Bail out if file cannot be read... */ + if (notfound) + return 0; + + /* Try to dlopen the file, but do not continue searching in any + case. */ + if (tryall_dlopen (handle, filename) != 0) + *handle = 0; + + return 1; + } + + /* If HANDLE was found return it, otherwise return 0. If HANDLE was + found but could not be opened, *HANDLE will be set to 0. */ + static lt_dlhandle * + find_handle (search_path, base_name, handle) + const char *search_path; + const char *base_name; + lt_dlhandle *handle; + { + if (!search_path) + return 0; + + if (!foreach_dirinpath (search_path, base_name, find_handle_callback, + handle, 0)) + return 0; + + return handle; + } + + static int + load_deplibs (handle, deplibs) + lt_dlhandle handle; + char *deplibs; + { + #if LTDL_DLOPEN_DEPLIBS + char *p, *save_search_path = 0; + int depcount = 0; + int i; + char **names = 0; + #endif + int errors = 0; + + handle->depcount = 0; + + #if LTDL_DLOPEN_DEPLIBS + if (!deplibs) + { + return errors; + } + ++errors; + + LT_DLMUTEX_LOCK (); + if (user_search_path) + { + save_search_path = lt_estrdup (user_search_path); + if (!save_search_path) + goto cleanup; + } + + /* extract search paths and count deplibs */ + p = deplibs; + while (*p) + { + if (!isspace ((int) *p)) + { + char *end = p+1; + while (*end && !isspace((int) *end)) + { + ++end; + } + + if (strncmp(p, "-L", 2) == 0 || strncmp(p, "-R", 2) == 0) + { + char save = *end; + *end = 0; /* set a temporary string terminator */ + if (lt_dladdsearchdir(p+2)) + { + goto cleanup; + } + *end = save; + } + else + { + ++depcount; + } + + p = end; + } + else + { + ++p; + } + } + + /* restore the old search path */ + LT_DLFREE (user_search_path); + user_search_path = save_search_path; + + LT_DLMUTEX_UNLOCK (); + + if (!depcount) + { + errors = 0; + goto cleanup; + } + + names = LT_EMALLOC (char *, depcount * sizeof (char*)); + if (!names) + goto cleanup; + + /* now only extract the actual deplibs */ + depcount = 0; + p = deplibs; + while (*p) + { + if (isspace ((int) *p)) + { + ++p; + } + else + { + char *end = p+1; + while (*end && !isspace ((int) *end)) + { + ++end; + } + + if (strncmp(p, "-L", 2) != 0 && strncmp(p, "-R", 2) != 0) + { + char *name; + char save = *end; + *end = 0; /* set a temporary string terminator */ + if (strncmp(p, "-l", 2) == 0) + { + size_t name_len = 3+ /* "lib" */ LT_STRLEN (p + 2); + name = LT_EMALLOC (char, 1+ name_len); + if (name) + sprintf (name, "lib%s", p+2); + } + else + name = lt_estrdup(p); + + if (!name) + goto cleanup_names; + + names[depcount++] = name; + *end = save; + } + p = end; + } + } + + /* load the deplibs (in reverse order) + At this stage, don't worry if the deplibs do not load correctly, + they may already be statically linked into the loading application + for instance. There will be a more enlightening error message + later on if the loaded module cannot resolve all of its symbols. */ + if (depcount) + { + int j = 0; + + handle->deplibs = (lt_dlhandle*) LT_EMALLOC (lt_dlhandle *, depcount); + if (!handle->deplibs) + goto cleanup; + + for (i = 0; i < depcount; ++i) + { + handle->deplibs[j] = lt_dlopenext(names[depcount-1-i]); + if (handle->deplibs[j]) + { + ++j; + } + } + + handle->depcount = j; /* Number of successfully loaded deplibs */ + errors = 0; + } + + cleanup_names: + for (i = 0; i < depcount; ++i) + { + LT_DLFREE (names[i]); + } + + cleanup: + LT_DLFREE (names); + #endif + + return errors; + } + + static int + unload_deplibs (handle) + lt_dlhandle handle; + { + int i; + int errors = 0; + + if (handle->depcount) + { + for (i = 0; i < handle->depcount; ++i) + { + if (!LT_DLIS_RESIDENT (handle->deplibs[i])) + { + errors += lt_dlclose (handle->deplibs[i]); + } + } + } + + return errors; + } + + static int + trim (dest, str) + char **dest; + const char *str; + { + /* remove the leading and trailing "'" from str + and store the result in dest */ + const char *end = strrchr (str, '\''); + size_t len = LT_STRLEN (str); + char *tmp; + + LT_DLFREE (*dest); + + if (len > 3 && str[0] == '\'') + { + tmp = LT_EMALLOC (char, end - str); + if (!tmp) + return 1; + + strncpy(tmp, &str[1], (end - str) - 1); + tmp[len-3] = LT_EOS_CHAR; + *dest = tmp; + } + else + { + *dest = 0; + } + + return 0; + } + + static int + free_vars (dlname, oldname, libdir, deplibs) + char *dlname; + char *oldname; + char *libdir; + char *deplibs; + { + LT_DLFREE (dlname); + LT_DLFREE (oldname); + LT_DLFREE (libdir); + LT_DLFREE (deplibs); + + return 0; + } + + static int + try_dlopen (phandle, filename) + lt_dlhandle *phandle; + const char *filename; + { + const char * ext = 0; + const char * saved_error = 0; + char * canonical = 0; + char * base_name = 0; + char * dir = 0; + char * name = 0; + int errors = 0; + lt_dlhandle newhandle; + + assert (phandle); + assert (*phandle == 0); + + LT_DLMUTEX_GETERROR (saved_error); + + /* dlopen self? */ + if (!filename) + { + *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); + if (*phandle == 0) + return 1; + + memset (*phandle, 0, sizeof(struct lt_dlhandle_struct)); + newhandle = *phandle; + + /* lt_dlclose()ing yourself is very bad! Disallow it. */ + LT_DLSET_FLAG (*phandle, LT_DLRESIDENT_FLAG); + + if (tryall_dlopen (&newhandle, 0) != 0) + { + LT_DLFREE (*phandle); + return 1; + } + + goto register_handle; + } + + assert (filename && *filename); + + /* Doing this immediately allows internal functions to safely + assume only canonicalized paths are passed. */ + if (canonicalize_path (filename, &canonical) != 0) + { + ++errors; + goto cleanup; + } + + /* If the canonical module name is a path (relative or absolute) + then split it into a directory part and a name part. */ + base_name = strrchr (canonical, '/'); + if (base_name) + { + size_t dirlen = (1+ base_name) - canonical; + + dir = LT_EMALLOC (char, 1+ dirlen); + if (!dir) + { + ++errors; + goto cleanup; + } + + strncpy (dir, canonical, dirlen); + dir[dirlen] = LT_EOS_CHAR; + + ++base_name; + } + else + LT_DLMEM_REASSIGN (base_name, canonical); + + assert (base_name && *base_name); + + /* Check whether we are opening a libtool module (.la extension). */ + ext = strrchr (base_name, '.'); + if (ext && strcmp (ext, archive_ext) == 0) + { + /* this seems to be a libtool module */ + FILE * file = 0; + char * dlname = 0; + char * old_name = 0; + char * libdir = 0; + char * deplibs = 0; + char * line = 0; + size_t line_len; + + /* if we can't find the installed flag, it is probably an + installed libtool archive, produced with an old version + of libtool */ + int installed = 1; + + /* extract the module name from the file name */ + name = LT_EMALLOC (char, ext - base_name + 1); + if (!name) + { + ++errors; + goto cleanup; + } + + /* canonicalize the module name */ + { + size_t i; + for (i = 0; i < ext - base_name; ++i) + { + if (isalnum ((int)(base_name[i]))) + { + name[i] = base_name[i]; + } + else + { + name[i] = '_'; + } + } + name[ext - base_name] = LT_EOS_CHAR; + } + + /* Now try to open the .la file. If there is no directory name + component, try to find it first in user_search_path and then other + prescribed paths. Otherwise (or in any case if the module was not + yet found) try opening just the module name as passed. */ + if (!dir) + { + const char *search_path; + + LT_DLMUTEX_LOCK (); + search_path = user_search_path; + if (search_path) + file = find_file (user_search_path, base_name, &dir); + LT_DLMUTEX_UNLOCK (); + + if (!file) + { + search_path = getenv (LTDL_SEARCHPATH_VAR); + if (search_path) + file = find_file (search_path, base_name, &dir); + } + + #ifdef LTDL_SHLIBPATH_VAR + if (!file) + { + search_path = getenv (LTDL_SHLIBPATH_VAR); + if (search_path) + file = find_file (search_path, base_name, &dir); + } + #endif + #ifdef LTDL_SYSSEARCHPATH + if (!file && sys_search_path) + { + file = find_file (sys_search_path, base_name, &dir); + } + #endif + } + if (!file) + { + file = fopen (filename, LT_READTEXT_MODE); + } + + /* If we didn't find the file by now, it really isn't there. Set + the status flag, and bail out. */ + if (!file) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); + ++errors; + goto cleanup; + } + + line_len = LT_FILENAME_MAX; + line = LT_EMALLOC (char, line_len); + if (!line) + { + fclose (file); + ++errors; + goto cleanup; + } + + /* read the .la file */ + while (!feof (file)) + { + if (!fgets (line, (int) line_len, file)) + { + break; + } + + /* Handle the case where we occasionally need to read a line + that is longer than the initial buffer size. */ + while ((line[LT_STRLEN(line) -1] != '\n') && (!feof (file))) + { + line = LT_DLREALLOC (char, line, line_len *2); + if (!fgets (&line[line_len -1], (int) line_len +1, file)) + { + break; + } + line_len *= 2; + } + + if (line[0] == '\n' || line[0] == '#') + { + continue; + } + + #undef STR_DLNAME + #define STR_DLNAME "dlname=" + if (strncmp (line, STR_DLNAME, sizeof (STR_DLNAME) - 1) == 0) + { + errors += trim (&dlname, &line[sizeof (STR_DLNAME) - 1]); + } + + #undef STR_OLD_LIBRARY + #define STR_OLD_LIBRARY "old_library=" + else if (strncmp (line, STR_OLD_LIBRARY, + sizeof (STR_OLD_LIBRARY) - 1) == 0) + { + errors += trim (&old_name, &line[sizeof (STR_OLD_LIBRARY) - 1]); + } + #undef STR_LIBDIR + #define STR_LIBDIR "libdir=" + else if (strncmp (line, STR_LIBDIR, sizeof (STR_LIBDIR) - 1) == 0) + { + errors += trim (&libdir, &line[sizeof(STR_LIBDIR) - 1]); + } + + #undef STR_DL_DEPLIBS + #define STR_DL_DEPLIBS "dependency_libs=" + else if (strncmp (line, STR_DL_DEPLIBS, + sizeof (STR_DL_DEPLIBS) - 1) == 0) + { + errors += trim (&deplibs, &line[sizeof (STR_DL_DEPLIBS) - 1]); + } + else if (strcmp (line, "installed=yes\n") == 0) + { + installed = 1; + } + else if (strcmp (line, "installed=no\n") == 0) + { + installed = 0; + } + + #undef STR_LIBRARY_NAMES + #define STR_LIBRARY_NAMES "library_names=" + else if (! dlname && strncmp (line, STR_LIBRARY_NAMES, + sizeof (STR_LIBRARY_NAMES) - 1) == 0) + { + char *last_libname; + errors += trim (&dlname, &line[sizeof (STR_LIBRARY_NAMES) - 1]); + if (!errors + && dlname + && (last_libname = strrchr (dlname, ' ')) != 0) + { + last_libname = lt_estrdup (last_libname + 1); + if (!last_libname) + { + ++errors; + goto cleanup; + } + LT_DLMEM_REASSIGN (dlname, last_libname); + } + } + + if (errors) + break; + } + + fclose (file); + LT_DLFREE (line); + + /* allocate the handle */ + *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); + if (*phandle == 0) + ++errors; + + if (errors) + { + free_vars (dlname, old_name, libdir, deplibs); + LT_DLFREE (*phandle); + goto cleanup; + } + + assert (*phandle); + + memset (*phandle, 0, sizeof(struct lt_dlhandle_struct)); + if (load_deplibs (*phandle, deplibs) == 0) + { + newhandle = *phandle; + /* find_module may replace newhandle */ + if (find_module (&newhandle, dir, libdir, dlname, old_name, installed)) + { + unload_deplibs (*phandle); + ++errors; + } + } + else + { + ++errors; + } + + free_vars (dlname, old_name, libdir, deplibs); + if (errors) + { + LT_DLFREE (*phandle); + goto cleanup; + } + + if (*phandle != newhandle) + { + unload_deplibs (*phandle); + } + } + else + { + /* not a libtool module */ + *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); + if (*phandle == 0) + { + ++errors; + goto cleanup; + } + + memset (*phandle, 0, sizeof (struct lt_dlhandle_struct)); + newhandle = *phandle; + + /* If the module has no directory name component, try to find it + first in user_search_path and then other prescribed paths. + Otherwise (or in any case if the module was not yet found) try + opening just the module name as passed. */ + if ((dir || (!find_handle (user_search_path, base_name, &newhandle) + && !find_handle (getenv (LTDL_SEARCHPATH_VAR), base_name, + &newhandle) + #ifdef LTDL_SHLIBPATH_VAR + && !find_handle (getenv (LTDL_SHLIBPATH_VAR), base_name, + &newhandle) + #endif + #ifdef LTDL_SYSSEARCHPATH + && !find_handle (sys_search_path, base_name, &newhandle) + #endif + ))) + { + if (tryall_dlopen (&newhandle, filename) != 0) + { + newhandle = NULL; + } + } + + if (!newhandle) + { + LT_DLFREE (*phandle); + ++errors; + goto cleanup; + } + } + + register_handle: + LT_DLMEM_REASSIGN (*phandle, newhandle); + + if ((*phandle)->info.ref_count == 0) + { + (*phandle)->info.ref_count = 1; + LT_DLMEM_REASSIGN ((*phandle)->info.name, name); + + LT_DLMUTEX_LOCK (); + (*phandle)->next = handles; + handles = *phandle; + LT_DLMUTEX_UNLOCK (); + } + + LT_DLMUTEX_SETERROR (saved_error); + + cleanup: + LT_DLFREE (dir); + LT_DLFREE (name); + LT_DLFREE (canonical); + + return errors; + } + + lt_dlhandle + lt_dlopen (filename) + const char *filename; + { + lt_dlhandle handle = 0; + + /* Just incase we missed a code path in try_dlopen() that reports + an error, but forgets to reset handle... */ + if (try_dlopen (&handle, filename) != 0) + return 0; + + return handle; + } + + /* If the last error messge store was `FILE_NOT_FOUND', then return + non-zero. */ + static int + file_not_found () + { + const char *error = 0; + + LT_DLMUTEX_GETERROR (error); + if (error == LT_DLSTRERROR (FILE_NOT_FOUND)) + return 1; + + return 0; + } + + /* If FILENAME has an ARCHIVE_EXT or SHLIB_EXT extension, try to + open the FILENAME as passed. Otherwise try appending ARCHIVE_EXT, + and if a file is still not found try again with SHLIB_EXT appended + instead. */ + lt_dlhandle + lt_dlopenext (filename) + const char *filename; + { + lt_dlhandle handle = 0; + char * tmp = 0; + char * ext = 0; + size_t len; + int errors = 0; + + if (!filename) + { + return lt_dlopen (filename); + } + + assert (filename); + + len = LT_STRLEN (filename); + ext = strrchr (filename, '.'); + + /* If FILENAME already bears a suitable extension, there is no need + to try appending additional extensions. */ + if (ext && ((strcmp (ext, archive_ext) == 0) + #ifdef LTDL_SHLIB_EXT + || (strcmp (ext, shlib_ext) == 0) + #endif + )) + { + return lt_dlopen (filename); + } + + /* First try appending ARCHIVE_EXT. */ + tmp = LT_EMALLOC (char, len + LT_STRLEN (archive_ext) + 1); + if (!tmp) + return 0; + + strcpy (tmp, filename); + strcat (tmp, archive_ext); + errors = try_dlopen (&handle, tmp); + + /* If we found FILENAME, stop searching -- whether we were able to + load the file as a module or not. If the file exists but loading + failed, it is better to return an error message here than to + report FILE_NOT_FOUND when the alternatives (foo.so etc) are not + in the module search path. */ + if (handle || ((errors > 0) && !file_not_found ())) + { + LT_DLFREE (tmp); + return handle; + } + + #ifdef LTDL_SHLIB_EXT + /* Try appending SHLIB_EXT. */ + if (LT_STRLEN (shlib_ext) > LT_STRLEN (archive_ext)) + { + LT_DLFREE (tmp); + tmp = LT_EMALLOC (char, len + LT_STRLEN (shlib_ext) + 1); + if (!tmp) + return 0; + + strcpy (tmp, filename); + } + else + { + tmp[len] = LT_EOS_CHAR; + } + + strcat(tmp, shlib_ext); + errors = try_dlopen (&handle, tmp); + + /* As before, if the file was found but loading failed, return now + with the current error message. */ + if (handle || ((errors > 0) && !file_not_found ())) + { + LT_DLFREE (tmp); + return handle; + } + #endif + + /* Still here? Then we really did fail to locate any of the file + names we tried. */ + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); + LT_DLFREE (tmp); + return 0; + } + + + static int + lt_argz_insert (pargz, pargz_len, before, entry) + char **pargz; + size_t *pargz_len; + char *before; + const char *entry; + { + error_t error; + + if ((error = argz_insert (pargz, pargz_len, before, entry))) + { + switch (error) + { + case ENOMEM: + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); + break; + default: + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (UNKNOWN)); + break; + } + return 1; + } + + return 0; + } + + static int + lt_argz_insertinorder (pargz, pargz_len, entry) + char **pargz; + size_t *pargz_len; + const char *entry; + { + char *before = 0; + + assert (pargz); + assert (pargz_len); + assert (entry && *entry); + + if (*pargz) + while ((before = argz_next (*pargz, *pargz_len, before))) + { + int cmp = strcmp (entry, before); + + if (cmp < 0) break; + if (cmp == 0) return 0; /* No duplicates! */ + } + + return lt_argz_insert (pargz, pargz_len, before, entry); + } + + static int + lt_argz_insertdir (pargz, pargz_len, dirnam, dp) + char **pargz; + size_t *pargz_len; + const char *dirnam; + struct dirent *dp; + { + char *buf = 0; + size_t buf_len = 0; + char *end = 0; + size_t end_offset = 0; + size_t dir_len = 0; + int errors = 0; + + assert (pargz); + assert (pargz_len); + assert (dp); + + dir_len = LT_STRLEN (dirnam); + end = dp->d_name + LT_D_NAMLEN(dp); + + /* Ignore version numbers. */ + { + char *p; + for (p = end; p -1 > dp->d_name; --p) + if (strchr (".0123456789", p[-1]) == 0) + break; + + if (*p == '.') + end = p; + } + + /* Ignore filename extension. */ + { + char *p; + for (p = end -1; p > dp->d_name; --p) + if (*p == '.') + { + end = p; + break; + } + } + + /* Prepend the directory name. */ + end_offset = end - dp->d_name; + buf_len = dir_len + 1+ end_offset; + buf = LT_EMALLOC (char, 1+ buf_len); + if (!buf) + return ++errors; + + assert (buf); + + strcpy (buf, dirnam); + strcat (buf, "/"); + strncat (buf, dp->d_name, end_offset); + buf[buf_len] = LT_EOS_CHAR; + + /* Try to insert (in order) into ARGZ/ARGZ_LEN. */ + if (lt_argz_insertinorder (pargz, pargz_len, buf) != 0) + ++errors; + + LT_DLFREE (buf); + + return errors; + } + + static int + list_files_by_dir (dirnam, pargz, pargz_len) + const char *dirnam; + char **pargz; + size_t *pargz_len; + { + DIR *dirp = 0; + int errors = 0; + + assert (dirnam && *dirnam); + assert (pargz); + assert (pargz_len); + assert (dirnam[LT_STRLEN(dirnam) -1] != '/'); + + dirp = opendir (dirnam); + if (dirp) + { + struct dirent *dp = 0; + + while ((dp = readdir (dirp))) + if (dp->d_name[0] != '.') + if (lt_argz_insertdir (pargz, pargz_len, dirnam, dp)) + { + ++errors; + break; + } + + closedir (dirp); + } + else + ++errors; + + return errors; + } + + + /* If there are any files in DIRNAME, call the function passed in + DATA1 (with the name of each file and DATA2 as arguments). */ + static int + foreachfile_callback (dirname, data1, data2) + char *dirname; + lt_ptr data1; + lt_ptr data2; + { + int (*func) LT_PARAMS((const char *filename, lt_ptr data)) + = (int (*) LT_PARAMS((const char *filename, lt_ptr data))) data1; + + int is_done = 0; + char *argz = 0; + size_t argz_len = 0; + + if (list_files_by_dir (dirname, &argz, &argz_len) != 0) + goto cleanup; + if (!argz) + goto cleanup; + + { + char *filename = 0; + while ((filename = argz_next (argz, argz_len, filename))) + if ((is_done = (*func) (filename, data2))) + break; + } + + cleanup: + LT_DLFREE (argz); + + return is_done; + } + + + /* Call FUNC for each unique extensionless file in SEARCH_PATH, along + with DATA. The filenames passed to FUNC would be suitable for + passing to lt_dlopenext. The extensions are stripped so that + individual modules do not generate several entries (e.g. libfoo.la, + libfoo.so, libfoo.so.1, libfoo.so.1.0.0). If SEARCH_PATH is NULL, + then the same directories that lt_dlopen would search are examined. */ + int + lt_dlforeachfile (search_path, func, data) + const char *search_path; + int (*func) LT_PARAMS ((const char *filename, lt_ptr data)); + lt_ptr data; + { + int is_done = 0; + + if (search_path) + { + /* If a specific path was passed, search only the directories + listed in it. */ + is_done = foreach_dirinpath (search_path, 0, + foreachfile_callback, func, data); + } + else + { + /* Otherwise search the default paths. */ + is_done = foreach_dirinpath (user_search_path, 0, + foreachfile_callback, func, data); + if (!is_done) + { + is_done = foreach_dirinpath (getenv("LTDL_LIBRARY_PATH"), 0, + foreachfile_callback, func, data); + } + + #ifdef LTDL_SHLIBPATH_VAR + if (!is_done) + { + is_done = foreach_dirinpath (getenv(LTDL_SHLIBPATH_VAR), 0, + foreachfile_callback, func, data); + } + #endif + #ifdef LTDL_SYSSEARCHPATH + if (!is_done) + { + is_done = foreach_dirinpath (getenv(LTDL_SYSSEARCHPATH), 0, + foreachfile_callback, func, data); + } + #endif + } + + return is_done; + } + + int + lt_dlclose (handle) + lt_dlhandle handle; + { + lt_dlhandle cur, last; + int errors = 0; + + LT_DLMUTEX_LOCK (); + + /* check whether the handle is valid */ + last = cur = handles; + while (cur && handle != cur) + { + last = cur; + cur = cur->next; + } + + if (!cur) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); + ++errors; + goto done; + } + + handle->info.ref_count--; + + /* Note that even with resident modules, we must track the ref_count + correctly incase the user decides to reset the residency flag + later (even though the API makes no provision for that at the + moment). */ + if (handle->info.ref_count <= 0 && !LT_DLIS_RESIDENT (handle)) + { + lt_user_data data = handle->loader->dlloader_data; + + if (handle != handles) + { + last->next = handle->next; + } + else + { + handles = handle->next; + } + + errors += handle->loader->module_close (data, handle->module); + errors += unload_deplibs(handle); + + /* It is up to the callers to free the data itself. */ + LT_DLFREE (handle->caller_data); + + LT_DLFREE (handle->info.filename); + LT_DLFREE (handle->info.name); + LT_DLFREE (handle); + + goto done; + } + + if (LT_DLIS_RESIDENT (handle)) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CLOSE_RESIDENT_MODULE)); + ++errors; + } + + done: + LT_DLMUTEX_UNLOCK (); + + return errors; + } + + lt_ptr + lt_dlsym (handle, symbol) + lt_dlhandle handle; + const char *symbol; + { + size_t lensym; + char lsym[LT_SYMBOL_LENGTH]; + char *sym; + lt_ptr address; + lt_user_data data; + + if (!handle) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); + return 0; + } + + if (!symbol) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); + return 0; + } + + lensym = LT_STRLEN (symbol) + LT_STRLEN (handle->loader->sym_prefix) + + LT_STRLEN (handle->info.name); + + if (lensym + LT_SYMBOL_OVERHEAD < LT_SYMBOL_LENGTH) + { + sym = lsym; + } + else + { + sym = LT_EMALLOC (char, lensym + LT_SYMBOL_OVERHEAD + 1); + if (!sym) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (BUFFER_OVERFLOW)); + return 0; + } + } + + data = handle->loader->dlloader_data; + if (handle->info.name) + { + const char *saved_error; + + LT_DLMUTEX_GETERROR (saved_error); + + /* this is a libtool module */ + if (handle->loader->sym_prefix) + { + strcpy(sym, handle->loader->sym_prefix); + strcat(sym, handle->info.name); + } + else + { + strcpy(sym, handle->info.name); + } + + strcat(sym, "_LTX_"); + strcat(sym, symbol); + + /* try "modulename_LTX_symbol" */ + address = handle->loader->find_sym (data, handle->module, sym); + if (address) + { + if (sym != lsym) + { + LT_DLFREE (sym); + } + return address; + } + LT_DLMUTEX_SETERROR (saved_error); + } + + /* otherwise try "symbol" */ + if (handle->loader->sym_prefix) + { + strcpy(sym, handle->loader->sym_prefix); + strcat(sym, symbol); + } + else + { + strcpy(sym, symbol); + } + + address = handle->loader->find_sym (data, handle->module, sym); + if (sym != lsym) + { + LT_DLFREE (sym); + } + + return address; + } + + const char * + lt_dlerror () + { + const char *error; + + LT_DLMUTEX_GETERROR (error); + LT_DLMUTEX_SETERROR (0); + + return error ? error : NULL; + } + + static int + lt_dlpath_insertdir (ppath, before, dir) + char **ppath; + char *before; + const char *dir; + { + int errors = 0; + char *canonical = 0; + char *argz = 0; + size_t argz_len = 0; + + assert (ppath); + assert (dir && *dir); + + if (canonicalize_path (dir, &canonical) != 0) + { + ++errors; + goto cleanup; + } + + assert (canonical && *canonical); + + /* If *PPATH is empty, set it to DIR. */ + if (*ppath == 0) + { + assert (!before); /* BEFORE cannot be set without PPATH. */ + assert (dir); /* Without DIR, don't call this function! */ + + *ppath = lt_estrdup (dir); + if (*ppath == 0) + ++errors; + + return errors; + } + + assert (ppath && *ppath); + + if (argzize_path (*ppath, &argz, &argz_len) != 0) + { + ++errors; + goto cleanup; + } + + /* Convert BEFORE into an equivalent offset into ARGZ. This only works + if *PPATH is already canonicalized, and hence does not change length + with respect to ARGZ. We canonicalize each entry as it is added to + the search path, and don't call this function with (uncanonicalized) + user paths, so this is a fair assumption. */ + if (before) + { + assert (*ppath <= before); + assert (before - *ppath <= strlen (*ppath)); + + before = before - *ppath + argz; + } + + if (lt_argz_insert (&argz, &argz_len, before, dir) != 0) + { + ++errors; + goto cleanup; + } + + argz_stringify (argz, argz_len, LT_PATHSEP_CHAR); + LT_DLMEM_REASSIGN (*ppath, argz); + + cleanup: + LT_DLFREE (canonical); + LT_DLFREE (argz); + + return errors; + } + + int + lt_dladdsearchdir (search_dir) + const char *search_dir; + { + int errors = 0; + + if (search_dir && *search_dir) + { + LT_DLMUTEX_LOCK (); + if (lt_dlpath_insertdir (&user_search_path, 0, search_dir) != 0) + ++errors; + LT_DLMUTEX_UNLOCK (); + } + + return errors; + } + + int + lt_dlinsertsearchdir (before, search_dir) + const char *before; + const char *search_dir; + { + int errors = 0; + + if (before) + { + LT_DLMUTEX_LOCK (); + if ((before < user_search_path) + || (before >= user_search_path + LT_STRLEN (user_search_path))) + { + LT_DLMUTEX_UNLOCK (); + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_POSITION)); + return 1; + } + LT_DLMUTEX_UNLOCK (); + } + + if (search_dir && *search_dir) + { + LT_DLMUTEX_LOCK (); + if (lt_dlpath_insertdir (&user_search_path, + (char *) before, search_dir) != 0) + { + ++errors; + } + LT_DLMUTEX_UNLOCK (); + } + + return errors; + } + + int + lt_dlsetsearchpath (search_path) + const char *search_path; + { + int errors = 0; + + LT_DLMUTEX_LOCK (); + LT_DLFREE (user_search_path); + LT_DLMUTEX_UNLOCK (); + + if (!search_path || !LT_STRLEN (search_path)) + { + return errors; + } + + LT_DLMUTEX_LOCK (); + if (canonicalize_path (search_path, &user_search_path) != 0) + ++errors; + LT_DLMUTEX_UNLOCK (); + + return errors; + } + + const char * + lt_dlgetsearchpath () + { + const char *saved_path; + + LT_DLMUTEX_LOCK (); + saved_path = user_search_path; + LT_DLMUTEX_UNLOCK (); + + return saved_path; + } + + int + lt_dlmakeresident (handle) + lt_dlhandle handle; + { + int errors = 0; + + if (!handle) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); + ++errors; + } + else + { + LT_DLSET_FLAG (handle, LT_DLRESIDENT_FLAG); + } + + return errors; + } + + int + lt_dlisresident (handle) + lt_dlhandle handle; + { + if (!handle) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); + return -1; + } + + return LT_DLIS_RESIDENT (handle); + } + + + + + /* --- MODULE INFORMATION --- */ + + const lt_dlinfo * + lt_dlgetinfo (handle) + lt_dlhandle handle; + { + if (!handle) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); + return 0; + } + + return &(handle->info); + } + + lt_dlhandle + lt_dlhandle_next (place) + lt_dlhandle place; + { + return place ? place->next : handles; + } + + int + lt_dlforeach (func, data) + int (*func) LT_PARAMS((lt_dlhandle handle, lt_ptr data)); + lt_ptr data; + { + int errors = 0; + lt_dlhandle cur; + + LT_DLMUTEX_LOCK (); + + cur = handles; + while (cur) + { + lt_dlhandle tmp = cur; + + cur = cur->next; + if ((*func) (tmp, data)) + { + ++errors; + break; + } + } + + LT_DLMUTEX_UNLOCK (); + + return errors; + } + + lt_dlcaller_id + lt_dlcaller_register () + { + static lt_dlcaller_id last_caller_id = 0; + int result; + + LT_DLMUTEX_LOCK (); + result = ++last_caller_id; + LT_DLMUTEX_UNLOCK (); + + return result; + } + + lt_ptr + lt_dlcaller_set_data (key, handle, data) + lt_dlcaller_id key; + lt_dlhandle handle; + lt_ptr data; + { + int n_elements = 0; + lt_ptr stale = (lt_ptr) 0; + int i; + + /* This needs to be locked so that the caller data can be updated + simultaneously by different threads. */ + LT_DLMUTEX_LOCK (); + + if (handle->caller_data) + while (handle->caller_data[n_elements].key) + ++n_elements; + + for (i = 0; i < n_elements; ++i) + { + if (handle->caller_data[i].key == key) + { + stale = handle->caller_data[i].data; + break; + } + } + + /* Ensure that there is enough room in this handle's caller_data + array to accept a new element (and an empty end marker). */ + if (i == n_elements) + { + lt_caller_data *temp + = LT_DLREALLOC (lt_caller_data, handle->caller_data, 2+ n_elements); + + if (!temp) + { + stale = 0; + goto done; + } + + handle->caller_data = temp; + + /* We only need this if we needed to allocate a new caller_data. */ + handle->caller_data[i].key = key; + handle->caller_data[1+ i].key = 0; + } + + handle->caller_data[i].data = data; + + done: + LT_DLMUTEX_UNLOCK (); + + return stale; + } + + lt_ptr + lt_dlcaller_get_data (key, handle) + lt_dlcaller_id key; + lt_dlhandle handle; + { + lt_ptr result = (lt_ptr) 0; + + /* This needs to be locked so that the caller data isn't updated by + another thread part way through this function. */ + LT_DLMUTEX_LOCK (); + + /* Locate the index of the element with a matching KEY. */ + { + int i; + for (i = 0; handle->caller_data[i].key; ++i) + { + if (handle->caller_data[i].key == key) + { + result = handle->caller_data[i].data; + break; + } + } + } + + LT_DLMUTEX_UNLOCK (); + + return result; + } + + + + /* --- USER MODULE LOADER API --- */ + + + int + lt_dlloader_add (place, dlloader, loader_name) + lt_dlloader *place; + const struct lt_user_dlloader *dlloader; + const char *loader_name; + { + int errors = 0; + lt_dlloader *node = 0, *ptr = 0; + + if ((dlloader == 0) /* diagnose null parameters */ + || (dlloader->module_open == 0) + || (dlloader->module_close == 0) + || (dlloader->find_sym == 0)) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); + return 1; + } + + /* Create a new dlloader node with copies of the user callbacks. */ + node = LT_EMALLOC (lt_dlloader, 1); + if (!node) + return 1; + + node->next = 0; + node->loader_name = loader_name; + node->sym_prefix = dlloader->sym_prefix; + node->dlloader_exit = dlloader->dlloader_exit; + node->module_open = dlloader->module_open; + node->module_close = dlloader->module_close; + node->find_sym = dlloader->find_sym; + node->dlloader_data = dlloader->dlloader_data; + + LT_DLMUTEX_LOCK (); + if (!loaders) + { + /* If there are no loaders, NODE becomes the list! */ + loaders = node; + } + else if (!place) + { + /* If PLACE is not set, add NODE to the end of the + LOADERS list. */ + for (ptr = loaders; ptr->next; ptr = ptr->next) + { + /*NOWORK*/; + } + + ptr->next = node; + } + else if (loaders == place) + { + /* If PLACE is the first loader, NODE goes first. */ + node->next = place; + loaders = node; + } + else + { + /* Find the node immediately preceding PLACE. */ + for (ptr = loaders; ptr->next != place; ptr = ptr->next) + { + /*NOWORK*/; + } + + if (ptr->next != place) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); + ++errors; + } + else + { + /* Insert NODE between PTR and PLACE. */ + node->next = place; + ptr->next = node; + } + } + + LT_DLMUTEX_UNLOCK (); + + return errors; + } + + int + lt_dlloader_remove (loader_name) + const char *loader_name; + { + lt_dlloader *place = lt_dlloader_find (loader_name); + lt_dlhandle handle; + int errors = 0; + + if (!place) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); + return 1; + } + + LT_DLMUTEX_LOCK (); + + /* Fail if there are any open modules which use this loader. */ + for (handle = handles; handle; handle = handle->next) + { + if (handle->loader == place) + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (REMOVE_LOADER)); + ++errors; + goto done; + } + } + + if (place == loaders) + { + /* PLACE is the first loader in the list. */ + loaders = loaders->next; + } + else + { + /* Find the loader before the one being removed. */ + lt_dlloader *prev; + for (prev = loaders; prev->next; prev = prev->next) + { + if (!strcmp (prev->next->loader_name, loader_name)) + { + break; + } + } + + place = prev->next; + prev->next = prev->next->next; + } + + if (place->dlloader_exit) + { + errors = place->dlloader_exit (place->dlloader_data); + } + + LT_DLFREE (place); + + done: + LT_DLMUTEX_UNLOCK (); + + return errors; + } + + lt_dlloader * + lt_dlloader_next (place) + lt_dlloader *place; + { + lt_dlloader *next; + + LT_DLMUTEX_LOCK (); + next = place ? place->next : loaders; + LT_DLMUTEX_UNLOCK (); + + return next; + } + + const char * + lt_dlloader_name (place) + lt_dlloader *place; + { + const char *name = 0; + + if (place) + { + LT_DLMUTEX_LOCK (); + name = place ? place->loader_name : 0; + LT_DLMUTEX_UNLOCK (); + } + else + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); + } + + return name; + } + + lt_user_data * + lt_dlloader_data (place) + lt_dlloader *place; + { + lt_user_data *data = 0; + + if (place) + { + LT_DLMUTEX_LOCK (); + data = place ? &(place->dlloader_data) : 0; + LT_DLMUTEX_UNLOCK (); + } + else + { + LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); + } + + return data; + } + + lt_dlloader * + lt_dlloader_find (loader_name) + const char *loader_name; + { + lt_dlloader *place = 0; + + LT_DLMUTEX_LOCK (); + for (place = loaders; place; place = place->next) + { + if (strcmp (place->loader_name, loader_name) == 0) + { + break; + } + } + LT_DLMUTEX_UNLOCK (); + + return place; + } From reid at x10sys.com Mon Nov 29 06:02:59 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 06:02:59 -0600 Subject: [llvm-commits] CVS: llvm/lib/System/ltdl.h Message-ID: <200411291202.GAA04520@zion.cs.uiuc.edu> Changes in directory llvm/lib/System: ltdl.h added (r1.1) --- Log message: Original version of ltdl.h from libtool 1.5.10 --- Diffs of the changes: (+366 -0) Index: llvm/lib/System/ltdl.h diff -c /dev/null llvm/lib/System/ltdl.h:1.1 *** /dev/null Mon Nov 29 06:02:58 2004 --- llvm/lib/System/ltdl.h Mon Nov 29 06:02:48 2004 *************** *** 0 **** --- 1,366 ---- + /* ltdl.h -- generic dlopen functions + Copyright (C) 1998-2000 Free Software Foundation, Inc. + Originally by Thomas Tanner + This file is part of GNU Libtool. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + As a special exception to the GNU Lesser General Public License, + if you distribute this file as part of a program or library that + is built using GNU libtool, you may include it under the same + distribution terms that you use for the rest of that program. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA + */ + + /* Only include this header file once. */ + #ifndef LTDL_H + #define LTDL_H 1 + + #include /* for size_t declaration */ + + + /* --- MACROS FOR PORTABILITY --- */ + + + /* Saves on those hard to debug '\0' typos.... */ + #define LT_EOS_CHAR '\0' + + /* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations, + so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at + the end of C declarations. */ + #ifdef __cplusplus + # define LT_BEGIN_C_DECLS extern "C" { + # define LT_END_C_DECLS } + #else + # define LT_BEGIN_C_DECLS /* empty */ + # define LT_END_C_DECLS /* empty */ + #endif + + LT_BEGIN_C_DECLS + + + /* LT_PARAMS is a macro used to wrap function prototypes, so that compilers + that don't understand ANSI C prototypes still work, and ANSI C + compilers can issue warnings about type mismatches. */ + #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus) + # define LT_PARAMS(protos) protos + # define lt_ptr void* + #else + # define LT_PARAMS(protos) () + # define lt_ptr char* + #endif + + /* LT_STMT_START/END are used to create macros which expand to a + a single compound statement in a portable way. */ + #if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus) + # define LT_STMT_START (void)( + # define LT_STMT_END ) + #else + # if (defined (sun) || defined (__sun__)) + # define LT_STMT_START if (1) + # define LT_STMT_END else (void)0 + # else + # define LT_STMT_START do + # define LT_STMT_END while (0) + # endif + #endif + + /* LT_CONC creates a new concatenated symbol for the compiler + in a portable way. */ + #if defined(__STDC__) || defined(__cplusplus) || defined(_MSC_VER) + # define LT_CONC(s,t) s##t + #else + # define LT_CONC(s,t) s/**/t + #endif + + /* LT_STRLEN can be used safely on NULL pointers. */ + #define LT_STRLEN(s) (((s) && (s)[0]) ? strlen (s) : 0) + + + + /* --- WINDOWS SUPPORT --- */ + + + /* Canonicalise Windows and Cygwin recognition macros. */ + #ifdef __CYGWIN32__ + # ifndef __CYGWIN__ + # define __CYGWIN__ __CYGWIN32__ + # endif + #endif + #if defined(_WIN32) || defined(WIN32) + # ifndef __WINDOWS__ + # ifdef _WIN32 + # define __WINDOWS__ _WIN32 + # else + # ifdef WIN32 + # define __WINDOWS__ WIN32 + # endif + # endif + # endif + #endif + + + #ifdef __WINDOWS__ + # ifndef __CYGWIN__ + /* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory + separator when it is set. */ + # define LT_DIRSEP_CHAR '\\' + # define LT_PATHSEP_CHAR ';' + # endif + #endif + #ifndef LT_PATHSEP_CHAR + # define LT_PATHSEP_CHAR ':' + #endif + + /* DLL building support on win32 hosts; mostly to workaround their + ridiculous implementation of data symbol exporting. */ + #ifndef LT_SCOPE + # ifdef __WINDOWS__ + # ifdef DLL_EXPORT /* defined by libtool (if required) */ + # define LT_SCOPE __declspec(dllexport) + # endif + # ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */ + # define LT_SCOPE extern __declspec(dllimport) + # endif + # endif + # ifndef LT_SCOPE /* static linking or !__WINDOWS__ */ + # define LT_SCOPE extern + # endif + #endif + + + #if defined(_MSC_VER) /* Visual Studio */ + # define R_OK 4 + #endif + + + + /* --- DYNAMIC MODULE LOADING API --- */ + + + typedef struct lt_dlhandle_struct *lt_dlhandle; /* A loaded module. */ + + /* Initialisation and finalisation functions for libltdl. */ + LT_SCOPE int lt_dlinit LT_PARAMS((void)); + LT_SCOPE int lt_dlexit LT_PARAMS((void)); + + /* Module search path manipulation. */ + LT_SCOPE int lt_dladdsearchdir LT_PARAMS((const char *search_dir)); + LT_SCOPE int lt_dlinsertsearchdir LT_PARAMS((const char *before, + const char *search_dir)); + LT_SCOPE int lt_dlsetsearchpath LT_PARAMS((const char *search_path)); + LT_SCOPE const char *lt_dlgetsearchpath LT_PARAMS((void)); + LT_SCOPE int lt_dlforeachfile LT_PARAMS(( + const char *search_path, + int (*func) (const char *filename, lt_ptr data), + lt_ptr data)); + + /* Portable libltdl versions of the system dlopen() API. */ + LT_SCOPE lt_dlhandle lt_dlopen LT_PARAMS((const char *filename)); + LT_SCOPE lt_dlhandle lt_dlopenext LT_PARAMS((const char *filename)); + LT_SCOPE lt_ptr lt_dlsym LT_PARAMS((lt_dlhandle handle, + const char *name)); + LT_SCOPE const char *lt_dlerror LT_PARAMS((void)); + LT_SCOPE int lt_dlclose LT_PARAMS((lt_dlhandle handle)); + + /* Module residency management. */ + LT_SCOPE int lt_dlmakeresident LT_PARAMS((lt_dlhandle handle)); + LT_SCOPE int lt_dlisresident LT_PARAMS((lt_dlhandle handle)); + + + + + /* --- MUTEX LOCKING --- */ + + + typedef void lt_dlmutex_lock LT_PARAMS((void)); + typedef void lt_dlmutex_unlock LT_PARAMS((void)); + typedef void lt_dlmutex_seterror LT_PARAMS((const char *errmsg)); + typedef const char *lt_dlmutex_geterror LT_PARAMS((void)); + + LT_SCOPE int lt_dlmutex_register LT_PARAMS((lt_dlmutex_lock *lock, + lt_dlmutex_unlock *unlock, + lt_dlmutex_seterror *seterror, + lt_dlmutex_geterror *geterror)); + + + + + /* --- MEMORY HANDLING --- */ + + + /* By default, the realloc function pointer is set to our internal + realloc implementation which iself uses lt_dlmalloc and lt_dlfree. + libltdl relies on a featureful realloc, but if you are sure yours + has the right semantics then you can assign it directly. Generally, + it is safe to assign just a malloc() and a free() function. */ + LT_SCOPE lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size)); + LT_SCOPE lt_ptr (*lt_dlrealloc) LT_PARAMS((lt_ptr ptr, size_t size)); + LT_SCOPE void (*lt_dlfree) LT_PARAMS((lt_ptr ptr)); + + + + + /* --- PRELOADED MODULE SUPPORT --- */ + + + /* A preopened symbol. Arrays of this type comprise the exported + symbols for a dlpreopened module. */ + typedef struct { + const char *name; + lt_ptr address; + } lt_dlsymlist; + + LT_SCOPE int lt_dlpreload LT_PARAMS((const lt_dlsymlist *preloaded)); + LT_SCOPE int lt_dlpreload_default + LT_PARAMS((const lt_dlsymlist *preloaded)); + + #define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \ + extern const lt_dlsymlist lt_preloaded_symbols[]; \ + lt_dlpreload_default(lt_preloaded_symbols); \ + }LT_STMT_END + + + + + /* --- MODULE INFORMATION --- */ + + + /* Read only information pertaining to a loaded module. */ + typedef struct { + char *filename; /* file name */ + char *name; /* module name */ + int ref_count; /* number of times lt_dlopened minus + number of times lt_dlclosed. */ + } lt_dlinfo; + + LT_SCOPE const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle)); + LT_SCOPE lt_dlhandle lt_dlhandle_next LT_PARAMS((lt_dlhandle place)); + LT_SCOPE int lt_dlforeach LT_PARAMS(( + int (*func) (lt_dlhandle handle, lt_ptr data), + lt_ptr data)); + + /* Associating user data with loaded modules. */ + typedef unsigned lt_dlcaller_id; + + LT_SCOPE lt_dlcaller_id lt_dlcaller_register LT_PARAMS((void)); + LT_SCOPE lt_ptr lt_dlcaller_set_data LT_PARAMS((lt_dlcaller_id key, + lt_dlhandle handle, + lt_ptr data)); + LT_SCOPE lt_ptr lt_dlcaller_get_data LT_PARAMS((lt_dlcaller_id key, + lt_dlhandle handle)); + + + + /* --- USER MODULE LOADER API --- */ + + + typedef struct lt_dlloader lt_dlloader; + typedef lt_ptr lt_user_data; + typedef lt_ptr lt_module; + + /* Function pointer types for creating user defined module loaders. */ + typedef lt_module lt_module_open LT_PARAMS((lt_user_data loader_data, + const char *filename)); + typedef int lt_module_close LT_PARAMS((lt_user_data loader_data, + lt_module handle)); + typedef lt_ptr lt_find_sym LT_PARAMS((lt_user_data loader_data, + lt_module handle, + const char *symbol)); + typedef int lt_dlloader_exit LT_PARAMS((lt_user_data loader_data)); + + struct lt_user_dlloader { + const char *sym_prefix; + lt_module_open *module_open; + lt_module_close *module_close; + lt_find_sym *find_sym; + lt_dlloader_exit *dlloader_exit; + lt_user_data dlloader_data; + }; + + LT_SCOPE lt_dlloader *lt_dlloader_next LT_PARAMS((lt_dlloader *place)); + LT_SCOPE lt_dlloader *lt_dlloader_find LT_PARAMS(( + const char *loader_name)); + LT_SCOPE const char *lt_dlloader_name LT_PARAMS((lt_dlloader *place)); + LT_SCOPE lt_user_data *lt_dlloader_data LT_PARAMS((lt_dlloader *place)); + LT_SCOPE int lt_dlloader_add LT_PARAMS((lt_dlloader *place, + const struct lt_user_dlloader *dlloader, + const char *loader_name)); + LT_SCOPE int lt_dlloader_remove LT_PARAMS(( + const char *loader_name)); + + + + /* --- ERROR MESSAGE HANDLING --- */ + + + /* Defining error strings alongside their symbolic names in a macro in + this way allows us to expand the macro in different contexts with + confidence that the enumeration of symbolic names will map correctly + onto the table of error strings. */ + #define lt_dlerror_table \ + LT_ERROR(UNKNOWN, "unknown error") \ + LT_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available") \ + LT_ERROR(INVALID_LOADER, "invalid loader") \ + LT_ERROR(INIT_LOADER, "loader initialization failed") \ + LT_ERROR(REMOVE_LOADER, "loader removal failed") \ + LT_ERROR(FILE_NOT_FOUND, "file not found") \ + LT_ERROR(DEPLIB_NOT_FOUND, "dependency library not found") \ + LT_ERROR(NO_SYMBOLS, "no symbols defined") \ + LT_ERROR(CANNOT_OPEN, "can't open the module") \ + LT_ERROR(CANNOT_CLOSE, "can't close the module") \ + LT_ERROR(SYMBOL_NOT_FOUND, "symbol not found") \ + LT_ERROR(NO_MEMORY, "not enough memory") \ + LT_ERROR(INVALID_HANDLE, "invalid module handle") \ + LT_ERROR(BUFFER_OVERFLOW, "internal buffer overflow") \ + LT_ERROR(INVALID_ERRORCODE, "invalid errorcode") \ + LT_ERROR(SHUTDOWN, "library already shutdown") \ + LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module") \ + LT_ERROR(INVALID_MUTEX_ARGS, "invalid mutex handler registration") \ + LT_ERROR(INVALID_POSITION, "invalid search path insert position") + + /* Enumerate the symbolic error names. */ + enum { + #define LT_ERROR(name, diagnostic) LT_CONC(LT_ERROR_, name), + lt_dlerror_table + #undef LT_ERROR + + LT_ERROR_MAX + }; + + /* These functions are only useful from inside custom module loaders. */ + LT_SCOPE int lt_dladderror LT_PARAMS((const char *diagnostic)); + LT_SCOPE int lt_dlseterror LT_PARAMS((int errorcode)); + + + + + /* --- SOURCE COMPATIBILITY WITH OLD LIBLTDL --- */ + + + #ifdef LT_NON_POSIX_NAMESPACE + # define lt_ptr_t lt_ptr + # define lt_module_t lt_module + # define lt_module_open_t lt_module_open + # define lt_module_close_t lt_module_close + # define lt_find_sym_t lt_find_sym + # define lt_dlloader_exit_t lt_dlloader_exit + # define lt_dlloader_t lt_dlloader + # define lt_dlloader_data_t lt_user_data + #endif + + LT_END_C_DECLS + + #endif /* !LTDL_H */ From reid at x10sys.com Mon Nov 29 06:04:38 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 06:04:38 -0600 Subject: [llvm-commits] CVS: llvm/lib/System/ltdl.c Message-ID: <200411291204.GAA04535@zion.cs.uiuc.edu> Changes in directory llvm/lib/System: ltdl.c updated: 1.1 -> 1.2 --- Log message: Mods for compilation with llvm. --- Diffs of the changes: (+10 -7) Index: llvm/lib/System/ltdl.c diff -u llvm/lib/System/ltdl.c:1.1 llvm/lib/System/ltdl.c:1.2 --- llvm/lib/System/ltdl.c:1.1 Mon Nov 29 06:02:25 2004 +++ llvm/lib/System/ltdl.c Mon Nov 29 06:04:27 2004 @@ -25,9 +25,12 @@ */ -#if HAVE_CONFIG_H -# include -#endif +#include "llvm/Config/config.h" +/* + #if HAVE_CONFIG_H + # include + #endif +*/ #if HAVE_UNISTD_H # include @@ -2681,7 +2684,7 @@ { size_t lendir = LT_STRLEN (dir_name); - if (lendir +1 +lenbase >= filenamesize) + if (lendir +1 +lenbase >= (size_t)filenamesize) { LT_DLFREE (filename); filenamesize = lendir +1 +lenbase +1; /* "/d" + '/' + "f" + '\0' */ @@ -2690,7 +2693,7 @@ goto cleanup; } - assert (filenamesize > lendir); + assert ((size_t)filenamesize > lendir); strcpy (filename, dir_name); if (base_name && *base_name) @@ -3134,7 +3137,7 @@ /* canonicalize the module name */ { size_t i; - for (i = 0; i < ext - base_name; ++i) + for (i = 0; i < (size_t)(ext - base_name); ++i) { if (isalnum ((int)(base_name[i]))) { @@ -3986,7 +3989,7 @@ if (before) { assert (*ppath <= before); - assert (before - *ppath <= strlen (*ppath)); + assert (before - *ppath <= (int)strlen (*ppath)); before = before - *ppath + argz; } From reid at x10sys.com Mon Nov 29 06:12:21 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 06:12:21 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Config/dlfcn.h Message-ID: <200411291212.GAA04581@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Config: dlfcn.h updated: 1.6 -> 1.7 --- Log message: Don't include ltdl.h any more. Its nested in lib/System now. --- Diffs of the changes: (+0 -4) Index: llvm/include/llvm/Config/dlfcn.h diff -u llvm/include/llvm/Config/dlfcn.h:1.6 llvm/include/llvm/Config/dlfcn.h:1.7 --- llvm/include/llvm/Config/dlfcn.h:1.6 Thu Nov 18 03:50:00 2004 +++ llvm/include/llvm/Config/dlfcn.h Mon Nov 29 06:12:11 2004 @@ -16,10 +16,6 @@ #include "llvm/Config/config.h" -#ifdef HAVE_LTDL_H -#include -#endif - #ifdef HAVE_DLFCN_H #include #endif From reid at x10sys.com Mon Nov 29 06:28:58 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 06:28:58 -0600 Subject: [llvm-commits] CVS: llvm/autoconf/README.TXT Message-ID: <200411291228.GAA04664@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: README.TXT updated: 1.1 -> 1.2 --- Log message: * Update instructions about upgrading libtool * Add instructions about upgrading autoconf --- Diffs of the changes: (+35 -8) Index: llvm/autoconf/README.TXT diff -u llvm/autoconf/README.TXT:1.1 llvm/autoconf/README.TXT:1.2 --- llvm/autoconf/README.TXT:1.1 Tue Oct 12 20:07:55 2004 +++ llvm/autoconf/README.TXT Mon Nov 29 06:28:47 2004 @@ -1,12 +1,39 @@ Upgrading Libtool ------------------ +=============================================================================== If you are in the mood to upgrade libtool, you must do the following: -1. configure/build/install libtool with --prefix= -2. Copy /share/aclocal/libtool.m4 to llvm/autoconf/m4/libtool.m4 -3. Copy /share/libtool/ltmain.sh to llvm/autoconf/ltmain.sh -4. Adjust the llvm/autoconf/m4/libtool.m4 file to ensure that the variable - default_ofile is set to "mklib" instead of "libtool" -5. Possibly adjust llvm/autoconf/m4/libtool.m4 to get rid of autoconf - warnings related to obsolete autconf features (e.g. AC_TRY_LINK) + 1. Get the new version of libtool and put it in + 2. configure/build/install libtool with --prefix= + 3. Copy /ltdl.m4 to llvm/autoconf/m4 + 4. Copy /share/aclocal/libtool.m4 to llvm/autoconf/m4/libtool.m4 + 5. Copy /share/libtool/ltmain.sh to llvm/autoconf/ltmain.sh + 6. Copy /share/libtool/libltdl/ltdl.c to llvm/lib/System + 7. Copy /share/libtool/libltdl/ltdl.h to llvm/lib/System + 8. Adjust the llvm/autoconf/m4/libtool.m4 file to ensure that the variable + default_ofile is set to "mklib" instead of "libtool" + 9. Run "autoupdate libtool.m4 ltdl.m4" in the llvm/autoconf/m4 directory. + This should correctly update the macro definitions in the libtool m4 + files to match the version of autoconf that LLVM uses. This converts + AC_HELP_STRING to AS_HELP_STRING and AC_TRY_LINK to AC_LINK_IFELSE, amongst + other things. You may need to manually adjust the files. +10. Run AutoRegen.sh to get the new macros into configure script +11. If there are any warnings from configure, go to step 9. +12. Rebuild LLVM, making sure it reconfigured +13. Test the JIT which uses libltdl +14. If it all works, only THEN commit the changes. + +Upgrading autoconf +=============================================================================== + +If you are in the mood to upgrade autoconf, you should: + + 1. Consider not upgrading. + 2. No really, this is a hassle, you don't want to do it. + 3. Get the new version of autoconf and put it in + 4. configure/build/install autoconf with --prefix= + 5. Run autoupdate on all the m4 macros in llvm/autoconf/m4 + 6. Run autoupdate on llvm/autoconf/configure.ac + 7. Regenerate configure script with AutoRegen.sh + 8. If there are any warnings from autoconf, fix them and go to step 7. + 9. Test, test, test. From reid at x10sys.com Mon Nov 29 06:30:09 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 06:30:09 -0600 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200411291230.GAA04693@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.136 -> 1.137 --- Log message: * Implement embedding libltdl into LLVM which required some rearranging. --- Diffs of the changes: (+12 -18) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.136 llvm/autoconf/configure.ac:1.137 --- llvm/autoconf/configure.ac:1.136 Sun Nov 28 22:56:35 2004 +++ llvm/autoconf/configure.ac Mon Nov 29 06:29:58 2004 @@ -233,12 +233,6 @@ AC_PROG_FLEX AC_PROG_BISON -dnl Check for libtool and the library that has dlopen function (which must come -dnl before the AC_PROG_LIBTOOL check in order to enable dlopening libraries with -dnl libtool). -AC_LIBTOOL_DLOPEN -AC_PROG_LIBTOOL - dnl Check for the tools that the makefiles require AC_CHECK_GNU_MAKE AC_PROG_LN_S @@ -276,6 +270,13 @@ dnl Determine if the linker supports the -R option. AC_LINK_USE_R +dnl Check for libtool and the library that has dlopen function (which must come +dnl before the AC_PROG_LIBTOOL check in order to enable dlopening libraries with +dnl libtool). +AC_LIBTOOL_DLOPEN +AC_LIB_LTDL +AC_PROG_LIBTOOL + dnl Check if we know how to tell etags we are using C++: etags_version=`$ETAGS --version 2>&1` case "$etags_version" in @@ -383,8 +384,8 @@ dnl looking for POSIX headers. AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([sys/time.h sys/mman.h sys/resource.h sys/time.h sys/types.h]) -AC_CHECK_HEADERS([bzlib.h dlfcn.h execinfo.h fcntl.h limits.h link.h ltdl.h]) -AC_CHECK_HEADERS([malloc.h unistd.h windows.h zlib.h]) +AC_CHECK_HEADERS([dlfcn.h execinfo.h fcntl.h limits.h link.h]) +AC_CHECK_HEADERS([malloc.h unistd.h windows.h]) AC_HEADER_TIME AC_HEADER_MMAP_ANONYMOUS @@ -482,15 +483,9 @@ AC_SUBST(LLVMCC1PLUS,$llvmcc1pluspath) fi -dnl Get libtool's idea of what the shared library suffix is. -dnl (This is a hack; it relies on undocumented behavior.) -AC_MSG_CHECKING([for shared library suffix]) -eval "SHLIBEXT=$shrext_cmds" -AC_MSG_RESULT($SHLIBEXT) -dnl Propagate it to the Makefiles and config.h (for gccld & bugpoint). -AC_SUBST(SHLIBEXT,$SHLIBEXT) -AC_DEFINE_UNQUOTED(SHLIBEXT,"$SHLIBEXT", - [Extension that shared libraries have, e.g., ".so".]) +dnl Propagate the shared library extension that the libltdl checks did to +dnl the Makefiles so we can use it there too +AC_SUBST(SHLIBEXT,$libltdl_cv_shlibext) # Translate the various configuration directories and other basic # information into substitutions that will end up in Makefile.config.in @@ -574,7 +569,6 @@ AC_CONFIG_MAKEFILE(test/QMTest/llvm.py) AC_CONFIG_MAKEFILE(test/QMTest/llvmdb.py) AC_CONFIG_MAKEFILE(tools/Makefile) -AC_CONFIG_MAKEFILE(tools/Makefile.JIT) AC_CONFIG_MAKEFILE(utils/Makefile) AC_CONFIG_MAKEFILE(projects/Makefile) From reid at x10sys.com Mon Nov 29 06:30:09 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 06:30:09 -0600 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200411291230.GAA04696@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.143 -> 1.144 --- Log message: * Implement embedding libltdl into LLVM which required some rearranging. --- Diffs of the changes: (+17426 -13849) Index: llvm/configure diff -u llvm/configure:1.143 llvm/configure:1.144 --- llvm/configure:1.143 Sun Nov 28 22:56:34 2004 +++ llvm/configure Mon Nov 29 06:29:58 2004 @@ -476,7 +476,7 @@ # 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 LLVM_COPYRIGHT subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS ARCH ENDIAN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT ENABLE_OPTIMIZED JIT ENABLE_DOXYGEN LLVMGCCDIR CPP CXX CXXFLAGS ac_ct_CXX LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ifGNUmake DATE FIND GREP MKDIR MV PAX RM SED TAR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA BZIP2 DOT DOXYGEN ETAGS GROFF GZIP POD2HTML POD2MAN PYTHON QMTEST RUNTEST ZIP ETAGSFLAGS ALLOCA MMAP_FILE LLVMGCC LLVMCC1 LLVMCC1P! LUS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME LIBOBJS LTLIBOBJS' +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 LLVM_COPYRIGHT subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS ARCH ENDIAN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT ENABLE_OPTIMIZED JIT ENABLE_DOXYGEN LLVMGCCDIR CPP CXX CXXFLAGS ac_ct_CXX LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON ifGNUmake LN_S DATE FIND GREP MKDIR MV PAX RANLIB ac_ct_RANLIB RM SED TAR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA BZIP2 DOT DOXYGEN ETAGS GROFF GZIP POD2HTML POD2MAN PYTHON QMTEST RUNTEST ZIP EGREP INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL ECHO AR ac_ct_AR STRIP ac_ct_ST! RIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ETAGSFLAGS ALLOCA MMAP_FILE LLVMGCC LLVMCC1 LLVMCC1PLUS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1037,6 +1037,7 @@ --enable-optimized --enable-jit Enable Just In Time Compiling (default is YES) --enable-doxygen Build doxygen documentation (default is NO) + --enable-ltdl-install install libltdl --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] @@ -2961,15 +2962,17 @@ # Check whether --enable-doxygen or --disable-doxygen was given. if test "${enable_doxygen+set}" = set; then enableval="$enable_doxygen" - enableval=yes + else - enableval=no + enableval=default fi; case "$enableval" in yes) ENABLE_DOXYGEN=1 ;; no) ENABLE_DOXYGEN=0 ;; + default) ENABLE_DOXYGEN=0 + ;; *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-doxygen. Use \"yes\" or \"no\"" >&5 echo "$as_me: error: Invalid setting for --enable-doxygen. Use \"yes\" or \"no\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -4454,916 +4457,1079 @@ fi - - -# Check whether --enable-shared or --disable-shared was given. -if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac +echo "$as_me:$LINENO: checking for GNU make" >&5 +echo $ECHO_N "checking for GNU make... $ECHO_C" >&6 +if test "${llvm_cv_gnu_make_command+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - enable_shared=yes -fi; + 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 +fi +echo "$as_me:$LINENO: result: $llvm_cv_gnu_make_command" >&5 +echo "${ECHO_T}$llvm_cv_gnu_make_command" >&6 + if test "x$llvm_cv_gnu_make_command" != "x" ; then + ifGNUmake='' ; + else + ifGNUmake='#' ; + echo "$as_me:$LINENO: result: \"Not found\"" >&5 +echo "${ECHO_T}\"Not found\"" >&6; + fi -# Check whether --enable-static or --disable-static was given. -if test "${enable_static+set}" = set; then - enableval="$enable_static" - p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi; -# Check whether --enable-fast-install or --disable-fast-install was given. -if test "${enable_fast_install+set}" = set; then - enableval="$enable_fast_install" - p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac +echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - enable_fast_install=yes -fi; + echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6 +fi -echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 -if test "${lt_cv_path_SED+set}" = set; then +# Extract the first word of "date", so it can be a program name with args. +set dummy date; 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_path_DATE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $DATE in + [\\/]* | ?:[\\/]*) + ac_cv_path_DATE="$DATE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && break - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done +done done + test -z "$ac_cv_path_DATE" && ac_cv_path_DATE="date" + ;; +esac fi +DATE=$ac_cv_path_DATE -SED=$lt_cv_path_SED -echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6 +if test -n "$DATE"; then + echo "$as_me:$LINENO: result: $DATE" >&5 +echo "${ECHO_T}$DATE" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +# Extract the first word of "find", so it can be a program name with args. +set dummy find; 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_path_FIND+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep + case $FIND in + [\\/]* | ?:[\\/]*) + ac_cv_path_FIND="$FIND" # Let the user override the test with a path. + ;; + *) + 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_path_FIND="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + test -z "$ac_cv_path_FIND" && ac_cv_path_FIND="find" + ;; +esac +fi +FIND=$ac_cv_path_FIND +if test -n "$FIND"; then + echo "$as_me:$LINENO: result: $FIND" >&5 +echo "${ECHO_T}$FIND" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -# Check whether --with-gnu-ld or --without-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes +# Extract the first word of "grep", so it can be a program name with args. +set dummy grep; 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_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - with_gnu_ld=no -fi; -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + case $GREP in + [\\/]* | ?:[\\/]*) + ac_cv_path_GREP="$GREP" # Let the user override the test with a path. + ;; *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 -else - echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 -fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 + break 2 + fi +done +done + + test -z "$ac_cv_path_GREP" && ac_cv_path_GREP="grep" + ;; +esac fi +GREP=$ac_cv_path_GREP -LD="$lt_cv_path_LD" -if test -n "$LD"; then - echo "$as_me:$LINENO: result: $LD" >&5 -echo "${ECHO_T}$LD" >&6 +if test -n "$GREP"; then + echo "$as_me:$LINENO: result: $GREP" >&5 +echo "${ECHO_T}$GREP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 -if test "${lt_cv_prog_gnu_ld+set}" = set; then + +# Extract the first word of "mkdir", so it can be a program name with args. +set dummy mkdir; 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_path_MKDIR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. -case `$LD -v 2>&1 &5 + break 2 + fi +done +done + + test -z "$ac_cv_path_MKDIR" && ac_cv_path_MKDIR="mkdir" ;; esac fi -echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 -with_gnu_ld=$lt_cv_prog_gnu_ld - +MKDIR=$ac_cv_path_MKDIR -echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 -if test "${lt_cv_ld_reload_flag+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$MKDIR"; then + echo "$as_me:$LINENO: result: $MKDIR" >&5 +echo "${ECHO_T}$MKDIR" >&6 else - lt_cv_ld_reload_flag='-r' + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac -echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 -echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 -if test "${lt_cv_path_NM+set}" = set; then +# Extract the first word of "mv", so it can be a program name with args. +set dummy mv; 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_path_MV+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/${ac_tool_prefix}nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - esac - fi - done - IFS="$lt_save_ifs" - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi + case $MV in + [\\/]* | ?:[\\/]*) + ac_cv_path_MV="$MV" # Let the user override the test with a path. + ;; + *) + 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_path_MV="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_MV" && ac_cv_path_MV="mv" + ;; +esac fi -echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 -echo "${ECHO_T}$lt_cv_path_NM" >&6 -NM="$lt_cv_path_NM" +MV=$ac_cv_path_MV -echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +if test -n "$MV"; then + echo "$as_me:$LINENO: result: $MV" >&5 +echo "${ECHO_T}$MV" >&6 else - echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 -echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 -if test "${lt_cv_deplibs_check_method+set}" = set; then +# Extract the first word of "pax", so it can be a program name with args. +set dummy pax; 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_path_PAX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix4* | aix5*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all + case $PAX in + [\\/]* | ?:[\\/]*) + ac_cv_path_PAX="$PAX" # Let the user override the test with a path. ;; + *) + 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_path_PAX="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so + test -z "$ac_cv_path_PAX" && ac_cv_path_PAX="pax" ;; +esac +fi +PAX=$ac_cv_path_PAX -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; +if test -n "$PAX"; then + echo "$as_me:$LINENO: result: $PAX" >&5 +echo "${ECHO_T}$PAX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump'. - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -freebsd* | kfreebsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; 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_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; +done +done -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case "$host_cpu" in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +fi -# This must be Linux ELF. -linux*) - lt_cv_deplibs_check_method=pass_all +# Extract the first word of "rm", so it can be a program name with args. +set dummy rm; 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_path_RM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $RM in + [\\/]* | ?:[\\/]*) + ac_cv_path_RM="$RM" # Let the user override the test with a path. ;; - -netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + *) + 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_path_RM="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; +done +done -nto-qnx*) - lt_cv_deplibs_check_method=unknown + test -z "$ac_cv_path_RM" && ac_cv_path_RM="rm" ;; +esac +fi +RM=$ac_cv_path_RM -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; +if test -n "$RM"; then + echo "$as_me:$LINENO: result: $RM" >&5 +echo "${ECHO_T}$RM" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all +# Extract the first word of "sed", so it can be a program name with args. +set dummy sed; 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_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $SED in + [\\/]* | ?:[\\/]*) + ac_cv_path_SED="$SED" # Let the user override the test with a path. ;; + *) + 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_path_SED="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done -sco3.2v5*) - lt_cv_deplibs_check_method=pass_all + test -z "$ac_cv_path_SED" && ac_cv_path_SED="sed" ;; +esac +fi +SED=$ac_cv_path_SED -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; +if test -n "$SED"; then + echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - esac +# Extract the first word of "tar", so it can be a program name with args. +set dummy tar; 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_path_TAR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $TAR in + [\\/]* | ?:[\\/]*) + ac_cv_path_TAR="$TAR" # Let the user override the test with a path. ;; + *) + 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_path_TAR="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done -sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all + test -z "$ac_cv_path_TAR" && ac_cv_path_TAR="gtar" ;; esac +fi +TAR=$ac_cv_path_TAR +if test -n "$TAR"; then + echo "$as_me:$LINENO: result: $TAR" >&5 +echo "${ECHO_T}$TAR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL=$ac_install_sh + fi +fi +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 -# Allow CC to be a program name with arguments. -compiler=$CC +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -# Check whether --enable-libtool-lock or --disable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval="$enable_libtool_lock" +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' -fi; -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - 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 - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* + +# Extract the first word of "bzip2", so it can be a program name with args. +set dummy bzip2; 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_path_BZIP2+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $BZIP2 in + [\\/]* | ?:[\\/]*) + ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a path. ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 5010 "configure"' > conftest.$ac_ext - 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 - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi + *) + 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_path_BZIP2="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - rm -rf conftest* +done +done + + test -z "$ac_cv_path_BZIP2" && ac_cv_path_BZIP2="true bzip2" ;; +esac +fi +BZIP2=$ac_cv_path_BZIP2 -x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - 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 - case "`/usr/bin/file conftest.o`" in - *32-bit*) - case $host in - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; +if test -n "$BZIP2"; then + echo "$as_me:$LINENO: result: $BZIP2" >&5 +echo "${ECHO_T}$BZIP2" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 -if test "${lt_cv_cc_needs_belf+set}" = set; then +# Extract the first word of "dot", so it can be a program name with args. +set dummy dot; 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_path_DOT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - 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 + case $DOT in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOT="$DOT" # Let the user override the test with a path. + ;; + *) + 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_path_DOT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + test -z "$ac_cv_path_DOT" && ac_cv_path_DOT="true dot" + ;; +esac +fi +DOT=$ac_cv_path_DOT -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 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_exeext' - { (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 - lt_cv_cc_needs_belf=yes +if test -n "$DOT"; then + echo "$as_me:$LINENO: result: $DOT" >&5 +echo "${ECHO_T}$DOT" >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -lt_cv_cc_needs_belf=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext 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 -fi -echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi +# Extract the first word of "doxygen", so it can be a program name with args. +set dummy doxygen; 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_path_DOXYGEN+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $DOXYGEN in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. ;; + *) + 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_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN="true doxygen" + ;; esac +fi +DOXYGEN=$ac_cv_path_DOXYGEN -need_locks="$enable_libtool_lock" - - +if test -n "$DOXYGEN"; then + echo "$as_me:$LINENO: result: $DOXYGEN" >&5 +echo "${ECHO_T}$DOXYGEN" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then +# Extract the first word of "etags", so it can be a program name with args. +set dummy etags; 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_path_ETAGS+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. */ -#include -#include -#include -#include + case $ETAGS in + [\\/]* | ?:[\\/]*) + ac_cv_path_ETAGS="$ETAGS" # Let the user override the test with a path. + ;; + *) + 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_path_ETAGS="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done -int -main () -{ + test -z "$ac_cv_path_ETAGS" && ac_cv_path_ETAGS="true etags" + ;; +esac +fi +ETAGS=$ac_cv_path_ETAGS - ; - 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_header_stdc=yes +if test -n "$ETAGS"; then + echo "$as_me:$LINENO: result: $ETAGS" >&5 +echo "${ECHO_T}$ETAGS" >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_stdc=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - 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 "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : +# Extract the first word of "groff", so it can be a program name with args. +set dummy groff; 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_path_GROFF+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_stdc=no -fi -rm -f conftest* + case $GROFF in + [\\/]* | ?:[\\/]*) + ac_cv_path_GROFF="$GROFF" # Let the user override the test with a path. + ;; + *) + 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_path_GROFF="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + test -z "$ac_cv_path_GROFF" && ac_cv_path_GROFF="true groff" + ;; +esac fi +GROFF=$ac_cv_path_GROFF -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : +if test -n "$GROFF"; then + echo "$as_me:$LINENO: result: $GROFF" >&5 +echo "${ECHO_T}$GROFF" >&6 else - ac_cv_header_stdc=no + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f conftest* +# Extract the first word of "gzip", so it can be a program name with args. +set dummy gzip; 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_path_GZIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GZIP in + [\\/]* | ?:[\\/]*) + ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path. + ;; + *) + 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_path_GZIP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_GZIP" && ac_cv_path_GZIP="true gzip" + ;; +esac fi +GZIP=$ac_cv_path_GZIP -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : +if test -n "$GZIP"; then + echo "$as_me:$LINENO: result: $GZIP" >&5 +echo "${ECHO_T}$GZIP" >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); -} -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./conftest$ac_exeext' - { (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 - : +# Extract the first word of "pod2html", so it can be a program name with args. +set dummy pod2html; 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_path_POD2HTML+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + case $POD2HTML in + [\\/]* | ?:[\\/]*) + ac_cv_path_POD2HTML="$POD2HTML" # Let the user override the test with a path. + ;; + *) + 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_path_POD2HTML="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi + test -z "$ac_cv_path_POD2HTML" && ac_cv_path_POD2HTML="true pod2html" + ;; +esac fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +POD2HTML=$ac_cv_path_POD2HTML +if test -n "$POD2HTML"; then + echo "$as_me:$LINENO: result: $POD2HTML" >&5 +echo "${ECHO_T}$POD2HTML" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - +# Extract the first word of "pod2man", so it can be a program name with args. +set dummy pod2man; 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_path_POD2MAN+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $POD2MAN in + [\\/]* | ?:[\\/]*) + ac_cv_path_POD2MAN="$POD2MAN" # Let the user override the test with a path. + ;; + *) + 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_path_POD2MAN="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + test -z "$ac_cv_path_POD2MAN" && ac_cv_path_POD2MAN="true pod2man" + ;; +esac +fi +POD2MAN=$ac_cv_path_POD2MAN +if test -n "$POD2MAN"; then + echo "$as_me:$LINENO: result: $POD2MAN" >&5 +echo "${ECHO_T}$POD2MAN" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +# Extract the first word of "python", so it can be a program name with args. +set dummy python; 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_path_PYTHON+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. */ -$ac_includes_default - -#include <$ac_header> -_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 + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + 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_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_PYTHON" && ac_cv_path_PYTHON="true python" + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON + +if test -n "$PYTHON"; then + echo "$as_me:$LINENO: result: $PYTHON" >&5 +echo "${ECHO_T}$PYTHON" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "qmtest", so it can be a program name with args. +set dummy qmtest; 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_path_QMTEST+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $QMTEST in + [\\/]* | ?:[\\/]*) + ac_cv_path_QMTEST="$QMTEST" # Let the user override the test with a path. + ;; + *) + 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_path_QMTEST="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_QMTEST" && ac_cv_path_QMTEST="true qmtest" + ;; +esac +fi +QMTEST=$ac_cv_path_QMTEST + +if test -n "$QMTEST"; then + echo "$as_me:$LINENO: result: $QMTEST" >&5 +echo "${ECHO_T}$QMTEST" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "runtest", so it can be a program name with args. +set dummy runtest; 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_path_RUNTEST+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $RUNTEST in + [\\/]* | ?:[\\/]*) + ac_cv_path_RUNTEST="$RUNTEST" # Let the user override the test with a path. + ;; + *) + 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_path_RUNTEST="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_RUNTEST" && ac_cv_path_RUNTEST="true runtest" + ;; +esac +fi +RUNTEST=$ac_cv_path_RUNTEST + +if test -n "$RUNTEST"; then + echo "$as_me:$LINENO: result: $RUNTEST" >&5 +echo "${ECHO_T}$RUNTEST" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# Extract the first word of "zip", so it can be a program name with args. +set dummy zip; 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_path_ZIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ZIP in + [\\/]* | ?:[\\/]*) + ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path. + ;; + *) + 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_path_ZIP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_ZIP" && ac_cv_path_ZIP="true zip" + ;; +esac +fi +ZIP=$ac_cv_path_ZIP + +if test -n "$ZIP"; then + echo "$as_me:$LINENO: result: $ZIP" >&5 +echo "${ECHO_T}$ZIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +echo "$as_me:$LINENO: checking for compiler -Wl,-R option" >&5 +echo $ECHO_N "checking for compiler -Wl,-R option... $ECHO_C" >&6 +if test "${llvm_cv_link_use_r+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + 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 + + oldcflags="$CFLAGS" + CFLAGS="$CFLAGS -Wl,-R." + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +int main() { return 0; } + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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); } && @@ -5374,57 +5540,108 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -s conftest$ac_exeext' { (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 - eval "$as_ac_Header=yes" + llvm_cv_link_use_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" +llvm_cv_link_use_r=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$oldcflags" + 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 + + fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +echo "$as_me:$LINENO: result: $llvm_cv_link_use_r" >&5 +echo "${ECHO_T}$llvm_cv_link_use_r" >&6 +if test "$llvm_cv_link_use_r" = yes ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LINK_R 1 _ACEOF -fi + fi -done -for ac_header in dlfcn.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 +if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset x; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *ccp; + char **p; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + ccp = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++ccp; + p = (char**) ccp; + ccp = (char const *const *) p; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + } +#endif + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -5448,475 +5665,237 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_header_compiler=yes + ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no +ac_cv_c_const=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6 +if test $ac_cv_c_const = no; then -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> +cat >>confdefs.h <<\_ACEOF +#define const _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 - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ----------------------------------- ## -## Report this to llvmbugs at cs.uiuc.edu ## -## ----------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi fi - -done - +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_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 -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_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 +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +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); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : + (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_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - # Broken: fails on valid input. -continue +ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#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_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : else - ac_cpp_err=yes + ac_cv_header_stdc=no 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 +rm -f conftest* - # 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 +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include - done - ac_cv_prog_CXXCPP=$CXXCPP +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* fi - CXXCPP=$ac_cv_prog_CXXCPP + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : else - ac_cv_prog_CXXCPP=$CXXCPP -fi -echo "$as_me:$LINENO: result: $CXXCPP" >&5 -echo "${ECHO_T}$CXXCPP" >&6 -ac_preproc_ok=false -for ac_cxx_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 +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else -# include +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif - Syntax error + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 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_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_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 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 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_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_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 + (exit $ac_status); }; }; then : else - { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_header_stdc=no fi - - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran - 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_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$F77"; then - ac_cv_prog_F77="$F77" # 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_F77="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -F77=$ac_cv_prog_F77 -if test -n "$F77"; then - echo "$as_me:$LINENO: result: $F77" >&5 -echo "${ECHO_T}$F77" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then - test -n "$F77" && break - done -fi -if test -z "$F77"; then - ac_ct_F77=$F77 - for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran -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_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_F77"; then - ac_cv_prog_ac_ct_F77="$ac_ct_F77" # 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_F77="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF fi -fi -ac_ct_F77=$ac_cv_prog_ac_ct_F77 -if test -n "$ac_ct_F77"; then - echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 -echo "${ECHO_T}$ac_ct_F77" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - test -n "$ac_ct_F77" && break -done - F77=$ac_ct_F77 -fi -# Provide some information about the compiler. -echo "$as_me:5884:" \ - "checking for Fortran 77 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); } -rm -f a.out -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 -if test "${ac_cv_f77_compiler_gnu+set}" = set; then + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include <$ac_hdr> - end +int +main () +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -5927,7 +5906,7 @@ cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" + { 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 @@ -5940,1685 +5919,1650 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_compiler_gnu=yes + eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no +eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_f77_compiler_gnu=$ac_compiler_gnu +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF +ac_header_dirent=$ac_hdr; break fi -echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 -ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} -ac_save_FFLAGS=$FFLAGS -FFLAGS= -echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 -echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_f77_g+set}" = set; then + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 +if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - FFLAGS=-g + ac_func_search_save_LIBS=$LIBS +ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF - program main +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - end +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_f77_werror_flag" + { 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' + { ac_try='test -s conftest$ac_exeext' { (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_f77_g=yes + ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_f77_g=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_opendir" = no; then + for ac_lib in dir; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 -echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 -if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS -elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" - fi +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_search_opendir="-l$ac_lib" +break else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" - else - FFLAGS= - fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS fi +echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6 +if test "$ac_cv_search_opendir" != no; then + test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" -G77=`test $ac_compiler_gnu = yes && echo yes` -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 +fi +else + echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_opendir=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_search_opendir="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_opendir" = no; then + for ac_lib in x; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -# find the maximum length of command line arguments -echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 -echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 -if test "${lt_cv_sys_max_cmd_len+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_search_opendir="-l$ac_lib" +break else - i=0 - teststring="ABCD" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* ) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for *BSD - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - ;; - - *) - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - ;; - esac +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6 +if test "$ac_cv_search_opendir" != no; then + test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi -if test -n $lt_cv_sys_max_cmd_len ; then - echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 -echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 -else - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 fi +# On IRIX 5.3, sys/types and inttypes.h are conflicting. -# Check for command to grab the raw symbol name followed by C symbol from nm. -echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 -echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' -# Transform the above into a raw symbol and a C symbol. -symxfrm='\1 \2\3 \3' -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32*) - symcode='[ABCDGISTW]' - ;; -hpux*) # Its linker distinguishes data from code symbols - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDGIRSTW]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris* | sysv5*) - symcode='[BDRT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+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. */ +$ac_includes_default -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac +#include <$ac_header> +_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 + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac +eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do +fi - # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" +done - # Check to see that the pipe works correctly. - pipe_works=no - rm -f conftest* - cat > conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 +for ac_header in dlfcn.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_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); }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&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); } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if grep ' nm_test_var$' "$nlist" >/dev/null; then - if grep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif + (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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[] = -{ -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} -}; +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_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); } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -f conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break + (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 - lt_cv_sys_global_symbol_pipe= + ac_cpp_err= fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= +else + ac_cpp_err=yes fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - echo "$as_me:$LINENO: result: failed" >&5 -echo "${ECHO_T}failed" >&6 +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes else - echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 -echo "$as_me:$LINENO: checking for objdir" >&5 -echo $ECHO_N "checking for objdir... $ECHO_C" >&6 -if test "${lt_cv_objdir+set}" = set; then +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null + eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 -echo "${ECHO_T}$lt_cv_objdir" >&6 -objdir=$lt_cv_objdir - - - +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac +fi -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' -sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' +done -# Same as above, but do not quote variable references. -double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' +# Check whether --enable-ltdl-install or --disable-ltdl-install was given. +if test "${enable_ltdl_install+set}" = set; then + enableval="$enable_ltdl_install" -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' +fi; -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -# Constants: -rm="rm -f" -# Global variables: -default_ofile=mklib -can_build_shared=yes +if test x"${enable_ltdl_install-no}" != xno; then + INSTALL_LTDL_TRUE= + INSTALL_LTDL_FALSE='#' +else + INSTALL_LTDL_TRUE='#' + INSTALL_LTDL_FALSE= +fi -# All known linkers require a `.a' archive for static linking (except M$VC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; 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_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 +if test x"${enable_ltdl_convenience-no}" != xno; then + CONVENIENCE_LTDL_TRUE= + CONVENIENCE_LTDL_FALSE='#' else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + CONVENIENCE_LTDL_TRUE='#' + CONVENIENCE_LTDL_FALSE= fi -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; 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_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_AR="ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -echo "${ECHO_T}$ac_ct_AR" >&6 +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi +need_lib_prefix=unknown +hardcode_into_libs=no - AR=$ac_ct_AR -else - AR="$ac_cv_prog_AR" -fi +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; 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_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH fi -done -done + ;; - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; - RANLIB=$ac_ct_RANLIB -else - RANLIB="$ac_cv_prog_RANLIB" -fi +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; 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_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes - test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; - STRIP=$ac_ct_STRIP -else - STRIP="$ac_cv_prog_STRIP" -fi + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; -old_CC="$CC" -old_CFLAGS="$CFLAGS" +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o +freebsd1*) + dynamic_linker=no + ;; -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; -if test -n "$RANLIB"; then +freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH case $host_os in - openbsd*) - old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + freebsd2*) + shlibpath_overrides_runpath=yes ;; - *) - old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + freebsd3.01* | freebsdelf3.01*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` - -# Only perform the check for file, if the check method requires it -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool at gnu.org -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - echo "$as_me:$LINENO: checking for file" >&5 -echo $ECHO_N "checking for file... $ECHO_C" >&6 -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case "$host_cpu" in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool at gnu.org +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no ;; -esac -fi -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes - else - MAGIC_CMD=: + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi -fi - fi + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' ;; -esac - -enable_dlopen=yes -enable_win32_dll=no - -# Check whether --enable-libtool-lock or --disable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval="$enable_libtool_lock" - -fi; -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; -# Check whether --with-pic or --without-pic was given. -if test "${with_pic+set}" = set; then - withval="$with_pic" - pic_mode="$withval" -else - pic_mode=default -fi; -test -z "$pic_mode" && pic_mode=default +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; -# Use C for the default configuration in the libtool script -tagname= -lt_save_CC="$CC" -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 +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; -# Source file extension for C test sources. -ac_ext=c +openbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}\n' +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; -# Allow CC to be a program name with arguments. -compiler=$CC +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; -# -# Check for any special shared library compilation flags. -# -lt_prog_cc_shlib= -if test "$GCC" = no; then - case $host_os in - sco3.2v5*) - lt_prog_cc_shlib='-belf' - ;; +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; esac -fi -if test -n "$lt_prog_cc_shlib"; then - { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 -echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} - if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : - else - { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 -echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} - lt_cv_prog_cc_can_build_shared=no + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH fi -fi + ;; +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; -# -# Check to make sure the static flag actually works. -# -echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6 -if test "${lt_prog_compiler_static_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_prog_compiler_static" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - else - lt_prog_compiler_static_works=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 -if test x"$lt_prog_compiler_static_works" = xyes; then - : +echo "$as_me:$LINENO: checking which extension is used for loadable modules" >&5 +echo $ECHO_N "checking which extension is used for loadable modules... $ECHO_C" >&6 +if test "${libltdl_cv_shlibext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_prog_compiler_static= -fi - +module=yes +eval libltdl_cv_shlibext=$shrext_cmds +fi +echo "$as_me:$LINENO: result: $libltdl_cv_shlibext" >&5 +echo "${ECHO_T}$libltdl_cv_shlibext" >&6 +if test -n "$libltdl_cv_shlibext"; then -lt_prog_compiler_no_builtin_flag= +cat >>confdefs.h <<_ACEOF +#define LTDL_SHLIB_EXT "$libltdl_cv_shlibext" +_ACEOF -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' +fi -echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then +echo "$as_me:$LINENO: checking which variable specifies run-time library path" >&5 +echo $ECHO_N "checking which variable specifies run-time library path... $ECHO_C" >&6 +if test "${libltdl_cv_shlibpath_var+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6941: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:6945: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $rm conftest* - + libltdl_cv_shlibpath_var="$shlibpath_var" fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 +echo "$as_me:$LINENO: result: $libltdl_cv_shlibpath_var" >&5 +echo "${ECHO_T}$libltdl_cv_shlibpath_var" >&6 +if test -n "$libltdl_cv_shlibpath_var"; then -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi +cat >>confdefs.h <<_ACEOF +#define LTDL_SHLIBPATH_VAR "$libltdl_cv_shlibpath_var" +_ACEOF fi -lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for the default library search path" >&5 +echo $ECHO_N "checking for the default library search path... $ECHO_C" >&6 +if test "${libltdl_cv_sys_search_path+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec" +fi +echo "$as_me:$LINENO: result: $libltdl_cv_sys_search_path" >&5 +echo "${ECHO_T}$libltdl_cv_sys_search_path" >&6 +if test -n "$libltdl_cv_sys_search_path"; then + sys_search_path= + for dir in $libltdl_cv_sys_search_path; do + if test -z "$sys_search_path"; then + sys_search_path="$dir" + else + sys_search_path="$sys_search_path$PATH_SEPARATOR$dir" + fi + done - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' +cat >>confdefs.h <<_ACEOF +#define LTDL_SYSSEARCHPATH "$sys_search_path" +_ACEOF - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; +fi - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; +echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6 +if test "${libltdl_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + libltdl_cv_objdir="$objdir" + if test -n "$objdir"; then + : + else + rm -f .libs 2>/dev/null + mkdir .libs 2>/dev/null + if test -d .libs; then + libltdl_cv_objdir=.libs + else + # MS-DOS does not allow filenames that begin with a dot. + libltdl_cv_objdir=_libs + fi + rmdir .libs 2>/dev/null + fi - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; +fi +echo "$as_me:$LINENO: result: $libltdl_cv_objdir" >&5 +echo "${ECHO_T}$libltdl_cv_objdir" >&6 - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; +cat >>confdefs.h <<_ACEOF +#define LTDL_OBJDIR "$libltdl_cv_objdir/" +_ACEOF - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case "$host_cpu" in - hppa*64*|ia64*) - # +Z the default - ;; +echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/${ac_tool_prefix}nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; *) - lt_prog_compiler_pic='-fPIC' - ;; + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac esac - ;; + fi + done + IFS="$lt_save_ifs" + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi +echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6 +NM="$lt_cv_path_NM" - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case "$cc_basename" in - xlc*) - lt_prog_compiler_pic='-qnocommon' - lt_prog_compiler_wl='-Wl,' - ;; - esac - ;; - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case "$host_cpu" in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; +# Check for command to grab the raw symbol name followed by C symbol from nm. +echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else - linux*) - case $CC in - icc* | ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - esac - ;; +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' - sco3.2v5*) - lt_prog_compiler_pic='-Kpic' - lt_prog_compiler_static='-dn' - ;; +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - solaris*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; +# Transform the above into a raw symbol and a C symbol. +symxfrm='\1 \2\3 \3' - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris* | sysv5*) + symcode='[BDRT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic" >&6 +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" -echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 -if test "${lt_prog_compiler_pic_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7184: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:7188: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then - lt_prog_compiler_pic_works=yes - fi - fi - $rm conftest* + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + 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); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 -if test x"$lt_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6 else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no + echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6 fi -fi -case "$host_os" in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_c_o+set}" = set; then +echo "$as_me:$LINENO: checking whether libtool supports -dlopen/-dlpreopen" >&5 +echo $ECHO_N "checking whether libtool supports -dlopen/-dlpreopen... $ECHO_C" >&6 +if test "${libltdl_cv_preloaded_symbols+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_cv_prog_compiler_c_o=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + if test -n "$lt_cv_sys_global_symbol_pipe"; then + libltdl_cv_preloaded_symbols=yes + else + libltdl_cv_preloaded_symbols=no + fi - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7244: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:7248: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s out/conftest.err; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* +fi +echo "$as_me:$LINENO: result: $libltdl_cv_preloaded_symbols" >&5 +echo "${ECHO_T}$libltdl_cv_preloaded_symbols" >&6 +if test x"$libltdl_cv_preloaded_symbols" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PRELOADED_SYMBOLS 1 +_ACEOF fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 +LIBADD_DL= -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - 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 + + +echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - need_locks=no -fi + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - runpath_var= - allow_undefined_flag= - enable_shared_with_static_runtimes=no - archive_cmds= - archive_expsym_cmds= - old_archive_From_new_cmds= - old_archive_from_expsyms_cmds= - export_dynamic_flag_spec= - whole_archive_flag_spec= - thread_safe_flag_spec= - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_direct=no - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - link_all_deplibs=unknown - hardcode_automatic=no - module_cmds= - module_expsym_cmds= - always_export_symbols=no - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= +#ifdef __STDC__ +# include +#else +# include +#endif - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - openbsd*) - with_gnu_ld=no - ;; - esac +#undef shl_load - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shl_load) || defined (__stub___shl_load) +choke me +#else +char (*f) () = shl_load; +#endif +#ifdef __cplusplus +} +#endif - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <&2 +int +main () +{ +return f != shl_load; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +ac_cv_func_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6 +if test $ac_cv_func_shl_load = yes; then -EOF - fi - ;; +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHL_LOAD 1 +_ACEOF - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes +else + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs=no - ;; +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +int +main () +{ +shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; +ac_cv_lib_dld_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +if test $ac_cv_lib_dld_shl_load = yes; then - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHL_LOAD 1 +_ACEOF - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris* | sysv5*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_cmds="$tmp_archive_cmds" - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - if test $supports_anon_versioning = yes; then - archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ -cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -$echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - else - archive_expsym_cmds="$tmp_archive_cmds" - fi - else - ld_shlibs=no - fi - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - - if test "$GCC" = yes; then - case $host_os in aix4.012|aix4.012.*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct=yes - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - esac - shared_flag='-shared' - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + LIBADD_DL="$LIBADD_DL -ldld" +else + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); int main () { - +dlopen (); ; return 0; } @@ -7645,41 +7589,41 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi + ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBDL 1 +_ACEOF + + LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes" +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#if HAVE_DLFCN_H +# include +#endif int main () { - +dlopen(0, 0); ; return 0; } @@ -7707,1172 +7651,923 @@ echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBDL 1 +_ACEOF + libltdl_cv_func_dlopen="yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols=yes - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec=' ' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; +echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; +ac_cv_lib_svld_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 +if test $ac_cv_lib_svld_dlopen = yes; then - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBDL 1 +_ACEOF - darwin* | rhapsody*) - case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case "$cc_basename" in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs=no - ;; - esac - fi - ;; + LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes" +else + echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dld_link (); +int +main () +{ +dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - freebsd1*) - ld_shlibs=no - ;; +ac_cv_lib_dld_dld_link=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 +if test $ac_cv_lib_dld_dld_link = yes; then - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; +cat >>confdefs.h <<\_ACEOF +#define HAVE_DLD 1 +_ACEOF - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; + LIBADD_DL="$LIBADD_DL -ldld" +else + echo "$as_me:$LINENO: checking for _dyld_func_lookup" >&5 +echo $ECHO_N "checking for _dyld_func_lookup... $ECHO_C" >&6 +if test "${ac_cv_func__dyld_func_lookup+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. */ +/* Define _dyld_func_lookup to an innocuous variant, in case declares _dyld_func_lookup. + For example, HP-UX 11i declares gettimeofday. */ +#define _dyld_func_lookup innocuous__dyld_func_lookup - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char _dyld_func_lookup (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes +#ifdef __STDC__ +# include +#else +# include +#endif - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; +#undef _dyld_func_lookup - hpux10* | hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' - ;; - *) - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - ia64*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=no - hardcode_shlibpath_var=no +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _dyld_func_lookup (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub__dyld_func_lookup) || defined (__stub____dyld_func_lookup) +choke me +#else +char (*f) () = _dyld_func_lookup; +#endif +#ifdef __cplusplus +} +#endif - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - *) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - export_dynamic_flag_spec='${wl}-E' +int +main () +{ +return f != _dyld_func_lookup; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_func__dyld_func_lookup=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; +ac_cv_func__dyld_func_lookup=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func__dyld_func_lookup" >&5 +echo "${ECHO_T}$ac_cv_func__dyld_func_lookup" >&6 +if test $ac_cv_func__dyld_func_lookup = yes; then - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld='-rpath $libdir' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - link_all_deplibs=yes - ;; +cat >>confdefs.h <<\_ACEOF +#define HAVE_DYLD 1 +_ACEOF - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; +fi - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - openbsd*) - hardcode_direct=yes - hardcode_shlibpath_var=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - ;; +fi - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; +fi - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - hardcode_libdir_separator=: - ;; +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext - sco3.2v5*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; +fi - solaris*) - no_undefined_flag=' -z text' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; - esac - link_all_deplibs=yes - ;; - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; +fi - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; +fi - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - sysv4.2uw2*) - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=no - hardcode_shlibpath_var=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; +if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes +then + lt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBADD_DL" - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag='${wl}-z ${wl}text' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; +for ac_func in dlerror +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+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. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func - sysv5*) - no_undefined_flag=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec= - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - ;; +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; +#ifdef __STDC__ +# include +#else +# include +#endif - *) - ld_shlibs=no - ;; - esac - fi +#undef $ac_func -echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -echo "${ECHO_T}$ld_shlibs" >&6 -test "$ld_shlibs" = no && can_build_shared=no +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes +fi +done - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + LIBS="$lt_save_LIBS" +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 - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + + +echo "$as_me:$LINENO: checking for _ prefix in compiled symbols" >&5 +echo $ECHO_N "checking for _ prefix in compiled symbols... $ECHO_C" >&6 +if test "${ac_cv_sys_symbol_underscore+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_sys_symbol_underscore=no + cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + ac_nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc=no + (exit $ac_status); } && test -s "$ac_nlist"; then + # See whether the symbols have a leading underscore. + if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then + ac_cv_sys_symbol_underscore=yes + else + if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then + : else - archive_cmds_need_lc=yes + echo "configure: cannot find nm_test_func in $ac_nlist" >&5 fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 fi - $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 -echo "${ECHO_T}$archive_cmds_need_lc" >&6 - ;; - esac + else + echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "configure: failed program was:" >&5 + cat conftest.c >&5 fi - ;; -esac + rm -rf conftest* -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi -need_lib_prefix=unknown -hardcode_into_libs=no +echo "$as_me:$LINENO: result: $ac_cv_sys_symbol_underscore" >&5 +echo "${ECHO_T}$ac_cv_sys_symbol_underscore" >&6 -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH +if test x"$ac_cv_sys_symbol_underscore" = xyes; then + if test x"$libltdl_cv_func_dlopen" = xyes || + test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then + echo "$as_me:$LINENO: checking whether we have to add an underscore for dlsym" >&5 +echo $ECHO_N "checking whether we have to add an underscore for dlsym... $ECHO_C" >&6 +if test "${libltdl_cv_need_uscore+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + libltdl_cv_need_uscore=unknown + save_LIBS="$LIBS" + LIBS="$LIBS $LIBADD_DL" + if test "$cross_compiling" = yes; then : + libltdl_cv_need_uscore=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; +#include -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; +#ifdef __cplusplus +extern "C" void exit (int); +#endif -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' - ;; + exit (status); +} +EOF + 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); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) libltdl_cv_need_uscore=no ;; + x$lt_dlneed_uscore) libltdl_cv_need_uscore=yes ;; + x$lt_unknown|x*) ;; esac - ;; + else : + # compilation failed - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; + fi +fi +rm -fr conftest* -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + LIBS="$save_LIBS" + +fi +echo "$as_me:$LINENO: result: $libltdl_cv_need_uscore" >&5 +echo "${ECHO_T}$libltdl_cv_need_uscore" >&6 fi - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; +fi -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; +if test x"$libltdl_cv_need_uscore" = xyes; then -freebsd1*) - dynamic_linker=no - ;; +cat >>confdefs.h <<\_ACEOF +#define NEED_USCORE 1 +_ACEOF -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; +fi -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes + +echo "$as_me:$LINENO: checking whether deplibs are loaded by dlopen" >&5 +echo $ECHO_N "checking whether deplibs are loaded by dlopen... $ECHO_C" >&6 +if test "${libltdl_cv_sys_dlopen_deplibs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # PORTME does your system automatically load deplibs for dlopen? + # or its logical equivalent (e.g. shl_load for HP-UX < 11) + # For now, we just catch OSes we know something about -- in the + # future, we'll try test this programmatically. + libltdl_cv_sys_dlopen_deplibs=unknown + case "$host_os" in + aix3*|aix4.1.*|aix4.2.*) + # Unknown whether this is true for these versions of AIX, but + # we want this `case' here to explicitly catch those versions. + libltdl_cv_sys_dlopen_deplibs=unknown ;; - freebsd3.01* | freebsdelf3.01*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes + aix[45]*) + libltdl_cv_sys_dlopen_deplibs=yes ;; - *) # from 3.2 on - shlibpath_overrides_runpath=no - hardcode_into_libs=yes + darwin*) + # Assuming the user has installed a libdl from somewhere, this is true + # If you are looking for one http://www.opendarwin.org/projects/dlcompat + libltdl_cv_sys_dlopen_deplibs=yes + ;; + gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) + # GNU and its variants, using gnu ld.so (Glibc) + libltdl_cv_sys_dlopen_deplibs=yes ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case "$host_cpu" in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + hpux10*|hpux11*) + libltdl_cv_sys_dlopen_deplibs=yes ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + irix[12345]*|irix6.[01]*) + # Catch all versions of IRIX before 6.2, and indicate that we don't + # know how it worked for any of those versions. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + irix*) + # The case above catches anything before 6.2, and it's known that + # at 6.2 and later dlopen does load deplibs. + libltdl_cv_sys_dlopen_deplibs=yes ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= + netbsd*) + libltdl_cv_sys_dlopen_deplibs=yes ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac + openbsd*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + osf[1234]*) + # dlopen did load deplibs (at least at 4.x), but until the 5.x series, + # it did *not* use an RPATH in a shared library to find objects the + # library depends on, so we explictly say `no'. + libltdl_cv_sys_dlopen_deplibs=no + ;; + osf5.0|osf5.0a|osf5.1) + # dlopen *does* load deplibs and with the right loader patch applied + # it even uses RPATH in a shared library to search for shared objects + # that the library depends on, but there's no easy way to know if that + # patch is installed. Since this is the case, all we can really + # say is unknown -- it depends on the patch being installed. If + # it is, this changes to `yes'. Without it, it would be `no'. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + osf*) + # the two cases above should catch all versions of osf <= 5.1. Read + # the comments above for what we know about them. + # At > 5.1, deplibs are loaded *and* any RPATH in a shared library + # is used to find them so we can finally say `yes'. + libltdl_cv_sys_dlopen_deplibs=yes + ;; + solaris*) + libltdl_cv_sys_dlopen_deplibs=yes ;; esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; -# This must be Linux ELF. -linux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes +fi +echo "$as_me:$LINENO: result: $libltdl_cv_sys_dlopen_deplibs" >&5 +echo "${ECHO_T}$libltdl_cv_sys_dlopen_deplibs" >&6 +if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi +cat >>confdefs.h <<\_ACEOF +#define LTDL_DLOPEN_DEPLIBS 1 +_ACEOF - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; +fi -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; +for ac_header in argz.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_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_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_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 - shlibpath_overrides_runpath=yes + ac_cpp_err= fi - ;; +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; +fi -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; +done -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; +echo "$as_me:$LINENO: checking for error_t" >&5 +echo $ECHO_N "checking for error_t... $ECHO_C" >&6 +if test "${ac_cv_type_error_t+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. */ +#if HAVE_ARGZ_H +# include +#endif -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; +int +main () +{ +if ((error_t *) 0) + return 0; +if (sizeof (error_t)) + return 0; + ; + 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_type_error_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -*) - dynamic_linker=no - ;; -esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 -test "$dynamic_linker" = no && can_build_shared=no +ac_cv_type_error_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_error_t" >&5 +echo "${ECHO_T}$ac_cv_type_error_t" >&6 +if test $ac_cv_type_error_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_ERROR_T 1 +_ACEOF -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var" || \ - test "X$hardcode_automatic" = "Xyes" ; then - # We can hardcode non-existant directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -echo "$as_me:$LINENO: result: $hardcode_action" >&5 -echo "${ECHO_T}$hardcode_action" >&6 -if test "$hardcode_action" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi +cat >>confdefs.h <<\_ACEOF +#define error_t int +_ACEOF -striplib= -old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac fi -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - darwin*) - # if libdl is installed we need to link against it - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then + + +for ac_func in argz_append argz_create_sep argz_insert argz_next argz_stringify +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char dlopen (); +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + int main () { -dlopen (); +return f != $ac_func; ; return 0; } @@ -8899,91 +8594,81 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes + eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no +eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF fi +done - ;; - *) - echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 -if test "${ac_cv_func_shl_load+set}" = set; then + + + + + + + + + + + + + + + + + + + + + + + + + + +for ac_header in assert.h ctype.h errno.h malloc.h memory.h stdlib.h \ + stdio.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) -choke me -#else -char (*f) () = shl_load; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != shl_load; - ; - return 0; -} +$ac_includes_default +#include <$ac_header> _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +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 @@ -8997,153 +8682,146 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { 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_func_shl_load=yes + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +ac_header_compiler=no fi -echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6 -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -int -main () -{ -shl_load (); - ; - return 0; -} +#include <$ac_header> _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +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); } && - { 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_exeext' - { (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_lib_dld_shl_load=yes + (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 + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + ac_header_preproc=no fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" -else - echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 -if test "${ac_cv_func_dlopen+set}" = set; then +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +fi -#ifdef __STDC__ -# include -#else -# include -#endif +done -#undef dlopen -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) -choke me -#else -char (*f) () = dlopen; -#endif -#ifdef __cplusplus -} -#endif -int -main () -{ -return f != dlopen; - ; - return 0; -} + + +for ac_header in dl.h sys/dl.h dld.h mach-o/dyld.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_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 @@ -9157,126 +8835,144 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { 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_func_dlopen=yes + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +ac_header_compiler=no fi -echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6 -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} +#include <$ac_header> _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +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); } && - { 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_exeext' - { (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_lib_dl_dlopen=yes + (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 + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + ac_header_preproc=no fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 -if test "${ac_cv_lib_svld_dlopen+set}" = set; then + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in string.h strings.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} +$ac_includes_default +#include <$ac_header> _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +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 @@ -9290,9220 +8986,12568 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { 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_lib_svld_dlopen=yes + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_svld_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +ac_header_compiler=no fi -echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dld_link (); -int -main () -{ -dld_link (); - ; - return 0; -} +#include <$ac_header> _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +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); } && - { 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_exeext' - { (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_lib_dld_dld_link=yes + (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 + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_dld_link=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" -fi - - -fi - - -fi - - -fi - - -fi - - + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + break +fi - echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self+set}" = set; then +done + + + + +for ac_func in strchr index +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -#include +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL +#ifdef __STDC__ +# include #else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif +# include #endif -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif +#undef $ac_func +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus -extern "C" void exit (int); +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif -void fnord() { int i=42;} -int main () +int +main () { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - - exit (status); +return f != $ac_func; + ; + return 0; } -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi + (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_exeext' + { (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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" fi -rm -fr conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + break +fi +done -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6 - if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self_static+set}" = set; then +for ac_func in strrchr rindex +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -#include +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL +#ifdef __STDC__ +# include #else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif +# include #endif -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif +#undef $ac_func +/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus -extern "C" void exit (int); +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif -void fnord() { int i=42;} -int main () +int +main () { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - - exit (status); +return f != $ac_func; + ; + return 0; } -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi + (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_exeext' + { (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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" fi -rm -fr conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + break +fi +done -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 - fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac +for ac_func in memcpy bcopy +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+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. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi +#ifdef __STDC__ +# include +#else +# include +#endif +#undef $ac_func -# Report which librarie types wil actually be built -echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6 +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif -echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 -test "$can_build_shared" = "no" && enable_shared=no +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case "$host_os" in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + break +fi +done -aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6 -echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6 -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler \ - CC \ - LD \ - lt_prog_compiler_wl \ - lt_prog_compiler_pic \ - lt_prog_compiler_static \ - lt_prog_compiler_no_builtin_flag \ - export_dynamic_flag_spec \ - thread_safe_flag_spec \ - whole_archive_flag_spec \ - enable_shared_with_static_runtimes \ - old_archive_cmds \ - old_archive_from_new_cmds \ - predep_objects \ - postdep_objects \ - predeps \ - postdeps \ - compiler_lib_search_path \ - archive_cmds \ - archive_expsym_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - old_archive_from_expsyms_cmds \ - allow_undefined_flag \ - no_undefined_flag \ - export_symbols_cmds \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ - hardcode_automatic \ - module_cmds \ - module_expsym_cmds \ - lt_cv_prog_compiler_c_o \ - exclude_expsyms \ - include_expsyms; do - - case $var in - old_archive_cmds | \ - old_archive_from_new_cmds | \ - archive_cmds | \ - archive_expsym_cmds | \ - module_cmds | \ - module_expsym_cmds | \ - old_archive_from_expsyms_cmds | \ - export_symbols_cmds | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - { echo "$as_me:$LINENO: creating $ofile" >&5 -echo "$as_me: creating $ofile" >&6;} +for ac_func in memmove strcmp +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+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. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func - cat <<__EOF__ >> "$cfgfile" -#! $SHELL +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 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 of the License, 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. +#ifdef __STDC__ +# include +#else +# include +#endif -# A sed program that does not truncate output. -SED=$lt_SED +#undef $ac_func -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e s/^X//" +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# The names of the tagged configurations supported by this script. -available_tags= +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -# ### BEGIN LIBTOOL CONFIG +fi +done -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared -# Whether or not to build static libraries. -build_old_libs=$enable_static +for ac_func in closedir opendir readdir +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+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. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes +#ifdef __STDC__ +# include +#else +# include +#endif -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install +#undef $ac_func -# The host system. -host_alias=$host_alias -host=$host - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# A language-specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU C compiler? -with_gcc=$GCC - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif -# Used on cygwin: assembler. -AS="$AS" +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# The name of the directory that contains temporary libtool files. -objdir=$objdir +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds +fi +done -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl -# Object file suffix (normally "o"). -objext="$ac_objext" +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi; -# Old archive suffix (normally "a"). -libext="$libext" +# Check whether --enable-static or --disable-static was given. +if test "${enable_static+set}" = set; then + enableval="$enable_static" + p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi; -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' +# Check whether --enable-fast-install or --disable-fast-install was given. +if test "${enable_fast_install+set}" = set; then + enableval="$enable_fast_install" + p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi; -# Executable file suffix (normally ""). -exeext="$exeext" +echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 +if test "${lt_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && break + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic -pic_mode=$pic_mode +fi -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len +SED=$lt_cv_path_SED +echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6 -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o -# Must we lock files when doing compilation ? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi; +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +with_gnu_ld=$lt_cv_prog_gnu_ld -# Whether dlopen is supported. -dlopen_support=$enable_dlopen -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self +echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 +if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_ld_reload_flag='-r' +fi +echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static +echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 +echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 +if test "${lt_cv_deplibs_check_method+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static +case $host_os in +aix4* | aix5*) + lt_cv_deplibs_check_method=pass_all + ;; -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag +beos*) + lt_cv_deplibs_check_method=pass_all + ;; -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump'. + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; -# Library versioning type. -version_type=$version_type +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; -# Format of library name prefix. -libname_spec=$lt_libname_spec +freebsd* | kfreebsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case "$host_cpu" in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds +# This must be Linux ELF. +linux*) + lt_cv_deplibs_check_method=pass_all + ;; -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path +sco3.2v5*) + lt_cv_deplibs_check_method=pass_all + ;; -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag +sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag +fi +echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl +# Allow CC to be a program name with arguments. +compiler=$CC -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address +# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval="$enable_libtool_lock" -# This is the shared library runtime path variable. -runpath_var=$runpath_var +fi; +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes -# This is the shared library path variable. -shlibpath_var=$shlibpath_var +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + 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 + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 10094 "configure"' > conftest.$ac_ext + 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 + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + 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 + case "`/usr/bin/file conftest.o`" in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 +if test "${lt_cv_cc_needs_belf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + 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 -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path" - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# ### END LIBTOOL CONFIG - -__EOF__ - - - case $host_os in - aix3*) - cat <<\EOF >> "$cfgfile" - -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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 + lt_cv_cc_needs_belf=yes else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -ac_ext=c +lt_cv_cc_needs_belf=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext 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 -CC="$lt_save_CC" - - -# Check whether --with-tags or --without-tags was given. -if test "${with_tags+set}" = set; then - withval="$with_tags" - tagnames="$withval" -fi; - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} +fi +echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" fi + ;; - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 -echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} - else - { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 -echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} - fi - fi +esac - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` +need_locks="$enable_libtool_lock" - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in - "") ;; - *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 -echo "$as_me: error: invalid tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 -echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} - { (exit 1); exit 1; }; } - fi - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag "$tagname" to $ofile - case $tagname in - CXX) - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cc +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_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 +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_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_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_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_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_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 -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_flag_spec_ld_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_automatic_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -# Source file extension for C++ test sources. -ac_ext=cc - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *) { return(0); }\n' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. +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 -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} + done + ac_cv_prog_CXXCPP=$CXXCPP -# Allow CC to be a program name with arguments. -compiler=$CC +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6 +ac_preproc_ok=false +for ac_cxx_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_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_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 -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_LD=$LD -lt_save_GCC=$GCC -GCC=$GXX -lt_save_with_gnu_ld=$with_gnu_ld -lt_save_path_LD=$lt_cv_path_LD -if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + # 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_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi else - unset lt_cv_prog_gnu_ld + ac_cpp_err=yes fi -if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue else - unset lt_cv_path_LD + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -compiler_CXX=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +rm -f conftest.err conftest.$ac_ext -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' +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 - lt_prog_compiler_no_builtin_flag_CXX= + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi -if test "$GXX" = yes; then - # Set up default GNU C++ configuration +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +fi -# Check whether --with-gnu-ld or --without-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran + 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_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - with_gnu_ld=no -fi; -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # Let the user override the test. else - echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +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_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6 else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$F77" && break done - IFS="$lt_save_ifs" +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran +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_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_cv_path_LD="$LD" # Let the user override the test with a path. + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # 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_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi - -LD="$lt_cv_path_LD" -if test -n "$LD"; then - echo "$as_me:$LINENO: result: $LD" >&5 -echo "${ECHO_T}$LD" >&6 +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. -case `$LD -v 2>&1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 -with_gnu_ld=$lt_cv_prog_gnu_ld - + test -n "$ac_ct_F77" && break +done - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + F77=$ac_ct_F77 +fi - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' +# Provide some information about the compiler. +echo "$as_me:10579:" \ + "checking for Fortran 77 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); } +rm -f a.out - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ - grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi + end +_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_f77_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 - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu -else - GXX=no - with_gnu_ld=no - wlarc= fi +echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main -# PORTME: fill in a description of your system's C++ link characteristics -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 -ld_shlibs_CXX=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - - if test "$GXX" = yes; then - case $host_os in aix4.012|aix4.012.*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct_CXX=yes - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - esac - shared_flag='-shared' - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty executable. - 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; -} + end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +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_cxx_werror_flag" + { ac_try='test -z "$ac_f77_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_exeext' + { 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 - -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi + ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_prog_f77_g=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi +fi - archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +G77=`test $ac_compiler_gnu = yes && echo yes` +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 -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 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_cxx_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_exeext' - { (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 -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# find the maximum length of command line arguments +echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + i=0 + teststring="ABCD" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols_CXX=yes - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX=' ' - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; ;; - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; ;; + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + netbsd* | freebsd* | openbsd* | darwin* ) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else - ld_shlibs_CXX=no + lt_cv_sys_max_cmd_len=65536 # usable default for *BSD fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + ;; + + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 +else + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 +fi + + + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Transform the above into a raw symbol and a C symbol. +symxfrm='\1 \2\3 \3' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' ;; - darwin* | rhapsody*) - case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' - link_all_deplibs_CXX=yes +cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris* | sysv5*) + symcode='[BDRT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - fi - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" else - case "$cc_basename" in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_CXX=no - ;; - esac + rm -f "$nlist"T fi - ;; - dgux*) - case $cc_basename in - ec++) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - freebsd12*) - # C++ shared libraries reported to be fairly broken before switch to ELF - ld_shlibs_CXX=no - ;; - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - freebsd* | kfreebsd*-gnu) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - gnu*) - ;; - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif - case $cc_basename in - CC) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC) - archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld_CXX='+b $libdir' - hardcode_libdir_separator_CXX=: - ;; - ia64*) - hardcode_libdir_flag_spec_CXX='-L$libdir' - ;; - *) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case "$host_cpu" in - hppa*64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - *) - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - case $cc_basename in - CC) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC) - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' - ;; - *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case "$host_cpu" in - ia64*|hppa*64*) - archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + 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); } && test -s conftest${ac_exeext}; then + pipe_works=yes fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no + echo "cannot find nm_test_func in $nlist" >&5 fi - ;; - esac - ;; - irix5* | irix6*) - case $cc_basename in - CC) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - ;; - linux*) - case $cc_basename in - KCC) - # Kuck and Associates, Inc. (KAI) C++ Compiler + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' +fi - hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6 +else + echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6 +fi - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - cxx) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: +echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6 +if test "${lt_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6 +objdir=$lt_cv_objdir - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - mvs*) - case $cc_basename in - cxx) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - openbsd*) - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - ;; - osf3*) - case $cc_basename in - KCC) - # Kuck and Associates, Inc. (KAI) C++ Compiler - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - RCC) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e s/^X//' +sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' +# Same as above, but do not quote variable references. +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - osf4* | osf5*) - case $cc_basename in - KCC) - # Kuck and Associates, Inc. (KAI) C++ Compiler +# Constants: +rm="rm -f" - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' +# Global variables: +default_ofile=mklib +can_build_shared=yes - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: +# All known linkers require a `.a' archive for static linking (except M$VC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' - ;; - RCC) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ - $rm $lib.exp' +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; 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_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; 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_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: + test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + AR=$ac_ct_AR +else + AR="$ac_cv_prog_AR" +fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - sco*) - archive_cmds_need_lc_CXX=no - case $cc_basename in - CC) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC) - # Sun C++ 4.2, 5.x and Centerline C++ - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.0-5 | solaris2.0-5.*) ;; - *) - # The C++ compiler is used as linker so we must use $wl - # flag to pass the commands to the underlying system - # linker. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - link_all_deplibs_CXX=yes +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; 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_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +fi - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - fi - - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' - fi - ;; - esac - ;; - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - archive_cmds_need_lc_CXX=no - ;; - tandem*) - case $cc_basename in - NCC) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; -esac -echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6 -test "$ld_shlibs_CXX" = no && can_build_shared=no - -GCC_CXX="$GXX" -LD_CXX="$LD" +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; 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_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done -cat > conftest.$ac_ext <&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -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 - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. + STRIP=$ac_ct_STRIP +else + STRIP="$ac_cv_prog_STRIP" +fi - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - # The `*' in the case matches for architectures that use `case' in - # $output_verbose_cmd can trigger glob expansion during the loop - # eval without this substitution. - output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" +old_CC="$CC" +old_CFLAGS="$CFLAGS" - for p in `eval $output_verbose_link_cmd`; do - case $p in +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" \ - || test $p = "-R"; then - prev=$p - continue - else - prev= - fi +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi - ;; +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + ;; + *) + old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 - *) ;; # Ignore the rest. +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool at gnu.org - esac +EOF + fi ;; + esac + fi + break + fi done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi - # Clean up. - rm -f a.out a.exe +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6 else - echo "libtool.m4: error: problem compiling CXX test program" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -$rm -f confest.$objext +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool at gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +enable_dlopen=yes +enable_win32_dll=no + +# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval="$enable_libtool_lock" + +fi; +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + + +# Check whether --with-pic or --without-pic was given. +if test "${with_pic+set}" = set; then + withval="$with_pic" + pic_mode="$withval" +else + pic_mode=default +fi; +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +lt_save_CC="$CC" +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 + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# +# Check for any special shared library compilation flags. +# +lt_prog_cc_shlib= +if test "$GCC" = no; then + case $host_os in + sco3.2v5*) + lt_prog_cc_shlib='-belf' + ;; + esac +fi +if test -n "$lt_prog_cc_shlib"; then + { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 +echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} + if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : + else + { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 +echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} + lt_cv_prog_cc_can_build_shared=no + fi +fi + + +# +# Check to make sure the static flag actually works. +# +echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_prog_compiler_static" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 + +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + -lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:11636: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:11640: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' case $host_os in - aix*) + aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_static='-Bstatic' fi ;; + amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | os2* | pw32*) + + mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + lt_prog_compiler_pic='-DDLL_EXPORT' ;; + darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' + lt_prog_compiler_pic='-fno-common' ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no ;; + sysv4*MP*) if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic + lt_prog_compiler_pic=-Kconform_pic fi ;; + hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) + # +Z the default ;; *) - lt_prog_compiler_pic_CXX='-fPIC' + lt_prog_compiler_pic='-fPIC' ;; esac ;; + *) - lt_prog_compiler_pic_CXX='-fPIC' + lt_prog_compiler_pic='-fPIC' ;; esac else + # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in - aix4* | aix5*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case "$cc_basename" in - xlc*) - lt_prog_compiler_pic_CXX='-qnocommon' - lt_prog_compiler_wl_CXX='-Wl,' - ;; - esac + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case "$cc_basename" in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' + ;; + esac ;; - dgux*) - case $cc_basename in - ec++) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | kfreebsd*-gnu) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - if test "$host_cpu" != ia64; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - case "$host_cpu" in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux*) - case $cc_basename in - KCC) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - icpc) - # Intel C++ - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - cxx) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - sco*) - case $cc_basename in - CC) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - *) - ;; - esac - ;; - solaris*) - case $cc_basename in - CC) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - unixware*) - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + linux*) + case $CC in + icc* | ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + sco3.2v5*) + lt_prog_compiler_pic='-Kpic' + lt_prog_compiler_static='-dn' + ;; + + solaris*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:11879: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:11883: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + lt_prog_compiler_pic_works=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 + +if test x"$lt_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi +case "$host_os" in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:11939: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:11943: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s out/conftest.err; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag= + enable_shared_with_static_runtimes=no + archive_cmds= + archive_expsym_cmds= + old_archive_From_new_cmds= + old_archive_from_expsyms_cmds= + export_dynamic_flag_spec= + whole_archive_flag_spec= + thread_safe_flag_spec= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + link_all_deplibs=unknown + hardcode_automatic=no + module_cmds= + module_expsym_cmds= + always_export_symbols=no + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris* | sysv5*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds="$tmp_archive_cmds" + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + if test $supports_anon_versioning = yes; then + archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ +cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ +$echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + else + archive_expsym_cmds="$tmp_archive_cmds" + fi + else + ld_shlibs=no + fi + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = yes; then + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + + if test "$GCC" = yes; then + case $host_os in aix4.012|aix4.012.*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct=yes + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an empty executable. + 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 conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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 + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; 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_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + 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 conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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 + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; 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_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + always_export_symbols=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec=' ' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds it's shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + case "$host_os" in + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case "$cc_basename" in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10* | hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + ;; + *) + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_libdir_separator=: + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + ia64*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=no + hardcode_shlibpath_var=no + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + *) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld='-rpath $libdir' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + openbsd*) + hardcode_direct=yes + hardcode_shlibpath_var=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + + sco3.2v5*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4.2uw2*) + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=no + hardcode_shlibpath_var=no + hardcode_runpath_var=yes + runpath_var=LD_RUN_PATH + ;; + + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + no_undefined_flag='${wl}-z ${wl}text' + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv5*) + no_undefined_flag=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + hardcode_libdir_flag_spec= + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$ld_shlibs" >&6 +test "$ld_shlibs" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + 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); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.01* | freebsdelf3.01*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case "$host_cpu" in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$hardcode_action" >&6 + +if test "$hardcode_action" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +striplib= +old_striplib= +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + ;; + *) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + esac +fi + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 +if test "${ac_cv_func_shl_load+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. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shl_load) || defined (__stub___shl_load) +choke me +#else +char (*f) () = shl_load; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != shl_load; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6 +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +int +main () +{ +shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dld_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 +if test "${ac_cv_func_dlopen+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. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dlopen) || defined (__stub___dlopen) +choke me +#else +char (*f) () = dlopen; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != dlopen; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6 +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_svld_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dld_link (); +int +main () +{ +dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dld_dld_link=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + 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); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6 + + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + 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); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# Report which librarie types wil actually be built +echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case "$host_os" in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6 + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler \ + CC \ + LD \ + lt_prog_compiler_wl \ + lt_prog_compiler_pic \ + lt_prog_compiler_static \ + lt_prog_compiler_no_builtin_flag \ + export_dynamic_flag_spec \ + thread_safe_flag_spec \ + whole_archive_flag_spec \ + enable_shared_with_static_runtimes \ + old_archive_cmds \ + old_archive_from_new_cmds \ + predep_objects \ + postdep_objects \ + predeps \ + postdeps \ + compiler_lib_search_path \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + old_archive_from_expsyms_cmds \ + allow_undefined_flag \ + no_undefined_flag \ + export_symbols_cmds \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ + hardcode_automatic \ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ + exclude_expsyms \ + include_expsyms; do + + case $var in + old_archive_cmds | \ + old_archive_from_new_cmds | \ + archive_cmds | \ + archive_expsym_cmds | \ + module_cmds | \ + module_expsym_cmds | \ + old_archive_from_expsyms_cmds | \ + export_symbols_cmds | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + { echo "$as_me:$LINENO: creating $ofile" >&5 +echo "$as_me: creating $ofile" >&6;} + + cat <<__EOF__ >> "$cfgfile" +#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. # -# Check to make sure the PIC flag actually works. +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 # -if test -n "$lt_prog_compiler_pic_CXX"; then +# 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 of the License, 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. -echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 -if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11720: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:11724: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then - lt_prog_compiler_pic_works_CXX=yes - fi - fi - $rm conftest* +# A sed program that does not truncate output. +SED=$lt_SED -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e s/^X//" -if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH -fi -case "$host_os" in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac +# The names of the tagged configurations supported by this script. +available_tags= -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext +# ### BEGIN LIBTOOL CONFIG - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11780: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:11784: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s out/conftest.err; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi +# Whether or not to build static libraries. +build_old_libs=$enable_static -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix4* | aix5*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes -echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -echo "${ECHO_T}$ld_shlibs_CXX" >&6 -test "$ld_shlibs_CXX" = no && can_build_shared=no +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi +# The host system. +host_alias=$host_alias +host=$host -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes +# An echo program that does not interpret backslashes. +echo=$lt_echo - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# A language-specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir - 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); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 - ;; - esac - fi - ;; -esac +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -need_lib_prefix=unknown -hardcode_into_libs=no +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown +# Object file suffix (normally "o"). +objext="$ac_objext" -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH +# Old archive suffix (normally "a"). +libext="$libext" - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; +# Executable file suffix (normally ""). +exeext="$exeext" -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic +pic_mode=$pic_mode -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no +# Must we lock files when doing compilation ? +need_locks=$lt_need_locks - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; +# Do we need a version for libraries? +need_version=$need_version - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; +# Whether dlopen is supported. +dlopen_support=$enable_dlopen -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -freebsd1*) - dynamic_linker=no - ;; +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.01* | freebsdelf3.01*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - *) # from 3.2 on - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - esac - ;; +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; +# Library versioning type. +version_type=$version_type -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case "$host_cpu" in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; +# Format of library name prefix. +libname_spec=$lt_libname_spec -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec -# This must be Linux ELF. -linux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects -openbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds -*) - dynamic_linker=no - ;; -esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 -test "$dynamic_linker" = no && can_build_shared=no +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || \ - test -n "$runpath_var_CXX" || \ - test "X$hardcode_automatic_CXX" = "Xyes" ; then +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - # We can hardcode non-existant directories. - if test "$hardcode_direct_CXX" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 -echo "${ECHO_T}$hardcode_action_CXX" >&6 +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl -if test "$hardcode_action_CXX" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address -striplib= -old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac -fi +# This is the shared library runtime path variable. +runpath_var=$runpath_var -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= +# This is the shared library path variable. +shlibpath_var=$shlibpath_var - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs - darwin*) - # if libdl is installed we need to link against it - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 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_cxx_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_exeext' - { (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_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L -fi +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var - ;; +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic - *) - echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 -if test "${ac_cv_func_shl_load+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. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs -#ifdef __STDC__ -# include -#else -# include -#endif +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -#undef shl_load +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) -choke me -#else -char (*f) () = shl_load; -#endif -#ifdef __cplusplus -} -#endif +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path" -int -main () -{ -return f != shl_load; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 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_cxx_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_exeext' - { (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_func_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols -ac_cv_func_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6 -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -int -main () -{ -shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 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_cxx_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_exeext' - { (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_lib_dld_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds -ac_cv_lib_dld_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" -else - echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 -if test "${ac_cv_func_dlopen+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. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms -#ifdef __STDC__ -# include -#else -# include -#endif +# ### END LIBTOOL CONFIG -#undef dlopen +__EOF__ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) -choke me -#else -char (*f) () = dlopen; -#endif -#ifdef __cplusplus -} -#endif -int -main () -{ -return f != dlopen; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 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_cxx_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_exeext' - { (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_func_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" -ac_cv_func_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES fi -echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6 -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 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_cxx_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_exeext' - { (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_lib_dl_dlopen=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +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 + +CC="$lt_save_CC" + + +# Check whether --with-tags or --without-tags was given. +if test "${with_tags+set}" = set; then + withval="$with_tags" + tagnames="$withval" +fi; + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + else + { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 +echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + fi + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; + *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 +echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 +echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag "$tagname" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_automatic_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# Source file extension for C++ test sources. +ac_ext=cc -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 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_cxx_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_exeext' - { (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_lib_svld_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext -ac_cv_lib_svld_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else - echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +compiler_CXX=$CC +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dld_link (); -int -main () -{ -dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 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_cxx_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_exeext' - { (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_lib_dld_dld_link=yes +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dld_dld_link=no + lt_prog_compiler_no_builtin_flag_CXX= fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi; +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - - +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +with_gnu_ld=$lt_cv_prog_gnu_ld -fi + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -fi + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - ;; - esac + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + with_gnu_ld=no + wlarc= - save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif + GXX=no + with_gnu_ld=no + wlarc= +fi -#include +# PORTME: fill in a description of your system's C++ link characteristics +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 +ld_shlibs_CXX=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + esac -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi -#ifdef __cplusplus -extern "C" void exit (int); -#endif + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } + if test "$GXX" = yes; then + case $host_os in aix4.012|aix4.012.*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_CXX=yes + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi - exit (status); -} -EOF - 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); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int +main () +{ -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_cxx_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_exeext' + { (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 - if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" -#ifdef __cplusplus -extern "C" void exit (int); -#endif + archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -void fnord() { int i=42;} -int main () +int +main () { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - exit (status); + ; + return 0; } -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_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_exeext' + { (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 + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -fr conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + always_export_symbols_CXX=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX=' ' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds it's shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 - fi + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + ld_shlibs_CXX=no + fi + ;; + darwin* | rhapsody*) + case "$host_os" in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case "$cc_basename" in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac + fi + ;; - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + dgux*) + case $cc_basename in + ec++) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_CXX \ - CC_CXX \ - LD_CXX \ - lt_prog_compiler_wl_CXX \ - lt_prog_compiler_pic_CXX \ - lt_prog_compiler_static_CXX \ - lt_prog_compiler_no_builtin_flag_CXX \ - export_dynamic_flag_spec_CXX \ - thread_safe_flag_spec_CXX \ - whole_archive_flag_spec_CXX \ - enable_shared_with_static_runtimes_CXX \ - old_archive_cmds_CXX \ - old_archive_from_new_cmds_CXX \ - predep_objects_CXX \ - postdep_objects_CXX \ - predeps_CXX \ - postdeps_CXX \ - compiler_lib_search_path_CXX \ - archive_cmds_CXX \ - archive_expsym_cmds_CXX \ - postinstall_cmds_CXX \ - postuninstall_cmds_CXX \ - old_archive_from_expsyms_cmds_CXX \ - allow_undefined_flag_CXX \ - no_undefined_flag_CXX \ - export_symbols_cmds_CXX \ - hardcode_libdir_flag_spec_CXX \ - hardcode_libdir_flag_spec_ld_CXX \ - hardcode_libdir_separator_CXX \ - hardcode_automatic_CXX \ - module_cmds_CXX \ - module_expsym_cmds_CXX \ - lt_cv_prog_compiler_c_o_CXX \ - exclude_expsyms_CXX \ - include_expsyms_CXX; do + freebsd12*) + # C++ shared libraries reported to be fairly broken before switch to ELF + ld_shlibs_CXX=no + ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + freebsd* | kfreebsd*-gnu) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + gnu*) + ;; + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. - case $var in - old_archive_cmds_CXX | \ - old_archive_from_new_cmds_CXX | \ - archive_cmds_CXX | \ - archive_expsym_cmds_CXX | \ - module_cmds_CXX | \ - module_expsym_cmds_CXX | \ - old_archive_from_expsyms_cmds_CXX | \ - export_symbols_cmds_CXX | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC) + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + if test "$GXX" = yes; then + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + case "$host_cpu" in + hppa*64*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld_CXX='+b $libdir' + hardcode_libdir_separator_CXX=: + ;; + ia64*) + hardcode_libdir_flag_spec_CXX='-L$libdir' + ;; + *) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case "$host_cpu" in + hppa*64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + *) + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. ;; esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC) + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case "$host_cpu" in + ia64*|hppa*64*) + archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS + irix5* | irix6*) + case $cc_basename in + CC) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' -# A C compiler. -LTCC=$lt_LTCC + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; + linux*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler -# A language-specific compiler. -CC=$lt_compiler_CXX + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' -# Is the compiler the GNU C compiler? -with_gcc=$GCC_CXX + hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' -# An ERE matcher. -EGREP=$lt_EGREP + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + cxx) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' -# The linker used to build libraries. -LD=$lt_LD_CXX + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: -# Whether we need hard or soft links. -LN_S=$lt_LN_S + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + mvs*) + case $cc_basename in + cxx) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + openbsd*) + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; + osf3*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler -# A BSD-compatible nm program. -NM=$lt_NM + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' -# A symbol stripping program -STRIP=$lt_STRIP + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" + ;; + RCC) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: -# Used on cygwin: assembler. -AS="$AS" + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' -# The name of the directory that contains temporary libtool files. -objdir=$objdir + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler -# Object file suffix (normally "o"). -objext="$ac_objext" + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' -# Old archive suffix (normally "a"). -libext="$libext" + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ + $rm $lib.exp' -# Executable file suffix (normally ""). -exeext="$exeext" + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX -pic_mode=$pic_mode + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' -# Must we lock files when doing compilation ? -need_locks=$lt_need_locks + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + sco*) + archive_cmds_need_lc_CXX=no + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC) + # Sun C++ 4.2, 5.x and Centerline C++ + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.0-5 | solaris2.0-5.*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + link_all_deplibs_CXX=yes -# Do we need a version for libraries? -need_version=$need_version + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' -# Whether dlopen is supported. -dlopen_support=$enable_dlopen + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + archive_cmds_need_lc_CXX=no + ;; + tandem*) + case $cc_basename in + NCC) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; +esac +echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6 +test "$ld_shlibs_CXX" = no && can_build_shared=no -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX +GCC_CXX="$GXX" +LD_CXX="$LD" -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX +cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. -# Format of library name prefix. -libname_spec=$lt_libname_spec + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec + for p in `eval $output_verbose_link_cmd`; do + case $p in -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_CXX -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" \ + || test $p = "-R"; then + prev=$p + continue + else + prev= + fi -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX + *) ;; # Ignore the rest. -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib + esac + done -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_CXX + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_CXX +$rm -f confest.$objext -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_CXX +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_CXX +lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case "$cc_basename" in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + cxx) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + sco*) + case $cc_basename in + CC) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + *) + ;; + esac + ;; + solaris*) + case $cc_basename in + CC) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + unixware*) + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:16415: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:16419: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + lt_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe +if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl +fi +case "$host_os" in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext -# This is the shared library runtime path variable. -runpath_var=$runpath_var + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:16475: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:16479: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s out/conftest.err; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* -# This is the shared library path variable. -shlibpath_var=$shlibpath_var +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX +echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6 +test "$ld_shlibs_CXX" = no && can_build_shared=no -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_CXX +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + 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); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_CXX=no + else + archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 + ;; + esac + fi + ;; +esac -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_CXX +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_CXX" +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; -# ### END LIBTOOL TAG CONFIG: $tagname +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; -__EOF__ +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; +freebsd1*) + dynamic_linker=no + ;; -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; +freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.01* | freebsdelf3.01*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; -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 +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -lt_cv_path_LD=$lt_save_path_LD -lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld -lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case "$host_cpu" in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux else - tagname="" - fi - ;; + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi -archive_cmds_need_lc_F77=no -allow_undefined_flag_F77= -always_export_symbols_F77=no -archive_expsym_cmds_F77= -export_dynamic_flag_spec_F77= -hardcode_direct_F77=no -hardcode_libdir_flag_spec_F77= -hardcode_libdir_flag_spec_ld_F77= -hardcode_libdir_separator_F77= -hardcode_minus_L_F77=no -hardcode_automatic_F77=no -module_cmds_F77= -module_expsym_cmds_F77= -link_all_deplibs_F77=unknown -old_archive_cmds_F77=$old_archive_cmds -no_undefined_flag_F77= -whole_archive_flag_spec_F77= -enable_shared_with_static_runtimes_F77=no + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; -# Source file extension for f77 test sources. -ac_ext=f +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; -# Object file extension for compiled f77 test sources. -objext=o -objext_F77=$objext +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; -# Code to be used in simple compile tests -lt_simple_compile_test_code=" subroutine t\n return\n end\n" +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; -# Code to be used in simple link tests -lt_simple_link_test_code=" program t\n end\n" +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; -# ltmain only uses $CC for tagged configurations so make sure $CC is set. +openbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; -# Allow CC to be a program name with arguments. -compiler=$CC +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -compiler_F77=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; -echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6 +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; -echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 -test "$can_build_shared" = "no" && enable_shared=no +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case "$host_os" in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH fi ;; -aix4* | aix5*) - test "$enable_shared" = yes && enable_static=no + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no ;; esac -echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6 +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var_CXX" || \ + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6 -echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6 +if test "$hardcode_action_CXX" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi -test "$ld_shlibs_F77" = no && can_build_shared=no +striplib= +old_striplib= +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + ;; + *) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + esac +fi -GCC_F77="$G77" -LD_F77="$LD" +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= -lt_prog_compiler_wl_F77= -lt_prog_compiler_pic_F77= -lt_prog_compiler_static_F77= + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; - if test "$GCC" = yes; then - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_static_F77='-static' + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; + darwin*) + # if libdl is installed we need to link against it + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' - ;; +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_cxx_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_exeext' + { (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_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - ;; + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_F77='-fno-common' - ;; +fi - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_F77=no - enable_shared=no - ;; + ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_F77=-Kconform_pic - fi - ;; + *) + echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 +if test "${ac_cv_func_shl_load+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. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case "$host_cpu" in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - ;; +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_F77='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' - else - lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case "$cc_basename" in - xlc*) - lt_prog_compiler_pic_F77='-qnocommon' - lt_prog_compiler_wl_F77='-Wl,' - ;; - esac - ;; +#ifdef __STDC__ +# include +#else +# include +#endif - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - ;; +#undef shl_load - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case "$host_cpu" in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_F77='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_F77='${wl}-a ${wl}archive' - ;; +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shl_load) || defined (__stub___shl_load) +choke me +#else +char (*f) () = shl_load; +#endif +#ifdef __cplusplus +} +#endif - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_F77='-non_shared' - ;; +int +main () +{ +return f != shl_load; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_cxx_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_exeext' + { (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_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - newsos6) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; +ac_cv_func_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6 +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - linux*) - case $CC in - icc* | ecc*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-static' - ;; - ccc*) - lt_prog_compiler_wl_F77='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - esac - ;; +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +int +main () +{ +shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_cxx_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_exeext' + { (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_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_F77='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; +ac_cv_lib_dld_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 +if test "${ac_cv_func_dlopen+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. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen - sco3.2v5*) - lt_prog_compiler_pic_F77='-Kpic' - lt_prog_compiler_static_F77='-dn' - ;; +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - solaris*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; +#ifdef __STDC__ +# include +#else +# include +#endif - sunos4*) - lt_prog_compiler_wl_F77='-Qoption ld ' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; +#undef dlopen - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dlopen) || defined (__stub___dlopen) +choke me +#else +char (*f) () = dlopen; +#endif +#ifdef __cplusplus +} +#endif - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_F77='-Kconform_pic' - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; +int +main () +{ +return f != dlopen; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_cxx_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_exeext' + { (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_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - uts4*) - lt_prog_compiler_pic_F77='-pic' - lt_prog_compiler_static_F77='-Bstatic' - ;; +ac_cv_func_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6 +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - *) - lt_prog_compiler_can_build_shared_F77=no - ;; - esac - fi +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_cxx_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_exeext' + { (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_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_F77"; then +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_cxx_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_exeext' + { (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_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 -if test "${lt_prog_compiler_pic_works_F77+set}" = set; then +ac_cv_lib_svld_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_prog_compiler_pic_works_F77=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_F77" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14076: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:14080: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then - lt_prog_compiler_pic_works_F77=yes - fi - fi - $rm conftest* + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dld_link (); +int +main () +{ +dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_cxx_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_exeext' + { (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_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_dld_dld_link=no fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 - -if test x"$lt_prog_compiler_pic_works_F77" = xyes; then - case $lt_prog_compiler_pic_F77 in - "" | " "*) ;; - *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; - esac -else - lt_prog_compiler_pic_F77= - lt_prog_compiler_can_build_shared_F77=no +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi + fi -case "$host_os" in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_F77= - ;; - *) - lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" - ;; -esac -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_F77=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14136: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:14140: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s out/conftest.err; then - lt_cv_prog_compiler_c_o_F77=yes - fi - fi - chmod u+w . - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* +fi + fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no fi -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 - runpath_var= - allow_undefined_flag_F77= - enable_shared_with_static_runtimes_F77=no - archive_cmds_F77= - archive_expsym_cmds_F77= - old_archive_From_new_cmds_F77= - old_archive_from_expsyms_cmds_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - thread_safe_flag_spec_F77= - hardcode_libdir_flag_spec_F77= - hardcode_libdir_flag_spec_ld_F77= - hardcode_libdir_separator_F77= - hardcode_direct_F77=no - hardcode_minus_L_F77=no - hardcode_shlibpath_var_F77=unsupported - link_all_deplibs_F77=unknown - hardcode_automatic_F77=no - module_cmds_F77= - module_expsym_cmds_F77= - always_export_symbols_F77=no - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_F77= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= +fi - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - openbsd*) - with_gnu_ld=no ;; esac - ld_shlibs_F77=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_F77=no - cat <&2 + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + 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); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. -EOF - fi - ;; +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6 - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_F77=no - ;; +#if HAVE_DLFCN_H +#include +#endif - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_F77=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_F77=no - fi - ;; +#include - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_F77='-L$libdir' - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=no - enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' - else - ld_shlibs=no - fi - ;; +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; +#ifdef __cplusplus +extern "C" void exit (int); +#endif - solaris* | sysv5*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_F77=no - cat <&2 +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + exit (status); +} EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; + 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); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* - sunos4*) - archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_cmds_F77="$tmp_archive_cmds" - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ -cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -$echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - else - archive_expsym_cmds_F77="$tmp_archive_cmds" - fi - else - ld_shlibs_F77=no +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac + done - if test "$ld_shlibs_F77" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_F77='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_F77= - fi - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=yes - archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_F77=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_F77=unsupported - fi - ;; + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no +cfgfile="$ofile" - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - esac + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL - archive_cmds_F77='' - hardcode_direct_F77=yes - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared - if test "$GCC" = yes; then - case $host_os in aix4.012|aix4.012.*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct_F77=yes - else - # We have old collect2 - hardcode_direct_F77=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_F77=yes - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_libdir_separator_F77= - fi - esac - shared_flag='-shared' - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi +# Whether or not to build static libraries. +build_old_libs=$enable_static - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_F77=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_F77='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 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_f77_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_exeext' - { (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 +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +# The host system. +host_alias=$host_alias +host=$host - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_F77="-z nodefs" - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main +# An echo program that does not interpret backslashes. +echo=$lt_echo - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 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_f77_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_exeext' - { (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 +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# A C compiler. +LTCC=$lt_LTCC -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +# A language-specific compiler. +CC=$lt_compiler_CXX - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_F77=' ${wl}-bernotok' - allow_undefined_flag_F77=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols_F77=yes - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77=' ' - archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_F77=no - ;; +# An ERE matcher. +EGREP=$lt_EGREP - bsdi[45]*) - export_dynamic_flag_spec_F77=-rdynamic - ;; +# The linker used to build libraries. +LD=$lt_LD_CXX - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes - ;; +# Whether we need hard or soft links. +LN_S=$lt_LN_S - darwin* | rhapsody*) - case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_F77=no - hardcode_direct_F77=no - hardcode_automatic_F77=yes - hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='' - link_all_deplibs_F77=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case "$cc_basename" in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_F77=no - ;; - esac - fi - ;; +# A BSD-compatible nm program. +NM=$lt_NM - dgux*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; +# A symbol stripping program +STRIP=$lt_STRIP - freebsd1*) - ld_shlibs_F77=no - ;; +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu) - archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; +# Used on cygwin: assembler. +AS="$AS" - hpux9*) - if test "$GCC" = yes; then - archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=yes +# The name of the directory that contains temporary libtool files. +objdir=$objdir - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - ;; +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds - hpux10* | hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' - ;; - *) - archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld_F77='+b $libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - ;; - ia64*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - ;; - *) - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' +# Object file suffix (normally "o"). +objext="$ac_objext" - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - ;; - esac - fi - ;; +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Must we lock files when doing compilation ? +need_locks=$lt_need_locks - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - link_all_deplibs_F77=yes - ;; +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; +# Do we need a version for libraries? +need_version=$need_version - newsos6) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_shlibpath_var_F77=no - ;; +# Whether dlopen is supported. +dlopen_support=$enable_dlopen - openbsd*) - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - ;; - *) - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - ;; - esac - fi - ;; +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self - os2*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - allow_undefined_flag_F77=unsupported - archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - ;; +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_F77='-rpath $libdir' - fi - hardcode_libdir_separator_F77=: - ;; +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - sco3.2v5*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - solaris*) - no_undefined_flag_F77=' -z text' - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_shlibpath_var_F77=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; - esac - link_all_deplibs_F77=yes - ;; +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; +# Library versioning type. +version_type=$version_type - sysv4) - case $host_vendor in - sni) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_F77='$CC -r -o $output$reload_objs' - hardcode_direct_F77=no - ;; - motorola) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no - ;; +# Format of library name prefix. +libname_spec=$lt_libname_spec - sysv4.3*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='-Bexport' - ;; +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_F77=yes - fi - ;; +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec - sysv4.2uw2*) - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=no - hardcode_shlibpath_var_F77=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_CXX +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag_F77='${wl}-z ${wl}text' - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no - ;; +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - sysv5*) - no_undefined_flag_F77=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec_F77= - hardcode_shlibpath_var_F77=no - runpath_var='LD_RUN_PATH' - ;; +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - uts4*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds - *) - ld_shlibs_F77=no - ;; - esac - fi +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX -echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 -echo "${ECHO_T}$ld_shlibs_F77" >&6 -test "$ld_shlibs_F77" = no && can_build_shared=no +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_CXX -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_F77" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_F77=yes +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_CXX - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_F77 in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX - 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); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_F77 - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_F77 - allow_undefined_flag_F77= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_F77=no - else - archive_cmds_need_lc_F77=yes - fi - allow_undefined_flag_F77=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 - ;; - esac - fi - ;; -esac +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_CXX -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -need_lib_prefix=unknown -hardcode_into_libs=no +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; +# This is the shared library runtime path variable. +runpath_var=$runpath_var - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs -freebsd1*) - dynamic_linker=no - ;; +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.01* | freebsdelf3.01*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - *) # from 3.2 on - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - esac - ;; +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_CXX -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case "$host_cpu" in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_CXX -# This must be Linux ELF. -linux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_CXX" -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX -openbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; +# ### END LIBTOOL TAG CONFIG: $tagname -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; +__EOF__ -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" fi - need_version=yes - ;; +fi -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - 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 -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -*) - dynamic_linker=no - ;; -esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 -test "$dynamic_linker" = no && can_build_shared=no + else + tagname="" + fi + ;; -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 -hardcode_action_F77= -if test -n "$hardcode_libdir_flag_spec_F77" || \ - test -n "$runpath_var_F77" || \ - test "X$hardcode_automatic_F77" = "Xyes" ; then + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then - # We can hardcode non-existant directories. - if test "$hardcode_direct_F77" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && - test "$hardcode_minus_L_F77" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_F77=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_F77=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_F77=unsupported -fi -echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 -echo "${ECHO_T}$hardcode_action_F77" >&6 +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu -if test "$hardcode_action_F77" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -striplib= -old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac -fi +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_flag_spec_ld_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$objext +# Code to be used in simple compile tests +lt_simple_compile_test_code=" subroutine t\n return\n end\n" +# Code to be used in simple link tests +lt_simple_link_test_code=" program t\n end\n" -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +compiler_F77=$CC +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` + +echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case "$host_os" in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_F77 \ - CC_F77 \ - LD_F77 \ - lt_prog_compiler_wl_F77 \ - lt_prog_compiler_pic_F77 \ - lt_prog_compiler_static_F77 \ - lt_prog_compiler_no_builtin_flag_F77 \ - export_dynamic_flag_spec_F77 \ - thread_safe_flag_spec_F77 \ - whole_archive_flag_spec_F77 \ - enable_shared_with_static_runtimes_F77 \ - old_archive_cmds_F77 \ - old_archive_from_new_cmds_F77 \ - predep_objects_F77 \ - postdep_objects_F77 \ - predeps_F77 \ - postdeps_F77 \ - compiler_lib_search_path_F77 \ - archive_cmds_F77 \ - archive_expsym_cmds_F77 \ - postinstall_cmds_F77 \ - postuninstall_cmds_F77 \ - old_archive_from_expsyms_cmds_F77 \ - allow_undefined_flag_F77 \ - no_undefined_flag_F77 \ - export_symbols_cmds_F77 \ - hardcode_libdir_flag_spec_F77 \ - hardcode_libdir_flag_spec_ld_F77 \ - hardcode_libdir_separator_F77 \ - hardcode_automatic_F77 \ - module_cmds_F77 \ - module_expsym_cmds_F77 \ - lt_cv_prog_compiler_c_o_F77 \ - exclude_expsyms_F77 \ - include_expsyms_F77; do + ;; +aix4* | aix5*) + test "$enable_shared" = yes && enable_static=no + ;; +esac +echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6 - case $var in - old_archive_cmds_F77 | \ - old_archive_from_new_cmds_F77 | \ - archive_cmds_F77 | \ - archive_expsym_cmds_F77 | \ - module_cmds_F77 | \ - module_expsym_cmds_F77 | \ - old_archive_from_expsyms_cmds_F77 | \ - export_symbols_cmds_F77 | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done +echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6 - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac +test "$ld_shlibs_F77" = no && can_build_shared=no -cfgfile="$ofile" +GCC_F77="$G77" +LD_F77="$LD" - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname +lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-static' -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; -# Whether or not to build static libraries. -build_old_libs=$enable_static + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' + ;; -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_F77 + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; -# The host system. -host_alias=$host_alias -host=$host + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_F77=no + enable_shared=no + ;; -# An echo program that does not interpret backslashes. -echo=$lt_echo + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + ;; -# A C compiler. -LTCC=$lt_LTCC + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case "$cc_basename" in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; -# A language-specific compiler. -CC=$lt_compiler_F77 + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; -# Is the compiler the GNU C compiler? -with_gcc=$GCC_F77 + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; -# An ERE matcher. -EGREP=$lt_EGREP + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; -# The linker used to build libraries. -LD=$lt_LD_F77 + linux*) + case $CC in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + esac + ;; -# Whether we need hard or soft links. -LN_S=$lt_LN_S + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; -# A BSD-compatible nm program. -NM=$lt_NM + sco3.2v5*) + lt_prog_compiler_pic_F77='-Kpic' + lt_prog_compiler_static_F77='-dn' + ;; -# A symbol stripping program -STRIP=$lt_STRIP + solaris*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; -# Used on cygwin: assembler. -AS="$AS" + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; -# The name of the directory that contains temporary libtool files. -objdir=$objdir + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_F77 +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then -# Object file suffix (normally "o"). -objext="$ac_objext" +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:18771: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:18775: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + lt_prog_compiler_pic_works_F77=yes + fi + fi + $rm conftest* -# Old archive suffix (normally "a"). -libext="$libext" +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' +if test x"$lt_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi -# Executable file suffix (normally ""). -exeext="$exeext" +fi +case "$host_os" in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; +esac -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_F77 -pic_mode=$pic_mode +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_F77=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:18831: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:18835: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s out/conftest.err; then + lt_cv_prog_compiler_c_o_F77=yes + fi + fi + chmod u+w . + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 -# Must we lock files when doing compilation ? -need_locks=$lt_need_locks -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi -# Do we need a version for libraries? -need_version=$need_version +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 -# Whether dlopen is supported. -dlopen_support=$enable_dlopen + runpath_var= + allow_undefined_flag_F77= + enable_shared_with_static_runtimes_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + old_archive_From_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + thread_safe_flag_spec_F77= + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_direct_F77=no + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + link_all_deplibs_F77=unknown + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + always_export_symbols_F77=no + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + openbsd*) + with_gnu_ld=no + ;; + esac -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static + ld_shlibs_F77=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_F77 + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_F77=no + cat <&2 -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 +EOF + fi + ;; -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + amigaos*) + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_F77=no + ;; -# Library versioning type. -version_type=$version_type + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_F77=no + fi + ;; -# Format of library name prefix. -libname_spec=$lt_libname_spec + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + ld_shlibs=no + fi + ;; -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_F77 -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds + solaris* | sysv5*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_F77=no + cat <&2 -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_F77 -archive_expsym_cmds=$lt_archive_expsym_cmds_F77 -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_F77 -module_expsym_cmds=$lt_module_expsym_cmds_F77 + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds_F77="$tmp_archive_cmds" + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ +cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ +$echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + else + archive_expsym_cmds_F77="$tmp_archive_cmds" + fi + else + ld_shlibs_F77=no + fi + ;; -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_F77 + if test "$ld_shlibs_F77" = yes; then + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_F77=yes + if test "$GCC" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_F77=unsupported + fi + ;; -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_F77 + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_F77 + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + esac -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_F77 + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_F77 + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method + archive_cmds_F77='' + hardcode_direct_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd + if test "$GCC" = yes; then + case $host_os in aix4.012|aix4.012.*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_F77=yes + else + # We have old collect2 + hardcode_direct_F77=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_F77 + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_F77=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_F77='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_F77 + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_f77_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_exeext' + { (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 -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_f77_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_exeext' + { (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 -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# This is the shared library runtime path variable. -runpath_var=$runpath_var +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -# This is the shared library path variable. -shlibpath_var=$shlibpath_var + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_F77=' ${wl}-bernotok' + allow_undefined_flag_F77=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + always_export_symbols_F77=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77=' ' + archive_cmds_need_lc_F77=yes + # This is similar to how AIX traditionally builds it's shared libraries. + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath + amigaos*) + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_F77=no + ;; -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_F77 + bsdi[45]*) + export_dynamic_flag_spec_F77=-rdynamic + ;; -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes + ;; -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 + darwin* | rhapsody*) + case "$host_os" in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_F77=no + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + whole_archive_flag_spec_F77='' + link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case "$cc_basename" in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_F77=no + ;; + esac + fi + ;; -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + freebsd1*) + ld_shlibs_F77=no + ;; -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_F77 + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_F77 + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_F77 + hpux9*) + if test "$GCC" = yes; then + archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + ;; -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_F77 + hpux10* | hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + ;; + *) + archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*) + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + ia64*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + *) + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_F77" + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + link_all_deplibs_F77=yes + ;; -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_F77 + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_F77 + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no + ;; -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds + openbsd*) + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi + ;; -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_F77 + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_F77 + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + ;; -# ### END LIBTOOL TAG CONFIG: $tagname + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' -__EOF__ + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_F77='-rpath $libdir' + fi + hardcode_libdir_separator_F77=: + ;; + sco3.2v5*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ;; -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi + solaris*) + no_undefined_flag_F77=' -z text' + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; + esac + link_all_deplibs_F77=yes + ;; + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; -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 + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; -CC="$lt_save_CC" + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' + ;; - else - tagname="" - fi - ;; + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes + fi + ;; - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - 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 + sysv4.2uw2*) + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=no + hardcode_runpath_var=yes + runpath_var=LD_RUN_PATH + ;; + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + no_undefined_flag_F77='${wl}-z ${wl}text' + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; -# Source file extension for Java test sources. -ac_ext=java + sysv5*) + no_undefined_flag_F77=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + hardcode_libdir_flag_spec_F77= + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + ;; -# Object file extension for compiled Java test sources. -objext=o -objext_GCJ=$objext + uts4*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}\n" + *) + ld_shlibs_F77=no + ;; + esac + fi -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n' +echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6 +test "$ld_shlibs_F77" = no && can_build_shared=no -# ltmain only uses $CC for tagged configurations so make sure $CC is set. +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes -# Allow CC to be a program name with arguments. -compiler=$CC + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_F77 in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + 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); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no + else + archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 + ;; + esac + fi + ;; +esac -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${GCJ-"gcj"} -compiler=$CC -compiler_GCJ=$CC +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no -# GCJ did not exist at the time GCC didn't implicitly link libc in. -archive_cmds_need_lc_GCJ=no +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH -lt_prog_compiler_no_builtin_flag_GCJ= + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; -echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16175: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:16179: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $rm conftest* +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; -fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" -else - : -fi +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no -fi + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes -lt_prog_compiler_wl_GCJ= -lt_prog_compiler_pic_GCJ= -lt_prog_compiler_static_GCJ= + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_static_GCJ='-static' + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - fi +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.01* | freebsdelf3.01*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' - ;; +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case "$host_cpu" in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' - ;; +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_GCJ='-fno-common' - ;; +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_GCJ=no - enable_shared=no - ;; +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_GCJ=-Kconform_pic - fi - ;; + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case "$host_cpu" in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - ;; + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_GCJ='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - else - lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case "$cc_basename" in - xlc*) - lt_prog_compiler_pic_GCJ='-qnocommon' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - esac - ;; + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' - ;; +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case "$host_cpu" in - hppa*64*|ia64*) - # +Z the default +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no ;; *) - lt_prog_compiler_pic_GCJ='+Z' + shlibpath_overrides_runpath=yes ;; esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; + else + shlibpath_overrides_runpath=yes + fi + ;; - linux*) - case $CC in - icc* | ecc*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-static' - ;; - ccc*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - esac - ;; +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; - sco3.2v5*) - lt_prog_compiler_pic_GCJ='-Kpic' - lt_prog_compiler_static_GCJ='-dn' - ;; +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; - solaris*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; - sunos4*) - lt_prog_compiler_wl_GCJ='-Qoption ld ' - lt_prog_compiler_pic_GCJ='-PIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_GCJ='-Kconform_pic' - lt_prog_compiler_static_GCJ='-Bstatic' - fi + siemens) + need_lib_prefix=no ;; - - uts4*) - lt_prog_compiler_pic_GCJ='-pic' - lt_prog_compiler_static_GCJ='-Bstatic' + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; + esac + ;; - *) - lt_prog_compiler_can_build_shared_GCJ=no - ;; - esac +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH fi + ;; -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_GCJ"; then - -echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 -if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_pic_works_GCJ=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_GCJ" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16418: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:16422: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s conftest.err; then - lt_prog_compiler_pic_works_GCJ=yes - fi - fi - $rm conftest* - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 - -if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then - case $lt_prog_compiler_pic_GCJ in - "" | " "*) ;; - *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; - esac -else - lt_prog_compiler_pic_GCJ= - lt_prog_compiler_can_build_shared_GCJ=no -fi - -fi -case "$host_os" in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_GCJ= - ;; - *) - lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" - ;; -esac - -echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_cv_prog_compiler_c_o_GCJ=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16478: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:16482: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - if test ! -s out/conftest.err; then - lt_cv_prog_compiler_c_o_GCJ=yes - fi - fi - chmod u+w . - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; -fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn + # We can hardcode non-existant directories. + if test "$hardcode_direct_F77" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate fi else - need_locks=no + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported fi +echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6 -echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 - - runpath_var= - allow_undefined_flag_GCJ= - enable_shared_with_static_runtimes_GCJ=no - archive_cmds_GCJ= - archive_expsym_cmds_GCJ= - old_archive_From_new_cmds_GCJ= - old_archive_from_expsyms_cmds_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - thread_safe_flag_spec_GCJ= - hardcode_libdir_flag_spec_GCJ= - hardcode_libdir_flag_spec_ld_GCJ= - hardcode_libdir_separator_GCJ= - hardcode_direct_GCJ=no - hardcode_minus_L_GCJ=no - hardcode_shlibpath_var_GCJ=unsupported - link_all_deplibs_GCJ=unknown - hardcode_automatic_GCJ=no - module_cmds_GCJ= - module_expsym_cmds_GCJ= - always_export_symbols_GCJ=no - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_GCJ= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= +if test "$hardcode_action_F77" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +striplib= +old_striplib= +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else +# FIXME - insert some real tests, host_os isn't really good enough case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - openbsd*) - with_gnu_ld=no + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + ;; + *) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 ;; esac +fi - ld_shlibs_GCJ=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_GCJ=no - cat <&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_F77 \ + CC_F77 \ + LD_F77 \ + lt_prog_compiler_wl_F77 \ + lt_prog_compiler_pic_F77 \ + lt_prog_compiler_static_F77 \ + lt_prog_compiler_no_builtin_flag_F77 \ + export_dynamic_flag_spec_F77 \ + thread_safe_flag_spec_F77 \ + whole_archive_flag_spec_F77 \ + enable_shared_with_static_runtimes_F77 \ + old_archive_cmds_F77 \ + old_archive_from_new_cmds_F77 \ + predep_objects_F77 \ + postdep_objects_F77 \ + predeps_F77 \ + postdeps_F77 \ + compiler_lib_search_path_F77 \ + archive_cmds_F77 \ + archive_expsym_cmds_F77 \ + postinstall_cmds_F77 \ + postuninstall_cmds_F77 \ + old_archive_from_expsyms_cmds_F77 \ + allow_undefined_flag_F77 \ + no_undefined_flag_F77 \ + export_symbols_cmds_F77 \ + hardcode_libdir_flag_spec_F77 \ + hardcode_libdir_flag_spec_ld_F77 \ + hardcode_libdir_separator_F77 \ + hardcode_automatic_F77 \ + module_cmds_F77 \ + module_expsym_cmds_F77 \ + lt_cv_prog_compiler_c_o_F77 \ + exclude_expsyms_F77 \ + include_expsyms_F77; do -EOF - fi + case $var in + old_archive_cmds_F77 | \ + old_archive_from_new_cmds_F77 | \ + archive_cmds_F77 | \ + archive_expsym_cmds_F77 | \ + module_cmds_F77 | \ + module_expsym_cmds_F77 | \ + old_archive_from_expsyms_cmds_F77 | \ + export_symbols_cmds_F77 | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 - amigaos*) - archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_GCJ=no - ;; +# The host system. +host_alias=$host_alias +host=$host - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_GCJ=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; +# An echo program that does not interpret backslashes. +echo=$lt_echo - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_GCJ='-L$libdir' - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=no - enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' - else - ld_shlibs=no - fi - ;; +# A C compiler. +LTCC=$lt_LTCC - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; +# A language-specific compiler. +CC=$lt_compiler_F77 - solaris* | sysv5*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_GCJ=no - cat <&2 +# Is the compiler the GNU C compiler? +with_gcc=$GCC_F77 -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. +# An ERE matcher. +EGREP=$lt_EGREP -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; +# The linker used to build libraries. +LD=$lt_LD_F77 - sunos4*) - archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; +# Whether we need hard or soft links. +LN_S=$lt_LN_S - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_cmds_GCJ="$tmp_archive_cmds" - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ -cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -$echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - else - archive_expsym_cmds_GCJ="$tmp_archive_cmds" - fi - else - ld_shlibs_GCJ=no - fi - ;; +# A BSD-compatible nm program. +NM=$lt_NM - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac +# A symbol stripping program +STRIP=$lt_STRIP - if test "$ld_shlibs_GCJ" = yes; then - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_GCJ= - fi - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=yes - archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_GCJ=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_GCJ=unsupported - fi - ;; +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - esac +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi +# Used on cygwin: assembler. +AS="$AS" - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. +# The name of the directory that contains temporary libtool files. +objdir=$objdir - archive_cmds_GCJ='' - hardcode_direct_GCJ=yes - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds - if test "$GCC" = yes; then - case $host_os in aix4.012|aix4.012.*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct_GCJ=yes - else - # We have old collect2 - hardcode_direct_GCJ=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_GCJ=yes - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_libdir_separator_GCJ= - fi - esac - shared_flag='-shared' - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + +# Object file suffix (normally "o"). +objext="$ac_objext" - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_GCJ=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_GCJ='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# Old archive suffix (normally "a"). +libext="$libext" -int -main () -{ +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 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_exeext' - { (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 +# Executable file suffix (normally ""). +exeext="$exeext" -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 +pic_mode=$pic_mode -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_GCJ="-z nodefs" - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 -int -main () -{ +# Must we lock files when doing compilation ? +need_locks=$lt_need_locks - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 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_exeext' - { (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 +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# Do we need a version for libraries? +need_version=$need_version -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +# Whether dlopen is supported. +dlopen_support=$enable_dlopen - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_GCJ=' ${wl}-bernotok' - allow_undefined_flag_GCJ=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols_GCJ=yes - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_GCJ=' ' - archive_cmds_need_lc_GCJ=yes - # This is similar to how AIX traditionally builds it's shared libraries. - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self - amigaos*) - archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_GCJ=no - ;; +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static - bsdi[45]*) - export_dynamic_flag_spec_GCJ=-rdynamic - ;; +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_F77 - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_GCJ=' ' - allow_undefined_flag_GCJ=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_GCJ='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_GCJ=yes - ;; +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 - darwin* | rhapsody*) - case "$host_os" in - rhapsody* | darwin1.[012]) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_GCJ=no - hardcode_direct_GCJ=no - hardcode_automatic_GCJ=yes - hardcode_shlibpath_var_GCJ=unsupported - whole_archive_flag_spec_GCJ='' - link_all_deplibs_GCJ=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - else - case "$cc_basename" in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_GCJ=no - ;; - esac - fi - ;; +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec - dgux*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_F77 +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds - freebsd1*) - ld_shlibs_GCJ=no - ;; +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_F77 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77 +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu) - archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_F77 +module_expsym_cmds=$lt_module_expsym_cmds_F77 - hpux9*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=yes +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - ;; +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_F77 - hpux10* | hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case "$host_cpu" in - hppa*64*|ia64*) - archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' - ;; - *) - archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - ;; - ia64*) - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_F77 - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - ;; - *) - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_F77 - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - ;; - esac - fi - ;; +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_F77 - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - link_all_deplibs_GCJ=yes - ;; +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method - newsos6) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_shlibpath_var_GCJ=no - ;; +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd - openbsd*) - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - ;; - *) - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - ;; - esac - fi - ;; +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_F77 - os2*) - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - allow_undefined_flag_GCJ=unsupported - archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_F77 - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - ;; +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_GCJ='-rpath $libdir' - fi - hardcode_libdir_separator_GCJ=: - ;; +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_F77 + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 - sco3.2v5*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - export_dynamic_flag_spec_GCJ='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 - solaris*) - no_undefined_flag_GCJ=' -z text' - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_shlibpath_var_GCJ=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; - esac - link_all_deplibs_GCJ=yes - ;; +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_F77 - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_F77 - sysv4) - case $host_vendor in - sni) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_GCJ='$CC -r -o $output$reload_objs' - hardcode_direct_GCJ=no - ;; - motorola) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_GCJ=no - ;; +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 - sysv4.3*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - export_dynamic_flag_spec_GCJ='-Bexport' - ;; +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_F77 - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_GCJ=yes - fi - ;; +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" - sysv4.2uw2*) - archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_F77 - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag_GCJ='${wl}-z ${wl}text' - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_GCJ=no - ;; +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - sysv5*) - no_undefined_flag_GCJ=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec_GCJ= - hardcode_shlibpath_var_GCJ=no - runpath_var='LD_RUN_PATH' - ;; +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - uts4*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_F77" - *) - ld_shlibs_GCJ=no - ;; - esac - fi +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_F77 -echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 -echo "${ECHO_T}$ld_shlibs_GCJ" >&6 -test "$ld_shlibs_GCJ" = no && can_build_shared=no +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_F77 -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_GCJ" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_GCJ=yes +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_F77 - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_GCJ in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 - $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_F77 + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ - 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); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_GCJ - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ - allow_undefined_flag_GCJ= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_GCJ=no - else - archive_cmds_need_lc_GCJ=yes - fi - allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 -echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 - ;; - esac - fi - ;; -esac -echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi fi -need_lib_prefix=unknown -hardcode_into_libs=no -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH +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 + +CC="$lt_save_CC" - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; + else + tagname="" + fi + ;; -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + 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 -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; +# Source file extension for Java test sources. +ac_ext=java -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; +# Object file extension for compiled Java test sources. +objext=o +objext_GCJ=$objext -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}\n" - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n' - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; +# ltmain only uses $CC for tagged configurations so make sure $CC is set. - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; +# Allow CC to be a program name with arguments. +compiler=$CC -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; -freebsd1*) - dynamic_linker=no - ;; +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +compiler_GCJ=$CC -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; +# GCJ did not exist at the time GCC didn't implicitly link libc in. +archive_cmds_need_lc_GCJ=no -freebsd*) - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.01* | freebsdelf3.01*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - *) # from 3.2 on - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - esac - ;; -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; +lt_prog_compiler_no_builtin_flag_GCJ= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + +echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:20870: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:20874: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case "$host_cpu" in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +else + : +fi -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; +fi -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; +lt_prog_compiler_wl_GCJ= +lt_prog_compiler_pic_GCJ= +lt_prog_compiler_static_GCJ= -# This must be Linux ELF. -linux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_static_GCJ='-static' - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_GCJ='-fno-common' + ;; -openbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_GCJ=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_GCJ=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default ;; *) - shlibpath_overrides_runpath=yes + lt_prog_compiler_pic_GCJ='-fPIC' ;; esac + ;; + + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac else - shlibpath_overrides_runpath=yes - fi - ;; + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_GCJ='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + else + lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case "$cc_basename" in + xlc*) + lt_prog_compiler_pic_GCJ='-qnocommon' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' + ;; -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_GCJ='-non_shared' + ;; -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; + newsos6) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; + linux*) + case $CC in + icc* | ecc*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-static' + ;; + ccc*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + esac + ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' ;; - siemens) - need_lib_prefix=no + + sco3.2v5*) + lt_prog_compiler_pic_GCJ='-Kpic' + lt_prog_compiler_static_GCJ='-dn' ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + + solaris*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' ;; - esac - ;; -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; + sunos4*) + lt_prog_compiler_wl_GCJ='-Qoption ld ' + lt_prog_compiler_pic_GCJ='-PIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; -*) - dynamic_linker=no - ;; -esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 -test "$dynamic_linker" = no && can_build_shared=no + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_GCJ='-Kconform_pic' + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; -echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 -hardcode_action_GCJ= -if test -n "$hardcode_libdir_flag_spec_GCJ" || \ - test -n "$runpath_var_GCJ" || \ - test "X$hardcode_automatic_GCJ" = "Xyes" ; then + uts4*) + lt_prog_compiler_pic_GCJ='-pic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; - # We can hardcode non-existant directories. - if test "$hardcode_direct_GCJ" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && - test "$hardcode_minus_L_GCJ" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_GCJ=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_GCJ=immediate + *) + lt_prog_compiler_can_build_shared_GCJ=no + ;; + esac fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_GCJ"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_GCJ=unsupported -fi -echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 -echo "${ECHO_T}$hardcode_action_GCJ" >&6 + lt_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:21113: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:21117: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + lt_prog_compiler_pic_works_GCJ=yes + fi + fi + $rm conftest* -if test "$hardcode_action_GCJ" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 -striplib= -old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in + "" | " "*) ;; + *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; + esac else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_can_build_shared_GCJ=no fi - ;; - *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ;; - esac + fi +case "$host_os" in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_GCJ= + ;; + *) + lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" + ;; +esac -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_cv_dlopen=no - lt_cv_dlopen_libs= + lt_cv_prog_compiler_c_o_GCJ=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:21173: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:21177: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s out/conftest.err; then + lt_cv_prog_compiler_c_o_GCJ=yes + fi + fi + chmod u+w . + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - darwin*) - # if libdl is installed we need to link against it - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + need_locks=no +fi -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 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_exeext' - { (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_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag_GCJ= + enable_shared_with_static_runtimes_GCJ=no + archive_cmds_GCJ= + archive_expsym_cmds_GCJ= + old_archive_From_new_cmds_GCJ= + old_archive_from_expsyms_cmds_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + thread_safe_flag_spec_GCJ= + hardcode_libdir_flag_spec_GCJ= + hardcode_libdir_flag_spec_ld_GCJ= + hardcode_libdir_separator_GCJ= + hardcode_direct_GCJ=no + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=unsupported + link_all_deplibs_GCJ=unknown + hardcode_automatic_GCJ=no + module_cmds_GCJ= + module_expsym_cmds_GCJ= + always_export_symbols_GCJ=no + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_GCJ= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_GCJ=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_GCJ=no + cat <&2 -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes +EOF + fi + ;; -fi + amigaos*) + archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes - ;; + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_GCJ=no + ;; - *) - echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 -if test "${ac_cv_func_shl_load+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. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_GCJ=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_GCJ='-L$libdir' + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=no + enable_shared_with_static_runtimes_GCJ=yes + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' -#ifdef __STDC__ -# include -#else -# include -#endif + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + ld_shlibs=no + fi + ;; -#undef shl_load + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) -choke me -#else -char (*f) () = shl_load; -#endif -#ifdef __cplusplus -} -#endif + solaris* | sysv5*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_GCJ=no + cat <&2 -int -main () -{ -return f != shl_load; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 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_exeext' - { (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_func_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. -ac_cv_func_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6 -if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" -else - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -int -main () -{ -shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 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_exeext' - { (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_lib_dld_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + sunos4*) + archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds_GCJ="$tmp_archive_cmds" + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ +cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ +$echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + else + archive_expsym_cmds_GCJ="$tmp_archive_cmds" + fi + else + ld_shlibs_GCJ=no + fi + ;; -ac_cv_lib_dld_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 -if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" -else - echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 -if test "${ac_cv_func_dlopen+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. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + if test "$ld_shlibs_GCJ" = yes; then + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_GCJ=yes + if test "$GCC" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_GCJ=unsupported + fi + ;; -#ifdef __STDC__ -# include -#else -# include -#endif + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no -#undef dlopen + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + esac -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) -choke me -#else -char (*f) () = dlopen; -#endif -#ifdef __cplusplus -} -#endif + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi -int -main () -{ -return f != dlopen; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 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_exeext' - { (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_func_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. -ac_cv_func_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6 -if test $ac_cv_func_dlopen = yes; then - lt_cv_dlopen="dlopen" -else - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + archive_cmds_GCJ='' + hardcode_direct_GCJ=yes + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -int -main () -{ -dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 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_exeext' - { (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_lib_dl_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test "$GCC" = yes; then + case $host_os in aix4.012|aix4.012.*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_GCJ=yes + else + # We have old collect2 + hardcode_direct_GCJ=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_GCJ=yes + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_libdir_separator_GCJ= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi -ac_cv_lib_dl_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_GCJ=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_GCJ='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); int main () { -dlopen (); + ; return 0; } @@ -18530,47 +21574,41 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_svld_dlopen=yes + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 -if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_GCJ="-z nodefs" + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dld_link (); int main () { -dld_link (); + ; return 0; } @@ -18597,719 +21635,1927 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_dld_dld_link=yes + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 -if test $ac_cv_lib_dld_dld_link = yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_GCJ=' ${wl}-bernotok' + allow_undefined_flag_GCJ=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + always_export_symbols_GCJ=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_GCJ=' ' + archive_cmds_need_lc_GCJ=yes + # This is similar to how AIX traditionally builds it's shared libraries. + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; - save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + amigaos*) + archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_GCJ=no + ;; - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" + bsdi[45]*) + export_dynamic_flag_spec_GCJ=-rdynamic + ;; - echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif + darwin* | rhapsody*) + case "$host_os" in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_GCJ=no + hardcode_direct_GCJ=no + hardcode_automatic_GCJ=yes + hardcode_shlibpath_var_GCJ=unsupported + whole_archive_flag_spec_GCJ='' + link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case "$cc_basename" in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac + fi + ;; -#include + dgux*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif + freebsd1*) + ld_shlibs_GCJ=no + ;; -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; -#ifdef __cplusplus -extern "C" void exit (int); -#endif + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } + hpux9*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes - exit (status); -} -EOF - 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); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + ;; + hpux10* | hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + ;; + *) + archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*) + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + ;; + ia64*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6 + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + ;; + *) + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' - if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + link_all_deplibs_GCJ=yes + ;; -#include + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif + newsos6) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_shlibpath_var_GCJ=no + ;; -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif + openbsd*) + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi + ;; -#ifdef __cplusplus -extern "C" void exit (int); -#endif + os2*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + allow_undefined_flag_GCJ=unsupported + archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + ;; - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' - exit (status); -} -EOF - 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); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_GCJ='-rpath $libdir' + fi + hardcode_libdir_separator_GCJ=: + ;; + sco3.2v5*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='${wl}-Bexport' + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ;; -fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 - fi + solaris*) + no_undefined_flag_GCJ=' -z text' + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_shlibpath_var_GCJ=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; + esac + link_all_deplibs_GCJ=yes + ;; - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac + sysv4) + case $host_vendor in + sni) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_GCJ='$CC -r -o $output$reload_objs' + hardcode_direct_GCJ=no + ;; + motorola) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi + sysv4.3*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='-Bexport' + ;; + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_GCJ=yes + fi + ;; -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_GCJ \ - CC_GCJ \ - LD_GCJ \ - lt_prog_compiler_wl_GCJ \ - lt_prog_compiler_pic_GCJ \ - lt_prog_compiler_static_GCJ \ - lt_prog_compiler_no_builtin_flag_GCJ \ - export_dynamic_flag_spec_GCJ \ - thread_safe_flag_spec_GCJ \ - whole_archive_flag_spec_GCJ \ - enable_shared_with_static_runtimes_GCJ \ - old_archive_cmds_GCJ \ - old_archive_from_new_cmds_GCJ \ - predep_objects_GCJ \ - postdep_objects_GCJ \ - predeps_GCJ \ - postdeps_GCJ \ - compiler_lib_search_path_GCJ \ - archive_cmds_GCJ \ - archive_expsym_cmds_GCJ \ - postinstall_cmds_GCJ \ - postuninstall_cmds_GCJ \ - old_archive_from_expsyms_cmds_GCJ \ - allow_undefined_flag_GCJ \ - no_undefined_flag_GCJ \ - export_symbols_cmds_GCJ \ - hardcode_libdir_flag_spec_GCJ \ - hardcode_libdir_flag_spec_ld_GCJ \ - hardcode_libdir_separator_GCJ \ - hardcode_automatic_GCJ \ - module_cmds_GCJ \ - module_expsym_cmds_GCJ \ - lt_cv_prog_compiler_c_o_GCJ \ - exclude_expsyms_GCJ \ - include_expsyms_GCJ; do + sysv4.2uw2*) + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_runpath_var=yes + runpath_var=LD_RUN_PATH + ;; + + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + no_undefined_flag_GCJ='${wl}-z ${wl}text' + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + + sysv5*) + no_undefined_flag_GCJ=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + hardcode_libdir_flag_spec_GCJ= + hardcode_shlibpath_var_GCJ=no + runpath_var='LD_RUN_PATH' + ;; - case $var in - old_archive_cmds_GCJ | \ - old_archive_from_new_cmds_GCJ | \ - archive_cmds_GCJ | \ - archive_expsym_cmds_GCJ | \ - module_cmds_GCJ | \ - module_expsym_cmds_GCJ | \ - old_archive_from_expsyms_cmds_GCJ | \ - export_symbols_cmds_GCJ | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + uts4*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no ;; + *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ld_shlibs_GCJ=no ;; esac - done + fi - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac +echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6 +test "$ld_shlibs_GCJ" = no && can_build_shared=no -cfgfile="$ofile" +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_GCJ" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_GCJ=yes -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_GCJ in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL + 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); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_GCJ + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ + allow_undefined_flag_GCJ= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no + else + archive_cmds_need_lc_GCJ=yes + fi + allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 + ;; + esac + fi + ;; +esac -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no -# Whether or not to build static libraries. -build_old_libs=$enable_static +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_GCJ +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; -# The host system. -host_alias=$host_alias -host=$host + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; -# An echo program that does not interpret backslashes. -echo=$lt_echo +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; -# A C compiler. -LTCC=$lt_LTCC +freebsd1*) + dynamic_linker=no + ;; -# A language-specific compiler. -CC=$lt_compiler_GCJ +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; -# Is the compiler the GNU C compiler? -with_gcc=$GCC_GCJ +freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.01* | freebsdelf3.01*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; -# An ERE matcher. -EGREP=$lt_EGREP +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; -# The linker used to build libraries. -LD=$lt_LD_GCJ +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case "$host_cpu" in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; -# Whether we need hard or soft links. -LN_S=$lt_LN_S +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; -# A BSD-compatible nm program. -NM=$lt_NM +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; -# A symbol stripping program -STRIP=$lt_STRIP +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; -# Used on cygwin: assembler. -AS="$AS" +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; -# The name of the directory that contains temporary libtool files. -objdir=$objdir +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_GCJ +openbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; -# Object file suffix (normally "o"). -objext="$ac_objext" +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; -# Old archive suffix (normally "a"). -libext="$libext" +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; -# Executable file suffix (normally ""). -exeext="$exeext" +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_GCJ -pic_mode=$pic_mode +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; -# Must we lock files when doing compilation ? -need_locks=$lt_need_locks +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no -# Do we need a version for libraries? -need_version=$need_version +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then -# Whether dlopen is supported. -dlopen_support=$enable_dlopen + # We can hardcode non-existant directories. + if test "$hardcode_direct_GCJ" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && + test "$hardcode_minus_L_GCJ" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_GCJ=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_GCJ=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_GCJ=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6 -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self +if test "$hardcode_action_GCJ" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static +striplib= +old_striplib= +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + ;; + *) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + esac +fi -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_GCJ +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ + darwin*) + # if libdl is installed we need to link against it + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -# Library versioning type. -version_type=$version_type +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Format of library name prefix. -libname_spec=$lt_libname_spec +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec +fi -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_GCJ -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds + ;; -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ + *) + echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 +if test "${ac_cv_func_shl_load+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. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_GCJ -archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds +#ifdef __STDC__ +# include +#else +# include +#endif -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_GCJ -module_expsym_cmds=$lt_module_expsym_cmds_GCJ +#undef shl_load -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shl_load) || defined (__stub___shl_load) +choke me +#else +char (*f) () = shl_load; +#endif +#ifdef __cplusplus +} +#endif -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_GCJ +int +main () +{ +return f != shl_load; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_GCJ +ac_cv_func_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6 +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_GCJ +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +int +main () +{ +shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_GCJ +ac_cv_lib_dld_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 +if test "${ac_cv_func_dlopen+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. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method +#ifdef __STDC__ +# include +#else +# include +#endif -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd +#undef dlopen -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_GCJ +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dlopen) || defined (__stub___dlopen) +choke me +#else +char (*f) () = dlopen; +#endif +#ifdef __cplusplus +} +#endif -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_GCJ +int +main () +{ +return f != dlopen; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds +ac_cv_func_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6 +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address +ac_cv_lib_svld_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -# This is the shared library runtime path variable. -runpath_var=$runpath_var +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dld_link (); +int +main () +{ +dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# This is the shared library path variable. -shlibpath_var=$shlibpath_var +ac_cv_lib_dld_dld_link=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +fi -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_GCJ +fi -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ +fi -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ +fi -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_GCJ -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_GCJ +fi -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_GCJ +fi -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" + ;; + esac -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_GCJ + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + save_LDFLAGS="$LDFLAGS" + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_GCJ" + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_GCJ + echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds +#include -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_GCJ +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_GCJ +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif -# ### END LIBTOOL TAG CONFIG: $tagname +#ifdef __cplusplus +extern "C" void exit (int); +#endif -__EOF__ +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" + exit (status); +} +EOF + 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); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no fi fi +rm -fr conftest* -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 +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6 + + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif - else - tagname="" - fi - ;; +#include - RC) - 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 +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif -# Source file extension for RC test sources. -ac_ext=rc +#ifdef __cplusplus +extern "C" void exit (int); +#endif -# Object file extension for compiled RC test sources. -objext=o -objext_RC=$objext +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" + exit (status); +} +EOF + 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); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 + fi -# Allow CC to be a program name with arguments. -compiler=$CC + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${RC-"windres"} -compiler=$CC -compiler_RC=$CC -lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh @@ -19333,51 +23579,51 @@ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ - compiler_RC \ - CC_RC \ - LD_RC \ - lt_prog_compiler_wl_RC \ - lt_prog_compiler_pic_RC \ - lt_prog_compiler_static_RC \ - lt_prog_compiler_no_builtin_flag_RC \ - export_dynamic_flag_spec_RC \ - thread_safe_flag_spec_RC \ - whole_archive_flag_spec_RC \ - enable_shared_with_static_runtimes_RC \ - old_archive_cmds_RC \ - old_archive_from_new_cmds_RC \ - predep_objects_RC \ - postdep_objects_RC \ - predeps_RC \ - postdeps_RC \ - compiler_lib_search_path_RC \ - archive_cmds_RC \ - archive_expsym_cmds_RC \ - postinstall_cmds_RC \ - postuninstall_cmds_RC \ - old_archive_from_expsyms_cmds_RC \ - allow_undefined_flag_RC \ - no_undefined_flag_RC \ - export_symbols_cmds_RC \ - hardcode_libdir_flag_spec_RC \ - hardcode_libdir_flag_spec_ld_RC \ - hardcode_libdir_separator_RC \ - hardcode_automatic_RC \ - module_cmds_RC \ - module_expsym_cmds_RC \ - lt_cv_prog_compiler_c_o_RC \ - exclude_expsyms_RC \ - include_expsyms_RC; do + compiler_GCJ \ + CC_GCJ \ + LD_GCJ \ + lt_prog_compiler_wl_GCJ \ + lt_prog_compiler_pic_GCJ \ + lt_prog_compiler_static_GCJ \ + lt_prog_compiler_no_builtin_flag_GCJ \ + export_dynamic_flag_spec_GCJ \ + thread_safe_flag_spec_GCJ \ + whole_archive_flag_spec_GCJ \ + enable_shared_with_static_runtimes_GCJ \ + old_archive_cmds_GCJ \ + old_archive_from_new_cmds_GCJ \ + predep_objects_GCJ \ + postdep_objects_GCJ \ + predeps_GCJ \ + postdeps_GCJ \ + compiler_lib_search_path_GCJ \ + archive_cmds_GCJ \ + archive_expsym_cmds_GCJ \ + postinstall_cmds_GCJ \ + postuninstall_cmds_GCJ \ + old_archive_from_expsyms_cmds_GCJ \ + allow_undefined_flag_GCJ \ + no_undefined_flag_GCJ \ + export_symbols_cmds_GCJ \ + hardcode_libdir_flag_spec_GCJ \ + hardcode_libdir_flag_spec_ld_GCJ \ + hardcode_libdir_separator_GCJ \ + hardcode_automatic_GCJ \ + module_cmds_GCJ \ + module_expsym_cmds_GCJ \ + lt_cv_prog_compiler_c_o_GCJ \ + exclude_expsyms_GCJ \ + include_expsyms_GCJ; do case $var in - old_archive_cmds_RC | \ - old_archive_from_new_cmds_RC | \ - archive_cmds_RC | \ - archive_expsym_cmds_RC | \ - module_cmds_RC | \ - module_expsym_cmds_RC | \ - old_archive_from_expsyms_cmds_RC | \ - export_symbols_cmds_RC | \ + old_archive_cmds_GCJ | \ + old_archive_from_new_cmds_GCJ | \ + archive_cmds_GCJ | \ + archive_expsym_cmds_GCJ | \ + module_cmds_GCJ | \ + module_expsym_cmds_GCJ | \ + old_archive_from_expsyms_cmds_GCJ | \ + export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ @@ -19414,10 +23660,10 @@ build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_RC +build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install @@ -19437,16 +23683,16 @@ LTCC=$lt_LTCC # A language-specific compiler. -CC=$lt_compiler_RC +CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? -with_gcc=$GCC_RC +with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. -LD=$lt_LD_RC +LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S @@ -19477,7 +23723,7 @@ reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_RC +wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" @@ -19492,14 +23738,14 @@ exeext="$exeext" # Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_RC +pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation ? need_locks=$lt_need_locks @@ -19520,19 +23766,19 @@ dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_RC +link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC +whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC +thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type @@ -19549,25 +23795,25 @@ # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_RC +old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_RC -archive_expsym_cmds=$lt_archive_expsym_cmds_RC +archive_cmds=$lt_archive_cmds_GCJ +archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_RC -module_expsym_cmds=$lt_module_expsym_cmds_RC +module_cmds=$lt_module_cmds_GCJ +module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib @@ -19575,23 +23821,23 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_predep_objects_RC +predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_postdep_objects_RC +postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. -predeps=$lt_predeps_RC +predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. -postdeps=$lt_postdeps_RC +postdeps=$lt_postdeps_GCJ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_RC +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -19600,10 +23846,10 @@ file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_RC +allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_RC +no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds @@ -19630,45 +23876,45 @@ shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_RC +hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC +hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. -hardcode_direct=$hardcode_direct_RC +hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. -hardcode_minus_L=$hardcode_minus_L_RC +hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_RC +hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_RC +hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_RC +link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec @@ -19677,22 +23923,22 @@ sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_RC" +fix_srcfile_path="$fix_srcfile_path_GCJ" # Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_RC +always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_RC +export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_RC +exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_RC +include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname @@ -19718,1181 +23964,512 @@ CC="$lt_save_CC" + else + tagname="" + fi ;; - *) - { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 -echo "$as_me: error: Unsupported tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 -echo "$as_me: error: unable to update list of available tagged configurations." >&2;} - { (exit 1); exit 1; }; } - fi -fi - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/mklib' - -# Prevent multiple expansion - - - - - - - - + RC) + 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 +# Source file extension for RC test sources. +ac_ext=rc +# Object file extension for compiled RC test sources. +objext=o +objext_RC=$objext +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} +# Allow CC to be a program name with arguments. +compiler=$CC +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +compiler_RC=$CC +lt_cv_prog_compiler_c_o_RC=yes +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_RC \ + CC_RC \ + LD_RC \ + lt_prog_compiler_wl_RC \ + lt_prog_compiler_pic_RC \ + lt_prog_compiler_static_RC \ + lt_prog_compiler_no_builtin_flag_RC \ + export_dynamic_flag_spec_RC \ + thread_safe_flag_spec_RC \ + whole_archive_flag_spec_RC \ + enable_shared_with_static_runtimes_RC \ + old_archive_cmds_RC \ + old_archive_from_new_cmds_RC \ + predep_objects_RC \ + postdep_objects_RC \ + predeps_RC \ + postdeps_RC \ + compiler_lib_search_path_RC \ + archive_cmds_RC \ + archive_expsym_cmds_RC \ + postinstall_cmds_RC \ + postuninstall_cmds_RC \ + old_archive_from_expsyms_cmds_RC \ + allow_undefined_flag_RC \ + no_undefined_flag_RC \ + export_symbols_cmds_RC \ + hardcode_libdir_flag_spec_RC \ + hardcode_libdir_flag_spec_ld_RC \ + hardcode_libdir_separator_RC \ + hardcode_automatic_RC \ + module_cmds_RC \ + module_expsym_cmds_RC \ + lt_cv_prog_compiler_c_o_RC \ + exclude_expsyms_RC \ + include_expsyms_RC; do + case $var in + old_archive_cmds_RC | \ + old_archive_from_new_cmds_RC | \ + archive_cmds_RC | \ + archive_expsym_cmds_RC | \ + module_cmds_RC | \ + module_expsym_cmds_RC | \ + old_archive_from_expsyms_cmds_RC | \ + export_symbols_cmds_RC | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done -echo "$as_me:$LINENO: checking for GNU make" >&5 -echo $ECHO_N "checking for GNU make... $ECHO_C" >&6 -if test "${llvm_cv_gnu_make_command+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - 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 -fi -echo "$as_me:$LINENO: result: $llvm_cv_gnu_make_command" >&5 -echo "${ECHO_T}$llvm_cv_gnu_make_command" >&6 - if test "x$llvm_cv_gnu_make_command" != "x" ; then - ifGNUmake='' ; - else - ifGNUmake='#' ; - echo "$as_me:$LINENO: result: \"Not found\"" >&5 -echo "${ECHO_T}\"Not found\"" >&6; - fi + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac +cfgfile="$ofile" -echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else - echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6 -fi + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname -# Extract the first word of "date", so it can be a program name with args. -set dummy date; 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_path_DATE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $DATE in - [\\/]* | ?:[\\/]*) - ac_cv_path_DATE="$DATE" # Let the user override the test with a path. - ;; - *) - 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_path_DATE="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - test -z "$ac_cv_path_DATE" && ac_cv_path_DATE="date" - ;; -esac -fi -DATE=$ac_cv_path_DATE +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL -if test -n "$DATE"; then - echo "$as_me:$LINENO: result: $DATE" >&5 -echo "${ECHO_T}$DATE" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared -# Extract the first word of "find", so it can be a program name with args. -set dummy find; 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_path_FIND+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $FIND in - [\\/]* | ?:[\\/]*) - ac_cv_path_FIND="$FIND" # Let the user override the test with a path. - ;; - *) - 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_path_FIND="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# Whether or not to build static libraries. +build_old_libs=$enable_static - test -z "$ac_cv_path_FIND" && ac_cv_path_FIND="find" - ;; -esac -fi -FIND=$ac_cv_path_FIND +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_RC -if test -n "$FIND"; then - echo "$as_me:$LINENO: result: $FIND" >&5 -echo "${ECHO_T}$FIND" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC -# Extract the first word of "grep", so it can be a program name with args. -set dummy grep; 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_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $GREP in - [\\/]* | ?:[\\/]*) - ac_cv_path_GREP="$GREP" # Let the user override the test with a path. - ;; - *) - 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_path_GREP="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install - test -z "$ac_cv_path_GREP" && ac_cv_path_GREP="grep" - ;; -esac -fi -GREP=$ac_cv_path_GREP +# The host system. +host_alias=$host_alias +host=$host -if test -n "$GREP"; then - echo "$as_me:$LINENO: result: $GREP" >&5 -echo "${ECHO_T}$GREP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# An echo program that does not interpret backslashes. +echo=$lt_echo -# Extract the first word of "mkdir", so it can be a program name with args. -set dummy mkdir; 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_path_MKDIR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MKDIR in - [\\/]* | ?:[\\/]*) - ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path. - ;; - *) - 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_path_MKDIR="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS - test -z "$ac_cv_path_MKDIR" && ac_cv_path_MKDIR="mkdir" - ;; -esac -fi -MKDIR=$ac_cv_path_MKDIR +# A C compiler. +LTCC=$lt_LTCC -if test -n "$MKDIR"; then - echo "$as_me:$LINENO: result: $MKDIR" >&5 -echo "${ECHO_T}$MKDIR" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# A language-specific compiler. +CC=$lt_compiler_RC -# Extract the first word of "mv", so it can be a program name with args. -set dummy mv; 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_path_MV+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $MV in - [\\/]* | ?:[\\/]*) - ac_cv_path_MV="$MV" # Let the user override the test with a path. - ;; - *) - 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_path_MV="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# Is the compiler the GNU C compiler? +with_gcc=$GCC_RC - test -z "$ac_cv_path_MV" && ac_cv_path_MV="mv" - ;; -esac -fi -MV=$ac_cv_path_MV +# An ERE matcher. +EGREP=$lt_EGREP -if test -n "$MV"; then - echo "$as_me:$LINENO: result: $MV" >&5 -echo "${ECHO_T}$MV" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# The linker used to build libraries. +LD=$lt_LD_RC -# Extract the first word of "pax", so it can be a program name with args. -set dummy pax; 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_path_PAX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PAX in - [\\/]* | ?:[\\/]*) - ac_cv_path_PAX="$PAX" # Let the user override the test with a path. - ;; - *) - 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_path_PAX="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# Whether we need hard or soft links. +LN_S=$lt_LN_S - test -z "$ac_cv_path_PAX" && ac_cv_path_PAX="pax" - ;; -esac -fi -PAX=$ac_cv_path_PAX +# A BSD-compatible nm program. +NM=$lt_NM -if test -n "$PAX"; then - echo "$as_me:$LINENO: result: $PAX" >&5 -echo "${ECHO_T}$PAX" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# A symbol stripping program +STRIP=$lt_STRIP -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; 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_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# Used on cygwin: assembler. +AS="$AS" - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# The name of the directory that contains temporary libtool files. +objdir=$objdir - RANLIB=$ac_ct_RANLIB -else - RANLIB="$ac_cv_prog_RANLIB" -fi +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds -# Extract the first word of "rm", so it can be a program name with args. -set dummy rm; 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_path_RM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $RM in - [\\/]* | ?:[\\/]*) - ac_cv_path_RM="$RM" # Let the user override the test with a path. - ;; - *) - 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_path_RM="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_RC - test -z "$ac_cv_path_RM" && ac_cv_path_RM="rm" - ;; -esac -fi -RM=$ac_cv_path_RM +# Object file suffix (normally "o"). +objext="$ac_objext" -if test -n "$RM"; then - echo "$as_me:$LINENO: result: $RM" >&5 -echo "${ECHO_T}$RM" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# Old archive suffix (normally "a"). +libext="$libext" -# Extract the first word of "sed", so it can be a program name with args. -set dummy sed; 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_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $SED in - [\\/]* | ?:[\\/]*) - ac_cv_path_SED="$SED" # Let the user override the test with a path. - ;; - *) - 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_path_SED="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' - test -z "$ac_cv_path_SED" && ac_cv_path_SED="sed" - ;; -esac -fi -SED=$ac_cv_path_SED +# Executable file suffix (normally ""). +exeext="$exeext" -if test -n "$SED"; then - echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_RC +pic_mode=$pic_mode -# Extract the first word of "tar", so it can be a program name with args. -set dummy tar; 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_path_TAR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $TAR in - [\\/]* | ?:[\\/]*) - ac_cv_path_TAR="$TAR" # Let the user override the test with a path. - ;; - *) - 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_path_TAR="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len - test -z "$ac_cv_path_TAR" && ac_cv_path_TAR="gtar" - ;; -esac -fi -TAR=$ac_cv_path_TAR +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC -if test -n "$TAR"; then - echo "$as_me:$LINENO: result: $TAR" >&5 -echo "${ECHO_T}$TAR" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# Must we lock files when doing compilation ? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix +# Do we need a version for libraries? +need_version=$need_version -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL=$ac_install_sh - fi -fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_RC -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC -# Extract the first word of "bzip2", so it can be a program name with args. -set dummy bzip2; 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_path_BZIP2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $BZIP2 in - [\\/]* | ?:[\\/]*) - ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a path. - ;; - *) - 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_path_BZIP2="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# Library versioning type. +version_type=$version_type - test -z "$ac_cv_path_BZIP2" && ac_cv_path_BZIP2="true bzip2" - ;; -esac -fi -BZIP2=$ac_cv_path_BZIP2 +# Format of library name prefix. +libname_spec=$lt_libname_spec -if test -n "$BZIP2"; then - echo "$as_me:$LINENO: result: $BZIP2" >&5 -echo "${ECHO_T}$BZIP2" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec -# Extract the first word of "dot", so it can be a program name with args. -set dummy dot; 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_path_DOT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $DOT in - [\\/]* | ?:[\\/]*) - ac_cv_path_DOT="$DOT" # Let the user override the test with a path. - ;; - *) - 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_path_DOT="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec - test -z "$ac_cv_path_DOT" && ac_cv_path_DOT="true dot" - ;; -esac -fi -DOT=$ac_cv_path_DOT +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_RC +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds -if test -n "$DOT"; then - echo "$as_me:$LINENO: result: $DOT" >&5 -echo "${ECHO_T}$DOT" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC -# Extract the first word of "doxygen", so it can be a program name with args. -set dummy doxygen; 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_path_DOXYGEN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $DOXYGEN in - [\\/]* | ?:[\\/]*) - ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. - ;; - *) - 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_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC - test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN="true doxygen" - ;; -esac -fi -DOXYGEN=$ac_cv_path_DOXYGEN +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_RC +archive_expsym_cmds=$lt_archive_expsym_cmds_RC +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds -if test -n "$DOXYGEN"; then - echo "$as_me:$LINENO: result: $DOXYGEN" >&5 -echo "${ECHO_T}$DOXYGEN" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_RC +module_expsym_cmds=$lt_module_expsym_cmds_RC -# Extract the first word of "etags", so it can be a program name with args. -set dummy etags; 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_path_ETAGS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ETAGS in - [\\/]* | ?:[\\/]*) - ac_cv_path_ETAGS="$ETAGS" # Let the user override the test with a path. - ;; - *) - 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_path_ETAGS="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib - test -z "$ac_cv_path_ETAGS" && ac_cv_path_ETAGS="true etags" - ;; -esac -fi -ETAGS=$ac_cv_path_ETAGS +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_RC -if test -n "$ETAGS"; then - echo "$as_me:$LINENO: result: $ETAGS" >&5 -echo "${ECHO_T}$ETAGS" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_RC -# Extract the first word of "groff", so it can be a program name with args. -set dummy groff; 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_path_GROFF+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $GROFF in - [\\/]* | ?:[\\/]*) - ac_cv_path_GROFF="$GROFF" # Let the user override the test with a path. - ;; - *) - 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_path_GROFF="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_RC + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_RC + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_RC - test -z "$ac_cv_path_GROFF" && ac_cv_path_GROFF="true groff" - ;; -esac -fi -GROFF=$ac_cv_path_GROFF +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_RC -if test -n "$GROFF"; then - echo "$as_me:$LINENO: result: $GROFF" >&5 -echo "${ECHO_T}$GROFF" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds -# Extract the first word of "gzip", so it can be a program name with args. -set dummy gzip; 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_path_GZIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $GZIP in - [\\/]* | ?:[\\/]*) - ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path. - ;; - *) - 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_path_GZIP="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval - test -z "$ac_cv_path_GZIP" && ac_cv_path_GZIP="true gzip" - ;; -esac -fi -GZIP=$ac_cv_path_GZIP +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe -if test -n "$GZIP"; then - echo "$as_me:$LINENO: result: $GZIP" >&5 -echo "${ECHO_T}$GZIP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl -# Extract the first word of "pod2html", so it can be a program name with args. -set dummy pod2html; 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_path_POD2HTML+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $POD2HTML in - [\\/]* | ?:[\\/]*) - ac_cv_path_POD2HTML="$POD2HTML" # Let the user override the test with a path. - ;; - *) - 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_path_POD2HTML="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - test -z "$ac_cv_path_POD2HTML" && ac_cv_path_POD2HTML="true pod2html" - ;; -esac -fi -POD2HTML=$ac_cv_path_POD2HTML +# This is the shared library runtime path variable. +runpath_var=$runpath_var -if test -n "$POD2HTML"; then - echo "$as_me:$LINENO: result: $POD2HTML" >&5 -echo "${ECHO_T}$POD2HTML" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# This is the shared library path variable. +shlibpath_var=$shlibpath_var -# Extract the first word of "pod2man", so it can be a program name with args. -set dummy pod2man; 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_path_POD2MAN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $POD2MAN in - [\\/]* | ?:[\\/]*) - ac_cv_path_POD2MAN="$POD2MAN" # Let the user override the test with a path. - ;; - *) - 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_path_POD2MAN="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath - test -z "$ac_cv_path_POD2MAN" && ac_cv_path_POD2MAN="true pod2man" - ;; -esac -fi -POD2MAN=$ac_cv_path_POD2MAN +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_RC -if test -n "$POD2MAN"; then - echo "$as_me:$LINENO: result: $POD2MAN" >&5 -echo "${ECHO_T}$POD2MAN" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs -# Extract the first word of "python", so it can be a program name with args. -set dummy python; 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_path_PYTHON+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PYTHON in - [\\/]* | ?:[\\/]*) - ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. - ;; - *) - 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_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC - test -z "$ac_cv_path_PYTHON" && ac_cv_path_PYTHON="true python" - ;; -esac -fi -PYTHON=$ac_cv_path_PYTHON +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC -if test -n "$PYTHON"; then - echo "$as_me:$LINENO: result: $PYTHON" >&5 -echo "${ECHO_T}$PYTHON" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC -# Extract the first word of "qmtest", so it can be a program name with args. -set dummy qmtest; 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_path_QMTEST+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $QMTEST in - [\\/]* | ?:[\\/]*) - ac_cv_path_QMTEST="$QMTEST" # Let the user override the test with a path. - ;; - *) - 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_path_QMTEST="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_RC - test -z "$ac_cv_path_QMTEST" && ac_cv_path_QMTEST="true qmtest" - ;; -esac -fi -QMTEST=$ac_cv_path_QMTEST +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_RC + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_RC + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_RC + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_RC" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_RC -if test -n "$QMTEST"; then - echo "$as_me:$LINENO: result: $QMTEST" >&5 -echo "${ECHO_T}$QMTEST" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_RC -# Extract the first word of "runtest", so it can be a program name with args. -set dummy runtest; 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_path_RUNTEST+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $RUNTEST in - [\\/]* | ?:[\\/]*) - ac_cv_path_RUNTEST="$RUNTEST" # Let the user override the test with a path. - ;; - *) - 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_path_RUNTEST="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds - test -z "$ac_cv_path_RUNTEST" && ac_cv_path_RUNTEST="true runtest" - ;; -esac -fi -RUNTEST=$ac_cv_path_RUNTEST +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_RC -if test -n "$RUNTEST"; then - echo "$as_me:$LINENO: result: $RUNTEST" >&5 -echo "${ECHO_T}$RUNTEST" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_RC -# Extract the first word of "zip", so it can be a program name with args. -set dummy zip; 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_path_ZIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ZIP in - [\\/]* | ?:[\\/]*) - ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path. - ;; - *) - 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_path_ZIP="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ - test -z "$ac_cv_path_ZIP" && ac_cv_path_ZIP="true zip" - ;; -esac -fi -ZIP=$ac_cv_path_ZIP -if test -n "$ZIP"; then - echo "$as_me:$LINENO: result: $ZIP" >&5 -echo "${ECHO_T}$ZIP" >&6 else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi fi -echo "$as_me:$LINENO: checking for compiler -Wl,-R option" >&5 -echo $ECHO_N "checking for compiler -Wl,-R option... $ECHO_C" >&6 -if test "${llvm_cv_link_use_r+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_ext=c +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 - oldcflags="$CFLAGS" - CFLAGS="$CFLAGS -Wl,-R." - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +CC="$lt_save_CC" -int -main () -{ -int main() { return 0; } - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 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_exeext' - { (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 - llvm_cv_link_use_r=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ;; -llvm_cv_link_use_r=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CFLAGS="$oldcflags" - 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: error: Unsupported tag name: $tagname" >&5 +echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi fi -echo "$as_me:$LINENO: result: $llvm_cv_link_use_r" >&5 -echo "${ECHO_T}$llvm_cv_link_use_r" >&6 -if test "$llvm_cv_link_use_r" = yes ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_LINK_R 1 -_ACEOF - fi + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/mklib' + +# Prevent multiple expansion + + + + + + + + + + + + + + + + + + + etags_version=`$ETAGS --version 2>&1` @@ -21974,9 +25551,7 @@ - - -for ac_header in bzlib.h dlfcn.h execinfo.h fcntl.h limits.h link.h ltdl.h +for ac_header in dlfcn.h execinfo.h fcntl.h limits.h link.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -22128,8 +25703,7 @@ - -for ac_header in malloc.h unistd.h windows.h zlib.h +for ac_header in malloc.h unistd.h windows.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -25786,17 +29360,7 @@ fi -echo "$as_me:$LINENO: checking for shared library suffix" >&5 -echo $ECHO_N "checking for shared library suffix... $ECHO_C" >&6 -eval "SHLIBEXT=$shrext_cmds" -echo "$as_me:$LINENO: result: $SHLIBEXT" >&5 -echo "${ECHO_T}$SHLIBEXT" >&6 -SHLIBEXT=$SHLIBEXT - - -cat >>confdefs.h <<_ACEOF -#define SHLIBEXT "$SHLIBEXT" -_ACEOF +SHLIBEXT=$libltdl_cv_shlibext # Translate the various configuration directories and other basic @@ -25930,9 +29494,6 @@ ac_config_commands="$ac_config_commands tools/Makefile" - ac_config_commands="$ac_config_commands tools/Makefile.JIT" - - ac_config_commands="$ac_config_commands utils/Makefile" @@ -26031,6 +29592,20 @@ LTLIBOBJS=$ac_ltlibobjs +if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"INSTALL_LTDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"INSTALL_LTDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${CONVENIENCE_LTDL_TRUE}" && test -z "${CONVENIENCE_LTDL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"CONVENIENCE_LTDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CONVENIENCE_LTDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files @@ -26477,7 +30052,6 @@ ${srcdir}/autoconf/mkinstalldirs `dirname test/QMTest/llvm.py` ${srcdir}/autoconf/mkinstalldirs `dirname test/QMTest/llvmdb.py` ${srcdir}/autoconf/mkinstalldirs `dirname tools/Makefile` -${srcdir}/autoconf/mkinstalldirs `dirname tools/Makefile.JIT` ${srcdir}/autoconf/mkinstalldirs `dirname utils/Makefile` ${srcdir}/autoconf/mkinstalldirs `dirname projects/Makefile` @@ -26507,7 +30081,6 @@ "test/QMTest/llvm.py" ) CONFIG_COMMANDS="$CONFIG_COMMANDS test/QMTest/llvm.py" ;; "test/QMTest/llvmdb.py" ) CONFIG_COMMANDS="$CONFIG_COMMANDS test/QMTest/llvmdb.py" ;; "tools/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS tools/Makefile" ;; - "tools/Makefile.JIT" ) CONFIG_COMMANDS="$CONFIG_COMMANDS tools/Makefile.JIT" ;; "utils/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS utils/Makefile" ;; "projects/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS projects/Makefile" ;; "include/llvm/Config/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/Config/config.h" ;; @@ -26640,27 +30213,16 @@ s, at FLEX@,$FLEX,;t t s, at YACC@,$YACC,;t t s, at BISON@,$BISON,;t t -s, at EGREP@,$EGREP,;t t -s, at LN_S@,$LN_S,;t t -s, at ECHO@,$ECHO,;t t -s, at AR@,$AR,;t t -s, at ac_ct_AR@,$ac_ct_AR,;t t -s, at RANLIB@,$RANLIB,;t t -s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s, at STRIP@,$STRIP,;t t -s, at ac_ct_STRIP@,$ac_ct_STRIP,;t t -s, at CXXCPP@,$CXXCPP,;t t -s, at F77@,$F77,;t t -s, at FFLAGS@,$FFLAGS,;t t -s, at ac_ct_F77@,$ac_ct_F77,;t t -s, at LIBTOOL@,$LIBTOOL,;t t s, at ifGNUmake@,$ifGNUmake,;t t +s, at LN_S@,$LN_S,;t t s, at DATE@,$DATE,;t t s, at FIND@,$FIND,;t t s, at GREP@,$GREP,;t t s, at MKDIR@,$MKDIR,;t t s, at MV@,$MV,;t t s, at PAX@,$PAX,;t t +s, at RANLIB@,$RANLIB,;t t +s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s, at RM@,$RM,;t t s, at SED@,$SED,;t t s, at TAR@,$TAR,;t t @@ -26679,6 +30241,22 @@ s, at QMTEST@,$QMTEST,;t t s, at RUNTEST@,$RUNTEST,;t t s, at ZIP@,$ZIP,;t t +s, at EGREP@,$EGREP,;t t +s, at INSTALL_LTDL_TRUE@,$INSTALL_LTDL_TRUE,;t t +s, at INSTALL_LTDL_FALSE@,$INSTALL_LTDL_FALSE,;t t +s, at CONVENIENCE_LTDL_TRUE@,$CONVENIENCE_LTDL_TRUE,;t t +s, at CONVENIENCE_LTDL_FALSE@,$CONVENIENCE_LTDL_FALSE,;t t +s, at LIBADD_DL@,$LIBADD_DL,;t t +s, at ECHO@,$ECHO,;t t +s, at AR@,$AR,;t t +s, at ac_ct_AR@,$ac_ct_AR,;t t +s, at STRIP@,$STRIP,;t t +s, at ac_ct_STRIP@,$ac_ct_STRIP,;t t +s, at CXXCPP@,$CXXCPP,;t t +s, at F77@,$F77,;t t +s, at FFLAGS@,$FFLAGS,;t t +s, at ac_ct_F77@,$ac_ct_F77,;t t +s, at LIBTOOL@,$LIBTOOL,;t t s, at ETAGSFLAGS@,$ETAGSFLAGS,;t t s, at ALLOCA@,$ALLOCA,;t t s, at MMAP_FILE@,$MMAP_FILE,;t t @@ -27421,7 +30999,6 @@ test/QMTest/llvm.py ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/test/QMTest/llvm.py test/QMTest/llvm.py ;; test/QMTest/llvmdb.py ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/test/QMTest/llvmdb.py test/QMTest/llvmdb.py ;; tools/Makefile ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/tools/Makefile tools/Makefile ;; - tools/Makefile.JIT ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/tools/Makefile.JIT tools/Makefile.JIT ;; utils/Makefile ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/utils/Makefile utils/Makefile ;; projects/Makefile ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/projects/Makefile projects/Makefile ;; esac From reid at x10sys.com Mon Nov 29 06:36:27 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 06:36:27 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Config/config.h.in Message-ID: <200411291236.GAA04734@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Config: config.h.in updated: 1.36 -> 1.37 --- Log message: Changes resulting from AC_LIB_LTDL usage. --- Diffs of the changes: (+136 -11) Index: llvm/include/llvm/Config/config.h.in diff -u llvm/include/llvm/Config/config.h.in:1.36 llvm/include/llvm/Config/config.h.in:1.37 --- llvm/include/llvm/Config/config.h.in:1.36 Thu Nov 25 14:21:53 2004 +++ llvm/include/llvm/Config/config.h.in Mon Nov 29 06:36:16 2004 @@ -15,14 +15,54 @@ */ #undef HAVE_ALLOCA_H +/* Define to 1 if you have the `argz_append' function. */ +#undef HAVE_ARGZ_APPEND + +/* Define to 1 if you have the `argz_create_sep' function. */ +#undef HAVE_ARGZ_CREATE_SEP + +/* Define to 1 if you have the header file. */ +#undef HAVE_ARGZ_H + +/* Define to 1 if you have the `argz_insert' function. */ +#undef HAVE_ARGZ_INSERT + +/* Define to 1 if you have the `argz_next' function. */ +#undef HAVE_ARGZ_NEXT + +/* Define to 1 if you have the `argz_stringify' function. */ +#undef HAVE_ARGZ_STRINGIFY + +/* Define to 1 if you have the header file. */ +#undef HAVE_ASSERT_H + /* Define to 1 if you have the `backtrace' function. */ #undef HAVE_BACKTRACE +/* Define to 1 if you have the `bcopy' function. */ +#undef HAVE_BCOPY + /* Does not have bi-directional iterator */ #undef HAVE_BI_ITERATOR -/* Define to 1 if you have the header file. */ -#undef HAVE_BZLIB_H +/* Define to 1 if you have the `closedir' function. */ +#undef HAVE_CLOSEDIR + +/* Define to 1 if you have the header file. */ +#undef HAVE_CTYPE_H + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_DIRENT_H + +/* Define if you have the GNU dld library. */ +#undef HAVE_DLD + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLD_H + +/* Define to 1 if you have the `dlerror' function. */ +#undef HAVE_DLERROR /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H @@ -30,6 +70,18 @@ /* Define if dlopen() is available on this platform. */ #undef HAVE_DLOPEN +/* Define to 1 if you have the header file. */ +#undef HAVE_DL_H + +/* Define if you have the _dyld_func_lookup function. */ +#undef HAVE_DYLD + +/* Define to 1 if you have the header file. */ +#undef HAVE_ERRNO_H + +/* Define to 1 if the system has the type `error_t'. */ +#undef HAVE_ERROR_T + /* Define to 1 if you have the header file. */ #undef HAVE_EXECINFO_H @@ -66,6 +118,9 @@ /* Does not have hash_set in gnu namespace */ #undef HAVE_GNU_EXT_HASH_SET +/* Define to 1 if you have the `index' function. */ +#undef HAVE_INDEX + /* Define to 1 if the system has the type `int64_t'. */ #undef HAVE_INT64_T @@ -87,6 +142,9 @@ /* Set to 1 if the isnan function is found in */ #undef HAVE_ISNAN_IN_MATH_H +/* Define if you have the libdl library or equivalent. */ +#undef HAVE_LIBDL + /* Define to 1 if you have the `elf' library (-lelf). */ #undef HAVE_LIBELF @@ -100,18 +158,24 @@ the current directory to the dynamic linker search path. */ #undef HAVE_LINK_R -/* Define to 1 if you have the header file. */ -#undef HAVE_LTDL_H - /* Define if lt_dlopen() is available on this platform */ #undef HAVE_LT_DLOPEN +/* Define to 1 if you have the header file. */ +#undef HAVE_MACH_O_DYLD_H + /* Define if mallinfo() is available on this platform. */ #undef HAVE_MALLINFO /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H +/* Define to 1 if you have the `memcpy' function. */ +#undef HAVE_MEMCPY + +/* Define to 1 if you have the `memmove' function. */ +#undef HAVE_MEMMOVE + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H @@ -131,6 +195,15 @@ /* define if the compiler implements namespaces */ #undef HAVE_NAMESPACES +/* Define to 1 if you have the header file, and it defines `DIR'. */ +#undef HAVE_NDIR_H + +/* Define to 1 if you have the `opendir' function. */ +#undef HAVE_OPENDIR + +/* Define if libtool can extract symbol lists from object files. */ +#undef HAVE_PRELOADED_SYMBOLS + /* Define to have the %a format string */ #undef HAVE_PRINTF_A @@ -140,9 +213,21 @@ /* Define to 1 if srand48/lrand48/drand48 exist in */ #undef HAVE_RAND48 +/* Define to 1 if you have the `readdir' function. */ +#undef HAVE_READDIR + +/* Define to 1 if you have the `rindex' function. */ +#undef HAVE_RINDEX + +/* Define if you have the shl_load function. */ +#undef HAVE_SHL_LOAD + /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_STDIO_H + /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H @@ -161,6 +246,12 @@ /* Does not have std namespace iterator */ #undef HAVE_STD_ITERATOR +/* Define to 1 if you have the `strchr' function. */ +#undef HAVE_STRCHR + +/* Define to 1 if you have the `strcmp' function. */ +#undef HAVE_STRCMP + /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP @@ -170,15 +261,29 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H +/* Define to 1 if you have the `strrchr' function. */ +#undef HAVE_STRRCHR + /* Define to 1 if you have the `strtoll' function. */ #undef HAVE_STRTOLL /* Define to 1 if you have the `strtoq' function. */ #undef HAVE_STRTOQ +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_SYS_DIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_DL_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAN_H +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_SYS_NDIR_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_RESOURCE_H @@ -206,9 +311,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_WINDOWS_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ZLIB_H - /* Installation directory for binary executables */ #undef LLVM_BINDIR @@ -236,6 +338,26 @@ /* Installation prefix directory */ #undef LLVM_PREFIX +/* Define if the OS needs help to load dependent libraries for dlopen(). */ +#undef LTDL_DLOPEN_DEPLIBS + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LTDL_OBJDIR + +/* Define to the name of the environment variable that determines the dynamic + library search path. */ +#undef LTDL_SHLIBPATH_VAR + +/* Define to the extension used for shared libraries, say, ".so". */ +#undef LTDL_SHLIB_EXT + +/* Define to the system default library search path. */ +#undef LTDL_SYSSEARCHPATH + +/* Define if dlsym() requires a leading underscore in symbol names. */ +#undef NEED_USCORE + /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT @@ -254,9 +376,6 @@ /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE -/* Extension that shared libraries have, e.g., ".so". */ -#undef SHLIBEXT - /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. @@ -278,6 +397,12 @@ `char[]'. */ #undef YYTEXT_POINTER +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to a type to use for `error_t' if it is not otherwise available. */ +#undef error_t + /* Define to `int' if does not define. */ #undef pid_t From reid at x10sys.com Mon Nov 29 06:37:55 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 06:37:55 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200411291237.GAA04751@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.241 -> 1.242 --- Log message: Allow reconfig from any directory, not just the top build directory, by changing directory first. Also make sure that we don't attempt to run config.status if the recheck didn't work. --- Diffs of the changes: (+3 -2) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.241 llvm/Makefile.rules:1.242 --- llvm/Makefile.rules:1.241 Mon Nov 29 01:17:07 2004 +++ llvm/Makefile.rules Mon Nov 29 06:37:44 2004 @@ -88,8 +88,9 @@ .PRECIOUS: $(ConfigStatusScript) $(ConfigStatusScript): $(ConfigureScript) $(Echo) Reconfiguring with $< - $(Verb) $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) - $(Verb) $(ConfigStatusScript) + $(Verb) cd $(BUILD_OBJ_ROOT) && \ + $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \ + $(ConfigStatusScript) #------------------------------------------------------------------------ # Make sure the configuration makefile is up to date From reid at x10sys.com Mon Nov 29 06:39:21 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 06:39:21 -0600 Subject: [llvm-commits] CVS: llvm/lib/System/DynamicLibrary.cpp Message-ID: <200411291239.GAA04775@zion.cs.uiuc.edu> Changes in directory llvm/lib/System: DynamicLibrary.cpp updated: 1.2 -> 1.3 --- Log message: We just use ltdl's implementation for this abstraction now. Its portable to more platforms than LLVM supports. --- Diffs of the changes: (+3 -13) Index: llvm/lib/System/DynamicLibrary.cpp diff -u llvm/lib/System/DynamicLibrary.cpp:1.2 llvm/lib/System/DynamicLibrary.cpp:1.3 --- llvm/lib/System/DynamicLibrary.cpp:1.2 Mon Nov 29 04:39:46 2004 +++ llvm/lib/System/DynamicLibrary.cpp Mon Nov 29 06:39:10 2004 @@ -12,7 +12,7 @@ //===----------------------------------------------------------------------===// #include "llvm/System/DynamicLibrary.h" -#include "llvm/Config/dlfcn.h" +#include "ltdl.h" #include //===----------------------------------------------------------------------===// @@ -20,14 +20,10 @@ //=== independent code. //===----------------------------------------------------------------------===// -#ifdef HAVE_LTDL_H - namespace llvm { using namespace sys; -#ifdef HAVE_LT_DLOPEN - DynamicLibrary::DynamicLibrary() : handle(0) { if (0 != lt_dlinit()) throw std::string(lt_dlerror()); @@ -63,7 +59,7 @@ return lt_dlsym((lt_dlhandle) handle,symbolName); } -#else +#if 0 DynamicLibrary::DynamicLibrary(const char*filename) : handle(0) { assert(!"Have ltdl.h but not libltdl.a!"); } @@ -77,12 +73,6 @@ return 0; } -#endif // HAVE_DLOPEN +#endif } // namespace llvm - -#else // HAVE_LTDL_H - -#include "platform/DynamicLibrary.cpp" - -#endif From reid at x10sys.com Mon Nov 29 06:40:32 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 06:40:32 -0600 Subject: [llvm-commits] CVS: llvm/lib/Support/ToolRunner.cpp Message-ID: <200411291240.GAA04803@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: ToolRunner.cpp updated: 1.32 -> 1.33 --- Log message: Shared library extension is now in LTDL_SHLIB_EXT --- Diffs of the changes: (+1 -1) Index: llvm/lib/Support/ToolRunner.cpp diff -u llvm/lib/Support/ToolRunner.cpp:1.32 llvm/lib/Support/ToolRunner.cpp:1.33 --- llvm/lib/Support/ToolRunner.cpp:1.32 Mon Nov 8 22:01:18 2004 +++ llvm/lib/Support/ToolRunner.cpp Mon Nov 29 06:40:21 2004 @@ -399,7 +399,7 @@ int GCC::MakeSharedObject(const std::string &InputFile, FileType fileType, std::string &OutputFile) { - OutputFile = getUniqueFilename(InputFile+SHLIBEXT); + OutputFile = getUniqueFilename(InputFile+LTDL_SHLIB_EXT); // Compile the C/asm file into a shared object const char* GCCArgs[] = { GCCPath.c_str(), From reid at x10sys.com Mon Nov 29 06:40:32 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 06:40:32 -0600 Subject: [llvm-commits] CVS: llvm/lib/Linker/LinkArchives.cpp Message-ID: <200411291240.GAA04806@zion.cs.uiuc.edu> Changes in directory llvm/lib/Linker: LinkArchives.cpp updated: 1.39 -> 1.40 --- Log message: Shared library extension is now in LTDL_SHLIB_EXT --- Diffs of the changes: (+2 -2) Index: llvm/lib/Linker/LinkArchives.cpp diff -u llvm/lib/Linker/LinkArchives.cpp:1.39 llvm/lib/Linker/LinkArchives.cpp:1.40 --- llvm/lib/Linker/LinkArchives.cpp:1.39 Thu Nov 25 03:32:08 2004 +++ llvm/lib/Linker/LinkArchives.cpp Mon Nov 29 06:40:21 2004 @@ -60,8 +60,8 @@ if (!SharedObjectOnly && FileOpenable(Directory + LibName + ".bc")) return Directory + LibName + ".bc"; - if (FileOpenable(Directory + LibName + SHLIBEXT)) - return Directory + LibName + SHLIBEXT; + if (FileOpenable(Directory + LibName + LTDL_SHLIB_EXT)) + return Directory + LibName + LTDL_SHLIB_EXT; if (!SharedObjectOnly && FileOpenable(Directory + LibName + ".a")) return Directory + LibName + ".a"; From reid at x10sys.com Mon Nov 29 07:28:06 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 07:28:06 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/System/DynamicLibrary.h Message-ID: <200411291328.HAA05131@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/System: DynamicLibrary.h updated: 1.2 -> 1.3 --- Log message: Add in some methods for use by the JIT. LoadLibraryPermanently brings the library into the address space permanently. SearchForAddressOfSymbol looks in all previously permanently loaded libraries and any currently open libraries for a symbol, instead of just one library like GetAddressOfSymbol --- Diffs of the changes: (+25 -0) Index: llvm/include/llvm/System/DynamicLibrary.h diff -u llvm/include/llvm/System/DynamicLibrary.h:1.2 llvm/include/llvm/System/DynamicLibrary.h:1.3 --- llvm/include/llvm/System/DynamicLibrary.h:1.2 Mon Nov 29 04:38:54 2004 +++ llvm/include/llvm/System/DynamicLibrary.h Mon Nov 29 07:27:56 2004 @@ -57,6 +57,31 @@ ~DynamicLibrary(); /// @} + /// @name Functions + /// @{ + public: + /// This function allows a library to be loaded without instantiating a + /// DynamicLibrary object. Consequently, it is marked as being permanent + /// and will only be unloaded when the program terminates. + /// @throws std::string on error. + /// @brief Open a dynamic library permanently. + static void LoadLibraryPermanently(const char* filename); + + /// This function will search through all previously loaded dynamic + /// libraries for the symbol \p symbolName. If it is found, the addressof + /// that symbol is returned. If not, null is returned. Note that this will + /// search permanently loaded libraries (LoadLibraryPermanently) as well + /// as ephemerally loaded libraries (constructors). + /// @throws std::string on error. + /// @brief Search through libraries for address of a symbol + static void* SearchForAddressOfSymbol(const char* symbolName); + + /// @brief Convenience function for C++ophiles. + static void* SearchForAddressOfSymbol(const std::string& symbolName) { + return SearchForAddressOfSymbol(symbolName.c_str()); + } + + /// @} /// @name Accessors /// @{ public: From reid at x10sys.com Mon Nov 29 07:33:38 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 07:33:38 -0600 Subject: [llvm-commits] CVS: llvm/lib/System/DynamicLibrary.cpp Message-ID: <200411291333.HAA05166@zion.cs.uiuc.edu> Changes in directory llvm/lib/System: DynamicLibrary.cpp updated: 1.3 -> 1.4 --- Log message: Implement two new functions: LoadLibraryPermanently and SearchForAddressOfSymbol. --- Diffs of the changes: (+66 -32) Index: llvm/lib/System/DynamicLibrary.cpp diff -u llvm/lib/System/DynamicLibrary.cpp:1.3 llvm/lib/System/DynamicLibrary.cpp:1.4 --- llvm/lib/System/DynamicLibrary.cpp:1.3 Mon Nov 29 06:39:10 2004 +++ llvm/lib/System/DynamicLibrary.cpp Mon Nov 29 07:33:28 2004 @@ -20,59 +20,93 @@ //=== independent code. //===----------------------------------------------------------------------===// +static bool did_initialize_ltdl = false; + +static inline void check_ltdl_initialization() { + if (!did_initialize_ltdl) { + if (0 != lt_dlinit()) + throw std::string(lt_dlerror()); + did_initialize_ltdl = true; + } +} + +static std::vector OpenedHandles; + namespace llvm { using namespace sys; DynamicLibrary::DynamicLibrary() : handle(0) { - if (0 != lt_dlinit()) - throw std::string(lt_dlerror()); + check_ltdl_initialization(); - handle = lt_dlopen(0); + lt_dlhandle a_handle = lt_dlopen(0); - if (handle == 0) + if (a_handle == 0) throw std::string("Can't open program as dynamic library"); + + handle = a_handle; + OpenedHandles.push_back(a_handle); } DynamicLibrary::DynamicLibrary(const char*filename) : handle(0) { - if (0 != lt_dlinit()) - throw std::string(lt_dlerror()); - - handle = lt_dlopen(filename); + check_ltdl_initialization(); - if (handle == 0) - handle = lt_dlopenext(filename); - - if (handle == 0) - throw std::string("Can't open dynamic library:") + filename; -} - -DynamicLibrary::~DynamicLibrary() { - if (handle) - lt_dlclose((lt_dlhandle)handle); + lt_dlhandle a_handle = lt_dlopen(filename); - lt_dlexit(); -} + if (a_handle == 0) + a_handle = lt_dlopenext(filename); -void *DynamicLibrary::GetAddressOfSymbol(const char *symbolName) { - assert(handle != 0 && "Invalid DynamicLibrary handle"); - return lt_dlsym((lt_dlhandle) handle,symbolName); -} + if (a_handle == 0) + throw std::string("Can't open :") + filename + ": " + lt_dlerror(); -#if 0 -DynamicLibrary::DynamicLibrary(const char*filename) : handle(0) { - assert(!"Have ltdl.h but not libltdl.a!"); + handle = a_handle; + OpenedHandles.push_back(a_handle); } DynamicLibrary::~DynamicLibrary() { - assert(!"Have ltdl.h but not libltdl.a!"); + lt_dlhandle a_handle = (lt_dlhandle) handle; + if (a_handle) { + lt_dlclose(a_handle); + + for (std::vector::iterator I = OpenedHandles.begin(), + E = OpenedHandles.end(); I != E; ++I) { + if (*I == a_handle) { + // Note: don't use the swap/pop_back trick here. Order is important. + OpenedHandles.erase(I); + } + } + } +} + +void DynamicLibrary::LoadLibraryPermanently(const char* filename) { + check_ltdl_initialization(); + lt_dlhandle a_handle = lt_dlopen(filename); + + if (a_handle == 0) + a_handle = lt_dlopenext(filename); + + if (a_handle == 0) + throw std::string("Can't open :") + filename + ": " + lt_dlerror(); + + lt_dlmakeresident(a_handle); + + OpenedHandles.push_back(a_handle); +} + +void* DynamicLibrary::SearchForAddressOfSymbol(const char* symbolName) { + check_ltdl_initialization(); + for (std::vector::iterator I = OpenedHandles.begin(), + E = OpenedHandles.end(); I != E; ++I) { + lt_ptr ptr = lt_dlsym(*I, symbolName); + if (ptr) + return ptr; + } + return 0; } void *DynamicLibrary::GetAddressOfSymbol(const char *symbolName) { - assert(!"Have ltdl.h but not libltdl.a!"); - return 0; + assert(handle != 0 && "Invalid DynamicLibrary handle"); + return lt_dlsym((lt_dlhandle) handle, symbolName); } -#endif - } // namespace llvm From reid at x10sys.com Mon Nov 29 08:07:57 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 08:07:57 -0600 Subject: [llvm-commits] CVS: llvm/lib/Support/PluginLoader.cpp Message-ID: <200411291407.IAA05316@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: PluginLoader.cpp updated: 1.12 -> 1.13 --- Log message: Use System/DynamicLibrary instead of Support/DynamicLinker to implement. --- Diffs of the changes: (+12 -2) Index: llvm/lib/Support/PluginLoader.cpp diff -u llvm/lib/Support/PluginLoader.cpp:1.12 llvm/lib/Support/PluginLoader.cpp:1.13 --- llvm/lib/Support/PluginLoader.cpp:1.12 Wed Sep 1 17:55:35 2004 +++ llvm/lib/Support/PluginLoader.cpp Mon Nov 29 08:07:46 2004 @@ -13,13 +13,23 @@ #define DONT_GET_PLUGIN_LOADER_OPTION #include "llvm/Support/PluginLoader.h" -#include "llvm/Support/DynamicLinker.h" +#include "llvm/System/DynamicLibrary.h" #include + using namespace llvm; void PluginLoader::operator=(const std::string &Filename) { std::string ErrorMessage; - if (LinkDynamicObject(Filename.c_str(), &ErrorMessage)) + try { + sys::DynamicLibrary::LoadLibraryPermanently(Filename.c_str()); + } catch (const std::string& errmsg) { + if (errmsg.empty()) { + ErrorMessage = "Unknown"; + } else { + ErrorMessage = errmsg; + } + } + if (!ErrorMessage.empty()) std::cerr << "Error opening '" << Filename << "': " << ErrorMessage << "\n -load request ignored.\n"; } From reid at x10sys.com Mon Nov 29 08:11:40 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 08:11:40 -0600 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/ExecutionEngine.cpp Message-ID: <200411291411.IAA05358@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine: ExecutionEngine.cpp updated: 1.62 -> 1.63 --- Log message: Use System/DynamicLibrary instead of Support/DynamicLinker --- Diffs of the changes: (+12 -5) Index: llvm/lib/ExecutionEngine/ExecutionEngine.cpp diff -u llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.62 llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.63 --- llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.62 Fri Nov 19 02:44:07 2004 +++ llvm/lib/ExecutionEngine/ExecutionEngine.cpp Mon Nov 29 08:11:29 2004 @@ -19,13 +19,13 @@ #include "llvm/DerivedTypes.h" #include "llvm/Module.h" #include "llvm/ModuleProvider.h" +#include "llvm/ADT/Statistic.h" #include "llvm/CodeGen/IntrinsicLowering.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/ExecutionEngine/GenericValue.h" -#include "llvm/Target/TargetData.h" #include "llvm/Support/Debug.h" -#include "llvm/ADT/Statistic.h" -#include "llvm/Support/DynamicLinker.h" +#include "llvm/System/DynamicLibrary.h" +#include "llvm/Target/TargetData.h" using namespace llvm; namespace { @@ -151,7 +151,13 @@ } } - if (EE == 0) delete IL; + if (EE == 0) + delete IL; + else + // Make sure we can resolve symbols in the program as well. The zero arg + // to the function tells DynamicLibrary to load the program, not a library. + sys::DynamicLibrary::LoadLibraryPermanently(0); + return EE; } @@ -502,7 +508,8 @@ } else { // External variable reference. Try to use the dynamic loader to // get a pointer to it. - if (void *SymAddr = GetAddressOfSymbol(I->getName().c_str())) + if (void *SymAddr = sys::DynamicLibrary::SearchForAddressOfSymbol( + I->getName().c_str())) addGlobalMapping(I, SymAddr); else { std::cerr << "Could not resolve external global address: " From reid at x10sys.com Mon Nov 29 08:11:40 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 08:11:40 -0600 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp Message-ID: <200411291411.IAA05361@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/Interpreter: ExternalFunctions.cpp updated: 1.79 -> 1.80 --- Log message: Use System/DynamicLibrary instead of Support/DynamicLinker --- Diffs of the changes: (+4 -3) Index: llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.79 llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.80 --- llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.79 Wed Oct 27 18:03:44 2004 +++ llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp Mon Nov 29 08:11:29 2004 @@ -22,8 +22,8 @@ #include "Interpreter.h" #include "llvm/DerivedTypes.h" #include "llvm/Module.h" +#include "llvm/System/DynamicLibrary.h" #include "llvm/Target/TargetData.h" -#include "llvm/Support/DynamicLinker.h" #include #include #include @@ -71,11 +71,12 @@ ExFunc FnPtr = FuncNames[ExtName]; if (FnPtr == 0) - FnPtr = (ExFunc)GetAddressOfSymbol(ExtName); + FnPtr = (ExFunc)sys::DynamicLibrary::SearchForAddressOfSymbol(ExtName); if (FnPtr == 0) FnPtr = FuncNames["lle_X_"+F->getName()]; if (FnPtr == 0) // Try calling a generic function... if it exists... - FnPtr = (ExFunc)GetAddressOfSymbol(("lle_X_"+F->getName()).c_str()); + FnPtr = (ExFunc)sys::DynamicLibrary::SearchForAddressOfSymbol( + ("lle_X_"+F->getName()).c_str()); if (FnPtr != 0) Functions.insert(std::make_pair(F, FnPtr)); // Cache for later return FnPtr; From reid at x10sys.com Mon Nov 29 08:11:40 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 08:11:40 -0600 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/Intercept.cpp JIT.cpp Message-ID: <200411291411.IAA05355@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: Intercept.cpp updated: 1.17 -> 1.18 JIT.cpp updated: 1.48 -> 1.49 --- Log message: Use System/DynamicLibrary instead of Support/DynamicLinker --- Diffs of the changes: (+4 -4) Index: llvm/lib/ExecutionEngine/JIT/Intercept.cpp diff -u llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.17 llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.18 --- llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.17 Wed Sep 1 17:55:35 2004 +++ llvm/lib/ExecutionEngine/JIT/Intercept.cpp Mon Nov 29 08:11:29 2004 @@ -16,7 +16,7 @@ //===----------------------------------------------------------------------===// #include "JIT.h" -#include "llvm/Support/DynamicLinker.h" +#include "llvm/System/DynamicLibrary.h" #include #include using namespace llvm; @@ -96,7 +96,7 @@ if (Name == "__main") return (void*)&__mainFunc; // If it's an external function, look it up in the process image... - void *Ptr = GetAddressOfSymbol(Name); + void *Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(Name); if (Ptr) return Ptr; std::cerr << "ERROR: Program used external function '" << Name Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.48 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.49 --- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.48 Sat Nov 20 17:51:03 2004 +++ llvm/lib/ExecutionEngine/JIT/JIT.cpp Mon Nov 29 08:11:29 2004 @@ -22,9 +22,9 @@ #include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/ExecutionEngine/GenericValue.h" +#include "llvm/System/DynamicLibrary.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetJITInfo.h" -#include "llvm/Support/DynamicLinker.h" #include using namespace llvm; @@ -287,7 +287,7 @@ // If the global is external, just remember the address. if (GV->isExternal()) { - Ptr = GetAddressOfSymbol(GV->getName().c_str()); + Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(GV->getName().c_str()); if (Ptr == 0) { std::cerr << "Could not resolve external global address: " << GV->getName() << "\n"; From llvm at cs.uiuc.edu Mon Nov 29 08:11:52 2004 From: llvm at cs.uiuc.edu (LLVM) Date: Mon, 29 Nov 2004 08:11:52 -0600 Subject: [llvm-commits] CVS: llvm/lib/Support/DynamicLinker.cpp Message-ID: <200411291411.IAA05370@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: DynamicLinker.cpp (r1.9) removed --- Log message: Functionality moved to portable lib/System/DynamicLibrary.cpp implementation --- Diffs of the changes: (+0 -0) From reid at x10sys.com Mon Nov 29 08:46:40 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 29 Nov 2004 08:46:40 -0600 Subject: [llvm-commits] CVS: llvm/docs/CommandGuide/Makefile Message-ID: <200411291446.IAA05602@zion.cs.uiuc.edu> Changes in directory llvm/docs/CommandGuide: Makefile updated: 1.6 -> 1.7 --- Log message: Fix two bugs: 1. Nothing should happen on "make all". Doc generation is quick, but we don't want to do it unless we're installing. 2. Correct a dependency for the *.ps files .. didn't notice this before because of cruft in my directory. It failed on a clean build. --- Diffs of the changes: (+1 -3) Index: llvm/docs/CommandGuide/Makefile diff -u llvm/docs/CommandGuide/Makefile:1.6 llvm/docs/CommandGuide/Makefile:1.7 --- llvm/docs/CommandGuide/Makefile:1.6 Sun Nov 28 22:34:05 2004 +++ llvm/docs/CommandGuide/Makefile Mon Nov 29 08:46:29 2004 @@ -19,8 +19,6 @@ MAN = $(patsubst $(BUILD_SRC_DIR)/%.pod, $(BUILD_OBJ_DIR)/%.1, $(POD)) PS = $(patsubst $(BUILD_SRC_DIR)/%.pod, $(BUILD_OBJ_DIR)/%.ps, $(POD)) -all-local:: $(HTML) $(MAN) $(PS) - .SUFFIXES: .SUFFIXES: .html .pod .1 .ps @@ -34,7 +32,7 @@ $(POD2MAN) --release=$(PACKAGE_VERSION) \ --center="LLVM Command Guide" $< $@ -$(BUILD_OBJ_DIR)/%.ps: man/man1/%.1 +$(BUILD_OBJ_DIR)/%.ps: $(BUILD_OBJ_DIR)/%.1 $(GROFF) -Tps -man $< > $@ clean-local:: From criswell at cs.uiuc.edu Mon Nov 29 09:56:47 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon, 29 Nov 2004 09:56:47 -0600 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/FreeBench/analyzer/Makefile Message-ID: <200411291556.JAA05866@choi.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/FreeBench/analyzer: Makefile updated: 1.2 -> 1.3 --- Log message: Input files are inside the source tree. Look for them there. --- Diffs of the changes: (+2 -2) Index: llvm-test/MultiSource/Benchmarks/FreeBench/analyzer/Makefile diff -u llvm-test/MultiSource/Benchmarks/FreeBench/analyzer/Makefile:1.2 llvm-test/MultiSource/Benchmarks/FreeBench/analyzer/Makefile:1.3 --- llvm-test/MultiSource/Benchmarks/FreeBench/analyzer/Makefile:1.2 Wed Sep 1 09:33:23 2004 +++ llvm-test/MultiSource/Benchmarks/FreeBench/analyzer/Makefile Mon Nov 29 09:56:32 2004 @@ -4,9 +4,9 @@ CPPFLAGS = -DVERSION='"1.00"' -DCOMPDATE="\"today\"" -DCFLAGS='""' -DHOSTNAME="\"thishost\"" #LDFLAGS = -lm ifdef LARGE_PROBLEM_SIZE -RUN_OPTIONS = ref.in +RUN_OPTIONS = $(BUILD_SRC_DIR)/ref.in else -RUN_OPTIONS = test.in +RUN_OPTIONS = $(BUILD_SRC_DIR)/test.in endif include $(LEVEL)/MultiSource/Makefile.multisrc From criswell at cs.uiuc.edu Mon Nov 29 09:56:50 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon, 29 Nov 2004 09:56:50 -0600 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/FreeBench/fourinarow/Makefile Message-ID: <200411291556.JAA05871@choi.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/FreeBench/fourinarow: Makefile updated: 1.2 -> 1.3 --- Log message: Input files are inside the source tree. Look for them there. --- Diffs of the changes: (+2 -2) Index: llvm-test/MultiSource/Benchmarks/FreeBench/fourinarow/Makefile diff -u llvm-test/MultiSource/Benchmarks/FreeBench/fourinarow/Makefile:1.2 llvm-test/MultiSource/Benchmarks/FreeBench/fourinarow/Makefile:1.3 --- llvm-test/MultiSource/Benchmarks/FreeBench/fourinarow/Makefile:1.2 Wed Sep 1 09:33:23 2004 +++ llvm-test/MultiSource/Benchmarks/FreeBench/fourinarow/Makefile Mon Nov 29 09:56:35 2004 @@ -4,9 +4,9 @@ CPPFLAGS = -DVERSION='"1.00"' -DCOMPDATE="\"today\"" -DCFLAGS='""' -DHOSTNAME="\"thishost\"" #LDFLAGS = -lm ifdef LARGE_PROBLEM_SIZE -RUN_OPTIONS = ref.in +RUN_OPTIONS = $(BUILD_SRC_DIR)/ref.in else -RUN_OPTIONS = test.in +RUN_OPTIONS = $(BUILD_SRC_DIR)/test.in endif include $(LEVEL)/MultiSource/Makefile.multisrc From criswell at cs.uiuc.edu Mon Nov 29 09:56:51 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon, 29 Nov 2004 09:56:51 -0600 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/Makefile Message-ID: <200411291556.JAA05872@choi.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2: Makefile updated: 1.2 -> 1.3 --- Log message: Input files are inside the source tree. Look for them there. --- Diffs of the changes: (+2 -2) Index: llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/Makefile diff -u llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/Makefile:1.2 llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/Makefile:1.3 --- llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/Makefile:1.2 Wed Sep 1 09:33:23 2004 +++ llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/Makefile Mon Nov 29 09:56:35 2004 @@ -4,9 +4,9 @@ CPPFLAGS = -DVERSION='"1.00"' -DCOMPDATE="\"today\"" -DCFLAGS='""' -DHOSTNAME="\"thishost\"" #LDFLAGS = -lm ifdef LARGE_PROBLEM_SIZE -RUN_OPTIONS = ref.in +RUN_OPTIONS = $(BUILD_SRC_DIR)/ref.in else -RUN_OPTIONS = test.in +RUN_OPTIONS = $(BUILD_SRC_DIR)/test.in endif include $(LEVEL)/MultiSource/Makefile.multisrc From criswell at cs.uiuc.edu Mon Nov 29 09:56:51 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon, 29 Nov 2004 09:56:51 -0600 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/FreeBench/neural/Makefile Message-ID: <200411291556.JAA05877@choi.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/FreeBench/neural: Makefile updated: 1.2 -> 1.3 --- Log message: Input files are inside the source tree. Look for them there. --- Diffs of the changes: (+2 -2) Index: llvm-test/MultiSource/Benchmarks/FreeBench/neural/Makefile diff -u llvm-test/MultiSource/Benchmarks/FreeBench/neural/Makefile:1.2 llvm-test/MultiSource/Benchmarks/FreeBench/neural/Makefile:1.3 --- llvm-test/MultiSource/Benchmarks/FreeBench/neural/Makefile:1.2 Wed Sep 1 09:33:23 2004 +++ llvm-test/MultiSource/Benchmarks/FreeBench/neural/Makefile Mon Nov 29 09:56:35 2004 @@ -4,9 +4,9 @@ CPPFLAGS = -DVERSION='"1.00"' -DCOMPDATE="\"today\"" -DCFLAGS='""' -DHOSTNAME="\"thishost\"" LDFLAGS = -lm ifdef LARGE_PROBLEM_SIZE -RUN_OPTIONS = ref.in +RUN_OPTIONS = $(BUILD_SRC_DIR)/ref.in else -RUN_OPTIONS = test.in +RUN_OPTIONS = $(BUILD_SRC_DIR)/test.in endif include $(LEVEL)/MultiSource/Makefile.multisrc From criswell at cs.uiuc.edu Mon Nov 29 09:56:52 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon, 29 Nov 2004 09:56:52 -0600 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/FreeBench/pifft/Makefile Message-ID: <200411291556.JAA05880@choi.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/FreeBench/pifft: Makefile updated: 1.2 -> 1.3 --- Log message: Input files are inside the source tree. Look for them there. --- Diffs of the changes: (+2 -2) Index: llvm-test/MultiSource/Benchmarks/FreeBench/pifft/Makefile diff -u llvm-test/MultiSource/Benchmarks/FreeBench/pifft/Makefile:1.2 llvm-test/MultiSource/Benchmarks/FreeBench/pifft/Makefile:1.3 --- llvm-test/MultiSource/Benchmarks/FreeBench/pifft/Makefile:1.2 Wed Sep 1 09:33:23 2004 +++ llvm-test/MultiSource/Benchmarks/FreeBench/pifft/Makefile Mon Nov 29 09:56:35 2004 @@ -4,9 +4,9 @@ CPPFLAGS = -DVERSION='"1.00"' -DCOMPDATE="\"today\"" -DCFLAGS='""' -DHOSTNAME="\"thishost\"" LDFLAGS = -lm ifdef LARGE_PROBLEM_SIZE -RUN_OPTIONS = ref.in +RUN_OPTIONS = $(BUILD_SRC_DIR)/ref.in else -RUN_OPTIONS = test.in +RUN_OPTIONS = $(BUILD_SRC_DIR)/test.in endif include $(LEVEL)/MultiSource/Makefile.multisrc From lattner at cs.uiuc.edu Mon Nov 29 13:48:12 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 29 Nov 2004 13:48:12 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200411291948.iATJmCsV003012@apoc.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.242 -> 1.243 --- Log message: Make built bytecode libraries depend on gccas/gccld as appropriate. This should fix the stale runtime libraries problem. --- Diffs of the changes: (+8 -5) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.242 llvm/Makefile.rules:1.243 --- llvm/Makefile.rules:1.242 Mon Nov 29 06:37:44 2004 +++ llvm/Makefile.rules Mon Nov 29 13:47:58 2004 @@ -201,6 +201,9 @@ ifndef TBLGEN TBLGEN := $(LLVMToolDir)/tblgen$(EXEEXT) endif +ifndef GCCAS +GCCAS := $(LLVMToolDir)/gccas$(EXEEXT) +endif ifndef GCCLD GCCLD := $(LLVMToolDir)/gccld$(EXEEXT) endif @@ -520,7 +523,7 @@ all-local:: $(LibName.BC) -$(LibName.BC): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir +$(LibName.BC): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir $(GCCLD) $(Echo) Linking $(BuildMode) Bytecode Library $(notdir $@) $(Verb) $(BCLinkLib) -o $@ $(ObjectsBC) @@ -782,13 +785,13 @@ #--------------------------------------------------------- # Create .bc files in the ObjDir directory from .cpp and .c files... #--------------------------------------------------------- -$(ObjDir)/%.bc: %.cpp $(ObjDir)/.dir +$(ObjDir)/%.bc: %.cpp $(ObjDir)/.dir $(GCCAS) $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCXXd" $< -o $@ ; \ then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \ else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi -$(ObjDir)/%.bc: %.c $(ObjDir)/.dir +$(ObjDir)/%.bc: %.c $(ObjDir)/.dir $(GCCAS) $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.C) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCd" $< -o $@ ; \ then $(MV) -f "$(ObjDir)/$*.BCCd" "$(ObjDir)/$*.d"; \ @@ -818,11 +821,11 @@ $(Compile.C) $< -o $@ endif -$(ObjDir)/%.bc: %.cpp $(ObjDir)/.dir +$(ObjDir)/%.bc: %.cpp $(ObjDir)/.dir $(GCCAS) $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)" $(BCCompile.CXX) $< -o $@ -$(ObjDir)/%.bc: %.c $(ObjDir)/.dir +$(ObjDir)/%.bc: %.c $(ObjDir)/.dir $(GCCAS) $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)" $(BCCompile.C) $< -o $@ From lattner at cs.uiuc.edu Mon Nov 29 14:36:56 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 29 Nov 2004 14:36:56 -0600 Subject: [llvm-commits] CVS: llvm-test/Makefile.programs Message-ID: <200411292036.iATKauGq023051@apoc.cs.uiuc.edu> Changes in directory llvm-test: Makefile.programs updated: 1.141 -> 1.142 --- Log message: Fix paths to libprofile --- Diffs of the changes: (+1 -1) Index: llvm-test/Makefile.programs diff -u llvm-test/Makefile.programs:1.141 llvm-test/Makefile.programs:1.142 --- llvm-test/Makefile.programs:1.141 Mon Nov 8 19:23:52 2004 +++ llvm-test/Makefile.programs Mon Nov 29 14:36:41 2004 @@ -381,7 +381,7 @@ $(LBUGPOINT) $< -run-jit $(BUGPOINT_OPTIONS) $(BUGPOINT_ARGS) -LIBPROFILESO = $(LLVM_OBJ_ROOT)/lib/Debug/libprofile_rt.so +LIBPROFILESO = $(LLVM_OBJ_ROOT)/Debug/lib/libprofile_rt.so $(PROGRAMS_TO_TEST:%=Output/%.prof): \ Output/%.prof: Output/%.llvm-prof.bc Output/%.out-nat $(LIBPROFILESO) From lattner at cs.uiuc.edu Mon Nov 29 14:37:00 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 29 Nov 2004 14:37:00 -0600 Subject: [llvm-commits] CVS: llvm-test/External/SPEC/Makefile.spec Message-ID: <200411292037.iATKb0ZK023056@apoc.cs.uiuc.edu> Changes in directory llvm-test/External/SPEC: Makefile.spec updated: 1.44 -> 1.45 --- Log message: Fix paths to libprofile --- Diffs of the changes: (+1 -1) Index: llvm-test/External/SPEC/Makefile.spec diff -u llvm-test/External/SPEC/Makefile.spec:1.44 llvm-test/External/SPEC/Makefile.spec:1.45 --- llvm-test/External/SPEC/Makefile.spec:1.44 Wed Oct 13 13:49:03 2004 +++ llvm-test/External/SPEC/Makefile.spec Mon Nov 29 14:36:43 2004 @@ -164,7 +164,7 @@ -LIBPROFILESO = $(LLVM_OBJ_ROOT)/lib/Debug/libprofile_rt.so +LIBPROFILESO = $(LLVM_OBJ_ROOT)/Debug/lib/libprofile_rt.so $(PROGRAMS_TO_TEST:%=Output/%.prof): \ Output/%.prof: Output/%.llvm-prof.bc Output/%.out-nat $(LIBPROFILESO) From gaeke at cs.uiuc.edu Mon Nov 29 14:38:39 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Mon, 29 Nov 2004 14:38:39 -0600 (CST) Subject: [llvm-commits] CVS: reopt/tools/dumptrace/Makefile Message-ID: <200411292038.OAA03307@kain.cs.uiuc.edu> Changes in directory reopt/tools/dumptrace: Makefile updated: 1.4 -> 1.5 --- Log message: Link in LLVMbzip2.o library --- Diffs of the changes: (+2 -2) Index: reopt/tools/dumptrace/Makefile diff -u reopt/tools/dumptrace/Makefile:1.4 reopt/tools/dumptrace/Makefile:1.5 --- reopt/tools/dumptrace/Makefile:1.4 Thu Oct 28 12:10:44 2004 +++ reopt/tools/dumptrace/Makefile Mon Nov 29 14:38:27 2004 @@ -1,8 +1,8 @@ LEVEL = ../.. TOOLNAME = dumptrace USEDLIBS = traceio -LLVMLIBS = LLVMCore LLVMBCReader LLVMBCWriter LLVMAnalysis.a \ - LLVMTransformUtils.a LLVMSupport.a LLVMSystem.a +LLVMLIBS = LLVMCore LLVMBCReader LLVMBCWriter LLVMbzip2 LLVMAnalysis.a \ + LLVMTransformUtils.a LLVMSupport.a LLVMSystem.a TOOLLINKOPTS = $(PLATFORMLIBDL) From gaeke at cs.uiuc.edu Mon Nov 29 14:38:39 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Mon, 29 Nov 2004 14:38:39 -0600 (CST) Subject: [llvm-commits] CVS: reopt/tools/reopt-llc/Makefile Message-ID: <200411292038.OAA03311@kain.cs.uiuc.edu> Changes in directory reopt/tools/reopt-llc: Makefile updated: 1.5 -> 1.6 --- Log message: Link in LLVMbzip2.o library --- Diffs of the changes: (+1 -0) Index: reopt/tools/reopt-llc/Makefile diff -u reopt/tools/reopt-llc/Makefile:1.5 reopt/tools/reopt-llc/Makefile:1.6 --- reopt/tools/reopt-llc/Makefile:1.5 Thu Nov 18 14:38:55 2004 +++ reopt/tools/reopt-llc/Makefile Mon Nov 29 14:38:27 2004 @@ -19,6 +19,7 @@ LLVMTransformUtils.a \ LLVMBCReader \ LLVMBCWriter \ + LLVMbzip2 \ LLVMCore \ LLVMSupport.a \ LLVMSystem.a From gaeke at cs.uiuc.edu Mon Nov 29 14:38:39 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Mon, 29 Nov 2004 14:38:39 -0600 (CST) Subject: [llvm-commits] CVS: reopt/tools/ttftest/Makefile Message-ID: <200411292038.OAA03310@kain.cs.uiuc.edu> Changes in directory reopt/tools/ttftest: Makefile updated: 1.4 -> 1.5 --- Log message: Link in LLVMbzip2.o library --- Diffs of the changes: (+2 -2) Index: reopt/tools/ttftest/Makefile diff -u reopt/tools/ttftest/Makefile:1.4 reopt/tools/ttftest/Makefile:1.5 --- reopt/tools/ttftest/Makefile:1.4 Thu Oct 28 12:10:44 2004 +++ reopt/tools/ttftest/Makefile Mon Nov 29 14:38:27 2004 @@ -1,8 +1,8 @@ LEVEL = ../.. TOOLNAME = ttftest USEDLIBS = tracetofunction traceio -LLVMLIBS = LLVMCore LLVMBCReader LLVMBCWriter LLVMAnalysis.a \ - LLVMTransformUtils.a LLVMSupport.a LLVMSystem.a +LLVMLIBS = LLVMCore LLVMBCReader LLVMBCWriter LLVMbzip2 LLVMAnalysis.a \ + LLVMTransformUtils.a LLVMSupport.a LLVMSystem.a TOOLLINKOPTS = $(PLATFORMLIBDL) From gaeke at cs.uiuc.edu Mon Nov 29 14:42:41 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Mon, 29 Nov 2004 14:42:41 -0600 (CST) Subject: [llvm-commits] CVS: reopt/lib/WholeReoptimizer/Makefile Message-ID: <200411292042.OAA04509@kain.cs.uiuc.edu> Changes in directory reopt/lib/WholeReoptimizer: Makefile updated: 1.7 -> 1.8 --- Log message: Link in libbzip2. --- Diffs of the changes: (+2 -1) Index: reopt/lib/WholeReoptimizer/Makefile diff -u reopt/lib/WholeReoptimizer/Makefile:1.7 reopt/lib/WholeReoptimizer/Makefile:1.8 --- reopt/lib/WholeReoptimizer/Makefile:1.7 Mon Nov 22 22:39:39 2004 +++ reopt/lib/WholeReoptimizer/Makefile Mon Nov 29 14:42:31 2004 @@ -9,7 +9,8 @@ # Object files that contain common LLVM code the Reoptimizer depends on REOPTIMIZER_LLVMOBJS = $(LLVMLibDir)/LLVMCore.o $(LLVMLibDir)/LLVMBCReader.o \ - $(LLVMLibDir)/LLVMBCWriter.o $(LLVMLibDir)/LLVMSparcV9.o \ + $(LLVMLibDir)/LLVMBCWriter.o $(LLVMLibDir)/LLVMbzip2.o \ + $(LLVMLibDir)/LLVMSparcV9.o \ $(LLVMLibDir)/LLVMSparcV9ModuloSched.o \ $(LLVMLibDir)/LLVMSparcV9LiveVar.o $(LLVMLibDir)/LLVMSparcV9InstrSched.o \ $(LLVMLibDir)/LLVMCodeGen.o $(LLVMLibDir)/LLVMExecutionEngine.o \ From lattner at cs.uiuc.edu Mon Nov 29 15:26:26 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 29 Nov 2004 15:26:26 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LICM.cpp Message-ID: <200411292126.iATLQQi9029173@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LICM.cpp updated: 1.68 -> 1.69 --- Log message: Allow hoisting loads of globals and alloca's in conditionals. --- Diffs of the changes: (+6 -0) Index: llvm/lib/Transforms/Scalar/LICM.cpp diff -u llvm/lib/Transforms/Scalar/LICM.cpp:1.68 llvm/lib/Transforms/Scalar/LICM.cpp:1.69 --- llvm/lib/Transforms/Scalar/LICM.cpp:1.68 Fri Nov 26 15:20:09 2004 +++ llvm/lib/Transforms/Scalar/LICM.cpp Mon Nov 29 15:26:12 2004 @@ -592,6 +592,12 @@ if (Inst.getParent() == CurLoop->getHeader()) return true; + // It's always safe to load from a global or alloca. + if (isa(Inst)) + if (isa(Inst.getOperand(0)) || + isa(Inst.getOperand(0))) + return true; + // Get the exit blocks for the current loop. std::vector ExitBlocks; CurLoop->getExitBlocks(ExitBlocks); From criswell at cs.uiuc.edu Mon Nov 29 15:29:45 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon, 29 Nov 2004 15:29:45 -0600 Subject: [llvm-commits] CVS: llvm-gcc/gcc/llvm-types.c Message-ID: <200411292129.PAA20429@choi.cs.uiuc.edu> Changes in directory llvm-gcc/gcc: llvm-types.c updated: 1.17 -> 1.18 --- Log message: Fix a bug on Sparc where this memory allocation failed, preventing llvm-gcc from compiling. The original code would underflow if the number of elements was zero, and there's at least one call to it in llvm-expand.c that does that. --- Diffs of the changes: (+12 -2) Index: llvm-gcc/gcc/llvm-types.c diff -u llvm-gcc/gcc/llvm-types.c:1.17 llvm-gcc/gcc/llvm-types.c:1.18 --- llvm-gcc/gcc/llvm-types.c:1.17 Sun Nov 28 15:17:34 2004 +++ llvm-gcc/gcc/llvm-types.c Mon Nov 29 15:29:29 2004 @@ -302,8 +302,18 @@ } llvm_type *llvm_type_create_struct(unsigned NumElements, unsigned Size) { - llvm_type *Result = (llvm_type*)xcalloc(1, sizeof(llvm_type) + - (NumElements-1)*sizeof(llvm_type*)); + /* The amount of space we need to allocate for the type */ + unsigned type_size; + + /* + * Determine the amount of memory needed for the type. Note that + * NumElements may be zero, so avoid integer underflow. + */ + type_size = sizeof (llvm_type); + type_size += ((NumElements) ? (NumElements-1)*sizeof(llvm_type*) : 0); + + /* Do the memory allocation and type initialization. */ + llvm_type * Result = (llvm_type*)xcalloc(1, type_size); Result->ID = StructTyID; Result->NumElements = NumElements; Result->x.Struct.Size = Size; From criswell at cs.uiuc.edu Mon Nov 29 15:46:44 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon, 29 Nov 2004 15:46:44 -0600 Subject: [llvm-commits] CVS: llvm/docs/CFEBuildInstrs.html Message-ID: <200411292146.PAA23956@choi.cs.uiuc.edu> Changes in directory llvm/docs: CFEBuildInstrs.html updated: 1.27 -> 1.28 --- Log message: Fix a typo. Corrected a potential grammary issue. --- Diffs of the changes: (+4 -4) Index: llvm/docs/CFEBuildInstrs.html diff -u llvm/docs/CFEBuildInstrs.html:1.27 llvm/docs/CFEBuildInstrs.html:1.28 --- llvm/docs/CFEBuildInstrs.html:1.27 Thu Nov 25 11:13:17 2004 +++ llvm/docs/CFEBuildInstrs.html Mon Nov 29 15:46:29 2004 @@ -147,8 +147,8 @@

    Solaris/SPARC:

    -For Solaris/SPARC, LLVM only supports the SPARC V9. Therefore, the -configure command line should specify sparcv9, as shown below. Also, +For Solaris/SPARC, LLVM only supports the SPARC V9 architecture. Therefore, +the configure command line should specify sparcv9, as shown below. Also, note that Solaris has trouble with various wide (multibyte) character functions from C as referenced from C++, so we typically configure with --disable-c-mbchar (cf. Bug 206). @@ -187,7 +187,7 @@ target to get it to work correctly. These include:

      -
    • Often targets include special or assembler linker flags which +
    • Often targets include special assembler or linker flags which gccas/gccld does not understand. In general, these can just be removed.
    • LLVM currently does not support any floating point values other than @@ -328,7 +328,7 @@ Brian Gaeke
      LLVM Compiler Infrastructure
      - Last modified: $Date: 2004/11/25 17:13:17 $ + Last modified: $Date: 2004/11/29 21:46:29 $ From gaeke at cs.uiuc.edu Mon Nov 29 16:52:48 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Mon, 29 Nov 2004 16:52:48 -0600 (CST) Subject: [llvm-commits] CVS: reopt/lib/TraceJIT/TraceJIT.cpp TraceJITEmitter.cpp TraceJITIntercept.cpp Message-ID: <200411292252.QAA28384@kain.cs.uiuc.edu> Changes in directory reopt/lib/TraceJIT: TraceJIT.cpp updated: 1.8 -> 1.9 TraceJITEmitter.cpp updated: 1.6 -> 1.7 TraceJITIntercept.cpp updated: 1.3 -> 1.4 --- Log message: GetAddressOfSymbol got renamed to sys::DynamicLibrary::SearchForAddressOfSymbol --- Diffs of the changes: (+7 -6) Index: reopt/lib/TraceJIT/TraceJIT.cpp diff -u reopt/lib/TraceJIT/TraceJIT.cpp:1.8 reopt/lib/TraceJIT/TraceJIT.cpp:1.9 --- reopt/lib/TraceJIT/TraceJIT.cpp:1.8 Mon Nov 8 14:59:39 2004 +++ reopt/lib/TraceJIT/TraceJIT.cpp Mon Nov 29 16:52:36 2004 @@ -31,7 +31,7 @@ #include "llvm/Target/TargetMachineRegistry.h" #include "llvm/Target/TargetJITInfo.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/DynamicLinker.h" +#include "llvm/System/DynamicLibrary.h" #include "llvm/Support/Debug.h" using namespace llvm; @@ -199,7 +199,7 @@ // If the global is external, just remember the address. if (GV->isExternal()) { - Ptr = GetAddressOfSymbol(GV->getName().c_str()); + Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(GV->getName().c_str()); if (Ptr == 0) { std::cerr << "Could not resolve external global address: " << GV->getName() << "\n"; Index: reopt/lib/TraceJIT/TraceJITEmitter.cpp diff -u reopt/lib/TraceJIT/TraceJITEmitter.cpp:1.6 reopt/lib/TraceJIT/TraceJITEmitter.cpp:1.7 --- reopt/lib/TraceJIT/TraceJITEmitter.cpp:1.6 Mon Nov 29 01:35:58 2004 +++ reopt/lib/TraceJIT/TraceJITEmitter.cpp Mon Nov 29 16:52:36 2004 @@ -31,7 +31,7 @@ #include "llvm/Target/TargetData.h" #include "llvm/Target/TargetJITInfo.h" #include "llvm/Support/Debug.h" -#include "llvm/Support/DynamicLinker.h" +#include "llvm/System/DynamicLibrary.h" using namespace llvm; namespace { @@ -101,7 +101,8 @@ // return 0. if (isa(V)) { if (V->hasExternalLinkage () && V->hasName ()) { - void *where = GetAddressOfSymbol (V->getName ()); + void *where = + sys::DynamicLibrary::SearchForAddressOfSymbol(V->getName().c_str()); if (where) return where; } Index: reopt/lib/TraceJIT/TraceJITIntercept.cpp diff -u reopt/lib/TraceJIT/TraceJITIntercept.cpp:1.3 reopt/lib/TraceJIT/TraceJITIntercept.cpp:1.4 --- reopt/lib/TraceJIT/TraceJITIntercept.cpp:1.3 Thu Sep 2 11:55:45 2004 +++ reopt/lib/TraceJIT/TraceJITIntercept.cpp Mon Nov 29 16:52:36 2004 @@ -16,7 +16,7 @@ //===----------------------------------------------------------------------===// #include "reopt/TraceJIT.h" -#include "llvm/Support/DynamicLinker.h" +#include "llvm/System/DynamicLibrary.h" #include #include using namespace llvm; @@ -87,5 +87,5 @@ if (Name == "atexit") return (void*)&jit_atexit; // Try to look it up in the process image. - return GetAddressOfSymbol(Name); + return sys::DynamicLibrary::SearchForAddressOfSymbol(Name.c_str()); } From lattner at cs.uiuc.edu Mon Nov 29 18:23:14 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 29 Nov 2004 18:23:14 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/SparcV9/InternalGlobalMapper.cpp Message-ID: <200411300023.iAU0NEZa012371@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/SparcV9: InternalGlobalMapper.cpp updated: 1.4 -> 1.5 --- Log message: Remove extraneous namespacification. In particular, don't define llvm::llvm::createInternalGlobalMapperPass --- Diffs of the changes: (+9 -11) Index: llvm/lib/Target/SparcV9/InternalGlobalMapper.cpp diff -u llvm/lib/Target/SparcV9/InternalGlobalMapper.cpp:1.4 llvm/lib/Target/SparcV9/InternalGlobalMapper.cpp:1.5 --- llvm/lib/Target/SparcV9/InternalGlobalMapper.cpp:1.4 Sun Sep 19 23:46:39 2004 +++ llvm/lib/Target/SparcV9/InternalGlobalMapper.cpp Mon Nov 29 18:22:59 2004 @@ -19,21 +19,21 @@ #include "llvm/Constants.h" #include "llvm/Module.h" #include "llvm/Pass.h" -#include "llvm/Type.h" #include "llvm/DerivedTypes.h" using namespace llvm; -namespace llvm { - typedef std::vector GVVectorTy; -class InternalGlobalMapper : public ModulePass { -public: - bool runOnModule(Module &M); -}; +namespace { + struct InternalGlobalMapper : public ModulePass { + bool runOnModule(Module &M); + }; +} -ModulePass *llvm::createInternalGlobalMapperPass() { - return new InternalGlobalMapper(); +namespace llvm { + ModulePass *createInternalGlobalMapperPass() { + return new InternalGlobalMapper(); + } } static void maybeAddInternalValueToVector (GVVectorTy &Vector, GlobalValue &GV){ @@ -80,5 +80,3 @@ return true; // Module was modified. } - -} // end namespace llvm From lattner at cs.uiuc.edu Mon Nov 29 18:29:29 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 29 Nov 2004 18:29:29 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/SimplifyCFG.cpp Message-ID: <200411300029.iAU0TTGg012392@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: SimplifyCFG.cpp updated: 1.57 -> 1.58 --- Log message: If we have something like this: if (x) { code ... } else { code ... } Turn it into: code if (x) { ... } else { ... } This reduces code size and in some common cases allows us to completely eliminate the conditional. This turns several if/then/else blocks in loops into straightline code in 179.art, turning the loops into single basic blocks (good for modsched even!). Maybe now brg will leave me alone ;-) --- Diffs of the changes: (+105 -0) Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp diff -u llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.57 llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.58 --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.57 Mon Nov 1 00:53:58 2004 +++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp Mon Nov 29 18:29:14 2004 @@ -544,6 +544,91 @@ return Changed; } +/// HoistThenElseCodeToIf - Given a conditional branch that codes to BB1 and +/// BB2, hoist any common code in the two blocks up into the branch block. The +/// caller of this function guarantees that BI's block dominates BB1 and BB2. +static bool HoistThenElseCodeToIf(BranchInst *BI) { + // This does very trivial matching, with limited scanning, to find identical + // instructions in the two blocks. In particular, we don't want to get into + // O(M*N) situations here where M and N are the sizes of BB1 and BB2. As + // such, we currently just scan for obviously identical instructions in an + // identical order. + BasicBlock *BB1 = BI->getSuccessor(0); // The true destination. + BasicBlock *BB2 = BI->getSuccessor(1); // The false destination + + Instruction *I1 = BB1->begin(), *I2 = BB2->begin(); + if (I1->getOpcode() != I2->getOpcode() || !I1->isIdenticalTo(I2)) + return false; + + // If we get here, we can hoist at least one instruction. + BasicBlock *BIParent = BI->getParent(); + bool Hoisted = false; + + do { + // If we are hoisting the terminator instruction, don't move one (making a + // broken BB), instead clone it, and remove BI. + if (isa(I1)) + goto HoistTerminator; + + // For a normal instruction, we just move one to right before the branch, + // then replace all uses of the other with the first. Finally, we remove + // the now redundant second instruction. + BIParent->getInstList().splice(BI, BB1->getInstList(), I1); + if (!I2->use_empty()) + I2->replaceAllUsesWith(I1); + BB2->getInstList().erase(I2); + + I1 = BB1->begin(); + I2 = BB2->begin(); + Hoisted = true; + } while (I1->getOpcode() == I2->getOpcode() && I1->isIdenticalTo(I2)); + + return true; + +HoistTerminator: + // Okay, it is safe to hoist the terminator. + Instruction *NT = I1->clone(); + BIParent->getInstList().insert(BI, NT); + if (NT->getType() != Type::VoidTy) { + I1->replaceAllUsesWith(NT); + I2->replaceAllUsesWith(NT); + NT->setName(I1->getName()); + } + + // Hoisting one of the terminators from our successor is a great thing. + // Unfortunately, the successors of the if/else blocks may have PHI nodes in + // them. If they do, all PHI entries for BB1/BB2 must agree for all PHI + // nodes, so we insert select instruction to compute the final result. + std::map, SelectInst*> InsertedSelects; + for (succ_iterator SI = succ_begin(BB1), E = succ_end(BB1); SI != E; ++SI) { + PHINode *PN; + for (BasicBlock::iterator BBI = SI->begin(); + PN = dyn_cast(BBI); ++BBI) { + Value *BB1V = PN->getIncomingValueForBlock(BB1); + Value *BB2V = PN->getIncomingValueForBlock(BB2); + if (BB1V != BB2V) { + // These values do not agree. Insert a select instruction before NT + // that determines the right value. + SelectInst *&SI = InsertedSelects[std::make_pair(BB1V, BB2V)]; + if (SI == 0) + SI = new SelectInst(BI->getCondition(), BB1V, BB2V, + BB1V->getName()+"."+BB2V->getName(), NT); + // Make the PHI node use the select for all incoming values for BB1/BB2 + for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) + if (PN->getIncomingBlock(i) == BB1 || PN->getIncomingBlock(i) == BB2) + PN->setIncomingValue(i, SI); + } + } + } + + // Update any PHI nodes in our new successors. + for (succ_iterator SI = succ_begin(BB1), E = succ_end(BB1); SI != E; ++SI) + AddPredecessorToBlock(*SI, BIParent, BB1); + + BI->eraseFromParent(); + return true; +} + namespace { /// ConstantIntOrdering - This class implements a stable ordering of constant /// integers that does not depend on their address. This is important for @@ -1077,6 +1162,26 @@ return true; } + // Otherwise, if this block only has a single predecessor, and if that block + // is a conditional branch, see if we can hoist any code from this block up + // into our predecessor. + if (OnlyPred) + if (BranchInst *BI = dyn_cast(OnlyPred->getTerminator())) { + // This is guaranteed to be a condbr at this point. + assert(BI->isConditional() && "Should have folded bb into pred!"); + // Get the other block. + BasicBlock *OtherBB = BI->getSuccessor(BI->getSuccessor(0) == BB); + PI = pred_begin(OtherBB); + ++PI; + if (PI == pred_end(OtherBB)) { + // We have a conditional branch to two blocks that are only reachable + // from the condbr. We know that the condbr dominates the two blocks, + // so see if there is any identical code in the "then" and "else" + // blocks. If so, we can hoist it up to the branching block. + Changed |= HoistThenElseCodeToIf(BI); + } + } + for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) if (BranchInst *BI = dyn_cast((*PI)->getTerminator())) // Change br (X == 0 | X == 1), T, F into a switch instruction. From lattner at cs.uiuc.edu Mon Nov 29 18:31:28 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 29 Nov 2004 18:31:28 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/SimplifyCFG/HoistCode.ll Message-ID: <200411300031.iAU0VSKG012457@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/SimplifyCFG: HoistCode.ll added (r1.1) --- Log message: New testcase for simplifycfg --- Diffs of the changes: (+11 -0) Index: llvm/test/Regression/Transforms/SimplifyCFG/HoistCode.ll diff -c /dev/null llvm/test/Regression/Transforms/SimplifyCFG/HoistCode.ll:1.1 *** /dev/null Mon Nov 29 18:31:26 2004 --- llvm/test/Regression/Transforms/SimplifyCFG/HoistCode.ll Mon Nov 29 18:31:16 2004 *************** *** 0 **** --- 1,11 ---- + ; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep br + + void %foo(bool %C, int* %P) { + br bool %C, label %T, label %F + T: + store int 7, int* %P + ret void + F: + store int 7, int* %P + ret void + } From lattner at cs.uiuc.edu Mon Nov 29 20:51:56 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 29 Nov 2004 20:51:56 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Instruction.h Message-ID: <200411300251.iAU2pu7Z022854@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm: Instruction.h updated: 1.61 -> 1.62 --- Log message: Add method --- Diffs of the changes: (+6 -0) Index: llvm/include/llvm/Instruction.h diff -u llvm/include/llvm/Instruction.h:1.61 llvm/include/llvm/Instruction.h:1.62 --- llvm/include/llvm/Instruction.h:1.61 Mon Oct 11 17:21:13 2004 +++ llvm/include/llvm/Instruction.h Mon Nov 29 20:51:41 2004 @@ -67,6 +67,12 @@ /// * The instruction has no name /// virtual Instruction *clone() const = 0; + + /// isIdenticalTo - Return true if the specified instruction is exactly + /// identical to the current one. This means that all operands match and any + /// extra information (e.g. load is volatile) agree. + bool isIdenticalTo(Instruction *I) const; + // Accessor methods... // From lattner at cs.uiuc.edu Mon Nov 29 20:52:06 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 29 Nov 2004 20:52:06 -0600 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Instruction.cpp Message-ID: <200411300252.iAU2q6Xm022862@apoc.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Instruction.cpp updated: 1.40 -> 1.41 --- Log message: Add method --- Diffs of the changes: (+27 -2) Index: llvm/lib/VMCore/Instruction.cpp diff -u llvm/lib/VMCore/Instruction.cpp:1.40 llvm/lib/VMCore/Instruction.cpp:1.41 --- llvm/lib/VMCore/Instruction.cpp:1.40 Sat Oct 16 13:08:06 2004 +++ llvm/lib/VMCore/Instruction.cpp Mon Nov 29 20:51:53 2004 @@ -11,14 +11,14 @@ // //===----------------------------------------------------------------------===// +#include "llvm/Instructions.h" #include "llvm/Function.h" #include "llvm/SymbolTable.h" #include "llvm/Type.h" #include "llvm/Support/LeakDetector.h" using namespace llvm; -void Instruction::init() -{ +void Instruction::init() { // Make sure that we get added to a basicblock LeakDetector::addGarbageObject(this); } @@ -134,6 +134,31 @@ return 0; } +/// isIdenticalTo - Return true if the specified instruction is exactly +/// identical to the current one. This means that all operands match and any +/// extra information (e.g. load is volatile) agree. +bool Instruction::isIdenticalTo(Instruction *I) const { + if (getOpcode() != I->getOpcode() || + getNumOperands() != I->getNumOperands() || + getType() != I->getType()) + return false; + + // We have two instructions of identical opcode and #operands. Check to see + // if all operands are the same. + for (unsigned i = 0, e = getNumOperands(); i != e; ++i) + if (getOperand(i) != I->getOperand(i)) + return false; + + // Check special state that is a part of some instructions. + if (const LoadInst *LI = dyn_cast(this)) + return LI->isVolatile() == cast(I)->isVolatile(); + if (const StoreInst *SI = dyn_cast(this)) + return SI->isVolatile() == cast(I)->isVolatile(); + if (const VANextInst *VAN = dyn_cast(this)) + return VAN->getArgType() == cast(I)->getArgType(); + return true; +} + /// isAssociative - Return true if the instruction is associative: /// From lattner at cs.uiuc.edu Mon Nov 29 22:01:58 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 29 Nov 2004 22:01:58 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/SimplifyCFG.cpp Message-ID: <200411300401.iAU41w0Y024538@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: SimplifyCFG.cpp updated: 1.58 -> 1.59 --- Log message: Alkis noticed that this variable is dead. Thanks! --- Diffs of the changes: (+0 -2) Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp diff -u llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.58 llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.59 --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.58 Mon Nov 29 18:29:14 2004 +++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp Mon Nov 29 22:01:44 2004 @@ -562,7 +562,6 @@ // If we get here, we can hoist at least one instruction. BasicBlock *BIParent = BI->getParent(); - bool Hoisted = false; do { // If we are hoisting the terminator instruction, don't move one (making a @@ -580,7 +579,6 @@ I1 = BB1->begin(); I2 = BB2->begin(); - Hoisted = true; } while (I1->getOpcode() == I2->getOpcode() && I1->isIdenticalTo(I2)); return true; From lattner at cs.uiuc.edu Tue Nov 30 00:29:08 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 00:29:08 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/2004-11-30-shift-crash.ll Message-ID: <200411300629.iAU6T8CJ024524@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/PowerPC: 2004-11-30-shift-crash.ll added (r1.1) --- Log message: New testcase that crashes the PPC backend --- Diffs of the changes: (+6 -0) Index: llvm/test/Regression/CodeGen/PowerPC/2004-11-30-shift-crash.ll diff -c /dev/null llvm/test/Regression/CodeGen/PowerPC/2004-11-30-shift-crash.ll:1.1 *** /dev/null Tue Nov 30 00:29:03 2004 --- llvm/test/Regression/CodeGen/PowerPC/2004-11-30-shift-crash.ll Tue Nov 30 00:28:53 2004 *************** *** 0 **** --- 1,6 ---- + ; RUN: llvm-as < %s | llc -march=ppc32 + + void %main() { + %tr4 = shl ulong 1, ubyte 0 ; [#uses=0] + ret void + } From lattner at cs.uiuc.edu Tue Nov 30 00:29:24 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 00:29:24 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp Message-ID: <200411300629.iAU6TOgl024537@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelSimple.cpp updated: 1.113 -> 1.114 --- Log message: Fix test/Regression/CodeGen/PowerPC/2004-11-30-shift-crash.ll --- Diffs of the changes: (+6 -1) Index: llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.113 llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.114 --- llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.113 Fri Nov 26 22:45:11 2004 +++ llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp Tue Nov 30 00:29:10 2004 @@ -2766,7 +2766,12 @@ // than for a variable shift by using the rlwimi instruction. if (ConstantUInt *CUI = dyn_cast(ShiftAmount)) { unsigned Amount = CUI->getValue(); - if (Amount < 32) { + if (Amount == 0) { + BuildMI(*MBB, IP, PPC::OR, 2, DestReg).addReg(SrcReg).addReg(SrcReg); + BuildMI(*MBB, IP, PPC::OR, 2, DestReg+1) + .addReg(SrcReg+1).addReg(SrcReg+1); + + } else if (Amount < 32) { unsigned TempReg = makeAnotherReg(ResultTy); if (isLeftShift) { BuildMI(*MBB, IP, PPC::RLWINM, 4, TempReg).addReg(SrcReg) From tbrethou at cs.uiuc.edu Tue Nov 30 00:29:56 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Tue, 30 Nov 2004 00:29:56 -0600 Subject: [llvm-commits] CVS: llvm/test/lib/llvm-dg.exp Message-ID: <200411300629.AAA11463@zion.cs.uiuc.edu> Changes in directory llvm/test/lib: llvm-dg.exp updated: 1.10 -> 1.11 --- Log message: Adding timeout for a test. --- Diffs of the changes: (+2 -0) Index: llvm/test/lib/llvm-dg.exp diff -u llvm/test/lib/llvm-dg.exp:1.10 llvm/test/lib/llvm-dg.exp:1.11 --- llvm/test/lib/llvm-dg.exp:1.10 Fri Nov 19 17:00:19 2004 +++ llvm/test/lib/llvm-dg.exp Tue Nov 30 00:29:45 2004 @@ -1,5 +1,7 @@ proc llvm-runtest { programs objdir srcdir subdir target_triplet llvmgcc llvmgxx prcontext} { + set timeout 60 + set path [file join $objdir $subdir] #Make Output Directory if it does not exist already From lattner at cs.uiuc.edu Tue Nov 30 00:36:07 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 00:36:07 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/2004-11-29-ShrCrash.ll Message-ID: <200411300636.iAU6a7Ha025241@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/PowerPC: 2004-11-29-ShrCrash.ll added (r1.1) --- Log message: New testcase --- Diffs of the changes: (+6 -0) Index: llvm/test/Regression/CodeGen/PowerPC/2004-11-29-ShrCrash.ll diff -c /dev/null llvm/test/Regression/CodeGen/PowerPC/2004-11-29-ShrCrash.ll:1.1 *** /dev/null Tue Nov 30 00:36:03 2004 --- llvm/test/Regression/CodeGen/PowerPC/2004-11-29-ShrCrash.ll Tue Nov 30 00:35:52 2004 *************** *** 0 **** --- 1,6 ---- + ; RUN: llvm-as < %s | llc -march=ppc32 + + void %main() { + %tr1 = shr uint 1, ubyte 0 + ret void + } From lattner at cs.uiuc.edu Tue Nov 30 00:36:23 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 00:36:23 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp Message-ID: <200411300636.iAU6aNIx025276@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelSimple.cpp updated: 1.114 -> 1.115 --- Log message: Fix test/Regression/CodeGen/PowerPC/2004-11-29-ShrCrash.ll --- Diffs of the changes: (+3 -1) Index: llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.114 llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.115 --- llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.114 Tue Nov 30 00:29:10 2004 +++ llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp Tue Nov 30 00:36:11 2004 @@ -2910,7 +2910,9 @@ return; unsigned SrcReg = getReg (Op, MBB, IP); - if (isLeftShift) { + if (Amount == 0) { + BuildMI(*MBB, IP, PPC::OR, 2, DestReg).addReg(SrcReg).addReg(SrcReg); + } else if (isLeftShift) { BuildMI(*MBB, IP, PPC::RLWINM, 4, DestReg).addReg(SrcReg) .addImm(Amount).addImm(0).addImm(31-Amount); } else { From lattner at cs.uiuc.edu Tue Nov 30 00:39:59 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 00:39:59 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/2004-11-30-shr-var-crash.ll Message-ID: <200411300639.iAU6dxgr025668@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/PowerPC: 2004-11-30-shr-var-crash.ll added (r1.1) --- Log message: New testcase that crashes the PPC BE --- Diffs of the changes: (+7 -0) Index: llvm/test/Regression/CodeGen/PowerPC/2004-11-30-shr-var-crash.ll diff -c /dev/null llvm/test/Regression/CodeGen/PowerPC/2004-11-30-shr-var-crash.ll:1.1 *** /dev/null Tue Nov 30 00:39:55 2004 --- llvm/test/Regression/CodeGen/PowerPC/2004-11-30-shr-var-crash.ll Tue Nov 30 00:39:45 2004 *************** *** 0 **** --- 1,7 ---- + ; RUN: llvm-as < %s | llc -march=ppc32 + + void %main() { + %shamt = add ubyte 0, 1 ; [#uses=1] + %tr2 = shr long 1, ubyte %shamt ; [#uses=0] + ret void + } From lattner at cs.uiuc.edu Tue Nov 30 00:40:16 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 00:40:16 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp Message-ID: <200411300640.iAU6eGPM025688@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelSimple.cpp updated: 1.115 -> 1.116 --- Log message: Fix CodeGen/PowerPC/2004-11-30-shr-var-crash.ll --- Diffs of the changes: (+1 -1) Index: llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.115 llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.116 --- llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.115 Tue Nov 30 00:36:11 2004 +++ llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp Tue Nov 30 00:40:04 2004 @@ -2870,7 +2870,7 @@ // Select correct least significant half if the shift amount > 32 BB = TmpMBB; unsigned OrReg = makeAnotherReg(Type::IntTy); - BuildMI(BB, PPC::OR, 2, OrReg).addReg(TmpReg6).addImm(TmpReg6); + BuildMI(BB, PPC::OR, 2, OrReg).addReg(TmpReg6).addReg(TmpReg6); TmpMBB->addSuccessor(PhiMBB); BB = PhiMBB; From lattner at cs.uiuc.edu Tue Nov 30 01:01:30 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 01:01:30 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp Message-ID: <200411300701.iAU71UfK005223@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: PromoteMemoryToRegister.cpp updated: 1.74 -> 1.75 --- Log message: Fix test/Regression/Transforms/LICM/2004-09-14-AliasAnalysisInvalidate.llx This only fails on darwin or on X86 under valgrind. --- Diffs of the changes: (+2 -0) Index: llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp diff -u llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:1.74 llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:1.75 --- llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:1.74 Mon Oct 18 09:38:48 2004 +++ llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp Tue Nov 30 01:01:15 2004 @@ -342,6 +342,8 @@ if (PNs[i]) { if (Value *V = hasConstantValue(PNs[i])) { if (!isa(V) || dominates(cast(V), PNs[i])) { + if (AST && isa(PNs[i]->getType())) + AST->deleteValue(PNs[i]); PNs[i]->replaceAllUsesWith(V); PNs[i]->eraseFromParent(); PNs[i] = 0; From reid at x10sys.com Tue Nov 30 01:13:45 2004 From: reid at x10sys.com (Reid Spencer) Date: Tue, 30 Nov 2004 01:13:45 -0600 Subject: [llvm-commits] CVS: llvm/lib/Support/Compressor.cpp Message-ID: <200411300713.BAA12153@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: Compressor.cpp updated: 1.8 -> 1.9 --- Log message: Up the compression threshold to 64K so we avoid it for all but the largest bytecode files. This should help linking substantially. --- Diffs of the changes: (+1 -1) Index: llvm/lib/Support/Compressor.cpp diff -u llvm/lib/Support/Compressor.cpp:1.8 llvm/lib/Support/Compressor.cpp:1.9 --- llvm/lib/Support/Compressor.cpp:1.8 Thu Nov 25 13:38:16 2004 +++ llvm/lib/Support/Compressor.cpp Tue Nov 30 01:13:34 2004 @@ -249,7 +249,7 @@ // For small files, we just don't bother compressing. bzip2 isn't very good // with tiny files and can actually make the file larger, so we just avoid // it altogether. - if (size > 256) { + if (size > 64*1024) { // Set up the bz_stream bz_stream bzdata; bzdata.bzalloc = 0; From lattner at cs.uiuc.edu Tue Nov 30 01:30:35 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 01:30:35 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp Message-ID: <200411300730.iAU7UZQv006683@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelSimple.cpp updated: 1.116 -> 1.117 --- Log message: Fix several bugs in 'op x, imm' handling. Foremost is that we now emit addi r3, r3, -1 instead of addi r3, r3, 1 for 'sub int X, 1'. Secondarily, this fixes several cases where we could crash given an unsigned constant. And fixes a couple of minor missed optimization cases, such as xor X, ~0U -> not X --- Diffs of the changes: (+10 -14) Index: llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.116 llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.117 --- llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.116 Tue Nov 30 00:40:04 2004 +++ llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp Tue Nov 30 01:30:20 2004 @@ -2323,24 +2323,20 @@ { PPC::ADDIS, PPC::ADDIS, PPC::ANDISo, PPC::ORIS, PPC::XORIS, PPC::SUBFIC } }; - // Handle subtract now by inverting the constant value - ConstantInt *CI = Op1; + // Handle subtract now by inverting the constant value: X-4 == X+(-4) if (Opcode == 1) { - ConstantSInt *CSI = dyn_cast(Op1); - CI = ConstantSInt::get(Op1->getType(), -CSI->getValue()); + Op1 = cast(ConstantExpr::getNeg(Op1)); + Opcode = 0; } // xor X, -1 -> not X - if (Opcode == 4) { - ConstantInt *CI = dyn_cast(Op1); - if (CI && CI->isAllOnesValue()) { - BuildMI(*MBB, IP, PPC::NOR, 2, DestReg).addReg(Op0Reg).addReg(Op0Reg); - return; - } + if (Opcode == 4 && Op1->isAllOnesValue()) { + BuildMI(*MBB, IP, PPC::NOR, 2, DestReg).addReg(Op0Reg).addReg(Op0Reg); + return; } - if (Opcode == 2 && !CI->isNullValue()) { - unsigned MB, ME, mask = CI->getRawValue(); + if (Opcode == 2 && !Op1->isNullValue()) { + unsigned MB, ME, mask = Op1->getRawValue(); if (isRunOfOnes(mask, MB, ME)) { BuildMI(*MBB, IP, PPC::RLWINM, 4, DestReg).addReg(Op0Reg).addImm(0) .addImm(MB).addImm(ME); @@ -2358,14 +2354,14 @@ // For Add, Sub, and SubF the instruction takes a signed immediate. For And, // Or, and Xor, the instruction takes an unsigned immediate. There is no // shifted immediate form of SubF so disallow its opcode for those constants. - if (canUseAsImmediateForOpcode(CI, Opcode, false)) { + if (canUseAsImmediateForOpcode(Op1, Opcode, false)) { if (Opcode < 2 || Opcode == 5) BuildMI(*MBB, IP, ImmOpTab[0][Opcode], 2, DestReg).addReg(Op0Reg) .addSImm(Op1->getRawValue()); else BuildMI(*MBB, IP, ImmOpTab[0][Opcode], 2, DestReg).addReg(Op0Reg) .addZImm(Op1->getRawValue()); - } else if (canUseAsImmediateForOpcode(CI, Opcode, true) && (Opcode < 5)) { + } else if (canUseAsImmediateForOpcode(Op1, Opcode, true) && (Opcode < 5)) { if (Opcode < 2) BuildMI(*MBB, IP, ImmOpTab[1][Opcode], 2, DestReg).addReg(Op0Reg) .addSImm(Op1->getRawValue() >> 16); From lattner at cs.uiuc.edu Tue Nov 30 01:38:56 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 01:38:56 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/Generic/2003-07-29-BadConstSbyte.ll Message-ID: <200411300738.iAU7cuJN006727@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/Generic: 2003-07-29-BadConstSbyte.ll updated: 1.3 -> 1.4 --- Log message: This passes on darwin now --- Diffs of the changes: (+0 -1) Index: llvm/test/Regression/CodeGen/Generic/2003-07-29-BadConstSbyte.ll diff -u llvm/test/Regression/CodeGen/Generic/2003-07-29-BadConstSbyte.ll:1.3 llvm/test/Regression/CodeGen/Generic/2003-07-29-BadConstSbyte.ll:1.4 --- llvm/test/Regression/CodeGen/Generic/2003-07-29-BadConstSbyte.ll:1.3 Sat Nov 6 17:05:53 2004 +++ llvm/test/Regression/CodeGen/Generic/2003-07-29-BadConstSbyte.ll Tue Nov 30 01:38:41 2004 @@ -11,7 +11,6 @@ ;; ;; Incorrect LLC Output for the array yy_ec was: ;; yy_ec_1094: -;; XFAIL: darwin ;; .ascii "\000\001\001\001\001\001\001\001\001\002\003\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\002\004\005\001\001\006\a\001\b\t\n\v\f\r\016\017\020\020\020\020\020\020\020\020\020\020\001\021\022\023\024\001\001\025\025\025\025\025\025\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\026\027\030\031\032\001\033\034\035\036\037 !\"#$%&'()*+,-./$0$1$234\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001" ;; From lattner at cs.uiuc.edu Tue Nov 30 01:47:48 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 01:47:48 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/SimplifyCFG.cpp Message-ID: <200411300747.iAU7lm6W016810@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: SimplifyCFG.cpp updated: 1.59 -> 1.60 --- Log message: Squelch warning --- Diffs of the changes: (+1 -1) Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp diff -u llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.59 llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.60 --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.59 Mon Nov 29 22:01:44 2004 +++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp Tue Nov 30 01:47:34 2004 @@ -601,7 +601,7 @@ for (succ_iterator SI = succ_begin(BB1), E = succ_end(BB1); SI != E; ++SI) { PHINode *PN; for (BasicBlock::iterator BBI = SI->begin(); - PN = dyn_cast(BBI); ++BBI) { + (PN = dyn_cast(BBI)); ++BBI) { Value *BB1V = PN->getIncomingValueForBlock(BB1); Value *BB2V = PN->getIncomingValueForBlock(BB2); if (BB1V != BB2V) { From reid at x10sys.com Tue Nov 30 02:12:05 2004 From: reid at x10sys.com (Reid Spencer) Date: Tue, 30 Nov 2004 02:12:05 -0600 Subject: [llvm-commits] CVS: llvm/autoconf/m4/path_tclsh.m4 Message-ID: <200411300812.CAA12738@zion.cs.uiuc.edu> Changes in directory llvm/autoconf/m4: path_tclsh.m4 added (r1.1) --- Log message: Add a check for the tclsh program needed by dejagnu. This can have weird names that have version numbers in it so this macro, DJ_AC_PATH_TCLSH will make the necessary checks. The makefile variable TCLSH is set to the path found. --- Diffs of the changes: (+56 -0) Index: llvm/autoconf/m4/path_tclsh.m4 diff -c /dev/null llvm/autoconf/m4/path_tclsh.m4:1.1 *** /dev/null Tue Nov 30 02:12:04 2004 --- llvm/autoconf/m4/path_tclsh.m4 Tue Nov 30 02:11:54 2004 *************** *** 0 **** --- 1,56 ---- + dnl This macro checks for tclsh which is required to run dejagnu. On some + dnl platforms (notably FreeBSD), tclsh is named tclshX.Y - this handles + dnl that for us so we can get the latest installed tclsh version. + dnl + AC_DEFUN([DJ_AC_PATH_TCLSH], [ + dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../ + ../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../.. + /../../../../../.." + no_itcl=true + AC_MSG_CHECKING(for the tclsh program) + AC_ARG_WITH(tclinclude, [ --with-tclinclude directory where tcl headers are], with_tclinclude=${withval}) + AC_CACHE_VAL(ac_cv_path_tclsh,[ + dnl first check to see if --with-itclinclude was specified + if test x"${with_tclinclude}" != x ; then + if test -f ${with_tclinclude}/tclsh ; then + ac_cv_path_tclsh=`(cd ${with_tclinclude}; pwd)` + elif test -f ${with_tclinclude}/src/tclsh ; then + ac_cv_path_tclsh=`(cd ${with_tclinclude}/src; pwd)` + else + AC_MSG_ERROR([${with_tclinclude} directory doesn't contain tclsh]) + fi + fi + ]) + + dnl next check in private source directory + dnl since ls returns lowest version numbers first, reverse its output + if test x"${ac_cv_path_tclsh}" = x ; then + dnl find the top level Itcl source directory + for i in $dirlist; do + if test -n "`ls -dr $srcdir/$i/tcl* 2>/dev/null`" ; then + tclpath=$srcdir/$i + break + fi + done + + dnl find the exact Itcl source dir. We do it this way, cause there + dnl might be multiple version of Itcl, and we want the most recent one. + for i in `ls -dr $tclpath/tcl* 2>/dev/null ` ; do + if test -f $i/src/tclsh ; then + ac_cv_path_tclsh=`(cd $i/src; pwd)`/tclsh + break + fi + done + fi + + dnl see if one is installed + if test x"${ac_cv_path_tclsh}" = x ; then + AC_MSG_RESULT(none) + AC_PATH_PROG(tclsh, tclsh) + else + AC_MSG_RESULT(${ac_cv_path_tclsh}) + fi + TCLSH="${ac_cv_path_tclsh}" + AC_SUBST(TCLSH) + ]) + From reid at x10sys.com Tue Nov 30 02:12:05 2004 From: reid at x10sys.com (Reid Spencer) Date: Tue, 30 Nov 2004 02:12:05 -0600 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200411300812.CAA12735@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.137 -> 1.138 --- Log message: Add a check for the tclsh program needed by dejagnu. This can have weird names that have version numbers in it so this macro, DJ_AC_PATH_TCLSH will make the necessary checks. The makefile variable TCLSH is set to the path found. --- Diffs of the changes: (+1 -0) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.137 llvm/autoconf/configure.ac:1.138 --- llvm/autoconf/configure.ac:1.137 Mon Nov 29 06:29:58 2004 +++ llvm/autoconf/configure.ac Tue Nov 30 02:11:54 2004 @@ -265,6 +265,7 @@ AC_PATH_PROG(PYTHON,[python],[true python]) AC_PATH_PROG(QMTEST,[qmtest],[true qmtest]) AC_PATH_PROG(RUNTEST,[runtest],[true runtest]) +DJ_AC_PATH_TCLSH AC_PATH_PROG(ZIP,[zip],[true zip]) dnl Determine if the linker supports the -R option. From reid at x10sys.com Tue Nov 30 02:12:05 2004 From: reid at x10sys.com (Reid Spencer) Date: Tue, 30 Nov 2004 02:12:05 -0600 Subject: [llvm-commits] CVS: llvm/configure Makefile.config.in Message-ID: <200411300812.CAA12743@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.144 -> 1.145 Makefile.config.in updated: 1.40 -> 1.41 --- Log message: Add a check for the tclsh program needed by dejagnu. This can have weird names that have version numbers in it so this macro, DJ_AC_PATH_TCLSH will make the necessary checks. The makefile variable TCLSH is set to the path found. --- Diffs of the changes: (+131 -30) Index: llvm/configure diff -u llvm/configure:1.144 llvm/configure:1.145 --- llvm/configure:1.144 Mon Nov 29 06:29:58 2004 +++ llvm/configure Tue Nov 30 02:11:54 2004 @@ -476,7 +476,7 @@ # 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 LLVM_COPYRIGHT subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS ARCH ENDIAN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT ENABLE_OPTIMIZED JIT ENABLE_DOXYGEN LLVMGCCDIR CPP CXX CXXFLAGS ac_ct_CXX LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON ifGNUmake LN_S DATE FIND GREP MKDIR MV PAX RANLIB ac_ct_RANLIB RM SED TAR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA BZIP2 DOT DOXYGEN ETAGS GROFF GZIP POD2HTML POD2MAN PYTHON QMTEST RUNTEST ZIP EGREP INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL ECHO AR ac_ct_AR STRIP ac_ct_ST! RIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ETAGSFLAGS ALLOCA MMAP_FILE LLVMGCC LLVMCC1 LLVMCC1PLUS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME LIBOBJS LTLIBOBJS' +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 LLVM_COPYRIGHT subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS ARCH ENDIAN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT ENABLE_OPTIMIZED JIT ENABLE_DOXYGEN LLVMGCCDIR CPP CXX CXXFLAGS ac_ct_CXX LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON ifGNUmake LN_S DATE FIND GREP MKDIR MV PAX RANLIB ac_ct_RANLIB RM SED TAR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA BZIP2 DOT DOXYGEN ETAGS GROFF GZIP POD2HTML POD2MAN PYTHON QMTEST RUNTEST tclsh TCLSH ZIP EGREP INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL ECHO AR ac_ct_AR ST! RIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ETAGSFLAGS ALLOCA MMAP_FILE LLVMGCC LLVMCC1 LLVMCC1PLUS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1050,6 +1050,7 @@ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-llvmgccdir Location of LLVM GCC front-end + --with-tclinclude directory where tcl headers are --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] @@ -5455,6 +5456,103 @@ echo "${ECHO_T}no" >&6 fi + +dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../ +../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../.. +/../../../../../.." +no_itcl=true +echo "$as_me:$LINENO: checking for the tclsh program" >&5 +echo $ECHO_N "checking for the tclsh program... $ECHO_C" >&6 + +# Check whether --with-tclinclude or --without-tclinclude was given. +if test "${with_tclinclude+set}" = set; then + withval="$with_tclinclude" + with_tclinclude=${withval} +fi; +if test "${ac_cv_path_tclsh+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +if test x"${with_tclinclude}" != x ; then + if test -f ${with_tclinclude}/tclsh ; then + ac_cv_path_tclsh=`(cd ${with_tclinclude}; pwd)` + elif test -f ${with_tclinclude}/src/tclsh ; then + ac_cv_path_tclsh=`(cd ${with_tclinclude}/src; pwd)` + else + { { echo "$as_me:$LINENO: error: ${with_tclinclude} directory doesn't contain tclsh" >&5 +echo "$as_me: error: ${with_tclinclude} directory doesn't contain tclsh" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +fi + + +if test x"${ac_cv_path_tclsh}" = x ; then + for i in $dirlist; do + if test -n "`ls -dr $srcdir/$i/tcl* 2>/dev/null`" ; then + tclpath=$srcdir/$i + break + fi + done + + for i in `ls -dr $tclpath/tcl* 2>/dev/null ` ; do + if test -f $i/src/tclsh ; then + ac_cv_path_tclsh=`(cd $i/src; pwd)`/tclsh + break + fi + done +fi + +if test x"${ac_cv_path_tclsh}" = x ; then + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 + # Extract the first word of "tclsh", so it can be a program name with args. +set dummy tclsh; 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_path_tclsh+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $tclsh in + [\\/]* | ?:[\\/]*) + ac_cv_path_tclsh="$tclsh" # Let the user override the test with a path. + ;; + *) + 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_path_tclsh="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +tclsh=$ac_cv_path_tclsh + +if test -n "$tclsh"; then + echo "$as_me:$LINENO: result: $tclsh" >&5 +echo "${ECHO_T}$tclsh" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +else + echo "$as_me:$LINENO: result: ${ac_cv_path_tclsh}" >&5 +echo "${ECHO_T}${ac_cv_path_tclsh}" >&6 +fi +TCLSH="${ac_cv_path_tclsh}" + + # Extract the first word of "zip", so it can be a program name with args. set dummy zip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -8100,7 +8198,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext + echo '#line 10192 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -10576,7 +10674,7 @@ # Provide some information about the compiler. -echo "$as_me:10579:" \ +echo "$as_me:10677:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -11633,11 +11731,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11636: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11734: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11640: \$? = $ac_status" >&5 + echo "$as_me:11738: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -11876,11 +11974,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11879: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11977: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11883: \$? = $ac_status" >&5 + echo "$as_me:11981: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -11936,11 +12034,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11939: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12037: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11943: \$? = $ac_status" >&5 + echo "$as_me:12041: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14121,7 +14219,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:16513: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16419: \$? = $ac_status" >&5 + echo "$as_me:16517: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -16472,11 +16570,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16475: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16573: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16479: \$? = $ac_status" >&5 + echo "$as_me:16577: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17833,7 +17931,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:18869: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:18775: \$? = $ac_status" >&5 + echo "$as_me:18873: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -18828,11 +18926,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18831: $lt_compile\"" >&5) + (eval echo "\"\$as_me:18929: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:18835: \$? = $ac_status" >&5 + echo "$as_me:18933: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -20867,11 +20965,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:20870: $lt_compile\"" >&5) + (eval echo "\"\$as_me:20968: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:20874: \$? = $ac_status" >&5 + echo "$as_me:20972: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -21110,11 +21208,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21113: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21211: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:21117: \$? = $ac_status" >&5 + echo "$as_me:21215: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -21170,11 +21268,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21173: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21271: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:21177: \$? = $ac_status" >&5 + echo "$as_me:21275: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -23355,7 +23453,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext < Changes in directory llvm/test/Regression/CFrontend: 2004-02-20-StaticRedeclare.c.tr updated: 1.2 -> 1.3 --- Log message: This was fixed with the recent tester changes. --- Diffs of the changes: (+0 -1) Index: llvm/test/Regression/CFrontend/2004-02-20-StaticRedeclare.c.tr diff -u llvm/test/Regression/CFrontend/2004-02-20-StaticRedeclare.c.tr:1.2 llvm/test/Regression/CFrontend/2004-02-20-StaticRedeclare.c.tr:1.3 --- llvm/test/Regression/CFrontend/2004-02-20-StaticRedeclare.c.tr:1.2 Sat Nov 6 14:38:27 2004 +++ llvm/test/Regression/CFrontend/2004-02-20-StaticRedeclare.c.tr Tue Nov 30 10:48:26 2004 @@ -1,4 +1,3 @@ -// XFAIL: * // RUN: %llvmgcc -xc %s -c -o - | llvm-dis | not grep declare int one (int a) { From lattner at cs.uiuc.edu Tue Nov 30 10:58:33 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 10:58:33 -0600 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp Message-ID: <200411301658.iAUGwXWQ018147@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: Reader.cpp updated: 1.143 -> 1.144 --- Log message: RevisionNum is read by error(), initialize it early. --- Diffs of the changes: (+1 -0) Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.143 llvm/lib/Bytecode/Reader/Reader.cpp:1.144 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.143 Fri Nov 19 10:24:05 2004 +++ llvm/lib/Bytecode/Reader/Reader.cpp Tue Nov 30 10:58:18 2004 @@ -2166,6 +2166,7 @@ const std::string &ModuleID) { try { + RevisionNum = 0; At = MemStart = BlockStart = Buf; MemEnd = BlockEnd = Buf + Length; From lattner at cs.uiuc.edu Tue Nov 30 11:09:20 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 11:09:20 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/PRE.cpp Message-ID: <200411301709.iAUH9KGv019041@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: PRE.cpp updated: 1.12 -> 1.13 --- Log message: This pass is completely broken. --- Diffs of the changes: (+4 -11) Index: llvm/lib/Transforms/Scalar/PRE.cpp diff -u llvm/lib/Transforms/Scalar/PRE.cpp:1.12 llvm/lib/Transforms/Scalar/PRE.cpp:1.13 --- llvm/lib/Transforms/Scalar/PRE.cpp:1.12 Mon Oct 25 13:45:16 2004 +++ llvm/lib/Transforms/Scalar/PRE.cpp Tue Nov 30 11:09:06 2004 @@ -152,20 +152,13 @@ bool PRE::ProcessBlock(BasicBlock *BB) { bool Changed = false; + // DISABLED: This pass invalidates iterators and then uses them. + return false; + // PRE expressions first defined in this block... - Instruction *PrevInst = 0; for (BasicBlock::iterator I = BB->begin(); I != BB->end(); ) - if (ProcessExpression(I)) { - // The current instruction may have been deleted, make sure to back up to - // PrevInst instead. - if (PrevInst) - I = PrevInst; - else - I = BB->begin(); + if (ProcessExpression(I++)) Changed = true; - } else { - PrevInst = I++; - } return Changed; } From lattner at cs.uiuc.edu Tue Nov 30 11:10:59 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 11:10:59 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/TailCallElim/tail_call_with_branch.ll Message-ID: <200411301710.iAUHAx7U019062@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/TailCallElim: tail_call_with_branch.ll updated: 1.2 -> 1.3 --- Log message: This is a cross platform fail, failing on freebsd as well --- Diffs of the changes: (+1 -1) Index: llvm/test/Regression/Transforms/TailCallElim/tail_call_with_branch.ll diff -u llvm/test/Regression/Transforms/TailCallElim/tail_call_with_branch.ll:1.2 llvm/test/Regression/Transforms/TailCallElim/tail_call_with_branch.ll:1.3 --- llvm/test/Regression/Transforms/TailCallElim/tail_call_with_branch.ll:1.2 Sat Nov 6 14:38:27 2004 +++ llvm/test/Regression/Transforms/TailCallElim/tail_call_with_branch.ll Tue Nov 30 11:10:47 2004 @@ -1,7 +1,7 @@ ; This testcase is due to tail-duplication not wanting to copy the return ; instruction into the terminating blocks because there was other code ; optimized out of the function after the taildup happened. -; XFAIL: linux,sun,darwin +; XFAIL: * ; RUN: llvm-as < %s | opt -tailcallelim | llvm-dis | not grep call int %t4(int %a) { From lattner at cs.uiuc.edu Tue Nov 30 11:12:12 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 11:12:12 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Debugger/funccall.ll Message-ID: <200411301712.iAUHCC6u019083@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Debugger: funccall.ll updated: 1.3 -> 1.4 --- Log message: Put the output in the temporary location --- Diffs of the changes: (+2 -2) Index: llvm/test/Regression/Debugger/funccall.ll diff -u llvm/test/Regression/Debugger/funccall.ll:1.3 llvm/test/Regression/Debugger/funccall.ll:1.4 --- llvm/test/Regression/Debugger/funccall.ll:1.3 Sat Nov 6 15:07:31 2004 +++ llvm/test/Regression/Debugger/funccall.ll Tue Nov 30 11:12:00 2004 @@ -1,5 +1,5 @@ -;; RUN: llvm-as -f %s -o %s.bc -;; RUN: echo -e "create\ns\ns\nfinish\nbt\nq\ny" | llvm-db %s.bc +;; RUN: llvm-as -f %s -o %t.bc +;; RUN: echo -e "create\ns\ns\nfinish\nbt\nq\ny" | llvm-db %t.bc ;; Debugger type declarations From lattner at cs.uiuc.edu Tue Nov 30 11:13:26 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 11:13:26 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Debugger/funccall.ll Message-ID: <200411301713.iAUHDQ5U019106@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Debugger: funccall.ll updated: 1.4 -> 1.5 --- Log message: do not pass -e into llvm-db as a command. --- Diffs of the changes: (+1 -1) Index: llvm/test/Regression/Debugger/funccall.ll diff -u llvm/test/Regression/Debugger/funccall.ll:1.4 llvm/test/Regression/Debugger/funccall.ll:1.5 --- llvm/test/Regression/Debugger/funccall.ll:1.4 Tue Nov 30 11:12:00 2004 +++ llvm/test/Regression/Debugger/funccall.ll Tue Nov 30 11:13:13 2004 @@ -1,5 +1,5 @@ ;; RUN: llvm-as -f %s -o %t.bc -;; RUN: echo -e "create\ns\ns\nfinish\nbt\nq\ny" | llvm-db %t.bc +;; RUN: echo "create\ns\ns\nfinish\nbt\nq\ny" | llvm-db %t.bc ;; Debugger type declarations From lattner at cs.uiuc.edu Tue Nov 30 11:42:03 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 11:42:03 -0600 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Message-ID: <200411301742.iAUHg3vN020118@apoc.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: JITEmitter.cpp updated: 1.56 -> 1.57 --- Log message: Fix the JIT when being used from llvm-db --- Diffs of the changes: (+1 -1) Index: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp diff -u llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.56 llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.57 --- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.56 Mon Nov 22 16:00:25 2004 +++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Tue Nov 30 11:41:49 2004 @@ -275,7 +275,7 @@ void *ResultPtr = TheJIT->getPointerToGlobalIfAvailable(F); if (ResultPtr) return ResultPtr; - if (F->hasExternalLinkage()) { + if (F->hasExternalLinkage() && F->isExternal()) { // If this is an external function pointer, we can force the JIT to // 'compile' it, which really just adds it to the map. if (DoesntNeedStub) From lattner at cs.uiuc.edu Tue Nov 30 11:45:22 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 11:45:22 -0600 Subject: [llvm-commits] CVS: llvm/test/Makefile Message-ID: <200411301745.iAUHjMaH020347@apoc.cs.uiuc.edu> Changes in directory llvm/test: Makefile updated: 1.69 -> 1.70 --- Log message: If TESTSUITE is set, we obviously want to run dejagnu --- Diffs of the changes: (+4 -0) Index: llvm/test/Makefile diff -u llvm/test/Makefile:1.69 llvm/test/Makefile:1.70 --- llvm/test/Makefile:1.69 Mon Nov 22 13:06:22 2004 +++ llvm/test/Makefile Tue Nov 30 11:45:08 2004 @@ -14,7 +14,11 @@ # Make QMTest the default for testing features and regressions # Do this first to force QMTest to run first # +ifdef TESTSUITE +all:: check-dejagnu +else all:: qmtest +endif # Include other test rules include Makefile.tests From lattner at cs.uiuc.edu Tue Nov 30 11:47:25 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 11:47:25 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Debugger/funccall.ll Message-ID: <200411301747.iAUHlPv6020404@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Debugger: funccall.ll updated: 1.5 -> 1.6 --- Log message: Add back -e, which apparently works in sh's echo but not tcsh's, which does not need it. Also, grep some output so we know that this command does something. --- Diffs of the changes: (+1 -1) Index: llvm/test/Regression/Debugger/funccall.ll diff -u llvm/test/Regression/Debugger/funccall.ll:1.5 llvm/test/Regression/Debugger/funccall.ll:1.6 --- llvm/test/Regression/Debugger/funccall.ll:1.5 Tue Nov 30 11:13:13 2004 +++ llvm/test/Regression/Debugger/funccall.ll Tue Nov 30 11:47:13 2004 @@ -1,5 +1,5 @@ ;; RUN: llvm-as -f %s -o %t.bc -;; RUN: echo "create\ns\ns\nfinish\nbt\nq\ny" | llvm-db %t.bc +;; RUN: echo -e "create\ns\ns\nfinish\nbt\nq\ny" | llvm-db %t.bc | grep 'in main at funccall.c:11:2' ;; Debugger type declarations From lattner at cs.uiuc.edu Tue Nov 30 12:25:19 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 12:25:19 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/CFrontend/2004-09-27-DidntEmitTemplate.cpp.tr Message-ID: <200411301825.iAUIPJpn030109@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/CFrontend: 2004-09-27-DidntEmitTemplate.cpp.tr (r1.1) removed --- Log message: This is a c++ test --- Diffs of the changes: (+0 -0) From lattner at cs.uiuc.edu Tue Nov 30 12:25:24 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 12:25:24 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/C++Frontend/2004-09-27-DidntEmitTemplate.cpp.tr Message-ID: <200411301825.iAUIPOaf030117@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/C++Frontend: 2004-09-27-DidntEmitTemplate.cpp.tr added (r1.1) --- Log message: Move this from the C test suite --- Diffs of the changes: (+22 -0) Index: llvm/test/Regression/C++Frontend/2004-09-27-DidntEmitTemplate.cpp.tr diff -c /dev/null llvm/test/Regression/C++Frontend/2004-09-27-DidntEmitTemplate.cpp.tr:1.1 *** /dev/null Tue Nov 30 12:25:22 2004 --- llvm/test/Regression/C++Frontend/2004-09-27-DidntEmitTemplate.cpp.tr Tue Nov 30 12:25:12 2004 *************** *** 0 **** --- 1,22 ---- + // RUN: llvmgcc -xc++ %s -c -o - | llvm-dis | grep callDefaultCtor | not grep declare + + // This is a testcase for LLVM PR445, which was a problem where the + // instantiation of callDefaultCtor was not being emitted correctly. + + struct Pass {}; + + template + Pass *callDefaultCtor() { return new Pass(); } + + void foo(Pass *(*C)()); + + struct basic_string { + bool empty() const { return true; } + }; + + + bool foo2(basic_string &X) { + return X.empty(); + } + void baz() { foo(callDefaultCtor); } + From tbrethou at cs.uiuc.edu Tue Nov 30 13:13:23 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Tue, 30 Nov 2004 13:13:23 -0600 (CST) Subject: [llvm-commits] CVS: llvm/test/Makefile Message-ID: <200411301913.NAA09810@kain.cs.uiuc.edu> Changes in directory llvm/test: Makefile updated: 1.70 -> 1.71 --- Log message: Added TCLSH var to site.exp. --- Diffs of the changes: (+1 -1) Index: llvm/test/Makefile diff -u llvm/test/Makefile:1.70 llvm/test/Makefile:1.71 --- llvm/test/Makefile:1.70 Tue Nov 30 11:45:08 2004 +++ llvm/test/Makefile Tue Nov 30 13:13:06 2004 @@ -141,7 +141,7 @@ @echo '# Do not edit here. If you wish to override these values' >>site.tmp @echo '# edit the last section' >>site.tmp @echo "set target_triplet $(TARGET_TRIPLE)" >> site.tmp - @echo 'set prcontext "tclsh $(LLVM_SRC_ROOT)/test/Scripts/prcontext.tcl"' >> site.tmp + @echo 'set prcontext "$(TCLSH) $(LLVM_SRC_ROOT)/test/Scripts/prcontext.tcl"' >> site.tmp @echo 'set srcdir $(LLVM_SRC_ROOT)/test' >>site.tmp @echo "set objdir $(LLVM_OBJ_ROOT)/test" >>site.tmp @echo 'set llvmgcc $(LLVMGCCDIR)/bin/gcc' >> site.tmp From lattner at cs.uiuc.edu Tue Nov 30 13:15:58 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 13:15:58 -0600 Subject: [llvm-commits] CVS: llvm-gcc/gcc/llvm-types.c Message-ID: <200411301915.iAUJFwTG008825@apoc.cs.uiuc.edu> Changes in directory llvm-gcc/gcc: llvm-types.c updated: 1.18 -> 1.19 --- Log message: Fix 2004-11-27-VariableSizeInStructure.c with checking enabled. --- Diffs of the changes: (+4 -1) Index: llvm-gcc/gcc/llvm-types.c diff -u llvm-gcc/gcc/llvm-types.c:1.18 llvm-gcc/gcc/llvm-types.c:1.19 --- llvm-gcc/gcc/llvm-types.c:1.18 Mon Nov 29 15:29:29 2004 +++ llvm-gcc/gcc/llvm-types.c Tue Nov 30 13:15:44 2004 @@ -1272,8 +1272,11 @@ * before calling llvm_type_get_from_tree, so we just allocate "enough" * space. */ + Size = 0; + if (TREE_CODE(TYPE_SIZE(type)) == INTEGER_CST) + Size = TREE_INT_CST_LOW(TYPE_SIZE(type)); Result = llvm_type_create_struct(1024 /*FIXME THIS IS HORRIBLE!*/, - (TREE_INT_CST_LOW(TYPE_SIZE(type))+7)/8); + (Size+7)/8); /* Add the new structure type to the hash table of created structure types. */ HTE = *HTEP = xmalloc(sizeof(PtrPtrTableEntry)); /* Fill in the entry... */ From lattner at cs.uiuc.edu Tue Nov 30 13:59:33 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 13:59:33 -0600 Subject: [llvm-commits] CVS: llvm-gcc/gcc/llvm-expand.c Message-ID: <200411301959.iAUJxXOG020615@apoc.cs.uiuc.edu> Changes in directory llvm-gcc/gcc: llvm-expand.c updated: 1.70 -> 1.71 --- Log message: Fix the missing symbols problem for 252.eon and the failure of C++Frontend/2004-09-27-DidntEmitTemplate.cpp.tr --- Diffs of the changes: (+10 -2) Index: llvm-gcc/gcc/llvm-expand.c diff -u llvm-gcc/gcc/llvm-expand.c:1.70 llvm-gcc/gcc/llvm-expand.c:1.71 --- llvm-gcc/gcc/llvm-expand.c:1.70 Sun Nov 28 01:54:45 2004 +++ llvm-gcc/gcc/llvm-expand.c Tue Nov 30 13:59:19 2004 @@ -89,6 +89,11 @@ */ static llvm_value *append_inst(llvm_function *Fn, llvm_instruction *I) { llvm_basicblock *BB; + int i; + + for (i = 0; i != I->NumOperands; ++i) + if (I->Operands[i] && llvm_value_is_global(I->Operands[i])) + MarkLLVMNameAsUsed(I->Operands[i]); /* If the instruction allows the ConstantExpr optimization... */ if (I->Opcode == O_Cast || I->Opcode == O_GetElementPtr || @@ -3068,18 +3073,21 @@ llvm_type_get_pointer(CalledFuncType)); } - append_inst(Fn, Call); + if (!ExceptBlock) { + append_inst(Fn, Call); - if (ExceptBlock) { + } else { llvm_basicblock *NormalDest = llvm_basicblock_new("invoke_cont"); Call->Operands[1] = D2V(NormalDest); if (Fn->ExpandInfo->ThrownExceptionsCallTerminate) { /* This should just go directly to the terminate block. */ Call->Operands[2] = D2V(ExceptBlock); + append_inst(Fn, Call); } else { llvm_basicblock *CleanupDest = llvm_basicblock_new("invoke_catch"); Call->Operands[2] = D2V(CleanupDest); + append_inst(Fn, Call); llvm_emit_label(Fn, CleanupDest); llvm_expand_goto_internal(Fn, ExceptBlock, 0, 1); } From lattner at cs.uiuc.edu Tue Nov 30 14:02:31 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 14:02:31 -0600 Subject: [llvm-commits] CVS: llvm-gcc/gcc/llvm-representation.c Message-ID: <200411302002.iAUK2VP4025934@apoc.cs.uiuc.edu> Changes in directory llvm-gcc/gcc: llvm-representation.c updated: 1.15 -> 1.16 --- Log message: This code is now redundant --- Diffs of the changes: (+0 -6) Index: llvm-gcc/gcc/llvm-representation.c diff -u llvm-gcc/gcc/llvm-representation.c:1.15 llvm-gcc/gcc/llvm-representation.c:1.16 --- llvm-gcc/gcc/llvm-representation.c:1.15 Sun Nov 28 01:54:45 2004 +++ llvm-gcc/gcc/llvm-representation.c Tue Nov 30 14:02:18 2004 @@ -361,16 +361,10 @@ /* llvm_constant_expr implementation ****************************************** */ llvm_constant_expr *llvm_constant_expr_new(llvm_instruction *I) { - unsigned i; llvm_constant_expr *CE = (llvm_constant_expr*)xcalloc(sizeof(llvm_constant_expr), 1); llvm_constant_construct(G2C(CE), D2V(I)->Ty, "", ConstantExpr, ""); CE->Inst = I; - - - for (i = 0; i != I->NumOperands; ++i) - if (llvm_value_is_global(I->Operands[i])) - MarkLLVMNameAsUsed(I->Operands[i]); return CE; } From gaeke at cs.uiuc.edu Tue Nov 30 15:27:17 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue, 30 Nov 2004 15:27:17 -0600 (CST) Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp Message-ID: <200411302127.PAA09435@kain.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.208 -> 1.209 --- Log message: Sparcs behave better if we use and avoid messing with __builtin_alloca. --- Diffs of the changes: (+1 -1) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.208 llvm/lib/Target/CBackend/Writer.cpp:1.209 --- llvm/lib/Target/CBackend/Writer.cpp:1.208 Sat Nov 13 16:21:56 2004 +++ llvm/lib/Target/CBackend/Writer.cpp Tue Nov 30 15:27:01 2004 @@ -707,7 +707,7 @@ static void generateCompilerSpecificCode(std::ostream& Out) { // Alloca is hard to get, and we don't want to include stdlib.h here... Out << "/* get a declaration for alloca */\n" - << "#if defined(sun) || defined(__CYGWIN__) || defined(__APPLE__)\n" + << "#if defined(__CYGWIN__) || defined(__APPLE__)\n" << "extern void *__builtin_alloca(unsigned long);\n" << "#define alloca(x) __builtin_alloca(x)\n" << "#elif defined(__FreeBSD__)\n" From lattner at cs.uiuc.edu Tue Nov 30 15:34:13 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 15:34:13 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp Message-ID: <200411302134.iAULYDAM025571@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.209 -> 1.210 --- Log message: Do not let GCC emit a warning for INT64_MIN --- Diffs of the changes: (+5 -2) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.209 llvm/lib/Target/CBackend/Writer.cpp:1.210 --- llvm/lib/Target/CBackend/Writer.cpp:1.209 Tue Nov 30 15:27:01 2004 +++ llvm/lib/Target/CBackend/Writer.cpp Tue Nov 30 15:33:58 2004 @@ -536,13 +536,16 @@ Out << cast(CPV)->getValue(); break; case Type::IntTyID: if ((int)cast(CPV)->getValue() == (int)0x80000000) - Out << "((int)0x80000000)"; // Handle MININT specially to avoid warning + Out << "((int)0x80000000U)"; // Handle MININT specially to avoid warning else Out << cast(CPV)->getValue(); break; case Type::LongTyID: - Out << cast(CPV)->getValue() << "ll"; break; + if (cast(CPV)->isMinValue()) + Out << "(/*INT64_MIN*/(-9223372036854775807LL)-1)"; + else + Out << cast(CPV)->getValue() << "ll"; break; case Type::UByteTyID: case Type::UShortTyID: From reid at x10sys.com Tue Nov 30 16:54:59 2004 From: reid at x10sys.com (Reid Spencer) Date: Tue, 30 Nov 2004 16:54:59 -0600 Subject: [llvm-commits] CVS: llvm/lib/Linker/LinkArchives.cpp Message-ID: <200411302254.QAA10397@zion.cs.uiuc.edu> Changes in directory llvm/lib/Linker: LinkArchives.cpp updated: 1.40 -> 1.41 --- Log message: Revert version 1.39. It breaks the ordering of the library processing. --- Diffs of the changes: (+1 -8) Index: llvm/lib/Linker/LinkArchives.cpp diff -u llvm/lib/Linker/LinkArchives.cpp:1.40 llvm/lib/Linker/LinkArchives.cpp:1.41 --- llvm/lib/Linker/LinkArchives.cpp:1.40 Mon Nov 29 06:40:21 2004 +++ llvm/lib/Linker/LinkArchives.cpp Tue Nov 30 16:54:48 2004 @@ -371,19 +371,12 @@ /// TRUE - Error. /// void llvm::LinkLibraries(const char *progname, Module *HeadModule, - const std::vector &Libs, + const std::vector &Libraries, const std::vector &LibPaths, bool Verbose, bool Native) { // String in which to receive error messages. std::string ErrorMessage; - // Build a set of library names that we should try, including the - // HeadModule's dependent libraries. We use a set here to eliminate - // duplicates between the module's libraries and the argument Libs. - Module::LibraryListType Libraries(HeadModule->getLibraries()); - Libraries.insert(Libs.begin(),Libs.end()); - - // For each library for (unsigned i = 0; i < Libraries.size(); ++i) { // Determine where this library lives. std::string Pathname = FindLib(Libraries[i], LibPaths); From lattner at cs.uiuc.edu Tue Nov 30 22:16:46 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 30 Nov 2004 22:16:46 -0600 Subject: [llvm-commits] CVS: llvm/docs/CFEBuildInstrs.html Message-ID: <200412010416.iB14Gk7p029462@apoc.cs.uiuc.edu> Changes in directory llvm/docs: CFEBuildInstrs.html updated: 1.28 -> 1.29 --- Log message: Fix typeo, thanks to Duraid for pointing it out --- Diffs of the changes: (+2 -2) Index: llvm/docs/CFEBuildInstrs.html diff -u llvm/docs/CFEBuildInstrs.html:1.28 llvm/docs/CFEBuildInstrs.html:1.29 --- llvm/docs/CFEBuildInstrs.html:1.28 Mon Nov 29 15:46:29 2004 +++ llvm/docs/CFEBuildInstrs.html Tue Nov 30 22:16:29 2004 @@ -240,7 +240,7 @@ % cd $CFEINSTALL/lib % llvm-ranlib libiberty.a % llvm-ranlib libstdc++.a - % llvm-ranlib libsubc++.a + % llvm-ranlib libsupc++.a % cd $CFEINSTALL/lib/target-triplet/3.4-llvm % llvm-ranlib libgcc.a % llvm-ranlib libgcov.a @@ -328,7 +328,7 @@ Brian Gaeke
      LLVM Compiler Infrastructure
      - Last modified: $Date: 2004/11/29 21:46:29 $ + Last modified: $Date: 2004/12/01 04:16:29 $ From reid at x10sys.com Tue Nov 30 23:15:56 2004 From: reid at x10sys.com (Reid Spencer) Date: Tue, 30 Nov 2004 23:15:56 -0600 Subject: [llvm-commits] CVS: llvm/docs/CFEBuildInstrs.html Message-ID: <200412010515.XAA07635@zion.cs.uiuc.edu> Changes in directory llvm/docs: CFEBuildInstrs.html updated: 1.29 -> 1.30 --- Log message: Be a little more explicit about how to configure LLVM with the --prefix option so that permissions errors don't occur if the default, /usr/local, is taken. --- Diffs of the changes: (+8 -3) Index: llvm/docs/CFEBuildInstrs.html diff -u llvm/docs/CFEBuildInstrs.html:1.29 llvm/docs/CFEBuildInstrs.html:1.30 --- llvm/docs/CFEBuildInstrs.html:1.29 Tue Nov 30 22:16:29 2004 +++ llvm/docs/CFEBuildInstrs.html Tue Nov 30 23:15:44 2004 @@ -94,10 +94,15 @@
    • Configure and build the LLVM libraries and tools using:

        % cd llvm
      - % ./configure [options...]
      + % ./configure --prefix=/some/path/you/can/install/to [options...]
        % gmake tools-only
       
      -

      This will build all of the LLVM tools and libraries.

    • +

      This will build all of the LLVM tools and libraries. The --prefix + option defaults to /usr/local (per configure standards) but unless you are a + system administrator, you probably won't be able to install LLVM there because + of permissions. Specify a path into which LLVM can be installed (e.g. + --prefix=/home/user/llvm).

      +
    • Add the directory containing the tools to your PATH.

      @@ -328,7 +333,7 @@
       
         Brian Gaeke
      LLVM Compiler Infrastructure
      - Last modified: $Date: 2004/12/01 04:16:29 $ + Last modified: $Date: 2004/12/01 05:15:44 $ From reid at x10sys.com Wed Dec 1 00:02:41 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 1 Dec 2004 00:02:41 -0600 Subject: [llvm-commits] CVS: llvm-gcc/gcc/llvm-expand.c llvm-out.c Message-ID: <200412010602.AAA08147@zion.cs.uiuc.edu> Changes in directory llvm-gcc/gcc: llvm-expand.c updated: 1.71 -> 1.72 llvm-out.c updated: 1.8 -> 1.9 --- Log message: Committing hacks to disable the debug support which is causing mis-compilation somehow. --- Diffs of the changes: (+5 -5) Index: llvm-gcc/gcc/llvm-expand.c diff -u llvm-gcc/gcc/llvm-expand.c:1.71 llvm-gcc/gcc/llvm-expand.c:1.72 --- llvm-gcc/gcc/llvm-expand.c:1.71 Tue Nov 30 13:59:19 2004 +++ llvm-gcc/gcc/llvm-expand.c Wed Dec 1 00:02:30 2004 @@ -2668,7 +2668,7 @@ int saved_stmts_are_full_exprs_p = stmts_are_full_exprs_p (); prep_stmt (t); - if(debug_info_level > DINFO_LEVEL_NONE){ + if(0 && debug_info_level > DINFO_LEVEL_NONE){ if(TREE_CODE(t) == COMPOUND_STMT){ /* skip compound statements - we handle their components. Avoids emitting multiple stop points for a single line. */ @@ -6918,7 +6918,7 @@ /*assert(!current_function_needs_context && "Case not handled!");*/ TREE_ASM_WRITTEN(subr) = 1; - if (debug_info_level > DINFO_LEVEL_NONE) { + if (0&& debug_info_level > DINFO_LEVEL_NONE) { /* emit global with info and prepare call to function start intrinsic. */ llvm_emit_dbg_function_info(Fn); } @@ -7016,7 +7016,7 @@ assert(Fn->ExpandInfo->GotoFixupList == 0 && "Goto fixups remain?"); assert(Fn->ExpandInfo->InnermostScope == 0 && "A scope didn't get popped?"); - if(debug_info_level > DINFO_LEVEL_NONE){ + if(0 && debug_info_level > DINFO_LEVEL_NONE){ /* emit region end intrinsic to end the function */ llvm_emit_region_end(Fn); } @@ -7674,7 +7674,7 @@ llvm_basicblock *CurBB = 0; /* If we're not emitting debug info, just bypass this. */ - if (debug_info_level <= DINFO_LEVEL_NONE) + if (0 && debug_info_level <= DINFO_LEVEL_NONE) return; CurBB = llvm_ilist_back(llvm_basicblock, Fn->BasicBlocks); Index: llvm-gcc/gcc/llvm-out.c diff -u llvm-gcc/gcc/llvm-out.c:1.8 llvm-gcc/gcc/llvm-out.c:1.9 --- llvm-gcc/gcc/llvm-out.c:1.8 Sun Nov 28 01:52:17 2004 +++ llvm-gcc/gcc/llvm-out.c Wed Dec 1 00:02:30 2004 @@ -61,7 +61,7 @@ llvm_InitializeTypeSystem(); llvm_InitializeConstants(); - if (debug_info_level > DINFO_LEVEL_NONE) + if (0 && debug_info_level > DINFO_LEVEL_NONE) InitDebuggerTypeDecls(); } From lattner at cs.uiuc.edu Wed Dec 1 00:59:03 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 1 Dec 2004 00:59:03 -0600 Subject: [llvm-commits] CVS: llvm-gcc/libstdc++-v3/include/bits/locale_classes.h Message-ID: <200412010659.iB16x3AM009073@apoc.cs.uiuc.edu> Changes in directory llvm-gcc/libstdc++-v3/include/bits: locale_classes.h updated: 1.2 -> 1.3 --- Log message: Revert a patch that broke std::cout << 1; --- Diffs of the changes: (+4 -1) Index: llvm-gcc/libstdc++-v3/include/bits/locale_classes.h diff -u llvm-gcc/libstdc++-v3/include/bits/locale_classes.h:1.2 llvm-gcc/libstdc++-v3/include/bits/locale_classes.h:1.3 --- llvm-gcc/libstdc++-v3/include/bits/locale_classes.h:1.2 Fri Nov 19 02:43:08 2004 +++ llvm-gcc/libstdc++-v3/include/bits/locale_classes.h Wed Dec 1 00:58:48 2004 @@ -268,7 +268,10 @@ public: // NB: This class is always a static data member, and thus can be // counted on to be zero-initialized. - id() : _M_index(0) { } + +// FURTHERMORE: Initializing this to zero breaks libstdc++, in particular +// because the static ctor is run after the field has been modified. + id() {} inline size_t _M_id() const From tbrethou at cs.uiuc.edu Wed Dec 1 01:09:40 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Wed, 1 Dec 2004 01:09:40 -0600 Subject: [llvm-commits] CVS: llvm-gcc/gcc/llvm-expand.c llvm-out.c Message-ID: <200412010709.BAA23499@choi.cs.uiuc.edu> Changes in directory llvm-gcc/gcc: llvm-expand.c updated: 1.72 -> 1.73 llvm-out.c updated: 1.9 -> 1.10 --- Log message: Revert these patches. The breakage was not due to these changes, and this breaks the build of the CFE. --- Diffs of the changes: (+5 -5) Index: llvm-gcc/gcc/llvm-expand.c diff -u llvm-gcc/gcc/llvm-expand.c:1.72 llvm-gcc/gcc/llvm-expand.c:1.73 --- llvm-gcc/gcc/llvm-expand.c:1.72 Wed Dec 1 00:02:30 2004 +++ llvm-gcc/gcc/llvm-expand.c Wed Dec 1 01:09:25 2004 @@ -2668,7 +2668,7 @@ int saved_stmts_are_full_exprs_p = stmts_are_full_exprs_p (); prep_stmt (t); - if(0 && debug_info_level > DINFO_LEVEL_NONE){ + if(debug_info_level > DINFO_LEVEL_NONE){ if(TREE_CODE(t) == COMPOUND_STMT){ /* skip compound statements - we handle their components. Avoids emitting multiple stop points for a single line. */ @@ -6918,7 +6918,7 @@ /*assert(!current_function_needs_context && "Case not handled!");*/ TREE_ASM_WRITTEN(subr) = 1; - if (0&& debug_info_level > DINFO_LEVEL_NONE) { + if (debug_info_level > DINFO_LEVEL_NONE) { /* emit global with info and prepare call to function start intrinsic. */ llvm_emit_dbg_function_info(Fn); } @@ -7016,7 +7016,7 @@ assert(Fn->ExpandInfo->GotoFixupList == 0 && "Goto fixups remain?"); assert(Fn->ExpandInfo->InnermostScope == 0 && "A scope didn't get popped?"); - if(0 && debug_info_level > DINFO_LEVEL_NONE){ + if(debug_info_level > DINFO_LEVEL_NONE){ /* emit region end intrinsic to end the function */ llvm_emit_region_end(Fn); } @@ -7674,7 +7674,7 @@ llvm_basicblock *CurBB = 0; /* If we're not emitting debug info, just bypass this. */ - if (0 && debug_info_level <= DINFO_LEVEL_NONE) + if (debug_info_level <= DINFO_LEVEL_NONE) return; CurBB = llvm_ilist_back(llvm_basicblock, Fn->BasicBlocks); Index: llvm-gcc/gcc/llvm-out.c diff -u llvm-gcc/gcc/llvm-out.c:1.9 llvm-gcc/gcc/llvm-out.c:1.10 --- llvm-gcc/gcc/llvm-out.c:1.9 Wed Dec 1 00:02:30 2004 +++ llvm-gcc/gcc/llvm-out.c Wed Dec 1 01:09:25 2004 @@ -61,7 +61,7 @@ llvm_InitializeTypeSystem(); llvm_InitializeConstants(); - if (0 && debug_info_level > DINFO_LEVEL_NONE) + if (debug_info_level > DINFO_LEVEL_NONE) InitDebuggerTypeDecls(); } From lattner at cs.uiuc.edu Wed Dec 1 01:17:25 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 1 Dec 2004 01:17:25 -0600 Subject: [llvm-commits] CVS: llvm-gcc/gcc/llvm-expand.c Message-ID: <200412010717.iB17HP8K013887@apoc.cs.uiuc.edu> Changes in directory llvm-gcc/gcc: llvm-expand.c updated: 1.73 -> 1.74 --- Log message: Two changes, The first hunk is just tidyness, no functionality changes. The second hunk disables a very important optimization that breaks libstdc++ horribly. Until its safe or we can find cases where it is safe, we cannot use it. --- Diffs of the changes: (+3 -2) Index: llvm-gcc/gcc/llvm-expand.c diff -u llvm-gcc/gcc/llvm-expand.c:1.73 llvm-gcc/gcc/llvm-expand.c:1.74 --- llvm-gcc/gcc/llvm-expand.c:1.73 Wed Dec 1 01:09:25 2004 +++ llvm-gcc/gcc/llvm-expand.c Wed Dec 1 01:17:10 2004 @@ -6059,7 +6059,8 @@ EXPR_WFL doesn't seem to be used in C much. */ - if (EXPR_WFL_EMIT_LINE_NOTE (exp)){ + if (debug_info_level > DINFO_LEVEL_NONE && + EXPR_WFL_EMIT_LINE_NOTE(exp)) { llvm_emit_dbg_stoppoint(Fn, EXPR_WFL_LINENO(exp), EXPR_WFL_COLNO(exp)); } Result = llvm_expand_expr(Fn, EXPR_WFL_NODE(exp), DestLoc); @@ -7258,7 +7259,7 @@ G->Init = llvm_decode_string_constant(DECL_INITIAL(decl), Len, ElTy); } } else { - if (TYPE_NEEDS_CONSTRUCTING(TREE_TYPE(decl))) { + if (0 && TYPE_NEEDS_CONSTRUCTING(TREE_TYPE(decl))) { /* This global has a ctor that will initialize it. For now, init to * undef. */ From criswell at cs.uiuc.edu Wed Dec 1 08:12:45 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed, 1 Dec 2004 08:12:45 -0600 Subject: [llvm-commits] CVS: llvm/docs/CFEBuildInstrs.html Message-ID: <200412011412.IAA24206@choi.cs.uiuc.edu> Changes in directory llvm/docs: CFEBuildInstrs.html updated: 1.30 -> 1.31 --- Log message: Fixed pathname to LLVM tools. Thanks to Vladimir Merzliakov for finding this. --- Diffs of the changes: (+2 -2) Index: llvm/docs/CFEBuildInstrs.html diff -u llvm/docs/CFEBuildInstrs.html:1.30 llvm/docs/CFEBuildInstrs.html:1.31 --- llvm/docs/CFEBuildInstrs.html:1.30 Tue Nov 30 23:15:44 2004 +++ llvm/docs/CFEBuildInstrs.html Wed Dec 1 08:12:30 2004 @@ -106,7 +106,7 @@
    • Add the directory containing the tools to your PATH.

      - % set path = ( `cd llvm/tools/Debug && pwd` $path )
      + % set path = ( `cd llvm/Debug/bin && pwd` $path )
       
    • Unpack the C/C++ front-end source into cfrontend/src.

    • @@ -333,7 +333,7 @@ Brian Gaeke
      LLVM Compiler Infrastructure
      - Last modified: $Date: 2004/12/01 05:15:44 $ + Last modified: $Date: 2004/12/01 14:12:30 $ From lattner at cs.uiuc.edu Wed Dec 1 11:10:50 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 1 Dec 2004 11:10:50 -0600 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200412011710.iB1HAoVU027881@apoc.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.268 -> 1.269 --- Log message: Add line # info --- Diffs of the changes: (+4 -1) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.268 llvm/docs/ReleaseNotes.html:1.269 --- llvm/docs/ReleaseNotes.html:1.268 Sat Nov 27 19:25:20 2004 +++ llvm/docs/ReleaseNotes.html Wed Dec 1 11:10:36 2004 @@ -146,6 +146,9 @@ an abstract target description, instead of requiring them to be hand written.
    • LLVM regression and feature tests can now be run with DejaGNU.
    • +
    • llvmgcc and llvmg++ now emit source-level line number information, making + it possible to map from LLVM code back to source. This is currently used + by llvm-db.
    • @@ -726,7 +729,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
      - Last modified: $Date: 2004/11/28 01:25:20 $ + Last modified: $Date: 2004/12/01 17:10:36 $ From lattner at cs.uiuc.edu Wed Dec 1 11:12:28 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 1 Dec 2004 11:12:28 -0600 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Type.cpp Message-ID: <200412011712.iB1HCSNU028019@apoc.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Type.cpp updated: 1.119 -> 1.120 --- Log message: Get GEP's working with packed types. Contributed by Morten Ofstad! --- Diffs of the changes: (+3 -0) Index: llvm/lib/VMCore/Type.cpp diff -u llvm/lib/VMCore/Type.cpp:1.119 llvm/lib/VMCore/Type.cpp:1.120 --- llvm/lib/VMCore/Type.cpp:1.119 Fri Nov 19 10:39:44 2004 +++ llvm/lib/VMCore/Type.cpp Wed Dec 1 11:12:16 2004 @@ -151,6 +151,9 @@ if (const ArrayType *ATy = dyn_cast(this)) return ATy->getElementType()->isSized(); + if (const PackedType *PTy = dyn_cast(this)) + return PTy->getElementType()->isSized(); + if (!isa(this)) return false; // Okay, our struct is sized if all of the elements are... From lattner at cs.uiuc.edu Wed Dec 1 11:13:18 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 1 Dec 2004 11:13:18 -0600 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Message-ID: <200412011713.iB1HDIIb028037@apoc.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: JITEmitter.cpp updated: 1.57 -> 1.58 --- Log message: Remove unneeded cast. --- Diffs of the changes: (+0 -1) Index: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp diff -u llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.57 llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.58 --- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.57 Tue Nov 30 11:41:49 2004 +++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Wed Dec 1 11:13:05 2004 @@ -266,7 +266,6 @@ if (GlobalVariable *GV = dyn_cast(V)) { /// FIXME: If we straightened things out, this could actually emit the /// global immediately instead of queuing it for codegen later! - GlobalVariable *GV = cast(V); return TheJIT->getOrEmitGlobalVariable(GV); } From lattner at cs.uiuc.edu Wed Dec 1 11:14:40 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 1 Dec 2004 11:14:40 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/TargetData.cpp Message-ID: <200412011714.iB1HEeJg028053@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target: TargetData.cpp updated: 1.53 -> 1.54 --- Log message: Initial support for packed types, contributed by Morten Ofstad --- Diffs of the changes: (+7 -0) Index: llvm/lib/Target/TargetData.cpp diff -u llvm/lib/Target/TargetData.cpp:1.53 llvm/lib/Target/TargetData.cpp:1.54 --- llvm/lib/Target/TargetData.cpp:1.53 Tue Nov 2 16:18:18 2004 +++ llvm/lib/Target/TargetData.cpp Wed Dec 1 11:14:28 2004 @@ -175,6 +175,13 @@ Size = AlignedSize*ATy->getNumElements(); return; } + case Type::PackedTyID: { + const PackedType *PTy = cast(Ty); + getTypeInfo(PTy->getElementType(), TD, Size, Alignment); + unsigned AlignedSize = (Size + Alignment - 1)/Alignment*Alignment; + Size = AlignedSize*PTy->getNumElements(); + return; + } case Type::StructTyID: { // Get the layout annotation... which is lazily created on demand. const StructLayout *Layout = TD->getStructLayout(cast(Ty)); From tbrethou at cs.uiuc.edu Wed Dec 1 12:27:18 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Wed, 1 Dec 2004 12:27:18 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelSimple.cpp Message-ID: <200412011827.MAA30604@choi.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelSimple.cpp updated: 1.297 -> 1.298 --- Log message: Reverting this patch: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041122/021428.html It broke Mutlisource/Applications/obsequi --- Diffs of the changes: (+36 -15) Index: llvm/lib/Target/X86/X86ISelSimple.cpp diff -u llvm/lib/Target/X86/X86ISelSimple.cpp:1.297 llvm/lib/Target/X86/X86ISelSimple.cpp:1.298 --- llvm/lib/Target/X86/X86ISelSimple.cpp:1.297 Sun Nov 28 23:55:24 2004 +++ llvm/lib/Target/X86/X86ISelSimple.cpp Wed Dec 1 12:27:03 2004 @@ -868,8 +868,11 @@ if (SetCondInst *SCI = dyn_cast(V)) if (SCI->hasOneUse()) { Instruction *User = cast(SCI->use_back()); - if (isa(User) || (isa(User) && - User->getOperand(0) == V)) + if ((isa(User) || isa(User)) && + (getClassB(SCI->getOperand(0)->getType()) != cLong || + SCI->getOpcode() == Instruction::SetEQ || + SCI->getOpcode() == Instruction::SetNE) && + (isa(User) || User->getOperand(0) == V)) return SCI; } return 0; @@ -1009,11 +1012,29 @@ BuildMI(*MBB, IP, X86::OR32rr, 2, FinalTmp).addReg(LoTmp).addReg(HiTmp); return OpNum; } else { - // To compare A op B, compute A-B, and check the result flag. - unsigned LowTmp = makeAnotherReg(Type::IntTy); - unsigned HiTmp = makeAnotherReg(Type::IntTy); - BuildMI(*MBB, IP, X86::SUB32ri, 2, LowTmp).addReg(Op0r).addImm(LowCst); - BuildMI(*MBB, IP, X86::SBB32ri, 2, HiTmp).addReg(Op0r+1).addImm(HiCst); + // Emit a sequence of code which compares the high and low parts once + // each, then uses a conditional move to handle the overflow case. For + // example, a setlt for long would generate code like this: + // + // AL = lo(op1) < lo(op2) // Always unsigned comparison + // BL = hi(op1) < hi(op2) // Signedness depends on operands + // dest = hi(op1) == hi(op2) ? BL : AL; + // + + // FIXME: This would be much better if we had hierarchical register + // classes! Until then, hardcode registers so that we can deal with + // their aliases (because we don't have conditional byte moves). + // + BuildMI(*MBB, IP, X86::CMP32ri, 2).addReg(Op0r).addImm(LowCst); + BuildMI(*MBB, IP, SetCCOpcodeTab[0][OpNum], 0, X86::AL); + BuildMI(*MBB, IP, X86::CMP32ri, 2).addReg(Op0r+1).addImm(HiCst); + BuildMI(*MBB, IP, SetCCOpcodeTab[CompTy->isSigned()][OpNum], 0,X86::BL); + BuildMI(*MBB, IP, X86::IMPLICIT_DEF, 0, X86::BH); + BuildMI(*MBB, IP, X86::IMPLICIT_DEF, 0, X86::AH); + BuildMI(*MBB, IP, X86::CMOVE16rr, 2, X86::BX).addReg(X86::BX) + .addReg(X86::AX); + // NOTE: visitSetCondInst knows that the value is dumped into the BL + // register at this point for long values... return OpNum; } } @@ -1059,13 +1080,6 @@ BuildMI(*MBB, IP, X86::OR32rr, 2, FinalTmp).addReg(LoTmp).addReg(HiTmp); break; // Allow the sete or setne to be generated from flags set by OR } else { - // To compare A op B, compute A-B, and check the result flag. - unsigned LowTmp = makeAnotherReg(Type::IntTy); - unsigned HiTmp = makeAnotherReg(Type::IntTy); - BuildMI(*MBB, IP, X86::SUB32rr, 2, LowTmp).addReg(Op0r).addReg(Op1r); - BuildMI(*MBB, IP, X86::SBB32rr, 2, HiTmp).addReg(Op0r+1).addReg(Op1r+1); - return OpNum; - // Emit a sequence of code which compares the high and low parts once // each, then uses a conditional move to handle the overflow case. For // example, a setlt for long would generate code like this: @@ -1122,7 +1136,14 @@ unsigned CompClass = getClassB(CompTy); bool isSigned = CompTy->isSigned() && CompClass != cFP; - BuildMI(*MBB, IP, SetCCOpcodeTab[isSigned][OpNum], 0, TargetReg); + if (CompClass != cLong || OpNum < 2) { + // Handle normal comparisons with a setcc instruction... + BuildMI(*MBB, IP, SetCCOpcodeTab[isSigned][OpNum], 0, TargetReg); + } else { + // Handle long comparisons by copying the value which is already in BL into + // the register we want... + BuildMI(*MBB, IP, X86::MOV8rr, 1, TargetReg).addReg(X86::BL); + } } void X86ISel::visitSelectInst(SelectInst &SI) { From brukman at cs.uiuc.edu Wed Dec 1 13:12:38 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed, 1 Dec 2004 13:12:38 -0600 Subject: [llvm-commits] CVS: llvm/docs/WritingAnLLVMBackend.html Message-ID: <200412011912.NAA09323@zion.cs.uiuc.edu> Changes in directory llvm/docs: WritingAnLLVMBackend.html updated: 1.2 -> 1.3 --- Log message: Remove duplicated link to "Machine backend" --- Diffs of the changes: (+1 -2) Index: llvm/docs/WritingAnLLVMBackend.html diff -u llvm/docs/WritingAnLLVMBackend.html:1.2 llvm/docs/WritingAnLLVMBackend.html:1.3 --- llvm/docs/WritingAnLLVMBackend.html:1.2 Sat Sep 18 01:28:07 2004 +++ llvm/docs/WritingAnLLVMBackend.html Wed Dec 1 13:12:27 2004 @@ -21,7 +21,6 @@
    • Outline
    • Implementation details
    • -
    • Machine backends
    • Language backends
    • Related reading material @@ -238,7 +237,7 @@ Misha Brukman
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2004/09/18 06:28:07 $ + Last modified: $Date: 2004/12/01 19:12:27 $ From brukman at cs.uiuc.edu Wed Dec 1 14:59:05 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed, 1 Dec 2004 14:59:05 -0600 Subject: [llvm-commits] CVS: llvm/docs/ExtendingLLVM.html Message-ID: <200412012059.OAA11006@zion.cs.uiuc.edu> Changes in directory llvm/docs: ExtendingLLVM.html updated: 1.15 -> 1.16 --- Log message: * Hyphenate ``constant-propagate'' * Add testing notes to the instruction section similar as for intrinsics * Mention adding codegen support for new instructions --- Diffs of the changes: (+13 -4) Index: llvm/docs/ExtendingLLVM.html diff -u llvm/docs/ExtendingLLVM.html:1.15 llvm/docs/ExtendingLLVM.html:1.16 --- llvm/docs/ExtendingLLVM.html:1.15 Tue Sep 28 11:58:12 2004 +++ llvm/docs/ExtendingLLVM.html Wed Dec 1 14:58:54 2004 @@ -100,12 +100,13 @@ not access memory or does not write to memory, add it to the relevant list of functions.
    • -
    • llvm/lib/Transforms/Utils/Local.cpp: If it is possible to constant - propagate your intrinsic, add support to it in the +
    • llvm/lib/Transforms/Utils/Local.cpp: If it is possible to + constant-propagate your intrinsic, add support to it in the canConstantFoldCallTo and ConstantFoldCall functions.
    • Test your intrinsic
    • -
    • llvm/test/Regression/*: add your test cases to the test suite.
    • + +
    • llvm/test/Regression/*: add your test cases to the test suite
    • If this intrinsic requires code generator support (i.e., it cannot be @@ -154,6 +155,14 @@ implement the class you defined in llvm/include/llvm/Instructions.h +

    • Test your instruction
    • + +
    • llvm/lib/Target/*: + Add support for your instruction to code generators, or add a lowering + pass.
    • + +
    • llvm/test/Regression/*: add your test cases to the test suite.
    • +

      Also, you need to implement (or modify) any analyses or passes that you want @@ -277,7 +286,7 @@ Misha Brukman
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2004/09/28 16:58:12 $ + Last modified: $Date: 2004/12/01 20:58:54 $ From brukman at cs.uiuc.edu Wed Dec 1 15:07:52 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed, 1 Dec 2004 15:07:52 -0600 Subject: [llvm-commits] CVS: llvm/docs/OpenProjects.html Message-ID: <200412012107.PAA11343@zion.cs.uiuc.edu> Changes in directory llvm/docs: OpenProjects.html updated: 1.39 -> 1.40 --- Log message: Reid has implemented llvm-ranlib. Thanks, Reid! --- Diffs of the changes: (+1 -6) Index: llvm/docs/OpenProjects.html diff -u llvm/docs/OpenProjects.html:1.39 llvm/docs/OpenProjects.html:1.40 --- llvm/docs/OpenProjects.html:1.39 Sat Nov 6 19:03:59 2004 +++ llvm/docs/OpenProjects.html Wed Dec 1 15:07:40 2004 @@ -183,11 +183,6 @@

        -
      1. Someone needs to look into getting the ranlib tool to index LLVM - bytecode files, so that linking in .a files is not hideously slow. They - would also then have to implement the reader for this index in - gccld.
      2. -
      3. Rework the PassManager to be more flexible
      4. Some transformations and analyses only work on reducible flow graphs. It @@ -392,7 +387,7 @@ Chris Lattner
        LLVM Compiler Infrastructure
        - Last modified: $Date: 2004/11/07 01:03:59 $ + Last modified: $Date: 2004/12/01 21:07:40 $ From lattner at cs.uiuc.edu Wed Dec 1 20:26:33 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 1 Dec 2004 20:26:33 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/2003-08-03-ReservedWordFunction.llx Message-ID: <200412020226.iB22QXpu011017@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/X86: 2003-08-03-ReservedWordFunction.llx (r1.2) removed --- Log message: This program doesn't break anything anymore. --- Diffs of the changes: (+0 -0) From lattner at cs.uiuc.edu Wed Dec 1 20:35:52 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 1 Dec 2004 20:35:52 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Instructions.h Message-ID: <200412020235.iB22Zq7b014000@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm: Instructions.h updated: 1.9 -> 1.10 --- Log message: Remove dead field --- Diffs of the changes: (+0 -1) Index: llvm/include/llvm/Instructions.h diff -u llvm/include/llvm/Instructions.h:1.9 llvm/include/llvm/Instructions.h:1.10 --- llvm/include/llvm/Instructions.h:1.9 Thu Nov 18 11:46:49 2004 +++ llvm/include/llvm/Instructions.h Wed Dec 1 20:35:38 2004 @@ -357,7 +357,6 @@ /// le, or ge. /// class SetCondInst : public BinaryOperator { - BinaryOps OpType; public: SetCondInst(BinaryOps Opcode, Value *LHS, Value *RHS, const std::string &Name = "", Instruction *InsertBefore = 0); From lattner at cs.uiuc.edu Wed Dec 1 21:42:24 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 1 Dec 2004 21:42:24 -0600 Subject: [llvm-commits] CVS: poolalloc/runtime/FL2Allocator/PoolAllocator.h Message-ID: <200412020342.iB23gNKN004879@apoc.cs.uiuc.edu> Changes in directory poolalloc/runtime/FL2Allocator: PoolAllocator.h updated: 1.15 -> 1.16 --- Log message: Add function --- Diffs of the changes: (+1 -0) Index: poolalloc/runtime/FL2Allocator/PoolAllocator.h diff -u poolalloc/runtime/FL2Allocator/PoolAllocator.h:1.15 poolalloc/runtime/FL2Allocator/PoolAllocator.h:1.16 --- poolalloc/runtime/FL2Allocator/PoolAllocator.h:1.15 Wed Nov 10 19:43:54 2004 +++ poolalloc/runtime/FL2Allocator/PoolAllocator.h Wed Dec 1 21:42:13 2004 @@ -103,6 +103,7 @@ void pooldestroy(PoolTy *Pool); void *poolalloc(PoolTy *Pool, unsigned NumBytes); void *poolrealloc(PoolTy *Pool, void *Node, unsigned NumBytes); + void *poolmemalign(PoolTy *Pool, unsigned Alignment, unsigned NumBytes); void poolfree(PoolTy *Pool, void *Node); /// poolobjsize - Reutrn the size of the object at the specified address, in From reid at x10sys.com Wed Dec 1 22:15:35 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 1 Dec 2004 22:15:35 -0600 Subject: [llvm-commits] CVS: llvm/autoconf/m4/path_tclsh.m4 Message-ID: <200412020415.WAA11795@zion.cs.uiuc.edu> Changes in directory llvm/autoconf/m4: path_tclsh.m4 updated: 1.1 -> 1.2 --- Log message: * Make sure the cache variable gets cached * Don't search a bunch of .. directories for something we'd never find, because we don't imbed tclsh into LLVM. * Look for various tclsh versions because some platforms don't install the tclsh link but just have tclsh8.3 or tclsh8.4 or some such. --- Diffs of the changes: (+16 -33) Index: llvm/autoconf/m4/path_tclsh.m4 diff -u llvm/autoconf/m4/path_tclsh.m4:1.1 llvm/autoconf/m4/path_tclsh.m4:1.2 --- llvm/autoconf/m4/path_tclsh.m4:1.1 Tue Nov 30 02:11:54 2004 +++ llvm/autoconf/m4/path_tclsh.m4 Wed Dec 1 22:15:24 2004 @@ -3,12 +3,12 @@ dnl that for us so we can get the latest installed tclsh version. dnl AC_DEFUN([DJ_AC_PATH_TCLSH], [ -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../ -../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../.. -/../../../../../.." no_itcl=true -AC_MSG_CHECKING(for the tclsh program) -AC_ARG_WITH(tclinclude, [ --with-tclinclude directory where tcl headers are], with_tclinclude=${withval}) +AC_MSG_CHECKING(for the tclsh program in tclinclude directory) +AC_ARG_WITH(tclinclude, + AS_HELP_STRING([--with-tclinclude], + [directory where tcl headers are]), + [with_tclinclude=${withval}],[with_tclinclude='']) AC_CACHE_VAL(ac_cv_path_tclsh,[ dnl first check to see if --with-itclinclude was specified if test x"${with_tclinclude}" != x ; then @@ -20,37 +20,20 @@ AC_MSG_ERROR([${with_tclinclude} directory doesn't contain tclsh]) fi fi -]) - -dnl next check in private source directory -dnl since ls returns lowest version numbers first, reverse its output -if test x"${ac_cv_path_tclsh}" = x ; then - dnl find the top level Itcl source directory - for i in $dirlist; do - if test -n "`ls -dr $srcdir/$i/tcl* 2>/dev/null`" ; then - tclpath=$srcdir/$i - break - fi - done - - dnl find the exact Itcl source dir. We do it this way, cause there - dnl might be multiple version of Itcl, and we want the most recent one. - for i in `ls -dr $tclpath/tcl* 2>/dev/null ` ; do - if test -f $i/src/tclsh ; then - ac_cv_path_tclsh=`(cd $i/src; pwd)`/tclsh - break - fi - done -fi dnl see if one is installed if test x"${ac_cv_path_tclsh}" = x ; then - AC_MSG_RESULT(none) - AC_PATH_PROG(tclsh, tclsh) + AC_MSG_RESULT(none) + AC_PATH_PROGS([TCLSH],[tclsh tclsh8.4 tclsh8.4.8 tclsh8.4.7 tclsh8.4.6 tclsh8.4.5 tclsh8.4.4 tclsh8.4.3 tclsh8.4.2 tclsh8.4.1 tclsh8.4.0 tclsh8.3 tclsh8.3.5 tclsh8.3.4 tclsh8.3.3 .tclsh8.3.2 tclsh8.3.1 tclsh8.3.0]) + if test x"${TCLSH}" = x ; then + ac_cv_path_tclsh=''; + else + ac_cv_path_tclsh="${TCLSH}"; + fi else - AC_MSG_RESULT(${ac_cv_path_tclsh}) + AC_MSG_RESULT(${ac_cv_path_tclsh}) + TCLSH="${ac_cv_path_tclsh}" + AC_SUBST(TCLSH) fi -TCLSH="${ac_cv_path_tclsh}" -AC_SUBST(TCLSH) -]) +])]) From reid at x10sys.com Wed Dec 1 22:17:31 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 1 Dec 2004 22:17:31 -0600 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200412020417.WAA11808@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.145 -> 1.146 --- Log message: Fix the tclsh test to find tclsh8.[34] and tclsh8.[34].X as well. --- Diffs of the changes: (+59 -68) Index: llvm/configure diff -u llvm/configure:1.145 llvm/configure:1.146 --- llvm/configure:1.145 Tue Nov 30 02:11:54 2004 +++ llvm/configure Wed Dec 1 22:17:20 2004 @@ -476,7 +476,7 @@ # 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 LLVM_COPYRIGHT subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS ARCH ENDIAN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT ENABLE_OPTIMIZED JIT ENABLE_DOXYGEN LLVMGCCDIR CPP CXX CXXFLAGS ac_ct_CXX LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON ifGNUmake LN_S DATE FIND GREP MKDIR MV PAX RANLIB ac_ct_RANLIB RM SED TAR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA BZIP2 DOT DOXYGEN ETAGS GROFF GZIP POD2HTML POD2MAN PYTHON QMTEST RUNTEST tclsh TCLSH ZIP EGREP INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL ECHO AR ac_ct_AR ST! RIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ETAGSFLAGS ALLOCA MMAP_FILE LLVMGCC LLVMCC1 LLVMCC1PLUS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME LIBOBJS LTLIBOBJS' +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 LLVM_COPYRIGHT subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS ARCH ENDIAN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT ENABLE_OPTIMIZED JIT ENABLE_DOXYGEN LLVMGCCDIR CPP CXX CXXFLAGS ac_ct_CXX LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON ifGNUmake LN_S DATE FIND GREP MKDIR MV PAX RANLIB ac_ct_RANLIB RM SED TAR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA BZIP2 DOT DOXYGEN ETAGS GROFF GZIP POD2HTML POD2MAN PYTHON QMTEST RUNTEST TCLSH ZIP EGREP INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL ECHO AR ac_ct_AR STRIP ac! _ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ETAGSFLAGS ALLOCA MMAP_FILE LLVMGCC LLVMCC1 LLVMCC1PLUS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -5457,17 +5457,16 @@ fi -dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../ -../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../.. -/../../../../../.." no_itcl=true -echo "$as_me:$LINENO: checking for the tclsh program" >&5 -echo $ECHO_N "checking for the tclsh program... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for the tclsh program in tclinclude directory" >&5 +echo $ECHO_N "checking for the tclsh program in tclinclude directory... $ECHO_C" >&6 # Check whether --with-tclinclude or --without-tclinclude was given. if test "${with_tclinclude+set}" = set; then withval="$with_tclinclude" with_tclinclude=${withval} +else + with_tclinclude='' fi; if test "${ac_cv_path_tclsh+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5485,38 +5484,21 @@ fi fi -fi - - -if test x"${ac_cv_path_tclsh}" = x ; then - for i in $dirlist; do - if test -n "`ls -dr $srcdir/$i/tcl* 2>/dev/null`" ; then - tclpath=$srcdir/$i - break - fi - done - - for i in `ls -dr $tclpath/tcl* 2>/dev/null ` ; do - if test -f $i/src/tclsh ; then - ac_cv_path_tclsh=`(cd $i/src; pwd)`/tclsh - break - fi - done -fi - if test x"${ac_cv_path_tclsh}" = x ; then - echo "$as_me:$LINENO: result: none" >&5 + echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 - # Extract the first word of "tclsh", so it can be a program name with args. -set dummy tclsh; ac_word=$2 + for ac_prog in tclsh tclsh8.4 tclsh8.4.8 tclsh8.4.7 tclsh8.4.6 tclsh8.4.5 tclsh8.4.4 tclsh8.4.3 tclsh8.4.2 tclsh8.4.1 tclsh8.4.0 tclsh8.3 tclsh8.3.5 tclsh8.3.4 tclsh8.3.3 .tclsh8.3.2 tclsh8.3.1 tclsh8.3.0 +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_path_tclsh+set}" = set; then +if test "${ac_cv_path_TCLSH+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $tclsh in + case $TCLSH in [\\/]* | ?:[\\/]*) - ac_cv_path_tclsh="$tclsh" # Let the user override the test with a path. + ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5526,7 +5508,7 @@ 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_path_tclsh="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5536,22 +5518,32 @@ ;; esac fi -tclsh=$ac_cv_path_tclsh +TCLSH=$ac_cv_path_TCLSH -if test -n "$tclsh"; then - echo "$as_me:$LINENO: result: $tclsh" >&5 -echo "${ECHO_T}$tclsh" >&6 +if test -n "$TCLSH"; then + echo "$as_me:$LINENO: result: $TCLSH" >&5 +echo "${ECHO_T}$TCLSH" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi + test -n "$TCLSH" && break +done + + if test x"${TCLSH}" = x ; then + ac_cv_path_tclsh=''; + else + ac_cv_path_tclsh="${TCLSH}"; + fi else - echo "$as_me:$LINENO: result: ${ac_cv_path_tclsh}" >&5 + echo "$as_me:$LINENO: result: ${ac_cv_path_tclsh}" >&5 echo "${ECHO_T}${ac_cv_path_tclsh}" >&6 + TCLSH="${ac_cv_path_tclsh}" + fi -TCLSH="${ac_cv_path_tclsh}" +fi # Extract the first word of "zip", so it can be a program name with args. set dummy zip; ac_word=$2 @@ -8198,7 +8190,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext + echo '#line 10184 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -10674,7 +10666,7 @@ # Provide some information about the compiler. -echo "$as_me:10677:" \ +echo "$as_me:10669:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -11731,11 +11723,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11734: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11726: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11738: \$? = $ac_status" >&5 + echo "$as_me:11730: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -11974,11 +11966,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11977: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11969: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11981: \$? = $ac_status" >&5 + echo "$as_me:11973: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -12034,11 +12026,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12037: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12029: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12041: \$? = $ac_status" >&5 + echo "$as_me:12033: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14219,7 +14211,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:16505: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16517: \$? = $ac_status" >&5 + echo "$as_me:16509: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -16570,11 +16562,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16573: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16565: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16577: \$? = $ac_status" >&5 + echo "$as_me:16569: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17931,7 +17923,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:18861: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:18873: \$? = $ac_status" >&5 + echo "$as_me:18865: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -18926,11 +18918,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:18929: $lt_compile\"" >&5) + (eval echo "\"\$as_me:18921: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:18933: \$? = $ac_status" >&5 + echo "$as_me:18925: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -20965,11 +20957,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:20968: $lt_compile\"" >&5) + (eval echo "\"\$as_me:20960: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:20972: \$? = $ac_status" >&5 + echo "$as_me:20964: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -21208,11 +21200,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21211: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21203: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:21215: \$? = $ac_status" >&5 + echo "$as_me:21207: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -21268,11 +21260,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21271: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21263: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:21275: \$? = $ac_status" >&5 + echo "$as_me:21267: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -23453,7 +23445,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext < Changes in directory llvm-test/External/SPEC: Makefile.spec updated: 1.45 -> 1.46 --- Log message: Fix 'make bugpoint-gccld' to run on the gccas-optimized program, not a completely unoptimized program. This was only broken for SPEC. --- Diffs of the changes: (+2 -2) Index: llvm-test/External/SPEC/Makefile.spec diff -u llvm-test/External/SPEC/Makefile.spec:1.45 llvm-test/External/SPEC/Makefile.spec:1.46 --- llvm-test/External/SPEC/Makefile.spec:1.45 Mon Nov 29 14:36:43 2004 +++ llvm-test/External/SPEC/Makefile.spec Wed Dec 1 22:21:48 2004 @@ -129,10 +129,10 @@ @echo "===> Leaving Output/bugpoint-$(RUN_TYPE)" $(PROGRAMS_TO_TEST:%=Output/%.bugpoint-gccld): \ -Output/%.bugpoint-gccld: Output/%.noopt-llvm.bc $(LBUGPOINT) \ +Output/%.bugpoint-gccld: Output/%.nogccldopt-llvm.bc $(LBUGPOINT) \ Output/gccld-pass-args Output/%.out-nat $(SPEC_SANDBOX) bugpoint-$(RUN_TYPE) $@ $(REF_IN_DIR) \ - $(LBUGPOINT) ../$*.noopt-llvm.bc `cat Output/gccld-pass-args` $(OPTPASSES) \ + $(LBUGPOINT) ../$*.nogccldopt-llvm.bc `cat Output/gccld-pass-args` $(OPTPASSES) \ $(BUGPOINT_OPTIONS) $(BUGPOINT_ARGS) @echo "===> Leaving Output/bugpoint-$(RUN_TYPE)" From lattner at cs.uiuc.edu Thu Dec 2 00:26:12 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 2 Dec 2004 00:26:12 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/GlobalOpt.cpp Message-ID: <200412020626.iB26QCtn011166@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: GlobalOpt.cpp updated: 1.27 -> 1.28 --- Log message: Fix a minor bug where we set a var to initialized on malloc, not on store. This doesn't fix anything that I'm aware of, just noticed it by inspection --- Diffs of the changes: (+17 -10) Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.27 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.28 --- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.27 Sun Nov 14 14:50:30 2004 +++ llvm/lib/Transforms/IPO/GlobalOpt.cpp Thu Dec 2 00:25:58 2004 @@ -670,9 +670,13 @@ // If there is a comparison against null, we will insert a global bool to // keep track of whether the global was initialized yet or not. - GlobalVariable *InitBool = 0; + GlobalVariable *InitBool = + new GlobalVariable(Type::BoolTy, false, GlobalValue::InternalLinkage, + ConstantBool::False, GV->getName()+".init"); + bool InitBoolUsed = false; // Loop over all uses of GV, processing them in turn. + std::vector Stores; while (!GV->use_empty()) if (LoadInst *LI = dyn_cast(GV->use_back())) { while (!LI->use_empty()) { @@ -681,18 +685,10 @@ if (!isa(LoadUse.getUser())) LoadUse = RepValue; else { - if (InitBool == 0) { - InitBool = new GlobalVariable(Type::BoolTy, false, - GlobalValue::InternalLinkage, - ConstantBool::False, - GV->getName()+".init"); - GV->getParent()->getGlobalList().insert(GV, InitBool); - // The global is initialized when the malloc is run. - new StoreInst(ConstantBool::True, InitBool, MI); - } // Replace the setcc X, 0 with a use of the bool value. SetCondInst *SCI = cast(LoadUse.getUser()); Value *LV = new LoadInst(InitBool, InitBool->getName()+".val", SCI); + InitBoolUsed = true; switch (SCI->getOpcode()) { default: assert(0 && "Unknown opcode!"); case Instruction::SetLT: @@ -714,9 +710,20 @@ LI->eraseFromParent(); } else { StoreInst *SI = cast(GV->use_back()); + // The global is initialized when the store to it occurs. + new StoreInst(ConstantBool::True, InitBool, SI); SI->eraseFromParent(); } + // If the initialization boolean was used, insert it, otherwise delete it. + if (!InitBoolUsed) { + while (!InitBool->use_empty()) // Delete initializations + cast(InitBool->use_back())->eraseFromParent(); + delete InitBool; + } else + GV->getParent()->getGlobalList().insert(GV, InitBool); + + // Now the GV is dead, nuke it and the malloc. GV->eraseFromParent(); MI->eraseFromParent(); From lattner at cs.uiuc.edu Thu Dec 2 01:11:22 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 2 Dec 2004 01:11:22 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/GlobalOpt.cpp Message-ID: <200412020711.iB27BMt0015038@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: GlobalOpt.cpp updated: 1.28 -> 1.29 --- Log message: Implement a FIXME by checking to make sure that a malloc is not being used in scary and unknown ways before we promote it. This fixes the miscompilation of 188.ammp that has been plauging us since a globalopt patch went in. Thanks a ton to Tanya for helping me diagnose the problem! --- Diffs of the changes: (+25 -3) Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.28 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.29 --- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.28 Thu Dec 2 00:25:58 2004 +++ llvm/lib/Transforms/IPO/GlobalOpt.cpp Thu Dec 2 01:11:07 2004 @@ -738,6 +738,29 @@ return NewGV; } +/// ValueIsOnlyUsedLocallyOrStoredToOneGlobal - Scan the use-list of V checking +/// to make sure that there are no complex uses of V. We permit simple things +/// like dereferencing the pointer, but not storing through the address, unless +/// it is to the specified global. +static bool ValueIsOnlyUsedLocallyOrStoredToOneGlobal(Instruction *V, + GlobalVariable *GV) { + for (Value::use_iterator UI = V->use_begin(), E = V->use_end(); UI != E;++UI) + if (isa(*UI) || isa(*UI)) { + // Fine, ignore. + } else if (StoreInst *SI = dyn_cast(*UI)) { + if (SI->getOperand(0) == V && SI->getOperand(1) != GV) + return false; // Storing the pointer itself... bad. + // Otherwise, storing through it, or storing into GV... fine. + } else if (isa(*UI) || isa(*UI)) { + if (!ValueIsOnlyUsedLocallyOrStoredToOneGlobal(cast(*UI),GV)) + return false; + } else { + return false; + } + return true; + +} + // OptimizeOnceStoredGlobal - Try to optimize globals based on the knowledge // that only one value (besides its initializer) is ever stored to the global. static bool OptimizeOnceStoredGlobal(GlobalVariable *GV, Value *StoredOnceVal, @@ -783,9 +806,8 @@ if (MI->getAllocatedType()->isSized() && NElements->getRawValue()* TD.getTypeSize(MI->getAllocatedType()) < 2048 && - AllUsesOfLoadedValueWillTrapIfNull(GV)) { - // FIXME: do more correctness checking to make sure the result of the - // malloc isn't squirrelled away somewhere. + AllUsesOfLoadedValueWillTrapIfNull(GV) && + ValueIsOnlyUsedLocallyOrStoredToOneGlobal(MI, GV)) { GVI = OptimizeGlobalAddressOfMalloc(GV, MI); return true; } From tbrethou at cs.uiuc.edu Thu Dec 2 01:22:32 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Thu, 2 Dec 2004 01:22:32 -0600 (CST) Subject: [llvm-commits] CVS: llvm/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp ModuloScheduling.cpp ModuloScheduling.h Message-ID: <200412020722.BAA17422@kain.cs.uiuc.edu> Changes in directory llvm/lib/Target/SparcV9/ModuloScheduling: MSSchedule.cpp updated: 1.11 -> 1.12 ModuloScheduling.cpp updated: 1.37 -> 1.38 ModuloScheduling.h updated: 1.21 -> 1.22 --- Log message: Reworked branch adding in prologue. Added check for infinite loops which are not modulo scheduled. --- Diffs of the changes: (+46 -39) Index: llvm/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp diff -u llvm/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp:1.11 llvm/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp:1.12 --- llvm/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp:1.11 Sun Nov 28 17:36:15 2004 +++ llvm/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp Thu Dec 2 01:22:15 2004 @@ -164,9 +164,7 @@ } bool MSSchedule::constructKernel(int II) { - MSchedGraphNode *branchNode = 0; - MSchedGraphNode *branchANode = 0; - + int stageNum = (schedule.rbegin()->first)/ II; DEBUG(std::cerr << "Number of Stages: " << stageNum << "\n"); @@ -178,11 +176,8 @@ E = schedule[i].end(); I != E; ++I) { //Check if its a branch if((*I)->isBranch()) { - if((*I)->getInst()->getOpcode() == V9::BA) - branchANode = *I; - else - branchNode = *I; assert(count == 0 && "Branch can not be from a previous iteration"); + kernel.push_back(std::make_pair(*I, count)); } else //FIXME: Check if the instructions in the earlier stage conflict @@ -193,13 +188,6 @@ } } - //Add Branch to the end - kernel.push_back(std::make_pair(branchNode, 0)); - - //Add Branch Always to the end - kernel.push_back(std::make_pair(branchANode, 0)); - - if(stageNum > 0) maxStage = stageNum; else Index: llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp diff -u llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp:1.37 llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp:1.38 --- llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp:1.37 Sun Nov 28 22:39:46 2004 +++ llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp Thu Dec 2 01:22:15 2004 @@ -213,20 +213,20 @@ }); //Finally schedule nodes - computeSchedule(); + bool haveSched = computeSchedule(); //Print out final schedule DEBUG(schedule.print(std::cerr)); //Final scheduling step is to reconstruct the loop only if we actual have //stage > 0 - if(schedule.getMaxStage() != 0) { + if(schedule.getMaxStage() != 0 && haveSched) { reconstructLoop(*BI); ++MSLoops; Changed = true; } else - DEBUG(std::cerr << "Max stage is 0, so no change in loop\n"); + DEBUG(std::cerr << "Max stage is 0, so no change in loop or reached cap\n"); //Clear out our maps for the next basic block that is processed nodeToAttributesMap.clear(); @@ -292,7 +292,12 @@ if(!isLoop) return false; - + + //Check that we have a conditional branch (avoiding MS infinite loops) + if(BranchInst *b = dyn_cast(((BasicBlock*) BI->getBasicBlock())->getTerminator())) + if(b->isUnconditional()) + return false; + //Check size of our basic block.. make sure we have more then just the terminator in it if(BI->getBasicBlock()->size() == 1) return false; @@ -1139,13 +1144,13 @@ //return FinalNodeOrder; } -void ModuloSchedulingPass::computeSchedule() { +bool ModuloSchedulingPass::computeSchedule() { bool success = false; //FIXME: Should be set to max II of the original loop //Cap II in order to prevent infinite loop - int capII = 30; + int capII = 100; while(!success) { @@ -1252,8 +1257,12 @@ } } + if(II >= capII) + return false; + assert(II < capII && "The II should not exceed the original loop number of cycles"); } + return true; } @@ -1312,21 +1321,22 @@ std::map > inKernel; int maxStageCount = 0; + //Keep a map of new values we consumed in case they need to be added back + std::map > consumedValues; + MSchedGraphNode *branch = 0; MSchedGraphNode *BAbranch = 0; schedule.print(std::cerr); + std::vector branches; + for(MSSchedule::kernel_iterator I = schedule.kernel_begin(), E = schedule.kernel_end(); I != E; ++I) { maxStageCount = std::max(maxStageCount, I->second); //Ignore the branch, we will handle this separately if(I->first->isBranch()) { - if (I->first->getInst()->getOpcode() != V9::BA) - branch = I->first; - else - BAbranch = I->first; - + branches.push_back(I->first); continue; } @@ -1357,7 +1367,7 @@ //After cloning, we may need to save the value that this instruction defines for(unsigned opNum=0; opNum < MI->getNumOperands(); ++opNum) { //get machine operand - const MachineOperand &mOp = instClone->getOperand(opNum); + MachineOperand &mOp = instClone->getOperand(opNum); if(mOp.getType() == MachineOperand::MO_VirtualRegister && mOp.isDef()) { //Check if this is a value we should save @@ -1386,12 +1396,23 @@ //We may also need to update the value that we use if its from an earlier prologue if(j != 0) { if(mOp.getType() == MachineOperand::MO_VirtualRegister && mOp.isUse()) { - if(newValues.count(mOp.getVRegValue())) - if(newValues[mOp.getVRegValue()].count(j-1)) { + if(newValues.count(mOp.getVRegValue())) { + if(newValues[mOp.getVRegValue()].count(i-1)) { + Value *oldV = mOp.getVRegValue(); DEBUG(std::cerr << "Replaced this value: " << mOp.getVRegValue() << " With:" << (newValues[mOp.getVRegValue()][i-1]) << "\n"); //Update the operand with the right value - instClone->getOperand(opNum).setValueReg(newValues[mOp.getVRegValue()][i-1]); + mOp.setValueReg(newValues[mOp.getVRegValue()][i-1]); + + //Remove this value since we have consumed it + //NOTE: Should this only be done if j != maxStage? + consumedValues[oldV][i-1] = (newValues[oldV][i-1]); + DEBUG(std::cerr << "Deleted value: " << consumedValues[oldV][i-1] << "\n"); + newValues[oldV].erase(i-1); } + } + else + if(consumedValues.count(mOp.getVRegValue())) + assert(!consumedValues[mOp.getVRegValue()].count(i-1) && "Found a case where we need the value"); } } } @@ -1400,17 +1421,15 @@ } - //Stick in branch at the end - machineBB->push_back(branch->getInst()->clone()); - - //Add nop - BuildMI(machineBB, V9::NOP, 0); + for(std::vector::iterator BR = branches.begin(), BE = branches.end(); BR != BE; ++BR) { + + //Stick in branch at the end + machineBB->push_back((*BR)->getInst()->clone()); - //Stick in branch at the end - machineBB->push_back(BAbranch->getInst()->clone()); + //Add nop + BuildMI(machineBB, V9::NOP, 0); + } - //Add nop - BuildMI(machineBB, V9::NOP, 0); (((MachineBasicBlock*)origBB)->getParent())->getBasicBlockList().push_back(machineBB); prologues.push_back(machineBB); Index: llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.h diff -u llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.h:1.21 llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.h:1.22 --- llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.h:1.21 Sun Nov 28 22:39:47 2004 +++ llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.h Thu Dec 2 01:22:15 2004 @@ -88,7 +88,7 @@ void addReccurrence(std::vector &recurrence, int II, MSchedGraphNode*, MSchedGraphNode*); void computePartialOrder(); - void computeSchedule(); + bool computeSchedule(); bool scheduleNode(MSchedGraphNode *node, int start, int end); From reid at x10sys.com Thu Dec 2 01:29:28 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 01:29:28 -0600 Subject: [llvm-commits] CVS: llvm/autoconf/m4/path_tclsh.m4 Message-ID: <200412020729.BAA20212@zion.cs.uiuc.edu> Changes in directory llvm/autoconf/m4: path_tclsh.m4 updated: 1.2 -> 1.3 --- Log message: Search for tclsh last so we don't find the FreeBSD warning script. --- Diffs of the changes: (+1 -1) Index: llvm/autoconf/m4/path_tclsh.m4 diff -u llvm/autoconf/m4/path_tclsh.m4:1.2 llvm/autoconf/m4/path_tclsh.m4:1.3 --- llvm/autoconf/m4/path_tclsh.m4:1.2 Wed Dec 1 22:15:24 2004 +++ llvm/autoconf/m4/path_tclsh.m4 Thu Dec 2 01:29:17 2004 @@ -24,7 +24,7 @@ dnl see if one is installed if test x"${ac_cv_path_tclsh}" = x ; then AC_MSG_RESULT(none) - AC_PATH_PROGS([TCLSH],[tclsh tclsh8.4 tclsh8.4.8 tclsh8.4.7 tclsh8.4.6 tclsh8.4.5 tclsh8.4.4 tclsh8.4.3 tclsh8.4.2 tclsh8.4.1 tclsh8.4.0 tclsh8.3 tclsh8.3.5 tclsh8.3.4 tclsh8.3.3 .tclsh8.3.2 tclsh8.3.1 tclsh8.3.0]) + AC_PATH_PROGS([TCLSH],[tclsh8.4 tclsh8.4.8 tclsh8.4.7 tclsh8.4.6 tclsh8.4.5 tclsh8.4.4 tclsh8.4.3 tclsh8.4.2 tclsh8.4.1 tclsh8.4.0 tclsh8.3 tclsh8.3.5 tclsh8.3.4 tclsh8.3.3 .tclsh8.3.2 tclsh8.3.1 tclsh8.3.0 tclsh]) if test x"${TCLSH}" = x ; then ac_cv_path_tclsh=''; else From reid at x10sys.com Thu Dec 2 01:31:32 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 01:31:32 -0600 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200412020731.BAA20296@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.146 -> 1.147 --- Log message: Search for tclsh last so we don't find the FreeBSD warning script too early --- Diffs of the changes: (+1 -1) Index: llvm/configure diff -u llvm/configure:1.146 llvm/configure:1.147 --- llvm/configure:1.146 Wed Dec 1 22:17:20 2004 +++ llvm/configure Thu Dec 2 01:31:22 2004 @@ -5487,7 +5487,7 @@ if test x"${ac_cv_path_tclsh}" = x ; then echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 - for ac_prog in tclsh tclsh8.4 tclsh8.4.8 tclsh8.4.7 tclsh8.4.6 tclsh8.4.5 tclsh8.4.4 tclsh8.4.3 tclsh8.4.2 tclsh8.4.1 tclsh8.4.0 tclsh8.3 tclsh8.3.5 tclsh8.3.4 tclsh8.3.3 .tclsh8.3.2 tclsh8.3.1 tclsh8.3.0 + for ac_prog in tclsh8.4 tclsh8.4.8 tclsh8.4.7 tclsh8.4.6 tclsh8.4.5 tclsh8.4.4 tclsh8.4.3 tclsh8.4.2 tclsh8.4.1 tclsh8.4.0 tclsh8.3 tclsh8.3.5 tclsh8.3.4 tclsh8.3.3 .tclsh8.3.2 tclsh8.3.1 tclsh8.3.0 tclsh do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 From reid at x10sys.com Thu Dec 2 03:09:59 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:09:59 -0600 Subject: [llvm-commits] CVS: llvm/lib/System/Unix/Path.cpp Message-ID: <200412020909.DAA21582@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Unix: Path.cpp updated: 1.14 -> 1.15 --- Log message: Fix seriously broken implementation of GetMagicNumber. --- Diffs of the changes: (+6 -4) Index: llvm/lib/System/Unix/Path.cpp diff -u llvm/lib/System/Unix/Path.cpp:1.14 llvm/lib/System/Unix/Path.cpp:1.15 --- llvm/lib/System/Unix/Path.cpp:1.14 Tue Nov 16 11:14:08 2004 +++ llvm/lib/System/Unix/Path.cpp Thu Dec 2 03:09:48 2004 @@ -178,11 +178,13 @@ int fd = ::open(path.c_str(),O_RDONLY); if (fd < 0) return false; - if (0 != ::read(fd, buf, len)) + ssize_t bytes_read = ::read(fd, buf, len); + ::close(fd); + if (ssize_t(len) != bytes_read) { + Magic.clear(); return false; - close(fd); - buf[len] = '\0'; - Magic = buf; + } + Magic.assign(buf,len); return true; } From reid at x10sys.com Thu Dec 2 03:22:06 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:22:06 -0600 Subject: [llvm-commits] CVS: llvm/tools/llvm-ar/llvm-ar.cpp Message-ID: <200412020922.DAA21662@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-ar: llvm-ar.cpp updated: 1.20 -> 1.21 --- Log message: Implement file replacement correctly even with the f (TruncateNames) flag set. The member name comparison was failing for truncated names. This patch fixes that. Truncated names are now properly replaced. --- Diffs of the changes: (+23 -2) Index: llvm/tools/llvm-ar/llvm-ar.cpp diff -u llvm/tools/llvm-ar/llvm-ar.cpp:1.20 llvm/tools/llvm-ar/llvm-ar.cpp:1.21 --- llvm/tools/llvm-ar/llvm-ar.cpp:1.20 Sat Nov 20 12:01:22 2004 +++ llvm/tools/llvm-ar/llvm-ar.cpp Thu Dec 2 03:21:55 2004 @@ -578,8 +578,29 @@ // Determine if this archive member matches one of the paths we're trying // to replace. - std::set::iterator found = - std::find(remaining.begin(),remaining.end(), I->getPath()); + + std::set::iterator found = remaining.end(); + for (std::set::iterator RI = remaining.begin(), + RE = remaining.end(); RI != RE; ++RI ) { + std::string compare(RI->get()); + if (TruncateNames && compare.length() > 15) { + const char* nm = compare.c_str(); + unsigned len = compare.length(); + size_t slashpos = compare.rfind('/'); + if (slashpos != std::string::npos) { + nm += slashpos + 1; + len -= slashpos +1; + } + if (len > 15) + len = 15; + compare.assign(nm,len); + } + if (compare == I->getPath().get()) { + found = RI; + break; + } + } + if (found != remaining.end()) { sys::Path::StatusInfo si; found->getStatusInfo(si); From llvm at cs.uiuc.edu Thu Dec 2 03:24:02 2004 From: llvm at cs.uiuc.edu (LLVM) Date: Thu, 2 Dec 2004 03:24:02 -0600 Subject: [llvm-commits] CVS: llvm/runtime/libprofile/Makefile.in Message-ID: <200412020924.DAA21699@zion.cs.uiuc.edu> Changes in directory llvm/runtime/libprofile: Makefile.in (r1.1) removed --- Log message: Remove this left-over crud from the automake experiment. --- Diffs of the changes: (+0 -0) From reid at x10sys.com Thu Dec 2 03:28:32 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:28:32 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200412020928.DAA21742@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.243 -> 1.244 --- Log message: For PR466: http://llvm.cs.uiuc.edu/PR466 : Change construction of bytecode libraries from producing a single bytecode file to producing a library containing bytecode files. This gets around the problem of multiple symbol definitions in the linker if something like -lc -lc is attempted on the command line. Previously this happened because the linker would find libc.bc as a "library". It will now find libc.a which it can simply search for missing symbols instead of linking in wholesale. --- Diffs of the changes: (+27 -24) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.243 llvm/Makefile.rules:1.244 --- llvm/Makefile.rules:1.243 Mon Nov 29 13:47:58 2004 +++ llvm/Makefile.rules Thu Dec 2 03:28:21 2004 @@ -232,8 +232,8 @@ C.Flags += -v CXX.Flags += -v LD.Flags += -v - BCLinkLib.Flags += -v VERBOSE := 1 +else endif # Adjust settings for verbose mode @@ -286,12 +286,11 @@ $(CompileCommonOpts) $(LD.Flags) $(Strip) Relink = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \ $(CompileCommonOpts) -BCLinkLib = $(LLVMGCC) -shared -nostdlib $(BCLinkLib.Flags) LTInstall = $(LIBTOOL) $(LibTool.Flags) --mode=install $(INSTALL) Burg = $(BURG) -I $(BUILD_SRC_DIR) TableGen = $(TBLGEN) -I $(BUILD_SRC_DIR) Archive = $(AR) $(AR.Flags) -LArchive = $(ToolDir)/llvm-ar rcsf +LArchive = $(LLVMToolDir)/llvm-ar rcsf ifdef RANLIB Ranlib = $(RANLIB) else @@ -466,7 +465,7 @@ LibName.LA := $(LibDir)/lib$(LIBRARYNAME).la LibName.A := $(LibDir)/lib$(LIBRARYNAME).a LibName.O := $(LibDir)/$(LIBRARYNAME).o -LibName.BC := $(LibDir)/lib$(LIBRARYNAME).bc +LibName.BCA:= $(LibDir)/lib$(LIBRARYNAME).bca #--------------------------------------------------------- # Shared Library Targets: @@ -511,37 +510,41 @@ #--------------------------------------------------------- ifdef BYTECODE_LIBRARY -ifdef EXPORTED_SYMBOL_LIST - BCLinkLib += -Xlinker -internalize-public-api-list=$(EXPORTED_SYMBOL_LIST) +all-local:: $(LibName.BCA) + +ifdef EXPORTED_SYMBOL_FILE +BCLinkLib = $(LLVMGCC) -shared -nostdlib -Xlinker \ + -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE) + +$(LibName.BCA): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir $(GCCLD) + $(Echo) Building $(BuildMode) Bytecode Archive $(notdir $@) \ + "(internalize)" + $(BCLinkLib) -o $(ObjDir)/$(LIBRARYNAME).o $(ObjectsBC) + $(Verb) $(LArchive) $@ $(ObjDir)/$(LIBRARYNAME).o else - ifdef EXPORTED_SYMBOL_FILE - BCLinkLib += -Xlinker -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE) - else - BCLinkLib += -Xlinker -disable-internalize - endif -endif +$(LibName.BCA): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir $(GCCLD) + $(Echo) Building $(BuildMode) Bytecode Archive $(notdir $@) + $(Verb) $(LArchive) $@ $(ObjectsBC) -all-local:: $(LibName.BC) - -$(LibName.BC): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir $(GCCLD) - $(Echo) Linking $(BuildMode) Bytecode Library $(notdir $@) - $(Verb) $(BCLinkLib) -o $@ $(ObjectsBC) +endif clean-local:: -ifneq ($(strip $(LibName.BC)),) - -$(Verb) $(RM) -f $(LibName.BC) +ifneq ($(strip $(LibName.BCA)),) + -$(Verb) $(RM) -f $(LibName.BCA) endif -DestBytecodeLib = $(bytecode_libdir)/lib$(LIBRARYNAME).bc +DestBytecodeLib = $(bytecode_libdir)/lib$(LIBRARYNAME).a + +install-bytecode: $(DestBytecodeLib) install-local:: $(DestBytecodeLib) -$(DestBytecodeLib): $(bytecode_libdir) $(LibName.BC) - $(Echo) Installing $(BuildMode) Bytecode Library $(DestBytecodeLib) - $(Verb) $(INSTALL) $(LibName.BC) $@ +$(DestBytecodeLib): $(bytecode_libdir) $(LibName.BCA) + $(Echo) Installing $(BuildMode) Bytecode Archive $(DestBytecodeLib) + $(Verb) $(INSTALL) $(LibName.BCA) $@ uninstall-local:: - $(Echo) Uninstalling $(BuildMode) Bytecode Library $(DestBytecodeLib) + $(Echo) Uninstalling $(BuildMode) Bytecode Archive $(DestBytecodeLib) -$(Verb) $(RM) -f $(DestBytecodeLib) endif From reid at x10sys.com Thu Dec 2 03:30:00 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:30:00 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/crtend/Makefile Message-ID: <200412020930.DAA21774@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/crtend: Makefile updated: 1.20 -> 1.21 --- Log message: For PR466: http://llvm.cs.uiuc.edu/PR466 : Much of what this Makefile did to make a libcrtend.a file is now supported by Makefile.rules when BYTECODE_LIBRARY=1 is specified. So, we've simplified the make rules for building this library. --- Diffs of the changes: (+14 -31) Index: llvm/runtime/GCCLibraries/crtend/Makefile diff -u llvm/runtime/GCCLibraries/crtend/Makefile:1.20 llvm/runtime/GCCLibraries/crtend/Makefile:1.21 --- llvm/runtime/GCCLibraries/crtend/Makefile:1.20 Sun Nov 14 16:13:13 2004 +++ llvm/runtime/GCCLibraries/crtend/Makefile Thu Dec 2 03:29:49 2004 @@ -10,47 +10,30 @@ # This directory contains the C and C++ runtime libraries for the LLVM GCC # front-ends. See the README.txt file for more details. # -# Since this archive has strange requirements, we use almost all custom rules -# for building it. +# Since this archive has strange requirements, we use some custom rules for +# building it. # ##===----------------------------------------------------------------------===## -LEVEL = ../../.. +LEVEL=../../.. DONT_BUILD_RELINKED=1 +BYTECODE_LIBRARY=1 +LIBRARYNAME=crtend + +# Note: We're fooling Makefile.rules here. The sources listed don't exist but +# it doesn't matter. Makefile.rules just uses $(SOURCES) to generate the set of +# object files to put in the library. Since we've specified BYTECODE_LIBRARY +# above, it changes the .c suffix to .bc suffix. Below are rules to build +# each of those bytecode objects from the sources we do have in this directory. +SOURCES=comp_main.c comp_genericeh.c comp_sjljeh.c EXTRA_DIST := comp_main.lst comp_genericeh.lst comp_sjljeh.lst +include $(LEVEL)/Makefile.common + MainSrc := crtend.c listend.ll GenericEHSrc := Exception.cpp SJLJEHSrc := SJLJ-Exception.cpp -Source := $(MainSrc) $(GenericEHSrc) $(SJLJEHSrc) $(CXXEHSrc) - -include $(LEVEL)/Makefile.common - -# CRTEND_A - The result of making 'all' - the final archive file. -CRTEND_A = $(LibDir)/libcrtend.a -all:: $(CRTEND_A) - -# Installation simply requires copying the archive to it's new home. -$(bytecode_libdir)/libcrtend.a: $(CRTEND_A) $(bytecode_libdir) - $(Echo) Installing $(CRTEND_A) - $(Verb) $(INSTALL) $(CRTEND_A) $(bytecode_libdir) - -install:: $(DESTDIR)$(bytecode_libdir)/libcrtend.a -install-bytecode:: $(DESTDIR)$(bytecode_libdir)/libcrtend.a - -clean-local:: - $(Verb)$(RM) -f $(CRTEND_A) - -# The three components described in the README -Components := main genericeh sjljeh -ComponentLibs := $(Components:%=$(ObjDir)/comp_%.bc) - - -# We build libcrtend.a from the four components described in the README. -$(CRTEND_A) : $(ComponentLibs) $(LibDir)/.dir - $(Echo) Building final libcrtend.a file from components - $(Verb) $(LArchive) $@ $(ComponentLibs) MainObj := $(ObjDir)/crtend.bc $(ObjDir)/listend.bc GenericEHObj := $(ObjDir)/Exception.bc From reid at x10sys.com Thu Dec 2 03:31:53 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:31:53 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libpthread/Makefile Message-ID: <200412020931.DAA21890@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libpthread: Makefile updated: 1.1 -> 1.2 --- Log message: Standardize the format of the runtime libraries makefiles. * Don't have lines longer than 80 cols * Blank line after the header * Reduce spaces in var definitions. --- Diffs of the changes: (+2 -1) Index: llvm/runtime/GCCLibraries/libpthread/Makefile diff -u llvm/runtime/GCCLibraries/libpthread/Makefile:1.1 llvm/runtime/GCCLibraries/libpthread/Makefile:1.2 --- llvm/runtime/GCCLibraries/libpthread/Makefile:1.1 Wed Dec 10 08:46:36 2003 +++ llvm/runtime/GCCLibraries/libpthread/Makefile Thu Dec 2 03:31:40 2004 @@ -6,7 +6,8 @@ # the University of Illinois Open Source License. See LICENSE.TXT for details. # ##===----------------------------------------------------------------------===## -LEVEL = ../../.. + +LEVEL=../../.. BYTECODE_LIBRARY=1 DONT_BUILD_RELINKED=1 LIBRARYNAME=pthread From reid at x10sys.com Thu Dec 2 03:31:54 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:31:54 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libtermcap/Makefile Message-ID: <200412020931.DAA21894@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libtermcap: Makefile updated: 1.2 -> 1.3 --- Log message: Standardize the format of the runtime libraries makefiles. * Don't have lines longer than 80 cols * Blank line after the header * Reduce spaces in var definitions. --- Diffs of the changes: (+3 -2) Index: llvm/runtime/GCCLibraries/libtermcap/Makefile diff -u llvm/runtime/GCCLibraries/libtermcap/Makefile:1.2 llvm/runtime/GCCLibraries/libtermcap/Makefile:1.3 --- llvm/runtime/GCCLibraries/libtermcap/Makefile:1.2 Mon Oct 20 17:28:48 2003 +++ llvm/runtime/GCCLibraries/libtermcap/Makefile Thu Dec 2 03:31:40 2004 @@ -1,4 +1,4 @@ -##===- runtime/GCCLibraries/libtermcap/Makefile ------------------------------*- Makefile -*-===## +##===- runtime/GCCLibraries/libtermcap/Makefile ------------*- Makefile -*-===## # # The LLVM Compiler Infrastructure # @@ -6,7 +6,8 @@ # the University of Illinois Open Source License. See LICENSE.TXT for details. # ##===----------------------------------------------------------------------===## -LEVEL = ../../.. + +LEVEL=../../.. BYTECODE_LIBRARY=1 DONT_BUILD_RELINKED=1 LIBRARYNAME=termcap From reid at x10sys.com Thu Dec 2 03:31:54 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:31:54 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libg/Makefile Message-ID: <200412020931.DAA21898@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libg: Makefile updated: 1.4 -> 1.5 --- Log message: Standardize the format of the runtime libraries makefiles. * Don't have lines longer than 80 cols * Blank line after the header * Reduce spaces in var definitions. --- Diffs of the changes: (+2 -1) Index: llvm/runtime/GCCLibraries/libg/Makefile diff -u llvm/runtime/GCCLibraries/libg/Makefile:1.4 llvm/runtime/GCCLibraries/libg/Makefile:1.5 --- llvm/runtime/GCCLibraries/libg/Makefile:1.4 Mon Aug 9 15:13:14 2004 +++ llvm/runtime/GCCLibraries/libg/Makefile Thu Dec 2 03:31:40 2004 @@ -6,7 +6,8 @@ # the University of Illinois Open Source License. See LICENSE.TXT for details. # ##===----------------------------------------------------------------------===## -LEVEL = ../../.. + +LEVEL=../../.. BYTECODE_LIBRARY=1 DONT_BUILD_RELINKED=1 LIBRARYNAME=g From reid at x10sys.com Thu Dec 2 03:31:54 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:31:54 -0600 Subject: [llvm-commits] CVS: llvm/runtime/libprofile/Makefile Message-ID: <200412020931.DAA21899@zion.cs.uiuc.edu> Changes in directory llvm/runtime/libprofile: Makefile updated: 1.2 -> 1.3 --- Log message: Standardize the format of the runtime libraries makefiles. * Don't have lines longer than 80 cols * Blank line after the header * Reduce spaces in var definitions. --- Diffs of the changes: (+1 -2) Index: llvm/runtime/libprofile/Makefile diff -u llvm/runtime/libprofile/Makefile:1.2 llvm/runtime/libprofile/Makefile:1.3 --- llvm/runtime/libprofile/Makefile:1.2 Mon Oct 25 22:12:11 2004 +++ llvm/runtime/libprofile/Makefile Thu Dec 2 03:31:40 2004 @@ -6,13 +6,12 @@ # the University of Illinois Open Source License. See LICENSE.TXT for details. # ##===----------------------------------------------------------------------===## + LEVEL = ../.. BYTECODE_LIBRARY=1 SHARED_LIBRARY=1 -#DONT_BUILD_RELINKED=1 LIBRARYNAME=profile_rt EXTRA_DIST = exported_symbols.lst EXPORTED_SYMBOL_FILE = $(BUILD_SRC_DIR)/exported_symbols.lst include $(LEVEL)/Makefile.common - From reid at x10sys.com Thu Dec 2 03:31:54 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:31:54 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libutempter/Makefile Message-ID: <200412020931.DAA21897@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libutempter: Makefile updated: 1.3 -> 1.4 --- Log message: Standardize the format of the runtime libraries makefiles. * Don't have lines longer than 80 cols * Blank line after the header * Reduce spaces in var definitions. --- Diffs of the changes: (+2 -1) Index: llvm/runtime/GCCLibraries/libutempter/Makefile diff -u llvm/runtime/GCCLibraries/libutempter/Makefile:1.3 llvm/runtime/GCCLibraries/libutempter/Makefile:1.4 --- llvm/runtime/GCCLibraries/libutempter/Makefile:1.3 Mon Aug 9 15:13:14 2004 +++ llvm/runtime/GCCLibraries/libutempter/Makefile Thu Dec 2 03:31:40 2004 @@ -6,7 +6,8 @@ # the University of Illinois Open Source License. See LICENSE.TXT for details. # ##===----------------------------------------------------------------------===## -LEVEL = ../../.. + +LEVEL=../../.. BYTECODE_LIBRARY=1 DONT_BUILD_RELINKED=1 LIBRARYNAME=utempter From reid at x10sys.com Thu Dec 2 03:31:54 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:31:54 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libm/Makefile Message-ID: <200412020931.DAA21907@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libm: Makefile updated: 1.5 -> 1.6 --- Log message: Standardize the format of the runtime libraries makefiles. * Don't have lines longer than 80 cols * Blank line after the header * Reduce spaces in var definitions. --- Diffs of the changes: (+5 -4) Index: llvm/runtime/GCCLibraries/libm/Makefile diff -u llvm/runtime/GCCLibraries/libm/Makefile:1.5 llvm/runtime/GCCLibraries/libm/Makefile:1.6 --- llvm/runtime/GCCLibraries/libm/Makefile:1.5 Tue Oct 21 13:25:37 2003 +++ llvm/runtime/GCCLibraries/libm/Makefile Thu Dec 2 03:31:40 2004 @@ -6,10 +6,11 @@ # the University of Illinois Open Source License. See LICENSE.TXT for details. # ##===----------------------------------------------------------------------===## -LEVEL = ../../.. -BYTECODE_LIBRARY = 1 -DONT_BUILD_RELINKED = 1 -LIBRARYNAME = m + +LEVEL=../../.. +BYTECODE_LIBRARY=1 +DONT_BUILD_RELINKED=1 +LIBRARYNAME=m include $(LEVEL)/Makefile.common From reid at x10sys.com Thu Dec 2 03:31:54 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:31:54 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libcurses/Makefile Message-ID: <200412020931.DAA21909@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libcurses: Makefile updated: 1.2 -> 1.3 --- Log message: Standardize the format of the runtime libraries makefiles. * Don't have lines longer than 80 cols * Blank line after the header * Reduce spaces in var definitions. --- Diffs of the changes: (+3 -2) Index: llvm/runtime/GCCLibraries/libcurses/Makefile diff -u llvm/runtime/GCCLibraries/libcurses/Makefile:1.2 llvm/runtime/GCCLibraries/libcurses/Makefile:1.3 --- llvm/runtime/GCCLibraries/libcurses/Makefile:1.2 Mon Oct 20 17:28:47 2003 +++ llvm/runtime/GCCLibraries/libcurses/Makefile Thu Dec 2 03:31:40 2004 @@ -1,4 +1,4 @@ -##===- runtime/GCCLibraries/libcurses/Makefile ------------------------------*- Makefile -*-===## +##===- runtime/GCCLibraries/libcurses/Makefile -------------*- Makefile -*-===## # # The LLVM Compiler Infrastructure # @@ -6,7 +6,8 @@ # the University of Illinois Open Source License. See LICENSE.TXT for details. # ##===----------------------------------------------------------------------===## -LEVEL = ../../.. + +LEVEL=../../.. BYTECODE_LIBRARY=1 DONT_BUILD_RELINKED=1 LIBRARYNAME=curses From reid at x10sys.com Thu Dec 2 03:31:54 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:31:54 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libucb/Makefile Message-ID: <200412020931.DAA21920@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libucb: Makefile updated: 1.4 -> 1.5 --- Log message: Standardize the format of the runtime libraries makefiles. * Don't have lines longer than 80 cols * Blank line after the header * Reduce spaces in var definitions. --- Diffs of the changes: (+2 -1) Index: llvm/runtime/GCCLibraries/libucb/Makefile diff -u llvm/runtime/GCCLibraries/libucb/Makefile:1.4 llvm/runtime/GCCLibraries/libucb/Makefile:1.5 --- llvm/runtime/GCCLibraries/libucb/Makefile:1.4 Mon Aug 9 15:13:14 2004 +++ llvm/runtime/GCCLibraries/libucb/Makefile Thu Dec 2 03:31:40 2004 @@ -6,7 +6,8 @@ # the University of Illinois Open Source License. See LICENSE.TXT for details. # ##===----------------------------------------------------------------------===## -LEVEL = ../../.. + +LEVEL=../../.. BYTECODE_LIBRARY=1 DONT_BUILD_RELINKED=1 LIBRARYNAME=ucb From reid at x10sys.com Thu Dec 2 03:31:54 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:31:54 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libgcc/Makefile Message-ID: <200412020931.DAA21908@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libgcc: Makefile updated: 1.4 -> 1.5 --- Log message: Standardize the format of the runtime libraries makefiles. * Don't have lines longer than 80 cols * Blank line after the header * Reduce spaces in var definitions. --- Diffs of the changes: (+2 -1) Index: llvm/runtime/GCCLibraries/libgcc/Makefile diff -u llvm/runtime/GCCLibraries/libgcc/Makefile:1.4 llvm/runtime/GCCLibraries/libgcc/Makefile:1.5 --- llvm/runtime/GCCLibraries/libgcc/Makefile:1.4 Mon Aug 9 15:13:14 2004 +++ llvm/runtime/GCCLibraries/libgcc/Makefile Thu Dec 2 03:31:40 2004 @@ -6,7 +6,8 @@ # the University of Illinois Open Source License. See LICENSE.TXT for details. # ##===----------------------------------------------------------------------===## -LEVEL = ../../.. + +LEVEL=../../.. BYTECODE_LIBRARY=1 DONT_BUILD_RELINKED=1 LIBRARYNAME=gcc From reid at x10sys.com Thu Dec 2 03:31:54 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:31:54 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libgdbm/Makefile Message-ID: <200412020931.DAA21906@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libgdbm: Makefile updated: 1.1 -> 1.2 --- Log message: Standardize the format of the runtime libraries makefiles. * Don't have lines longer than 80 cols * Blank line after the header * Reduce spaces in var definitions. --- Diffs of the changes: (+5 -4) Index: llvm/runtime/GCCLibraries/libgdbm/Makefile diff -u llvm/runtime/GCCLibraries/libgdbm/Makefile:1.1 llvm/runtime/GCCLibraries/libgdbm/Makefile:1.2 --- llvm/runtime/GCCLibraries/libgdbm/Makefile:1.1 Tue Oct 21 13:26:07 2003 +++ llvm/runtime/GCCLibraries/libgdbm/Makefile Thu Dec 2 03:31:40 2004 @@ -6,10 +6,11 @@ # the University of Illinois Open Source License. See LICENSE.TXT for details. # ##===----------------------------------------------------------------------===## -LEVEL = ../../.. -BYTECODE_LIBRARY = 1 -DONT_BUILD_RELINKED = 1 -LIBRARYNAME = gdbm + +LEVEL=../../.. +BYTECODE_LIBRARY=1 +DONT_BUILD_RELINKED=1 +LIBRARYNAME=gdbm include $(LEVEL)/Makefile.common From reid at x10sys.com Thu Dec 2 03:31:54 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:31:54 -0600 Subject: [llvm-commits] CVS: llvm/runtime/libtrace/Makefile Message-ID: <200412020931.DAA21912@zion.cs.uiuc.edu> Changes in directory llvm/runtime/libtrace: Makefile updated: 1.9 -> 1.10 --- Log message: Standardize the format of the runtime libraries makefiles. * Don't have lines longer than 80 cols * Blank line after the header * Reduce spaces in var definitions. --- Diffs of the changes: (+1 -1) Index: llvm/runtime/libtrace/Makefile diff -u llvm/runtime/libtrace/Makefile:1.9 llvm/runtime/libtrace/Makefile:1.10 --- llvm/runtime/libtrace/Makefile:1.9 Fri Apr 16 12:13:52 2004 +++ llvm/runtime/libtrace/Makefile Thu Dec 2 03:31:40 2004 @@ -6,9 +6,9 @@ # the University of Illinois Open Source License. See LICENSE.TXT for details. # ##===----------------------------------------------------------------------===## + LEVEL = ../.. BYTECODE_LIBRARY=1 -#DONT_BUILD_RELINKED=1 LIBRARYNAME=trace include $(LEVEL)/Makefile.common From reid at x10sys.com Thu Dec 2 03:31:54 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:31:54 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libmalloc/Makefile Message-ID: <200412020931.DAA21913@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libmalloc: Makefile updated: 1.3 -> 1.4 --- Log message: Standardize the format of the runtime libraries makefiles. * Don't have lines longer than 80 cols * Blank line after the header * Reduce spaces in var definitions. --- Diffs of the changes: (+3 -2) Index: llvm/runtime/GCCLibraries/libmalloc/Makefile diff -u llvm/runtime/GCCLibraries/libmalloc/Makefile:1.3 llvm/runtime/GCCLibraries/libmalloc/Makefile:1.4 --- llvm/runtime/GCCLibraries/libmalloc/Makefile:1.3 Mon Oct 20 17:28:48 2003 +++ llvm/runtime/GCCLibraries/libmalloc/Makefile Thu Dec 2 03:31:40 2004 @@ -1,4 +1,4 @@ -##===- runtime/GCCLibraries/libmalloc/Makefile ------------------------------*- Makefile -*-===## +##===- runtime/GCCLibraries/libmalloc/Makefile -------------*- Makefile -*-===## # # The LLVM Compiler Infrastructure # @@ -6,7 +6,8 @@ # the University of Illinois Open Source License. See LICENSE.TXT for details. # ##===----------------------------------------------------------------------===## -LEVEL = ../../.. + +LEVEL=../../.. BYTECODE_LIBRARY=1 DONT_BUILD_RELINKED=1 LIBRARYNAME=malloc From reid at x10sys.com Thu Dec 2 03:31:54 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:31:54 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libutil/Makefile Message-ID: <200412020931.DAA21893@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libutil: Makefile updated: 1.2 -> 1.3 --- Log message: Standardize the format of the runtime libraries makefiles. * Don't have lines longer than 80 cols * Blank line after the header * Reduce spaces in var definitions. --- Diffs of the changes: (+3 -2) Index: llvm/runtime/GCCLibraries/libutil/Makefile diff -u llvm/runtime/GCCLibraries/libutil/Makefile:1.2 llvm/runtime/GCCLibraries/libutil/Makefile:1.3 --- llvm/runtime/GCCLibraries/libutil/Makefile:1.2 Mon Oct 20 17:28:48 2003 +++ llvm/runtime/GCCLibraries/libutil/Makefile Thu Dec 2 03:31:40 2004 @@ -1,4 +1,4 @@ -##===- runtime/GCCLibraries/libutil/Makefile ------------------------------*- Makefile -*-===## +##===- runtime/GCCLibraries/libutil/Makefile ---------------*- Makefile -*-===## # # The LLVM Compiler Infrastructure # @@ -6,7 +6,8 @@ # the University of Illinois Open Source License. See LICENSE.TXT for details. # ##===----------------------------------------------------------------------===## -LEVEL = ../../.. + +LEVEL=../../.. BYTECODE_LIBRARY=1 DONT_BUILD_RELINKED=1 LIBRARYNAME=util From reid at x10sys.com Thu Dec 2 03:52:21 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:52:21 -0600 Subject: [llvm-commits] CVS: llvm/lib/Linker/LinkArchives.cpp Message-ID: <200412020952.DAA22060@zion.cs.uiuc.edu> Changes in directory llvm/lib/Linker: LinkArchives.cpp updated: 1.41 -> 1.42 --- Log message: PR466: http://llvm.cs.uiuc.edu/PR466 : * Make the linker find lib*.bca files now instead of lib*.bc since those are what the makefiles now generate for bytecode archives. * Make sure the linker only links archives when LinkLibraries is called. Previously if it found a lib*.bc file and that file was a bytecode file, it would link in the entire bytecode. This could make -lc -lc fail with duplicate symbols error but it shouldn't as searching multiple libraries, even the same one more than once, is permitted. * Now that the above problems are corrected, implement the dependent libs feature. After the module is linked with all specified libraries, the LinkLibraries function will obtain the set of dependent libraries from the linked modules and attemp to find and link against those libraries. --- Diffs of the changes: (+54 -41) Index: llvm/lib/Linker/LinkArchives.cpp diff -u llvm/lib/Linker/LinkArchives.cpp:1.41 llvm/lib/Linker/LinkArchives.cpp:1.42 --- llvm/lib/Linker/LinkArchives.cpp:1.41 Tue Nov 30 16:54:48 2004 +++ llvm/lib/Linker/LinkArchives.cpp Thu Dec 2 03:52:10 2004 @@ -57,8 +57,8 @@ for (unsigned Index = 0; Index != Paths.size(); ++Index) { std::string Directory = Paths[Index] + "/"; - if (!SharedObjectOnly && FileOpenable(Directory + LibName + ".bc")) - return Directory + LibName + ".bc"; + if (!SharedObjectOnly && FileOpenable(Directory + LibName + ".bca")) + return Directory + LibName + ".bca"; if (FileOpenable(Directory + LibName + LTDL_SHLIB_EXT)) return Directory + LibName + LTDL_SHLIB_EXT; @@ -352,6 +352,46 @@ return false; } +/// LinkOneLibrary - links one library of any kind into the HeadModule +static inline void LinkOneLibrary(const char*progname, Module* HeadModule, + const std::string& Lib, + const std::vector& LibPaths, + bool Verbose, bool Native) { + + // String in which to receive error messages. + std::string ErrorMessage; + + // Determine where this library lives. + std::string Pathname = FindLib(Lib, LibPaths); + if (Pathname.empty()) { + // If the pathname does not exist, then simply return if we're doing a + // native link and give a warning if we're doing a bytecode link. + if (!Native) { + std::cerr << progname << ": WARNING: Cannot find library -l" + << Lib << "\n"; + return; + } + } + + // A user may specify an ar archive without -l, perhaps because it + // is not installed as a library. Detect that and link the library. + if (IsArchive(Pathname)) { + if (Verbose) + std::cerr << "Trying to link archive '" << Pathname << "' (-l" + << Lib << ")\n"; + + if (LinkInArchive(HeadModule, Pathname, &ErrorMessage, Verbose)) { + std::cerr << progname << ": " << ErrorMessage + << ": Error linking in archive '" << Pathname << "' (-l" + << Lib << ")\n"; + exit(1); + } + } else { + std::cerr << progname << ": WARNING: Supposed library -l" + << Lib << " isn't a library.\n"; + } +} + /// LinkLibraries - takes the specified library files and links them into the /// main bytecode object file. /// @@ -374,47 +414,20 @@ const std::vector &Libraries, const std::vector &LibPaths, bool Verbose, bool Native) { - // String in which to receive error messages. - std::string ErrorMessage; + // Process the set of libraries we've been provided for (unsigned i = 0; i < Libraries.size(); ++i) { - // Determine where this library lives. - std::string Pathname = FindLib(Libraries[i], LibPaths); - if (Pathname.empty()) { - // If the pathname does not exist, then continue to the next one if - // we're doing a native link and give an error if we're doing a bytecode - // link. - if (!Native) { - std::cerr << progname << ": WARNING: Cannot find library -l" - << Libraries[i] << "\n"; - continue; - } - } - - // A user may specify an ar archive without -l, perhaps because it - // is not installed as a library. Detect that and link the library. - if (IsArchive(Pathname)) { - if (Verbose) - std::cerr << "Trying to link archive '" << Pathname << "' (-l" - << Libraries[i] << ")\n"; - - if (LinkInArchive(HeadModule, Pathname, &ErrorMessage, Verbose)) { - std::cerr << progname << ": " << ErrorMessage - << ": Error linking in archive '" << Pathname << "' (-l" - << Libraries[i] << ")\n"; - exit(1); - } - } else if (IsBytecode(Pathname)) { - if (Verbose) - std::cerr << "Trying to link bytecode file '" << Pathname - << "' (-l" << Libraries[i] << ")\n"; + LinkOneLibrary(progname,HeadModule,Libraries[i],LibPaths,Verbose,Native); + } - if (LinkInFile(HeadModule, Pathname, ErrorMessage, Verbose)) { - std::cerr << progname << ": " << ErrorMessage - << ": error linking in bytecode file '" << Pathname << "' (-l" - << Libraries[i] << ")\n"; - exit(1); - } - } + // At this point we have processed all the libraries provided to us. Since + // we have an aggregated module at this point, the dependent libraries in + // that module should also be aggregated with duplicates eliminated. This is + // now the time to process the dependent libraries to resolve any remaining + // symbols. + const Module::LibraryListType& DepLibs = HeadModule->getLibraries(); + for (Module::LibraryListType::const_iterator I = DepLibs.begin(), + E = DepLibs.end(); I != E; ++I) { + LinkOneLibrary(progname,HeadModule,*I,LibPaths,Verbose,Native); } } From reid at x10sys.com Thu Dec 2 03:58:23 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:58:23 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libc/Makefile Message-ID: <200412020958.DAA22176@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libc: Makefile updated: 1.4 -> 1.5 --- Log message: Standardize the makefiles with space around = to match the rest of LLVM. --- Diffs of the changes: (+3 -3) Index: llvm/runtime/GCCLibraries/libc/Makefile diff -u llvm/runtime/GCCLibraries/libc/Makefile:1.4 llvm/runtime/GCCLibraries/libc/Makefile:1.5 --- llvm/runtime/GCCLibraries/libc/Makefile:1.4 Fri Oct 22 16:02:08 2004 +++ llvm/runtime/GCCLibraries/libc/Makefile Thu Dec 2 03:58:08 2004 @@ -8,9 +8,9 @@ ##===----------------------------------------------------------------------===## LEVEL = ../../.. -BYTECODE_LIBRARY=1 -DONT_BUILD_RELINKED=1 -LIBRARYNAME=c +BYTECODE_LIBRARY = 1 +DONT_BUILD_RELINKED = 1 +LIBRARYNAME = c include $(LEVEL)/Makefile.common From reid at x10sys.com Thu Dec 2 03:58:23 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:58:23 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libgdbm/Makefile Message-ID: <200412020958.DAA22177@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libgdbm: Makefile updated: 1.2 -> 1.3 --- Log message: Standardize the makefiles with space around = to match the rest of LLVM. --- Diffs of the changes: (+4 -4) Index: llvm/runtime/GCCLibraries/libgdbm/Makefile diff -u llvm/runtime/GCCLibraries/libgdbm/Makefile:1.2 llvm/runtime/GCCLibraries/libgdbm/Makefile:1.3 --- llvm/runtime/GCCLibraries/libgdbm/Makefile:1.2 Thu Dec 2 03:31:40 2004 +++ llvm/runtime/GCCLibraries/libgdbm/Makefile Thu Dec 2 03:58:08 2004 @@ -7,10 +7,10 @@ # ##===----------------------------------------------------------------------===## -LEVEL=../../.. -BYTECODE_LIBRARY=1 -DONT_BUILD_RELINKED=1 -LIBRARYNAME=gdbm +LEVEL = ../../.. +BYTECODE_LIBRARY = 1 +DONT_BUILD_RELINKED = 1 +LIBRARYNAME = gdbm include $(LEVEL)/Makefile.common From reid at x10sys.com Thu Dec 2 03:58:24 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:58:24 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libucb/Makefile Message-ID: <200412020958.DAA22178@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libucb: Makefile updated: 1.5 -> 1.6 --- Log message: Standardize the makefiles with space around = to match the rest of LLVM. --- Diffs of the changes: (+4 -4) Index: llvm/runtime/GCCLibraries/libucb/Makefile diff -u llvm/runtime/GCCLibraries/libucb/Makefile:1.5 llvm/runtime/GCCLibraries/libucb/Makefile:1.6 --- llvm/runtime/GCCLibraries/libucb/Makefile:1.5 Thu Dec 2 03:31:40 2004 +++ llvm/runtime/GCCLibraries/libucb/Makefile Thu Dec 2 03:58:09 2004 @@ -7,9 +7,9 @@ # ##===----------------------------------------------------------------------===## -LEVEL=../../.. -BYTECODE_LIBRARY=1 -DONT_BUILD_RELINKED=1 -LIBRARYNAME=ucb +LEVEL = ../../.. +BYTECODE_LIBRARY = 1 +DONT_BUILD_RELINKED = 1 +LIBRARYNAME = ucb include $(LEVEL)/Makefile.common From reid at x10sys.com Thu Dec 2 03:58:24 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:58:24 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libtermcap/Makefile Message-ID: <200412020958.DAA22180@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libtermcap: Makefile updated: 1.3 -> 1.4 --- Log message: Standardize the makefiles with space around = to match the rest of LLVM. --- Diffs of the changes: (+4 -4) Index: llvm/runtime/GCCLibraries/libtermcap/Makefile diff -u llvm/runtime/GCCLibraries/libtermcap/Makefile:1.3 llvm/runtime/GCCLibraries/libtermcap/Makefile:1.4 --- llvm/runtime/GCCLibraries/libtermcap/Makefile:1.3 Thu Dec 2 03:31:40 2004 +++ llvm/runtime/GCCLibraries/libtermcap/Makefile Thu Dec 2 03:58:09 2004 @@ -7,9 +7,9 @@ # ##===----------------------------------------------------------------------===## -LEVEL=../../.. -BYTECODE_LIBRARY=1 -DONT_BUILD_RELINKED=1 -LIBRARYNAME=termcap +LEVEL = ../../.. +BYTECODE_LIBRARY = 1 +DONT_BUILD_RELINKED = 1 +LIBRARYNAME = termcap include $(LEVEL)/Makefile.common From reid at x10sys.com Thu Dec 2 03:58:24 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:58:24 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GC/SemiSpace/Makefile Message-ID: <200412020958.DAA22179@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GC/SemiSpace: Makefile updated: 1.2 -> 1.3 --- Log message: Standardize the makefiles with space around = to match the rest of LLVM. --- Diffs of the changes: (+2 -2) Index: llvm/runtime/GC/SemiSpace/Makefile diff -u llvm/runtime/GC/SemiSpace/Makefile:1.2 llvm/runtime/GC/SemiSpace/Makefile:1.3 --- llvm/runtime/GC/SemiSpace/Makefile:1.2 Fri Oct 22 16:02:08 2004 +++ llvm/runtime/GC/SemiSpace/Makefile Thu Dec 2 03:58:08 2004 @@ -8,8 +8,8 @@ ##===----------------------------------------------------------------------===## LEVEL = ../../.. -BYTECODE_LIBRARY=1 -LIBRARYNAME=gcsemispace +BYTECODE_LIBRARY = 1 +LIBRARYNAME = gcsemispace EXPORTED_SYMBOL_FILE = $(BUILD_SRC_DIR)/../gc_exported_symbols.lst From reid at x10sys.com Thu Dec 2 03:58:24 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:58:24 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libg/Makefile Message-ID: <200412020958.DAA22195@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libg: Makefile updated: 1.5 -> 1.6 --- Log message: Standardize the makefiles with space around = to match the rest of LLVM. --- Diffs of the changes: (+4 -4) Index: llvm/runtime/GCCLibraries/libg/Makefile diff -u llvm/runtime/GCCLibraries/libg/Makefile:1.5 llvm/runtime/GCCLibraries/libg/Makefile:1.6 --- llvm/runtime/GCCLibraries/libg/Makefile:1.5 Thu Dec 2 03:31:40 2004 +++ llvm/runtime/GCCLibraries/libg/Makefile Thu Dec 2 03:58:08 2004 @@ -7,9 +7,9 @@ # ##===----------------------------------------------------------------------===## -LEVEL=../../.. -BYTECODE_LIBRARY=1 -DONT_BUILD_RELINKED=1 -LIBRARYNAME=g +LEVEL = ../../.. +BYTECODE_LIBRARY = 1 +DONT_BUILD_RELINKED = 1 +LIBRARYNAME = g include $(LEVEL)/Makefile.common From reid at x10sys.com Thu Dec 2 03:58:24 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:58:24 -0600 Subject: [llvm-commits] CVS: llvm/runtime/libtrace/Makefile Message-ID: <200412020958.DAA22210@zion.cs.uiuc.edu> Changes in directory llvm/runtime/libtrace: Makefile updated: 1.10 -> 1.11 --- Log message: Standardize the makefiles with space around = to match the rest of LLVM. --- Diffs of the changes: (+2 -2) Index: llvm/runtime/libtrace/Makefile diff -u llvm/runtime/libtrace/Makefile:1.10 llvm/runtime/libtrace/Makefile:1.11 --- llvm/runtime/libtrace/Makefile:1.10 Thu Dec 2 03:31:40 2004 +++ llvm/runtime/libtrace/Makefile Thu Dec 2 03:58:09 2004 @@ -8,8 +8,8 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. -BYTECODE_LIBRARY=1 -LIBRARYNAME=trace +BYTECODE_LIBRARY = 1 +LIBRARYNAME = trace include $(LEVEL)/Makefile.common From reid at x10sys.com Thu Dec 2 03:58:24 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:58:24 -0600 Subject: [llvm-commits] CVS: llvm/runtime/libdummy/Makefile Message-ID: <200412020958.DAA22209@zion.cs.uiuc.edu> Changes in directory llvm/runtime/libdummy: Makefile updated: 1.4 -> 1.5 --- Log message: Standardize the makefiles with space around = to match the rest of LLVM. --- Diffs of the changes: (+5 -4) Index: llvm/runtime/libdummy/Makefile diff -u llvm/runtime/libdummy/Makefile:1.4 llvm/runtime/libdummy/Makefile:1.5 --- llvm/runtime/libdummy/Makefile:1.4 Mon Oct 20 17:28:48 2003 +++ llvm/runtime/libdummy/Makefile Thu Dec 2 03:58:09 2004 @@ -1,4 +1,4 @@ -##===- runtime/libdummy/Makefile ------------------------------*- Makefile -*-===## +##===- runtime/libdummy/Makefile ---------------------------*- Makefile -*-===## # # The LLVM Compiler Infrastructure # @@ -6,9 +6,10 @@ # the University of Illinois Open Source License. See LICENSE.TXT for details. # ##===----------------------------------------------------------------------===## + LEVEL = ../.. -BYTECODE_LIBRARY=1 -DONT_BUILD_RELINKED=1 -LIBRARYNAME=dummy +BYTECODE_LIBRARY = 1 +DONT_BUILD_RELINKED = 1 +LIBRARYNAME = dummy include $(LEVEL)/Makefile.common From reid at x10sys.com Thu Dec 2 03:58:24 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:58:24 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libutil/Makefile Message-ID: <200412020958.DAA22192@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libutil: Makefile updated: 1.3 -> 1.4 --- Log message: Standardize the makefiles with space around = to match the rest of LLVM. --- Diffs of the changes: (+4 -4) Index: llvm/runtime/GCCLibraries/libutil/Makefile diff -u llvm/runtime/GCCLibraries/libutil/Makefile:1.3 llvm/runtime/GCCLibraries/libutil/Makefile:1.4 --- llvm/runtime/GCCLibraries/libutil/Makefile:1.3 Thu Dec 2 03:31:40 2004 +++ llvm/runtime/GCCLibraries/libutil/Makefile Thu Dec 2 03:58:09 2004 @@ -7,9 +7,9 @@ # ##===----------------------------------------------------------------------===## -LEVEL=../../.. -BYTECODE_LIBRARY=1 -DONT_BUILD_RELINKED=1 -LIBRARYNAME=util +LEVEL = ../../.. +BYTECODE_LIBRARY = 1 +DONT_BUILD_RELINKED = 1 +LIBRARYNAME = util include $(LEVEL)/Makefile.common From reid at x10sys.com Thu Dec 2 03:58:24 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:58:24 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libm/Makefile Message-ID: <200412020958.DAA22204@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libm: Makefile updated: 1.6 -> 1.7 --- Log message: Standardize the makefiles with space around = to match the rest of LLVM. --- Diffs of the changes: (+4 -4) Index: llvm/runtime/GCCLibraries/libm/Makefile diff -u llvm/runtime/GCCLibraries/libm/Makefile:1.6 llvm/runtime/GCCLibraries/libm/Makefile:1.7 --- llvm/runtime/GCCLibraries/libm/Makefile:1.6 Thu Dec 2 03:31:40 2004 +++ llvm/runtime/GCCLibraries/libm/Makefile Thu Dec 2 03:58:09 2004 @@ -7,10 +7,10 @@ # ##===----------------------------------------------------------------------===## -LEVEL=../../.. -BYTECODE_LIBRARY=1 -DONT_BUILD_RELINKED=1 -LIBRARYNAME=m +LEVEL = ../../.. +BYTECODE_LIBRARY = 1 +DONT_BUILD_RELINKED = 1 +LIBRARYNAME = m include $(LEVEL)/Makefile.common From reid at x10sys.com Thu Dec 2 03:58:24 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:58:24 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/Makefile Message-ID: <200412020958.DAA22194@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries: Makefile updated: 1.6 -> 1.7 --- Log message: Standardize the makefiles with space around = to match the rest of LLVM. --- Diffs of the changes: (+1 -7) Index: llvm/runtime/GCCLibraries/Makefile diff -u llvm/runtime/GCCLibraries/Makefile:1.6 llvm/runtime/GCCLibraries/Makefile:1.7 --- llvm/runtime/GCCLibraries/Makefile:1.6 Mon Aug 9 14:51:49 2004 +++ llvm/runtime/GCCLibraries/Makefile Thu Dec 2 03:58:08 2004 @@ -7,13 +7,7 @@ # ##===----------------------------------------------------------------------===## -LEVEL = ../.. +LEVEL := ../.. PARALLEL_DIRS := crtend libc libcurses libg libgcc libgdbm libm libmalloc \ libtermcap libucb libutempter libutil include $(LEVEL)/Makefile.common - -# Install target for libraries: copy bytecode files to $LLVMGCCDIR/bytecode-libs -# -install:: - -clean:: From reid at x10sys.com Thu Dec 2 03:58:24 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:58:24 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libmalloc/Makefile Message-ID: <200412020958.DAA22191@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libmalloc: Makefile updated: 1.4 -> 1.5 --- Log message: Standardize the makefiles with space around = to match the rest of LLVM. --- Diffs of the changes: (+4 -4) Index: llvm/runtime/GCCLibraries/libmalloc/Makefile diff -u llvm/runtime/GCCLibraries/libmalloc/Makefile:1.4 llvm/runtime/GCCLibraries/libmalloc/Makefile:1.5 --- llvm/runtime/GCCLibraries/libmalloc/Makefile:1.4 Thu Dec 2 03:31:40 2004 +++ llvm/runtime/GCCLibraries/libmalloc/Makefile Thu Dec 2 03:58:09 2004 @@ -7,9 +7,9 @@ # ##===----------------------------------------------------------------------===## -LEVEL=../../.. -BYTECODE_LIBRARY=1 -DONT_BUILD_RELINKED=1 -LIBRARYNAME=malloc +LEVEL = ../../.. +BYTECODE_LIBRARY = 1 +DONT_BUILD_RELINKED = 1 +LIBRARYNAME = malloc include $(LEVEL)/Makefile.common From reid at x10sys.com Thu Dec 2 03:58:24 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:58:24 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libutempter/Makefile Message-ID: <200412020958.DAA22220@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libutempter: Makefile updated: 1.4 -> 1.5 --- Log message: Standardize the makefiles with space around = to match the rest of LLVM. --- Diffs of the changes: (+4 -4) Index: llvm/runtime/GCCLibraries/libutempter/Makefile diff -u llvm/runtime/GCCLibraries/libutempter/Makefile:1.4 llvm/runtime/GCCLibraries/libutempter/Makefile:1.5 --- llvm/runtime/GCCLibraries/libutempter/Makefile:1.4 Thu Dec 2 03:31:40 2004 +++ llvm/runtime/GCCLibraries/libutempter/Makefile Thu Dec 2 03:58:09 2004 @@ -7,9 +7,9 @@ # ##===----------------------------------------------------------------------===## -LEVEL=../../.. -BYTECODE_LIBRARY=1 -DONT_BUILD_RELINKED=1 -LIBRARYNAME=utempter +LEVEL = ../../.. +BYTECODE_LIBRARY = 1 +DONT_BUILD_RELINKED = 1 +LIBRARYNAME = utempter include $(LEVEL)/Makefile.common From reid at x10sys.com Thu Dec 2 03:58:24 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:58:24 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libcurses/Makefile Message-ID: <200412020958.DAA22213@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libcurses: Makefile updated: 1.3 -> 1.4 --- Log message: Standardize the makefiles with space around = to match the rest of LLVM. --- Diffs of the changes: (+4 -4) Index: llvm/runtime/GCCLibraries/libcurses/Makefile diff -u llvm/runtime/GCCLibraries/libcurses/Makefile:1.3 llvm/runtime/GCCLibraries/libcurses/Makefile:1.4 --- llvm/runtime/GCCLibraries/libcurses/Makefile:1.3 Thu Dec 2 03:31:40 2004 +++ llvm/runtime/GCCLibraries/libcurses/Makefile Thu Dec 2 03:58:08 2004 @@ -7,9 +7,9 @@ # ##===----------------------------------------------------------------------===## -LEVEL=../../.. -BYTECODE_LIBRARY=1 -DONT_BUILD_RELINKED=1 -LIBRARYNAME=curses +LEVEL = ../../.. +BYTECODE_LIBRARY = 1 +DONT_BUILD_RELINKED = 1 +LIBRARYNAME = curses include $(LEVEL)/Makefile.common From reid at x10sys.com Thu Dec 2 03:58:24 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:58:24 -0600 Subject: [llvm-commits] CVS: llvm/runtime/libprofile/Makefile Message-ID: <200412020958.DAA22193@zion.cs.uiuc.edu> Changes in directory llvm/runtime/libprofile: Makefile updated: 1.3 -> 1.4 --- Log message: Standardize the makefiles with space around = to match the rest of LLVM. --- Diffs of the changes: (+3 -3) Index: llvm/runtime/libprofile/Makefile diff -u llvm/runtime/libprofile/Makefile:1.3 llvm/runtime/libprofile/Makefile:1.4 --- llvm/runtime/libprofile/Makefile:1.3 Thu Dec 2 03:31:40 2004 +++ llvm/runtime/libprofile/Makefile Thu Dec 2 03:58:09 2004 @@ -8,9 +8,9 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. -BYTECODE_LIBRARY=1 -SHARED_LIBRARY=1 -LIBRARYNAME=profile_rt +BYTECODE_LIBRARY = 1 +SHARED_LIBRARY = 1 +LIBRARYNAME = profile_rt EXTRA_DIST = exported_symbols.lst EXPORTED_SYMBOL_FILE = $(BUILD_SRC_DIR)/exported_symbols.lst From reid at x10sys.com Thu Dec 2 03:58:24 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:58:24 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/crtend/Makefile Message-ID: <200412020958.DAA22219@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/crtend: Makefile updated: 1.21 -> 1.22 --- Log message: Standardize the makefiles with space around = to match the rest of LLVM. --- Diffs of the changes: (+5 -5) Index: llvm/runtime/GCCLibraries/crtend/Makefile diff -u llvm/runtime/GCCLibraries/crtend/Makefile:1.21 llvm/runtime/GCCLibraries/crtend/Makefile:1.22 --- llvm/runtime/GCCLibraries/crtend/Makefile:1.21 Thu Dec 2 03:29:49 2004 +++ llvm/runtime/GCCLibraries/crtend/Makefile Thu Dec 2 03:58:08 2004 @@ -15,17 +15,17 @@ # ##===----------------------------------------------------------------------===## -LEVEL=../../.. -DONT_BUILD_RELINKED=1 -BYTECODE_LIBRARY=1 -LIBRARYNAME=crtend +LEVEL = ../../.. +DONT_BUILD_RELINKED = 1 +BYTECODE_LIBRARY = 1 +LIBRARYNAME = crtend # Note: We're fooling Makefile.rules here. The sources listed don't exist but # it doesn't matter. Makefile.rules just uses $(SOURCES) to generate the set of # object files to put in the library. Since we've specified BYTECODE_LIBRARY # above, it changes the .c suffix to .bc suffix. Below are rules to build # each of those bytecode objects from the sources we do have in this directory. -SOURCES=comp_main.c comp_genericeh.c comp_sjljeh.c +SOURCES = comp_main.c comp_genericeh.c comp_sjljeh.c EXTRA_DIST := comp_main.lst comp_genericeh.lst comp_sjljeh.lst From reid at x10sys.com Thu Dec 2 03:58:24 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:58:24 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libgcc/Makefile Message-ID: <200412020958.DAA22227@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libgcc: Makefile updated: 1.5 -> 1.6 --- Log message: Standardize the makefiles with space around = to match the rest of LLVM. --- Diffs of the changes: (+4 -4) Index: llvm/runtime/GCCLibraries/libgcc/Makefile diff -u llvm/runtime/GCCLibraries/libgcc/Makefile:1.5 llvm/runtime/GCCLibraries/libgcc/Makefile:1.6 --- llvm/runtime/GCCLibraries/libgcc/Makefile:1.5 Thu Dec 2 03:31:40 2004 +++ llvm/runtime/GCCLibraries/libgcc/Makefile Thu Dec 2 03:58:08 2004 @@ -7,9 +7,9 @@ # ##===----------------------------------------------------------------------===## -LEVEL=../../.. -BYTECODE_LIBRARY=1 -DONT_BUILD_RELINKED=1 -LIBRARYNAME=gcc +LEVEL = ../../.. +BYTECODE_LIBRARY = 1 +DONT_BUILD_RELINKED = 1 +LIBRARYNAME = gcc include $(LEVEL)/Makefile.common From reid at x10sys.com Thu Dec 2 03:58:24 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 2 Dec 2004 03:58:24 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libpthread/Makefile Message-ID: <200412020958.DAA22218@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libpthread: Makefile updated: 1.2 -> 1.3 --- Log message: Standardize the makefiles with space around = to match the rest of LLVM. --- Diffs of the changes: (+4 -4) Index: llvm/runtime/GCCLibraries/libpthread/Makefile diff -u llvm/runtime/GCCLibraries/libpthread/Makefile:1.2 llvm/runtime/GCCLibraries/libpthread/Makefile:1.3 --- llvm/runtime/GCCLibraries/libpthread/Makefile:1.2 Thu Dec 2 03:31:40 2004 +++ llvm/runtime/GCCLibraries/libpthread/Makefile Thu Dec 2 03:58:09 2004 @@ -7,9 +7,9 @@ # ##===----------------------------------------------------------------------===## -LEVEL=../../.. -BYTECODE_LIBRARY=1 -DONT_BUILD_RELINKED=1 -LIBRARYNAME=pthread +LEVEL = ../../.. +BYTECODE_LIBRARY = 1 +DONT_BUILD_RELINKED = 1 +LIBRARYNAME = pthread include $(LEVEL)/Makefile.common From criswell at cs.uiuc.edu Thu Dec 2 09:27:41 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 2 Dec 2004 09:27:41 -0600 Subject: [llvm-commits] CVS: llvm-gcc/configure Message-ID: <200412021527.JAA23924@choi.cs.uiuc.edu> Changes in directory llvm-gcc: configure updated: 1.3 -> 1.4 --- Log message: Disable debugging support for libraries (and potentially everything else). This should fix PR#464. --- Diffs of the changes: (+8 -8) Index: llvm-gcc/configure diff -u llvm-gcc/configure:1.3 llvm-gcc/configure:1.4 --- llvm-gcc/configure:1.3 Thu Feb 5 10:05:30 2004 +++ llvm-gcc/configure Thu Dec 2 09:27:25 2004 @@ -2100,9 +2100,9 @@ BISON=${BISON-bison} CC=${CC-${host_alias}-gcc} - CFLAGS=${CFLAGS-"-g -O2"} + CFLAGS=${CFLAGS-"-O2"} CXX=${CXX-${host_alias}-c++} - CXXFLAGS=${CXXFLAGS-"-g -O2"} + CXXFLAGS=${CXXFLAGS-"-O2"} CC_FOR_BUILD=${CC_FOR_BUILD-gcc} CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc} CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++} @@ -2181,8 +2181,8 @@ cc_prog_is_gcc=yes echo 'void f(){}' > conftest.c if test -z "`${CC} -g -c conftest.c 2>&1`"; then - CFLAGS=${CFLAGS-"-g -O2"} - CXXFLAGS=${CXXFLAGS-"-g -O2"} + CFLAGS=${CFLAGS-"-O2"} + CXXFLAGS=${CXXFLAGS-"-O2"} else CFLAGS=${CFLAGS-"-O2"} CXXFLAGS=${CXXFLAGS-"-O2"} @@ -2210,8 +2210,8 @@ if test "$cc_prog_is_gcc" = yes; then echo 'void f(){}' > conftest.c if test -z "`${CC} -g -c conftest.c 2>&1`"; then - CFLAGS=${CFLAGS-"-g -O2"} - CXXFLAGS=${CXXFLAGS-"-g -O2"} + CFLAGS=${CFLAGS-"-O2"} + CXXFLAGS=${CXXFLAGS-"-O2"} else CFLAGS=${CFLAGS-"-O2"} CXXFLAGS=${CXXFLAGS-"-O2"} @@ -2241,8 +2241,8 @@ fi CXX=${CXX-"c++"} - CFLAGS=${CFLAGS-"-g"} - CXXFLAGS=${CXXFLAGS-"-g -O2"} + CFLAGS=${CFLAGS-""} + CXXFLAGS=${CXXFLAGS-"-O2"} fi # FIXME Should this be done recursively ??? (Useful for e.g. gdbtest) From criswell at cs.uiuc.edu Thu Dec 2 11:13:38 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 2 Dec 2004 11:13:38 -0600 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/MallocBench/Makefile Message-ID: <200412021713.LAA30615@choi.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/MallocBench: Makefile updated: 1.8 -> 1.9 --- Log message: Disable make. --- Diffs of the changes: (+1 -1) Index: llvm-test/MultiSource/Benchmarks/MallocBench/Makefile diff -u llvm-test/MultiSource/Benchmarks/MallocBench/Makefile:1.8 llvm-test/MultiSource/Benchmarks/MallocBench/Makefile:1.9 --- llvm-test/MultiSource/Benchmarks/MallocBench/Makefile:1.8 Tue Oct 12 12:10:01 2004 +++ llvm-test/MultiSource/Benchmarks/MallocBench/Makefile Thu Dec 2 11:13:22 2004 @@ -1,3 +1,3 @@ LEVEL = ../../.. -PARALLEL_DIRS := cfrac espresso gs make +PARALLEL_DIRS := cfrac espresso gs include $(LEVEL)/Makefile.programs From lattner at cs.uiuc.edu Thu Dec 2 11:20:31 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 2 Dec 2004 11:20:31 -0600 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200412021720.iB2HKVuk007001@apoc.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.269 -> 1.270 --- Log message: Document beta pass --- Diffs of the changes: (+3 -1) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.269 llvm/docs/ReleaseNotes.html:1.270 --- llvm/docs/ReleaseNotes.html:1.269 Wed Dec 1 11:10:36 2004 +++ llvm/docs/ReleaseNotes.html Thu Dec 2 11:20:17 2004 @@ -356,6 +356,8 @@
      5. The -pre pass is incomplete (there are cases it doesn't handle that it should) and not thoroughly tested.
      6. The llvm-db tool is in a very early stage of development.
      7. +
      8. The "iterative scan" register allocator (enabled with -regalloc=iterativescan) + is not stable.
    @@ -729,7 +731,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/12/01 17:10:36 $ + Last modified: $Date: 2004/12/02 17:20:17 $ From lattner at cs.uiuc.edu Thu Dec 2 11:57:35 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 2 Dec 2004 11:57:35 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelSimple.cpp Message-ID: <200412021757.iB2HvZgZ009493@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelSimple.cpp updated: 1.298 -> 1.299 --- Log message: Consider 64-bit registers to be FP as well. --- Diffs of the changes: (+3 -1) Index: llvm/lib/Target/X86/X86ISelSimple.cpp diff -u llvm/lib/Target/X86/X86ISelSimple.cpp:1.298 llvm/lib/Target/X86/X86ISelSimple.cpp:1.299 --- llvm/lib/Target/X86/X86ISelSimple.cpp:1.298 Wed Dec 1 12:27:03 2004 +++ llvm/lib/Target/X86/X86ISelSimple.cpp Thu Dec 2 11:57:21 2004 @@ -815,7 +815,9 @@ MachineBasicBlock *SBB = *SI; for (MachineBasicBlock::iterator I = SBB->begin(); I != SBB->end() && I->getOpcode() == X86::PHI; ++I) { - if (RegMap.getRegClass(I->getOperand(0).getReg())->getSize() == 10) + const TargetRegisterClass *RC = + RegMap.getRegClass(I->getOperand(0).getReg()); + if (RC->getSize() == 10 || RC->getSize() == 8) goto UsesFPReg; } } From lattner at cs.uiuc.edu Thu Dec 2 12:17:43 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 2 Dec 2004 12:17:43 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86RegisterInfo.cpp X86RegisterInfo.td Message-ID: <200412021817.iB2IHhqs010672@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86RegisterInfo.cpp updated: 1.94 -> 1.95 X86RegisterInfo.td updated: 1.15 -> 1.16 --- Log message: Spill/restore X86 floating point stack registers with 64-bits of precision instead of 80-bits of precision. This fixes PR467: http://llvm.cs.uiuc.edu/PR467 . This change speeds up fldry on X86 with LLC from 7.32s on apoc to 4.68s. --- Diffs of the changes: (+13 -6) Index: llvm/lib/Target/X86/X86RegisterInfo.cpp diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.94 llvm/lib/Target/X86/X86RegisterInfo.cpp:1.95 --- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.94 Tue Oct 5 23:01:02 2004 +++ llvm/lib/Target/X86/X86RegisterInfo.cpp Thu Dec 2 12:17:31 2004 @@ -50,7 +50,8 @@ case 8: return 0; case 16: return 1; case 32: return 2; - case 80: return 3; + case 64: return 3; // FP in 64-bit spill mode. + case 80: return 4; // FP in 80-bit spill mode. } } @@ -58,7 +59,7 @@ MachineBasicBlock::iterator MI, unsigned SrcReg, int FrameIdx) const { static const unsigned Opcode[] = - { X86::MOV8mr, X86::MOV16mr, X86::MOV32mr, X86::FSTP80m }; + { X86::MOV8mr, X86::MOV16mr, X86::MOV32mr, X86::FST64m, X86::FSTP80m }; unsigned Idx = getIdx(getSpillSize(SrcReg)); addFrameReference(BuildMI(MBB, MI, Opcode[Idx], 5), FrameIdx).addReg(SrcReg); } @@ -67,7 +68,7 @@ MachineBasicBlock::iterator MI, unsigned DestReg, int FrameIdx)const{ static const unsigned Opcode[] = - { X86::MOV8rm, X86::MOV16rm, X86::MOV32rm, X86::FLD80m }; + { X86::MOV8rm, X86::MOV16rm, X86::MOV32rm, X86::FLD64m, X86::FLD80m }; unsigned Idx = getIdx(getSpillSize(DestReg)); addFrameReference(BuildMI(MBB, MI, Opcode[Idx], 4, DestReg), FrameIdx); } @@ -77,7 +78,7 @@ unsigned DestReg, unsigned SrcReg, const TargetRegisterClass *RC) const { static const unsigned Opcode[] = - { X86::MOV8rr, X86::MOV16rr, X86::MOV32rr, X86::FpMOV }; + { X86::MOV8rr, X86::MOV16rr, X86::MOV32rr, X86::FpMOV, X86::FpMOV }; BuildMI(MBB, MI, Opcode[getIdx(RC->getSize()*8)], 1, DestReg).addReg(SrcReg); } Index: llvm/lib/Target/X86/X86RegisterInfo.td diff -u llvm/lib/Target/X86/X86RegisterInfo.td:1.15 llvm/lib/Target/X86/X86RegisterInfo.td:1.16 --- llvm/lib/Target/X86/X86RegisterInfo.td:1.15 Tue Sep 21 16:22:11 2004 +++ llvm/lib/Target/X86/X86RegisterInfo.td Thu Dec 2 12:17:31 2004 @@ -84,12 +84,18 @@ }]; } -def RFP : RegisterClass; +// FIXME: This sets up the floating point register files as though they are f64 +// values, though they really are f80 values. This will cause us to spill +// values as 64-bit quantities instead of 80-bit quantities, which is much much +// faster on common hardware. In reality, this should be controlled by a +// command line option or something. + +def RFP : RegisterClass; // Floating point stack registers (these are not allocatable by the // register allocator - the floating point stackifier is responsible // for transforming FPn allocations to STn registers) -def RST : RegisterClass { +def RST : RegisterClass { let Methods = [{ iterator allocation_order_end(MachineFunction &MF) const { return begin(); From lattner at cs.uiuc.edu Thu Dec 2 12:21:59 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 2 Dec 2004 12:21:59 -0600 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200412021821.iB2ILxrS010697@apoc.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.270 -> 1.271 --- Log message: Add a note --- Diffs of the changes: (+3 -1) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.270 llvm/docs/ReleaseNotes.html:1.271 --- llvm/docs/ReleaseNotes.html:1.270 Thu Dec 2 11:20:17 2004 +++ llvm/docs/ReleaseNotes.html Thu Dec 2 12:21:45 2004 @@ -149,6 +149,8 @@
  • llvmgcc and llvmg++ now emit source-level line number information, making it possible to map from LLVM code back to source. This is currently used by llvm-db.
  • +
  • Floating point intensive programs on X86 systems run much faster + with the LLC code generator and JIT than in 1.3.
  • @@ -731,7 +733,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/12/02 17:20:17 $ + Last modified: $Date: 2004/12/02 18:21:45 $ From criswell at cs.uiuc.edu Thu Dec 2 13:03:04 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 2 Dec 2004 13:03:04 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp Message-ID: <200412021903.NAA08316@choi.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.210 -> 1.211 --- Log message: Reverting revision 1.209. Including alloca.h on Solaris brings in the prototype of strftime(), which breaks compilation of CBE generated code. --- Diffs of the changes: (+1 -1) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.210 llvm/lib/Target/CBackend/Writer.cpp:1.211 --- llvm/lib/Target/CBackend/Writer.cpp:1.210 Tue Nov 30 15:33:58 2004 +++ llvm/lib/Target/CBackend/Writer.cpp Thu Dec 2 13:02:49 2004 @@ -710,7 +710,7 @@ static void generateCompilerSpecificCode(std::ostream& Out) { // Alloca is hard to get, and we don't want to include stdlib.h here... Out << "/* get a declaration for alloca */\n" - << "#if defined(__CYGWIN__) || defined(__APPLE__)\n" + << "#if defined(sun) || defined(__CYGWIN__) || defined(__APPLE__)\n" << "extern void *__builtin_alloca(unsigned long);\n" << "#define alloca(x) __builtin_alloca(x)\n" << "#elif defined(__FreeBSD__)\n" From lattner at cs.uiuc.edu Thu Dec 2 15:05:16 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 2 Dec 2004 15:05:16 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp Message-ID: <200412022105.iB2L5GQd017435@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/SparcV9: SparcV9TargetMachine.cpp updated: 1.127 -> 1.128 --- Log message: The stripping pass as we know it is about to disappear --- Diffs of the changes: (+1 -9) Index: llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp diff -u llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp:1.127 llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp:1.128 --- llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp:1.127 Fri Nov 19 17:34:33 2004 +++ llvm/lib/Target/SparcV9/SparcV9TargetMachine.cpp Thu Dec 2 15:05:01 2004 @@ -63,10 +63,6 @@ cl::init(false), cl::desc("Emit LLVM-to-MachineCode mapping info to assembly")); - cl::opt DisableStrip("disable-strip", - cl::desc("Do not strip the LLVM bytecode in executable")); - - cl::opt EnableModSched("enable-modsched", cl::desc("Enable modulo scheduling pass instead of local scheduling"), cl::Hidden); @@ -239,12 +235,8 @@ PM.add(createSparcV9MachineCodeDestructionPass()); // Emit bytecode to the assembly file into its special section next - if (EmitMappingInfo) { - // Strip all of the symbols from the bytecode so that it will be smaller... - if (!DisableStrip) - PM.add(createSymbolStrippingPass()); + if (EmitMappingInfo) PM.add(createBytecodeAsmPrinterPass(Out)); - } return false; } From lattner at cs.uiuc.edu Thu Dec 2 15:24:02 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 2 Dec 2004 15:24:02 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200412022124.iB2LO2nc027530@apoc.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.244 -> 1.245 --- Log message: Quiet! --- Diffs of the changes: (+1 -1) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.244 llvm/Makefile.rules:1.245 --- llvm/Makefile.rules:1.244 Thu Dec 2 03:28:21 2004 +++ llvm/Makefile.rules Thu Dec 2 15:23:43 2004 @@ -519,7 +519,7 @@ $(LibName.BCA): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir $(GCCLD) $(Echo) Building $(BuildMode) Bytecode Archive $(notdir $@) \ "(internalize)" - $(BCLinkLib) -o $(ObjDir)/$(LIBRARYNAME).o $(ObjectsBC) + $(Verb) $(BCLinkLib) -o $(ObjDir)/$(LIBRARYNAME).o $(ObjectsBC) $(Verb) $(LArchive) $@ $(ObjDir)/$(LIBRARYNAME).o else $(LibName.BCA): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir $(GCCLD) From lattner at cs.uiuc.edu Thu Dec 2 15:24:31 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 2 Dec 2004 15:24:31 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Transforms/IPO.h Scalar.h Message-ID: <200412022124.iB2LOVEj027548@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Transforms: IPO.h updated: 1.37 -> 1.38 Scalar.h updated: 1.49 -> 1.50 --- Log message: Move the strip pass from Scalar to IPO lib --- Diffs of the changes: (+7 -8) Index: llvm/include/llvm/Transforms/IPO.h diff -u llvm/include/llvm/Transforms/IPO.h:1.37 llvm/include/llvm/Transforms/IPO.h:1.38 --- llvm/include/llvm/Transforms/IPO.h:1.37 Mon Oct 18 09:43:45 2004 +++ llvm/include/llvm/Transforms/IPO.h Thu Dec 2 15:24:18 2004 @@ -24,6 +24,13 @@ class BasicBlock; //===----------------------------------------------------------------------===// +// +// These functions removes symbols from functions and modules. If OnlyDebugInfo +// is true, only debugging information is removed from the module. +// +ModulePass *createStripSymbolsPass(bool OnlyDebugInfo = false); + +//===----------------------------------------------------------------------===// /// createLowerSetJmpPass - This function lowers the setjmp/longjmp intrinsics /// to invoke/unwind instructions. This should really be part of the C/C++ /// front-end, but it's so much easier to write transformations in LLVM proper. Index: llvm/include/llvm/Transforms/Scalar.h diff -u llvm/include/llvm/Transforms/Scalar.h:1.49 llvm/include/llvm/Transforms/Scalar.h:1.50 --- llvm/include/llvm/Transforms/Scalar.h:1.49 Wed Nov 17 12:01:49 2004 +++ llvm/include/llvm/Transforms/Scalar.h Thu Dec 2 15:24:19 2004 @@ -276,14 +276,6 @@ // into regular LLVM instructions. FunctionPass* createLowerConstantExpressionsPass(); - -//===----------------------------------------------------------------------===// -// -// These functions removes symbols from functions and modules. -// -FunctionPass *createSymbolStrippingPass(); -FunctionPass *createFullSymbolStrippingPass(); - } // End llvm namespace #endif From lattner at cs.uiuc.edu Thu Dec 2 15:24:52 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 2 Dec 2004 15:24:52 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/SymbolStripping.cpp Message-ID: <200412022124.iB2LOqhr027562@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: SymbolStripping.cpp (r1.27) removed --- Log message: This pass is moving to lib IPO --- Diffs of the changes: (+0 -0) From lattner at cs.uiuc.edu Thu Dec 2 15:25:15 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 2 Dec 2004 15:25:15 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/StripSymbols.cpp Message-ID: <200412022125.iB2LPFS3027574@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: StripSymbols.cpp added (r1.1) --- Log message: Initial reimplementation of the -strip pass, with a stub for implementing -S --- Diffs of the changes: (+68 -0) Index: llvm/lib/Transforms/IPO/StripSymbols.cpp diff -c /dev/null llvm/lib/Transforms/IPO/StripSymbols.cpp:1.1 *** /dev/null Thu Dec 2 15:25:13 2004 --- llvm/lib/Transforms/IPO/StripSymbols.cpp Thu Dec 2 15:25:03 2004 *************** *** 0 **** --- 1,68 ---- + //===- StripSymbols.cpp - Strip symbols and debug info from a module ------===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by the LLVM research group and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This file implements stripping symbols out of symbol tables. + // + // Specifically, this allows you to strip all of the symbols out of: + // * All functions in a module + // * All non-essential symbols in a module (all function symbols + all module + // scope symbols) + // * Debug information. + // + // Notice that: + // * This pass makes code much less readable, so it should only be used in + // situations where the 'strip' utility would be used (such as reducing + // code size, and making it harder to reverse engineer code). + // + //===----------------------------------------------------------------------===// + + #include "llvm/Transforms/IPO.h" + #include "llvm/Module.h" + #include "llvm/SymbolTable.h" + #include "llvm/Pass.h" + using namespace llvm; + + namespace { + class StripSymbols : public ModulePass { + bool OnlyDebugInfo; + public: + StripSymbols(bool ODI = false) : OnlyDebugInfo(ODI) {} + + virtual bool runOnModule(Module &M); + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); + } + }; + RegisterOpt X("strip", "Strip all symbols from a module"); + } + + ModulePass *llvm::createStripSymbolsPass(bool OnlyDebugInfo) { + return new StripSymbols(OnlyDebugInfo); + } + + + bool StripSymbols::runOnModule(Module &M) { + // If we're not just stripping debug info, strip all symbols from the + // functions and the names from any internal globals. + if (!OnlyDebugInfo) { + for (Module::giterator I = M.gbegin(), E = M.gend(); I != E; ++I) + if (I->hasInternalLinkage()) + I->setName(""); // Internal symbols can't participate in linkage + + for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) { + if (I->hasInternalLinkage()) + I->setName(""); // Internal symbols can't participate in linkage + I->getSymbolTable().strip(); + } + } + + // FIXME: implement stripping of debug info. + return true; + } From lattner at cs.uiuc.edu Thu Dec 2 15:26:22 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 2 Dec 2004 15:26:22 -0600 Subject: [llvm-commits] CVS: llvm/tools/gccld/GenerateCode.cpp gccld.cpp gccld.h Message-ID: <200412022126.iB2LQMq3027636@apoc.cs.uiuc.edu> Changes in directory llvm/tools/gccld: GenerateCode.cpp updated: 1.37 -> 1.38 gccld.cpp updated: 1.81 -> 1.82 gccld.h updated: 1.10 -> 1.11 --- Log message: Recognize --strip-all as a synonym for -s. Add -S and --strip-debug option support. --- Diffs of the changes: (+20 -10) Index: llvm/tools/gccld/GenerateCode.cpp diff -u llvm/tools/gccld/GenerateCode.cpp:1.37 llvm/tools/gccld/GenerateCode.cpp:1.38 --- llvm/tools/gccld/GenerateCode.cpp:1.37 Wed Nov 17 10:41:19 2004 +++ llvm/tools/gccld/GenerateCode.cpp Thu Dec 2 15:26:10 2004 @@ -130,13 +130,14 @@ /// /// Inputs: /// M - The module for which bytecode should be generated. -/// Strip - Flags whether symbols should be stripped from the output. +/// StripLevel - 2 if we should strip all symbols, 1 if we should strip +/// debug info. /// Internalize - Flags whether all symbols should be marked internal. /// Out - Pointer to file stream to which to write the output. /// /// Returns non-zero value on error. /// -int llvm::GenerateBytecode(Module *M, bool Strip, bool Internalize, +int llvm::GenerateBytecode(Module *M, int StripLevel, bool Internalize, std::ostream *Out) { // In addition to just linking the input from GCC, we also want to spiff it up // a little bit. Do this now. @@ -208,11 +209,11 @@ addPass(Passes, createGlobalDCEPass()); } - // If the -s command line option was specified, strip the symbols out of the - // resulting program to make it smaller. -s is a GCC option that we are - // supporting. - if (Strip) - addPass(Passes, createSymbolStrippingPass()); + // If the -s or -S command line options were specified, strip the symbols out + // of the resulting program to make it smaller. -s and -S are GLD options + // that we are supporting. + if (StripLevel) + addPass(Passes, createStripSymbolsPass(StripLevel == 1)); // Make sure everything is still good. Passes.add(createVerifierPass()); Index: llvm/tools/gccld/gccld.cpp diff -u llvm/tools/gccld/gccld.cpp:1.81 llvm/tools/gccld/gccld.cpp:1.82 --- llvm/tools/gccld/gccld.cpp:1.81 Wed Nov 17 10:41:19 2004 +++ llvm/tools/gccld/gccld.cpp Thu Dec 2 15:26:10 2004 @@ -58,7 +58,10 @@ cl::value_desc("library prefix")); cl::opt - Strip("s", cl::desc("Strip symbol info from executable")); + Strip("strip-all", cl::desc("Strip all symbol info from executable")); + cl::opt + StripDebug("strip-debug", + cl::desc("Strip debugger symbol info from executable")); cl::opt NoInternalize("disable-internalize", @@ -90,6 +93,11 @@ CO5("eh-frame-hdr", cl::Hidden, cl::desc("Compatibility option: ignored")); cl::opt CO6("h", cl::Hidden, cl::desc("Compatibility option: ignored")); + + cl::alias A0("s", cl::desc("Alias for --strip-all"), + cl::aliasopt(Strip)); + cl::alias A1("S", cl::desc("Alias for --strip-debug"), + cl::aliasopt(StripDebug)); } /// PrintAndReturn - Prints a message to standard error and returns true. @@ -199,7 +207,8 @@ sys::RemoveFileOnSignal(sys::Path(RealBytecodeOutput)); // Generate the bytecode file. - if (GenerateBytecode(Composite.get(), Strip, !NoInternalize, &Out)) { + int StripLevel = Strip ? 2 : (StripDebug ? 1 : 0); + if (GenerateBytecode(Composite.get(), StripLevel, !NoInternalize, &Out)) { Out.close(); return PrintAndReturn(argv[0], "error generating bytecode"); } Index: llvm/tools/gccld/gccld.h diff -u llvm/tools/gccld/gccld.h:1.10 llvm/tools/gccld/gccld.h:1.11 --- llvm/tools/gccld/gccld.h:1.10 Sun Nov 14 16:17:49 2004 +++ llvm/tools/gccld/gccld.h Thu Dec 2 15:26:10 2004 @@ -22,7 +22,7 @@ int GenerateBytecode (Module * M, - bool Strip, + int StripLevel, bool Internalize, std::ostream * Out); From lattner at cs.uiuc.edu Thu Dec 2 15:27:48 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 2 Dec 2004 15:27:48 -0600 Subject: [llvm-commits] CVS: llvm/tools/llvm-ld/Optimize.cpp Message-ID: <200412022127.iB2LRmqS027654@apoc.cs.uiuc.edu> Changes in directory llvm/tools/llvm-ld: Optimize.cpp updated: 1.1 -> 1.2 --- Log message: Adjust to change in pass name --- Diffs of the changes: (+2 -2) Index: llvm/tools/llvm-ld/Optimize.cpp diff -u llvm/tools/llvm-ld/Optimize.cpp:1.1 llvm/tools/llvm-ld/Optimize.cpp:1.2 --- llvm/tools/llvm-ld/Optimize.cpp:1.1 Sat Nov 20 13:43:28 2004 +++ llvm/tools/llvm-ld/Optimize.cpp Thu Dec 2 15:27:35 2004 @@ -126,10 +126,10 @@ addPass(Passes, createConstantMergePass()); // If the -s command line option was specified, strip the symbols out of the - // resulting program to make it smaller. -s is a GCC option that we are + // resulting program to make it smaller. -s is a GLD option that we are // supporting. if (Strip) - addPass(Passes, createSymbolStrippingPass()); + addPass(Passes, createStripSymbolsPass()); // Propagate constants at call sites into the functions they call. addPass(Passes, createIPConstantPropagationPass()); From criswell at cs.uiuc.edu Thu Dec 2 15:28:52 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 2 Dec 2004 15:28:52 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/ExecutionEngine/test-arith.ll test-cast.ll Message-ID: <200412022128.PAA05587@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/ExecutionEngine: test-arith.ll updated: 1.9 -> 1.10 test-cast.ll updated: 1.8 -> 1.9 --- Log message: These lookup symbols with leading underscores, which currently fails in the PowerPC JIT. Hence, they are XFAILs. --- Diffs of the changes: (+2 -0) Index: llvm/test/Regression/ExecutionEngine/test-arith.ll diff -u llvm/test/Regression/ExecutionEngine/test-arith.ll:1.9 llvm/test/Regression/ExecutionEngine/test-arith.ll:1.10 --- llvm/test/Regression/ExecutionEngine/test-arith.ll:1.9 Sat Nov 6 17:32:43 2004 +++ llvm/test/Regression/ExecutionEngine/test-arith.ll Thu Dec 2 15:28:37 2004 @@ -1,3 +1,4 @@ +; XFAIL: darwin ; RUN: llvm-as -f %s -o %t.bc ; RUN: lli %t.bc > /dev/null Index: llvm/test/Regression/ExecutionEngine/test-cast.ll diff -u llvm/test/Regression/ExecutionEngine/test-cast.ll:1.8 llvm/test/Regression/ExecutionEngine/test-cast.ll:1.9 --- llvm/test/Regression/ExecutionEngine/test-cast.ll:1.8 Sat Nov 6 17:32:43 2004 +++ llvm/test/Regression/ExecutionEngine/test-cast.ll Thu Dec 2 15:28:37 2004 @@ -1,3 +1,4 @@ +; XFAIL: darwin ; RUN: llvm-as -f %s -o %t.bc ; RUN: lli %t.bc > /dev/null From alkis at cs.uiuc.edu Thu Dec 2 15:51:24 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 2 Dec 2004 15:51:24 -0600 Subject: [llvm-commits] CVS: llvm-java/tools/class2llvm/Makefile Message-ID: <200412022151.PAA28912@zion.cs.uiuc.edu> Changes in directory llvm-java/tools/class2llvm: Makefile updated: 1.6 -> 1.7 --- Log message: Make classdump and class2llvm link again. --- Diffs of the changes: (+1 -1) Index: llvm-java/tools/class2llvm/Makefile diff -u llvm-java/tools/class2llvm/Makefile:1.6 llvm-java/tools/class2llvm/Makefile:1.7 --- llvm-java/tools/class2llvm/Makefile:1.6 Thu Oct 28 01:31:04 2004 +++ llvm-java/tools/class2llvm/Makefile Thu Dec 2 15:51:12 2004 @@ -11,6 +11,6 @@ TOOLNAME := class2llvm USEDLIBS := LLVMJavaClassfile LLVMJavaCompiler -LLVMLIBS := LLVMBCWriter LLVMCore LLVMSupport.a LLVMSystem.a +LLVMLIBS := LLVMBCWriter LLVMCore LLVMSupport.a LLVMbzip2 LLVMSystem.a include $(LEVEL)/Makefile.common From alkis at cs.uiuc.edu Thu Dec 2 15:51:24 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 2 Dec 2004 15:51:24 -0600 Subject: [llvm-commits] CVS: llvm-java/tools/classdump/Makefile Message-ID: <200412022151.PAA28913@zion.cs.uiuc.edu> Changes in directory llvm-java/tools/classdump: Makefile updated: 1.7 -> 1.8 --- Log message: Make classdump and class2llvm link again. --- Diffs of the changes: (+1 -1) Index: llvm-java/tools/classdump/Makefile diff -u llvm-java/tools/classdump/Makefile:1.7 llvm-java/tools/classdump/Makefile:1.8 --- llvm-java/tools/classdump/Makefile:1.7 Thu Oct 28 01:31:04 2004 +++ llvm-java/tools/classdump/Makefile Thu Dec 2 15:51:12 2004 @@ -11,6 +11,6 @@ TOOLNAME := classdump USEDLIBS := LLVMJavaClassfile -LLVMLIBS := LLVMCore LLVMSystem.a LLVMSupport.a +LLVMLIBS := LLVMCore LLVMSupport.a LLVMbzip2 LLVMSystem.a include $(LEVEL)/Makefile.common From alkis at cs.uiuc.edu Thu Dec 2 17:24:07 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 2 Dec 2004 17:24:07 -0600 Subject: [llvm-commits] CVS: llvm-java/Makefile.rules Message-ID: <200412022324.RAA30276@zion.cs.uiuc.edu> Changes in directory llvm-java: Makefile.rules updated: 1.15 -> 1.16 --- Log message: llvm-link is not needed anymore. --- Diffs of the changes: (+0 -1) Index: llvm-java/Makefile.rules diff -u llvm-java/Makefile.rules:1.15 llvm-java/Makefile.rules:1.16 --- llvm-java/Makefile.rules:1.15 Wed Nov 24 02:55:33 2004 +++ llvm-java/Makefile.rules Thu Dec 2 17:23:56 2004 @@ -9,7 +9,6 @@ LDIS := $(LLVMToolDir)/llvm-dis$(EXEEXT) LLI := $(LLVMToolDir)/lli$(EXEEXT) -LLINK := $(LLVMToolDir)/llvm-link$(EXEEXT) LOPT := $(LLVMToolDir)/opt$(EXEEXT) CLASS2LLVM := $(ToolDir)/class2llvm$(EXEEXT) From alkis at cs.uiuc.edu Thu Dec 2 17:24:46 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 2 Dec 2004 17:24:46 -0600 Subject: [llvm-commits] CVS: llvm-java/test/Programs/SingleSource/UnitTests/Makefile Message-ID: <200412022324.RAA30306@zion.cs.uiuc.edu> Changes in directory llvm-java/test/Programs/SingleSource/UnitTests: Makefile updated: 1.6 -> 1.7 --- Log message: Fix rules to make more sense when compiling from a single .class file to a bytecode file. --- Diffs of the changes: (+1 -1) Index: llvm-java/test/Programs/SingleSource/UnitTests/Makefile diff -u llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.6 llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.7 --- llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.6 Wed Nov 24 13:44:53 2004 +++ llvm-java/test/Programs/SingleSource/UnitTests/Makefile Thu Dec 2 17:24:34 2004 @@ -27,7 +27,7 @@ BYTECODE_LIBRARY=1 LIBRARYNAME=test -EXTRA_OBJS = $(LibDir)/libtest.bc +EXTRA_OBJS = $(LibDir)/libtest.bca all:: Output/.compile-java $(addprefix Output/, $(addsuffix .llvm.bc, $(JAVA_TESTS))) From alkis at cs.uiuc.edu Thu Dec 2 17:24:46 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 2 Dec 2004 17:24:46 -0600 Subject: [llvm-commits] CVS: llvm-java/test/Makefile.test Message-ID: <200412022324.RAA30305@zion.cs.uiuc.edu> Changes in directory llvm-java/test: Makefile.test updated: 1.18 -> 1.19 --- Log message: Fix rules to make more sense when compiling from a single .class file to a bytecode file. --- Diffs of the changes: (+8 -7) Index: llvm-java/test/Makefile.test diff -u llvm-java/test/Makefile.test:1.18 llvm-java/test/Makefile.test:1.19 --- llvm-java/test/Makefile.test:1.18 Wed Nov 24 14:33:38 2004 +++ llvm-java/test/Makefile.test Thu Dec 2 17:24:34 2004 @@ -19,15 +19,16 @@ # intermediate results .PRECIOUS: Output/.dir %.linked.bc %.raw.bc %.ll %.llvm.bc -#rule to link in runtime to raw bytecode -%.linked.bc: %.raw.bc $(LibDir)/libjrt.bc $(EXTRA_OBJS) - $(Echo) Linking $< with the Java runtime - $(Verb)$(LLINK) $^ -o=$@ +# -simplifycfg -mem2reg -instcombine -# rule to optimize the linked bytecode -%.llvm.bc: %.linked.bc $(LOPT) +# rule to link bytecode with runtime +%.llvm: %.linked.bc $(LibDir)/libjrt.bca $(EXTRA_OBJS) $(LOPT) $(Echo) Optimizing $< - $(Verb)$(LOPT) -simplifycfg -mem2reg -instcombine -f -o=$@ $< + $(Verb)$(GCCLD) -disable-opt -o=$*.llvm $< -L $(LibDir) -ljrt $(EXTRA_OBJS) +# rule to link bytecode with runtime +%.llvm.bc: %.linked.bc $(LibDir)/libjrt.bca $(EXTRA_OBJS) $(LOPT) + $(Echo) Optimizing $< + $(Verb)$(GCCLD) -disable-opt -o=$*.llvm $< -L $(LibDir) -ljrt $(EXTRA_OBJS) # rule to make assembly from bytecode %.dis-ll: %.bc From alkis at cs.uiuc.edu Thu Dec 2 17:24:46 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 2 Dec 2004 17:24:46 -0600 Subject: [llvm-commits] CVS: llvm-java/test/Programs/SingleSource/Makefile.singlesrc Message-ID: <200412022324.RAA30309@zion.cs.uiuc.edu> Changes in directory llvm-java/test/Programs/SingleSource: Makefile.singlesrc updated: 1.9 -> 1.10 --- Log message: Fix rules to make more sense when compiling from a single .class file to a bytecode file. --- Diffs of the changes: (+5 -0) Index: llvm-java/test/Programs/SingleSource/Makefile.singlesrc diff -u llvm-java/test/Programs/SingleSource/Makefile.singlesrc:1.9 llvm-java/test/Programs/SingleSource/Makefile.singlesrc:1.10 --- llvm-java/test/Programs/SingleSource/Makefile.singlesrc:1.9 Wed Nov 24 03:02:17 2004 +++ llvm-java/test/Programs/SingleSource/Makefile.singlesrc Thu Dec 2 17:24:34 2004 @@ -12,4 +12,9 @@ $(Echo) Compiling $< to bytecode $(Verb)$(CLASS2LLVM) -cp $(CLASSPATH):Output $(subst /,.,$(*F)) -o=$@ +# optimize raw bytecode +%.linked.bc: %.raw.bc $(LOPT) + $(Echo) Optimizing $< + $(Verb)$(LOPT) -simplifycfg -mem2reg -instcombine -f -o=$@ $< + include $(LEVEL)/test/Makefile.test From alkis at cs.uiuc.edu Thu Dec 2 17:35:00 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 2 Dec 2004 17:35:00 -0600 Subject: [llvm-commits] CVS: llvm-java/test/Makefile.test Message-ID: <200412022335.RAA30518@zion.cs.uiuc.edu> Changes in directory llvm-java/test: Makefile.test updated: 1.19 -> 1.20 --- Log message: Make rule specify that we generating both files with the one command. --- Diffs of the changes: (+2 -6) Index: llvm-java/test/Makefile.test diff -u llvm-java/test/Makefile.test:1.19 llvm-java/test/Makefile.test:1.20 --- llvm-java/test/Makefile.test:1.19 Thu Dec 2 17:24:34 2004 +++ llvm-java/test/Makefile.test Thu Dec 2 17:34:49 2004 @@ -22,12 +22,8 @@ # -simplifycfg -mem2reg -instcombine # rule to link bytecode with runtime -%.llvm: %.linked.bc $(LibDir)/libjrt.bca $(EXTRA_OBJS) $(LOPT) - $(Echo) Optimizing $< - $(Verb)$(GCCLD) -disable-opt -o=$*.llvm $< -L $(LibDir) -ljrt $(EXTRA_OBJS) -# rule to link bytecode with runtime -%.llvm.bc: %.linked.bc $(LibDir)/libjrt.bca $(EXTRA_OBJS) $(LOPT) - $(Echo) Optimizing $< +%.llvm %.llvm.bc: %.linked.bc $(LibDir)/libjrt.bca $(EXTRA_OBJS) $(LOPT) + $(Echo) Linking $< with the Java runtime $(Verb)$(GCCLD) -disable-opt -o=$*.llvm $< -L $(LibDir) -ljrt $(EXTRA_OBJS) # rule to make assembly from bytecode From alkis at cs.uiuc.edu Thu Dec 2 18:29:55 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 2 Dec 2004 18:29:55 -0600 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200412030029.SAA31327@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.151 -> 1.152 --- Log message: Silence warnings. --- Diffs of the changes: (+3 -0) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.151 llvm-java/lib/Compiler/Compiler.cpp:1.152 --- llvm-java/lib/Compiler/Compiler.cpp:1.151 Wed Nov 24 14:40:39 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Thu Dec 2 18:29:42 2004 @@ -540,6 +540,7 @@ return arrayInfo; } } + abort(); } /// Returns the ClassInfo object associated with an array of the @@ -923,6 +924,7 @@ return arrayInfo; } } + abort(); } /// Initializes the VTableInfo map for object arrays; in other @@ -997,6 +999,7 @@ "java/lang/Object[]", &module_); DEBUG(std::cerr << "Built VTableInfo for: java/lang/Object[]\n"); + return true; } const VTableInfo& getObjectArrayVTableInfo(ClassFile* cf) { From lattner at cs.uiuc.edu Thu Dec 2 23:13:30 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 2 Dec 2004 23:13:30 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelSimple.cpp Message-ID: <200412030513.iB35DUdx005137@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelSimple.cpp updated: 1.299 -> 1.300 --- Log message: Fix a regression caused by the previous patch --- Diffs of the changes: (+4 -2) Index: llvm/lib/Target/X86/X86ISelSimple.cpp diff -u llvm/lib/Target/X86/X86ISelSimple.cpp:1.299 llvm/lib/Target/X86/X86ISelSimple.cpp:1.300 --- llvm/lib/Target/X86/X86ISelSimple.cpp:1.299 Thu Dec 2 11:57:21 2004 +++ llvm/lib/Target/X86/X86ISelSimple.cpp Thu Dec 2 23:13:15 2004 @@ -802,9 +802,11 @@ MachineOperand& MO = I->getOperand(i); if (MO.isRegister() && MO.getReg()) { unsigned Reg = MO.getReg(); - if (MRegisterInfo::isVirtualRegister(Reg)) - if (RegMap.getRegClass(Reg)->getSize() == 10) + if (MRegisterInfo::isVirtualRegister(Reg)) { + unsigned RegSize = RegMap.getRegClass(Reg)->getSize(); + if (RegSize == 10 || RegSize == 8) goto UsesFPReg; + } } } // If we haven't found an FP register use or def in this basic block, check From tbrethou at cs.uiuc.edu Thu Dec 2 23:25:38 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Thu, 2 Dec 2004 23:25:38 -0600 (CST) Subject: [llvm-commits] CVS: llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp Message-ID: <200412030525.XAA01471@kain.cs.uiuc.edu> Changes in directory llvm/lib/Target/SparcV9/ModuloScheduling: ModuloScheduling.cpp updated: 1.38 -> 1.39 --- Log message: When writing kernel, save the branches til the end. They are still put in the "right place" in the schedule, but sometimes when folding to make a kernel instructions are added between branches. This is wrong. To avoid this, we handle branches special. --- Diffs of the changes: (+17 -5) Index: llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp diff -u llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp:1.38 llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp:1.39 --- llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp:1.38 Thu Dec 2 01:22:15 2004 +++ llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp Thu Dec 2 23:25:22 2004 @@ -1542,11 +1542,21 @@ std::map finalPHIValue; std::map kernelValue; + //Branches are a special case + std::vector branches; + //Create TmpInstructions for the final phis for(MSSchedule::kernel_iterator I = schedule.kernel_begin(), E = schedule.kernel_end(); I != E; ++I) { DEBUG(std::cerr << "Stage: " << I->second << " Inst: " << *(I->first->getInst()) << "\n";); + if(I->first->isBranch()) { + //Clone instruction + const MachineInstr *inst = I->first->getInst(); + MachineInstr *instClone = inst->clone(); + branches.push_back(instClone); + } + //Clone instruction const MachineInstr *inst = I->first->getInst(); MachineInstr *instClone = inst->clone(); @@ -1556,11 +1566,6 @@ DEBUG(std::cerr << "Cloned Inst: " << *instClone << "\n"); - if(I->first->isBranch()) { - //Add kernel noop - BuildMI(machineBB, V9::NOP, 0); - } - //Loop over Machine Operands for(unsigned i=0; i < inst->getNumOperands(); ++i) { //get machine operand @@ -1623,6 +1628,13 @@ } + //Add branches + for(std::vector::iterator I = branches.begin(), E = branches.end(); I != E; ++I) { + machineBB->push_back(*I); + BuildMI(machineBB, V9::NOP, 0); + } + + DEBUG(std::cerr << "KERNEL before PHIs\n"); DEBUG(machineBB->print(std::cerr)); From lattner at cs.uiuc.edu Thu Dec 2 23:46:13 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 2 Dec 2004 23:46:13 -0600 Subject: [llvm-commits] CVS: llvm/tools/gccas/gccas.cpp Message-ID: <200412030546.iB35kDqd006409@apoc.cs.uiuc.edu> Changes in directory llvm/tools/gccas: gccas.cpp updated: 1.103 -> 1.104 --- Log message: Add -strip-debug option remove the temporary -disable-dse option --- Diffs of the changes: (+9 -3) Index: llvm/tools/gccas/gccas.cpp diff -u llvm/tools/gccas/gccas.cpp:1.103 llvm/tools/gccas/gccas.cpp:1.104 --- llvm/tools/gccas/gccas.cpp:1.103 Sun Nov 14 16:14:45 2004 +++ llvm/tools/gccas/gccas.cpp Thu Dec 2 23:45:58 2004 @@ -48,7 +48,9 @@ cl::desc("Do not run any optimization passes")); cl::opt - DisableDSE("disable-dse", cl::desc("Do not run dead store elimination")); + StripDebug("strip-debug", + cl::desc("Strip debugger symbol info from translation unit")); + cl::opt NoCompress("disable-compression", cl::init(false), cl::desc("Don't ompress the generated bytecode")); @@ -66,9 +68,14 @@ void AddConfiguredTransformationPasses(PassManager &PM) { PM.add(createVerifierPass()); // Verify that input is correct + addPass(PM, createLowerSetJmpPass()); // Lower llvm.setjmp/.longjmp addPass(PM, createFunctionResolvingPass()); // Resolve (...) functions + // If the -strip-debug command line option was specified, do it. + if (StripDebug) + addPass(PM, createStripSymbolsPass(true)); + if (DisableOptimizations) return; addPass(PM, createRaiseAllocationsPass()); // call %malloc -> malloc inst @@ -109,8 +116,7 @@ // Run instcombine after redundancy elimination to exploit opportunities // opened up by them. addPass(PM, createInstructionCombiningPass()); - if (!DisableDSE) - addPass(PM, createDeadStoreEliminationPass()); // Delete dead stores + addPass(PM, createDeadStoreEliminationPass()); // Delete dead stores addPass(PM, createAggressiveDCEPass()); // SSA based 'Aggressive DCE' addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs addPass(PM, createDeadTypeEliminationPass()); // Eliminate dead types From gaeke at cs.uiuc.edu Fri Dec 3 00:02:13 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri, 3 Dec 2004 00:02:13 -0600 (CST) Subject: [llvm-commits] CVS: reopt/lib/TraceJIT/TraceJIT.cpp Message-ID: <200412030602.AAA02014@kain.cs.uiuc.edu> Changes in directory reopt/lib/TraceJIT: TraceJIT.cpp updated: 1.9 -> 1.10 --- Log message: The other piece of the TraceJIT change... --- Diffs of the changes: (+5 -0) Index: reopt/lib/TraceJIT/TraceJIT.cpp diff -u reopt/lib/TraceJIT/TraceJIT.cpp:1.9 reopt/lib/TraceJIT/TraceJIT.cpp:1.10 --- reopt/lib/TraceJIT/TraceJIT.cpp:1.9 Mon Nov 29 16:52:36 2004 +++ reopt/lib/TraceJIT/TraceJIT.cpp Fri Dec 3 00:02:01 2004 @@ -262,6 +262,11 @@ TargetMachine *Target = ent->CtorFn(*MP->getModule(), IL); assert(Target && "Could not allocate target machine!"); + // Make sure we can resolve symbols in the program as well. The zero arg + // to the function tells DynamicLibrary to load the program, not a + // library. + sys::DynamicLibrary::LoadLibraryPermanently(0); + // If the target supports TraceJIT code generation, return a new TraceJIT now. if (TargetJITInfo *TJ = Target->getJITInfo()) return new TraceJIT(MP, *Target, *TJ); From reid at x10sys.com Fri Dec 3 00:04:46 2004 From: reid at x10sys.com (Reid Spencer) Date: Fri, 3 Dec 2004 00:04:46 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200412030604.AAA25128@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.245 -> 1.246 --- Log message: Pass -strip-debug to gccas when bytecode libraries are being built. --- Diffs of the changes: (+4 -0) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.245 llvm/Makefile.rules:1.246 --- llvm/Makefile.rules:1.245 Thu Dec 2 15:23:43 2004 +++ llvm/Makefile.rules Fri Dec 3 00:04:35 2004 @@ -510,6 +510,10 @@ #--------------------------------------------------------- ifdef BYTECODE_LIBRARY +# make the C and C++ compilers strip debug info out of bytecode libraries. +BCCompile.C += -Wa,-strip-debug +BCCompile.CXX += -Wa,-strip-debug + all-local:: $(LibName.BCA) ifdef EXPORTED_SYMBOL_FILE From lattner at cs.uiuc.edu Fri Dec 3 01:17:05 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 01:17:05 -0600 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/Intercept.cpp Message-ID: <200412030717.iB37H5Wa009828@apoc.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: Intercept.cpp updated: 1.18 -> 1.19 --- Log message: Do not look here for elegance. This fixes the ugly darwin "cannot find symbols starting with __" issue. Thanks for Owen/resistor for testing this out for me. --- Diffs of the changes: (+24 -0) Index: llvm/lib/ExecutionEngine/JIT/Intercept.cpp diff -u llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.18 llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.19 --- llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.18 Mon Nov 29 08:11:29 2004 +++ llvm/lib/ExecutionEngine/JIT/Intercept.cpp Fri Dec 3 01:16:51 2004 @@ -99,6 +99,30 @@ void *Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(Name); if (Ptr) return Ptr; + // If this is darwin, it has some funky issues, try to solve them here. Some + // important symbols are marked 'private external' which doesn't allow + // SearchForAddressOfSymbol to find them. As such, we special case them here, + // there is only a small handful of them. +#ifdef __APPLE__ + { + extern void *__ashldi3; if (Name == "__ashldi3") return &__ashldi3; + extern void *__ashrdi3; if (Name == "__ashrdi3") return &__ashrdi3; + extern void *__cmpdi2; if (Name == "__cmpdi2") return &__cmpdi2; + extern void *__divdi3; if (Name == "__divdi3") return &__divdi3; + extern void *__eprintf; if (Name == "__eprintf") return &__eprintf; + extern void *__fixdfdi; if (Name == "__fixdfdi") return &__fixdfdi; + extern void *__fixsfdi; if (Name == "__fixsfdi") return &__fixsfdi; + extern void *__fixunsdfdi; if (Name == "__fixunsdfdi") return &__fixunsdfdi; + extern void *__fixunssfdi; if (Name == "__fixunssfdi") return &__fixunssfdi; + extern void *__floatdidf; if (Name == "__floatdidf") return &__floatdidf; + extern void *__floatdisf; if (Name == "__floatdisf") return &__floatdisf; + extern void *__lshrdi3; if (Name == "__lshrdi3") return &__lshrdi3; + extern void *__moddi3; if (Name == "__moddi3") return &__moddi3; + extern void *__udivdi3; if (Name == "__udivdi3") return &__udivdi3; + extern void *__umoddi3; if (Name == "__umoddi3") return &__umoddi3; + } +#endif + std::cerr << "ERROR: Program used external function '" << Name << "' which could not be resolved!\n"; abort(); From criswell at cs.uiuc.edu Fri Dec 3 09:59:42 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri, 3 Dec 2004 09:59:42 -0600 Subject: [llvm-commits] CVS: llvm/docs/CodeGenerator.html Message-ID: <200412031559.JAA05162@choi.cs.uiuc.edu> Changes in directory llvm/docs: CodeGenerator.html updated: 1.8 -> 1.9 --- Log message: Fixed typo. --- Diffs of the changes: (+2 -2) Index: llvm/docs/CodeGenerator.html diff -u llvm/docs/CodeGenerator.html:1.8 llvm/docs/CodeGenerator.html:1.9 --- llvm/docs/CodeGenerator.html:1.8 Sat Jun 5 09:39:24 2004 +++ llvm/docs/CodeGenerator.html Fri Dec 3 09:59:26 2004 @@ -591,7 +591,7 @@ Base+[1,2,4,8]*IndexReg+Disp32
    -

    Wow, that's crazy. In order to represent this, LLVM tracks no less that 4 +

    Wow, that's crazy. In order to represent this, LLVM tracks no less than 4 operands for each memory operand of this form. This means that the "load" form of 'mov' has the following "Operands" in this order:

    @@ -637,7 +637,7 @@ Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/06/05 14:39:24 $ + Last modified: $Date: 2004/12/03 15:59:26 $ From lattner at cs.uiuc.edu Fri Dec 3 10:22:29 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 10:22:29 -0600 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/StripSymbols.cpp Message-ID: <200412031622.iB3GMTfi019099@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: StripSymbols.cpp updated: 1.1 -> 1.2 --- Log message: Implement stripping of debug symbols, making the --strip-debug options in gccas/gccld more than just a noop. --- Diffs of the changes: (+82 -2) Index: llvm/lib/Transforms/IPO/StripSymbols.cpp diff -u llvm/lib/Transforms/IPO/StripSymbols.cpp:1.1 llvm/lib/Transforms/IPO/StripSymbols.cpp:1.2 --- llvm/lib/Transforms/IPO/StripSymbols.cpp:1.1 Thu Dec 2 15:25:03 2004 +++ llvm/lib/Transforms/IPO/StripSymbols.cpp Fri Dec 3 10:22:08 2004 @@ -23,9 +23,12 @@ //===----------------------------------------------------------------------===// #include "llvm/Transforms/IPO.h" +#include "llvm/Constants.h" +#include "llvm/DerivedTypes.h" +#include "llvm/Instructions.h" #include "llvm/Module.h" -#include "llvm/SymbolTable.h" #include "llvm/Pass.h" +#include "llvm/SymbolTable.h" using namespace llvm; namespace { @@ -47,6 +50,26 @@ return new StripSymbols(OnlyDebugInfo); } +static void RemoveDeadConstant(Constant *C) { + assert(C->use_empty() && "Constant is not dead!"); + std::vector Operands; + for (unsigned i = 0, e = C->getNumOperands(); i != e; ++i) + if (isa(C->getOperand(i)->getType()) && + C->getOperand(i)->hasOneUse()) + Operands.push_back(C->getOperand(i)); + if (GlobalVariable *GV = dyn_cast(C)) { + if (!GV->hasInternalLinkage()) return; // Don't delete non static globals. + GV->eraseFromParent(); + } + else if (!isa(C)) + C->destroyConstant(); + + // If the constant referenced anything, see if we can delete it as well. + while (!Operands.empty()) { + RemoveDeadConstant(Operands.back()); + Operands.pop_back(); + } +} bool StripSymbols::runOnModule(Module &M) { // If we're not just stripping debug info, strip all symbols from the @@ -63,6 +86,63 @@ } } - // FIXME: implement stripping of debug info. + // Strip debug info in the module if it exists. To do this, we remove + // llvm.dbg.func.start, llvm.dbg.stoppoint, and llvm.dbg.region.end calls, and + // any globals they point to if now dead. + Function *FuncStart = M.getNamedFunction("llvm.dbg.func.start"); + Function *StopPoint = M.getNamedFunction("llvm.dbg.stoppoint"); + Function *RegionEnd = M.getNamedFunction("llvm.dbg.region.end"); + if (!FuncStart && !StopPoint && !RegionEnd) + return true; + + std::vector DeadGlobals; + + // Remove all of the calls to the debugger intrinsics, and remove them from + // the module. + if (FuncStart) { + Value *RV = UndefValue::get(StopPoint->getFunctionType()->getReturnType()); + while (!FuncStart->use_empty()) { + CallInst *CI = cast(FuncStart->use_back()); + Value *Arg = CI->getOperand(1); + CI->replaceAllUsesWith(RV); + CI->eraseFromParent(); + if (Arg->use_empty()) + if (GlobalVariable *GV = dyn_cast(Arg)) + DeadGlobals.push_back(GV); + } + FuncStart->eraseFromParent(); + } + if (StopPoint) { + Value *RV = UndefValue::get(StopPoint->getFunctionType()->getReturnType()); + while (!StopPoint->use_empty()) { + CallInst *CI = cast(StopPoint->use_back()); + Value *Arg = CI->getOperand(4); + CI->replaceAllUsesWith(RV); + CI->eraseFromParent(); + if (Arg->use_empty()) + if (GlobalVariable *GV = dyn_cast(Arg)) + DeadGlobals.push_back(GV); + } + StopPoint->eraseFromParent(); + } + if (RegionEnd) { + Value *RV = UndefValue::get(RegionEnd->getFunctionType()->getReturnType()); + while (!RegionEnd->use_empty()) { + CallInst *CI = cast(RegionEnd->use_back()); + CI->replaceAllUsesWith(RV); + CI->eraseFromParent(); + } + RegionEnd->eraseFromParent(); + } + + // Finally, delete any internal globals that were only used by the debugger + // intrinsics. + while (!DeadGlobals.empty()) { + GlobalVariable *GV = DeadGlobals.back(); + DeadGlobals.pop_back(); + if (GV->hasInternalLinkage()) + RemoveDeadConstant(GV); + } + return true; } From lattner at cs.uiuc.edu Fri Dec 3 11:03:49 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 11:03:49 -0600 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/compress.c pcompress2.c uncompress.c Message-ID: <200412031703.iB3H3nl5021042@apoc.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2: compress.c updated: 1.1 -> 1.2 pcompress2.c updated: 1.1 -> 1.2 uncompress.c updated: 1.1 -> 1.2 --- Log message: Increase filename buffer size so this testcase passes when passed in `pwd`/test.in and `pwd` is large --- Diffs of the changes: (+3 -3) Index: llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/compress.c diff -u llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/compress.c:1.1 llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/compress.c:1.2 --- llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/compress.c:1.1 Sat Oct 11 16:18:47 2003 +++ llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/compress.c Fri Dec 3 11:03:35 2004 @@ -37,7 +37,7 @@ void compress(int argc, char *argv[]) { char *filename; - char outname[100]; + char outname[1000]; struct stat buf; unsigned int filesize, outsize; Index: llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/pcompress2.c diff -u llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/pcompress2.c:1.1 llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/pcompress2.c:1.2 --- llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/pcompress2.c:1.1 Sat Oct 11 16:18:48 2003 +++ llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/pcompress2.c Fri Dec 3 11:03:35 2004 @@ -27,7 +27,7 @@ #ifndef BENCHMARK const char* argv0; #else - char filename[100]; + char filename[1000]; #endif #ifdef BENCHMARK Index: llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/uncompress.c diff -u llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/uncompress.c:1.1 llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/uncompress.c:1.2 --- llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/uncompress.c:1.1 Sat Oct 11 16:18:48 2003 +++ llvm-test/MultiSource/Benchmarks/FreeBench/pcompress2/uncompress.c Fri Dec 3 11:03:35 2004 @@ -40,7 +40,7 @@ FILE *fpi; #ifndef BENCHMARK FILE *fpo; - char outname[100]; + char outname[1000]; #endif unsigned int insize, outsize; From lattner at cs.uiuc.edu Fri Dec 3 11:18:57 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 11:18:57 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/CBackend/2004-12-03-ExternStatics.ll Message-ID: <200412031718.iB3HIvEw022384@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/CBackend: 2004-12-03-ExternStatics.ll added (r1.1) --- Log message: new testcase for PR472: http://llvm.cs.uiuc.edu/PR472 --- Diffs of the changes: (+12 -0) Index: llvm/test/Regression/CodeGen/CBackend/2004-12-03-ExternStatics.ll diff -c /dev/null llvm/test/Regression/CodeGen/CBackend/2004-12-03-ExternStatics.ll:1.1 *** /dev/null Fri Dec 3 11:18:52 2004 --- llvm/test/Regression/CodeGen/CBackend/2004-12-03-ExternStatics.ll Fri Dec 3 11:18:42 2004 *************** *** 0 **** --- 1,12 ---- + ; RUN: llvm-as < %s | llc -march=c | not grep 'extern.*msg' + + ; This is PR472 + + %msg = internal global [6 x sbyte] c"hello\00" + + implementation ; Functions: + + sbyte* %foo() { + entry: + ret sbyte* getelementptr ([6 x sbyte]* %msg, int 0, int 0) + } From lattner at cs.uiuc.edu Fri Dec 3 11:19:22 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 11:19:22 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp Message-ID: <200412031719.iB3HJMrg022398@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.211 -> 1.212 --- Log message: Fix test/Regression/CodeGen/CBackend/2004-12-03-ExternStatics.ll and PR472: http://llvm.cs.uiuc.edu/PR472 --- Diffs of the changes: (+4 -1) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.211 llvm/lib/Target/CBackend/Writer.cpp:1.212 --- llvm/lib/Target/CBackend/Writer.cpp:1.211 Thu Dec 2 13:02:49 2004 +++ llvm/lib/Target/CBackend/Writer.cpp Fri Dec 3 11:19:10 2004 @@ -858,7 +858,10 @@ Out << "\n\n/* Global Variable Declarations */\n"; for (Module::giterator I = M.gbegin(), E = M.gend(); I != E; ++I) if (!I->isExternal()) { - Out << "extern "; + if (I->hasInternalLinkage()) + Out << "static "; + else + Out << "extern "; printType(Out, I->getType()->getElementType(), Mang->getValueName(I)); if (I->hasLinkOnceLinkage()) From lattner at cs.uiuc.edu Fri Dec 3 11:21:47 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 11:21:47 -0600 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200412031721.iB3HLlHB022426@apoc.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.271 -> 1.272 --- Log message: Bug fixed --- Diffs of the changes: (+3 -1) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.271 llvm/docs/ReleaseNotes.html:1.272 --- llvm/docs/ReleaseNotes.html:1.271 Thu Dec 2 12:21:45 2004 +++ llvm/docs/ReleaseNotes.html Fri Dec 3 11:21:33 2004 @@ -254,6 +254,8 @@ tables defined
  • [X86] llc output for functions w/certain names tickles GNU 'as' bugs
  • +
  • [cbackend] Static globals are + prototyped as 'extern'
  • Bugs in the C/C++ front-end:

    @@ -733,7 +735,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/12/02 18:21:45 $ + Last modified: $Date: 2004/12/03 17:21:33 $ From lattner at cs.uiuc.edu Fri Dec 3 13:48:24 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 13:48:24 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Linker/testlink1.ll Message-ID: <200412031948.iB3JmOXm024714@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Linker: testlink1.ll updated: 1.10 -> 1.11 --- Log message: Do not multiply define symbol --- Diffs of the changes: (+1 -1) Index: llvm/test/Regression/Linker/testlink1.ll diff -u llvm/test/Regression/Linker/testlink1.ll:1.10 llvm/test/Regression/Linker/testlink1.ll:1.11 --- llvm/test/Regression/Linker/testlink1.ll:1.10 Mon Sep 15 15:04:28 2003 +++ llvm/test/Regression/Linker/testlink1.ll Fri Dec 3 13:48:10 2004 @@ -6,7 +6,7 @@ %MyIntList = global { \2 *, int } { { \2, int }* null, int 17 } external global int ; int*:0 -%AConst = constant int 123 +%AConst = linkonce constant int 123 %Intern1 = internal constant int 42 %Intern2 = internal constant int 792 From reid at x10sys.com Fri Dec 3 14:08:59 2004 From: reid at x10sys.com (Reid Spencer) Date: Fri, 3 Dec 2004 14:08:59 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200412032008.OAA31916@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.246 -> 1.247 --- Log message: Resurrect the install-bytecode target for installing just the bytecode libraries to the CFE. --- Diffs of the changes: (+8 -6) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.246 llvm/Makefile.rules:1.247 --- llvm/Makefile.rules:1.246 Fri Dec 3 00:04:35 2004 +++ llvm/Makefile.rules Fri Dec 3 14:08:48 2004 @@ -19,9 +19,10 @@ #-------------------------------------------------------------------- # Define the various target sets #-------------------------------------------------------------------- -RecursiveTargets := all clean clean-all check install uninstall +RecursiveTargets := all clean clean-all check install uninstall install-bytecode LocalTargets := all-local clean-local clean-all-local check-local \ - install-local printvars uninstall-local + install-local printvars uninstall-local \ + install-bytecode-local TopLevelTargets := dist dist-check dist-clean tags dist-gzip dist-bzip2 \ dist-zip UserTargets := $(RecursiveTargets) $(LocalTargets) $(TopLevelTargets) @@ -59,7 +60,7 @@ # PRECONDITIONS: that which must be built/checked first ################################################################################ -SrcMakefiles := $(filter %Makefile %Makefile.tests %Makefile.JIT,\ +SrcMakefiles := $(filter %Makefile %Makefile.tests,\ $(wildcard $(BUILD_SRC_DIR)/Makefile*)) ObjMakefiles := $(subst $(BUILD_SRC_DIR),$(BUILD_OBJ_DIR),$(SrcMakefiles)) ConfigureScript := $(LLVM_SRC_ROOT)/configure @@ -137,6 +138,7 @@ uninstall:: uninstall-local check-local:: all-local install-local:: all-local +install-bytecode:: install-bytecode-local ############################################################################### # VARIABLES: Set up various variables based on configuration data @@ -388,14 +390,14 @@ SubDirs += $(PARALLEL_DIRS) -# Unfortunately, this list must be maintained if new -# recursive targets are added. +# Unfortunately, this list must be maintained if new recursive targets are added all :: $(addsuffix /.makeall ,$(PARALLEL_DIRS)) clean :: $(addsuffix /.makeclean ,$(PARALLEL_DIRS)) clean-all:: $(addsuffix /.makeclean-all,$(PARALLEL_DIRS)) check :: $(addsuffix /.makecheck ,$(PARALLEL_DIRS)) install :: $(addsuffix /.makeinstall ,$(PARALLEL_DIRS)) uninstall:: $(addsuffix /.makeuninstall,$(PARALLEL_DIRS)) +install-bytecode :: $(addsuffix /.makeinstall-bytecode,$(PARALLEL_DIRS)) Parallel_Targets := $(foreach T,$(RecursiveTargets),%/.make$(T)) @@ -539,7 +541,7 @@ DestBytecodeLib = $(bytecode_libdir)/lib$(LIBRARYNAME).a -install-bytecode: $(DestBytecodeLib) +install-bytecode-local:: $(DestBytecodeLib) install-local:: $(DestBytecodeLib) From lattner at cs.uiuc.edu Fri Dec 3 15:06:12 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 15:06:12 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200412032106.iB3L6CfX021491@apoc.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.247 -> 1.248 --- Log message: 'make check' at the top level shouldn't recurse through the sourcedirs --- Diffs of the changes: (+1 -2) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.247 llvm/Makefile.rules:1.248 --- llvm/Makefile.rules:1.247 Fri Dec 3 14:08:48 2004 +++ llvm/Makefile.rules Fri Dec 3 15:05:57 2004 @@ -19,7 +19,7 @@ #-------------------------------------------------------------------- # Define the various target sets #-------------------------------------------------------------------- -RecursiveTargets := all clean clean-all check install uninstall install-bytecode +RecursiveTargets := all clean clean-all install uninstall install-bytecode LocalTargets := all-local clean-local clean-all-local check-local \ install-local printvars uninstall-local \ install-bytecode-local @@ -394,7 +394,6 @@ all :: $(addsuffix /.makeall ,$(PARALLEL_DIRS)) clean :: $(addsuffix /.makeclean ,$(PARALLEL_DIRS)) clean-all:: $(addsuffix /.makeclean-all,$(PARALLEL_DIRS)) -check :: $(addsuffix /.makecheck ,$(PARALLEL_DIRS)) install :: $(addsuffix /.makeinstall ,$(PARALLEL_DIRS)) uninstall:: $(addsuffix /.makeuninstall,$(PARALLEL_DIRS)) install-bytecode :: $(addsuffix /.makeinstall-bytecode,$(PARALLEL_DIRS)) From criswell at cs.uiuc.edu Fri Dec 3 15:56:45 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri, 3 Dec 2004 15:56:45 -0600 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl Message-ID: <200412032156.PAA32008@choi.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.74 -> 1.75 --- Log message: Removed QMTests as I will be zapping them soon. I've done some testing, and this seems to work, but if people who use the nightly tester regularly could spot check these changes, I'd be appreciative. --- Diffs of the changes: (+0 -51) Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.74 llvm/utils/NightlyTest.pl:1.75 --- llvm/utils/NightlyTest.pl:1.74 Tue Nov 23 10:23:50 2004 +++ llvm/utils/NightlyTest.pl Fri Dec 3 15:56:30 2004 @@ -493,53 +493,6 @@ if ($BuildError) { $NOFEATURES = 1; $NOREGRESSIONS = 1; $RUNDEJAGNU=0; } -# Get results of feature tests. -my $FeatureTestResults; # String containing the results of the feature tests -my $FeatureTime; # System+CPU Time for feature tests -my $FeatureWallTime; # Wall Clock Time for feature tests -if (!$NOFEATURES) { - if ( $VERBOSE ) { print "FEATURE TEST STAGE\n"; } - my $feature_output = "$FeatureTestsLog"; - - # Run the feature tests so we can summarize the results - system "(time -p gmake $MAKEOPTS -C test Feature.t) > $feature_output 2>&1"; - - # Extract test results - $FeatureTestResults = GetQMTestResults("$feature_output"); - - # Extract time of feature tests - my $FeatureTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$feature_output"; - my $FeatureTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$feature_output"; - $FeatureTime = $FeatureTimeU+$FeatureTimeS; # FeatureTime = User+System - $FeatureWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$feature_output"; - # Run the regression tests so we can summarize the results -} else { - $FeatureTestResults = "Skipped by user choice."; - $FeatureTime = "0.0"; - $FeatureWallTime = "0.0"; -} - -if (!$NOREGRESSIONS) { - if ( $VERBOSE ) { print "REGRESSION TEST STAGE\n"; } - my $regression_output = "$RegressionTestsLog"; - - # Run the regression tests so we can summarize the results - system "(time -p gmake $MAKEOPTS -C test Regression.t) > $regression_output 2>&1"; - - # Extract test results - $RegressionTestResults = GetQMTestResults("$regression_output"); - - # Extract time of regressions tests - my $RegressionTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$regression_output"; - my $RegressionTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$regression_output"; - $RegressionTime = $RegressionTimeU+$RegressionTimeS; # RegressionTime = User+System - $RegressionWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$regression_output"; -} else { - $RegressionTestResults = "Skipped by user choice."; - $RegressionTime = "0.0"; - $RegressionWallTime = "0.0"; -} - my $DejangnuTestResults; # String containing the results of the dejagnu if($RUNDEJAGNU) { if($VERBOSE) { print "DEJAGNU FEATURE/REGRESSION TEST STAGE\n"; } @@ -568,8 +521,6 @@ } if ($DEBUG) { - print $FeatureTestResults; - print $RegressionTestResults; print $DejagnuTestResults; } @@ -890,8 +841,6 @@ print "CVS Checkout: $CVSCheckoutTime seconds\n"; print "Files/Dirs/LOC in CVS: $NumFilesInCVS/$NumDirsInCVS/$LOC\n"; print "Build Time: $BuildTime seconds\n"; - print "Feature Test Time: $FeatureTime seconds\n"; - print "Regression Test Time: $RegressionTime seconds\n"; print "Libraries/Executables/Objects built: $NumLibraries/$NumExecutables/$NumObjects\n"; print "WARNINGS:\n $WarningsList\n"; From lattner at cs.uiuc.edu Fri Dec 3 16:18:56 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 16:18:56 -0600 Subject: [llvm-commits] CVS: llvm/lib/Linker/LinkModules.cpp Message-ID: <200412032218.iB3MIupB007424@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Linker: LinkModules.cpp updated: 1.95 -> 1.96 --- Log message: Significantly rework linker support for global variables, allowing it to correctly link globals whose LLVM types do not match. This fixes several of the F2C SPEC FP benchmarks, which were failing this due to the implementation of common blocks used by f2c. --- Diffs of the changes: (+101 -84) Index: llvm/lib/Linker/LinkModules.cpp diff -u llvm/lib/Linker/LinkModules.cpp:1.95 llvm/lib/Linker/LinkModules.cpp:1.96 --- llvm/lib/Linker/LinkModules.cpp:1.95 Thu Nov 25 03:29:44 2004 +++ llvm/lib/Linker/LinkModules.cpp Fri Dec 3 16:18:41 2004 @@ -374,10 +374,60 @@ "ForceRenaming didn't work"); } +/// GetLinkageResult - This analyzes the two global values and determines what +/// the result will look like in the destination module. In particular, it +/// computes the resultant linkage type, computes whether the global in the +/// source should be copied over to the destination (replacing the existing +/// one), and computes whether this linkage is an error or not. +static bool GetLinkageResult(GlobalValue *Dest, GlobalValue *Src, + GlobalValue::LinkageTypes <, bool &LinkFromSrc, + std::string *Err) { + assert((!Dest || !Src->hasInternalLinkage()) && + "If Src has internal linkage, Dest shouldn't be set!"); + if (!Dest) { + // Linking something to nothing. + LinkFromSrc = true; + LT = Src->getLinkage(); + } else if (Src->isExternal()) { + // If Src is external or if both Src & Drc are external.. Just link the + // external globals, we aren't adding anything. + LinkFromSrc = false; + LT = Dest->getLinkage(); + } else if (Dest->isExternal()) { + // If Dest is external but Src is not: + LinkFromSrc = true; + LT = Src->getLinkage(); + } else if (Src->hasAppendingLinkage() || Dest->hasAppendingLinkage()) { + if (Src->getLinkage() != Dest->getLinkage()) + return Error(Err, "Linking globals named '" + Src->getName() + + "': can only link appending global with another appending global!"); + LinkFromSrc = true; // Special cased. + LT = Src->getLinkage(); + } else if (Src->hasWeakLinkage() || Src->hasLinkOnceLinkage()) { + // At this point we know that Dest has LinkOnce, External or Weak linkage. + if (Dest->hasLinkOnceLinkage() && Src->hasWeakLinkage()) { + LinkFromSrc = true; + LT = Src->getLinkage(); + } else { + LinkFromSrc = false; + LT = Dest->getLinkage(); + } + } else if (Dest->hasWeakLinkage() || Dest->hasLinkOnceLinkage()) { + // At this point we know that Src has External linkage. + LinkFromSrc = true; + LT = GlobalValue::ExternalLinkage; + } else { + assert(Dest->hasExternalLinkage() && Src->hasExternalLinkage() && + "Unexpected linkage type!"); + return Error(Err, "Linking globals named '" + Src->getName() + + "': symbol multiply defined!"); + } + return false; +} // LinkGlobals - Loop through the global variables in the src module and merge // them into the dest module. -static bool LinkGlobals(Module *Dest, const Module *Src, +static bool LinkGlobals(Module *Dest, Module *Src, std::map &ValueMap, std::multimap &AppendingVars, std::map &GlobalsByName, @@ -387,8 +437,8 @@ SymbolTable *ST = (SymbolTable*)&Dest->getSymbolTable(); // Loop over all of the globals in the src module, mapping them over as we go - for (Module::const_giterator I = Src->gbegin(), E = Src->gend(); I != E; ++I){ - const GlobalVariable *SGV = I; + for (Module::giterator I = Src->gbegin(), E = Src->gend(); I != E; ++I) { + GlobalVariable *SGV = I; GlobalVariable *DGV = 0; // Check to see if may have to link the global. if (SGV->hasName() && !SGV->hasInternalLinkage()) @@ -398,17 +448,23 @@ GlobalsByName.find(SGV->getName()); if (EGV != GlobalsByName.end()) DGV = dyn_cast(EGV->second); - if (DGV && RecursiveResolveTypes(SGV->getType(), DGV->getType(),ST, "")) - DGV = 0; // FIXME: gross. + if (DGV) + // If types don't agree due to opaque types, try to resolve them. + RecursiveResolveTypes(SGV->getType(), DGV->getType(),ST, ""); } + if (DGV && DGV->hasInternalLinkage()) + DGV = 0; + assert(SGV->hasInitializer() || SGV->hasExternalLinkage() && "Global must either be external or have an initializer!"); - bool SGExtern = SGV->isExternal(); - bool DGExtern = DGV ? DGV->isExternal() : false; + GlobalValue::LinkageTypes NewLinkage; + bool LinkFromSrc; + if (GetLinkageResult(DGV, SGV, NewLinkage, LinkFromSrc, Err)) + return true; - if (!DGV || DGV->hasInternalLinkage() || SGV->hasInternalLinkage()) { + if (!DGV) { // No linking to be performed, simply create an identical version of the // symbol over in the dest module... the initializer will be filled in // later by LinkGlobalInits... @@ -428,81 +484,7 @@ if (SGV->hasAppendingLinkage()) // Keep track that this is an appending variable... AppendingVars.insert(std::make_pair(SGV->getName(), NewDGV)); - - } else if (SGV->isExternal()) { - // If SGV is external or if both SGV & DGV are external.. Just link the - // external globals, we aren't adding anything. - ValueMap.insert(std::make_pair(SGV, DGV)); - - // Inherit 'const' information. - if (SGV->isConstant()) DGV->setConstant(true); - - } else if (DGV->isExternal()) { // If DGV is external but SGV is not... - ValueMap.insert(std::make_pair(SGV, DGV)); - DGV->setLinkage(SGV->getLinkage()); // Inherit linkage! - - if (DGV->isConstant() && !SGV->isConstant()) - return Error(Err, "Linking globals named '" + SGV->getName() + - "': declaration is const but definition is not!"); - - // Inherit 'const' information. - if (SGV->isConstant()) DGV->setConstant(true); - - } else if (SGV->hasWeakLinkage() || SGV->hasLinkOnceLinkage()) { - // At this point we know that DGV has LinkOnce, Appending, Weak, or - // External linkage. If DGV is Appending, this is an error. - if (DGV->hasAppendingLinkage()) - return Error(Err, "Linking globals named '" + SGV->getName() + - "' with 'weak' and 'appending' linkage is not allowed!"); - - if (SGV->isConstant() != DGV->isConstant()) - return Error(Err, "Global Variable Collision on '" + - ToStr(SGV->getType(), Src) + " %" + SGV->getName() + - "' - Global variables differ in const'ness"); - - // Otherwise, just perform the link. - ValueMap.insert(std::make_pair(SGV, DGV)); - - // Linkonce+Weak = Weak - if (DGV->hasLinkOnceLinkage() && SGV->hasWeakLinkage()) - DGV->setLinkage(SGV->getLinkage()); - - } else if (DGV->hasWeakLinkage() || DGV->hasLinkOnceLinkage()) { - // At this point we know that SGV has LinkOnce, Appending, or External - // linkage. If SGV is Appending, this is an error. - if (SGV->hasAppendingLinkage()) - return Error(Err, "Linking globals named '" + SGV->getName() + - " ' with 'weak' and 'appending' linkage is not allowed!"); - - if (SGV->isConstant() != DGV->isConstant()) - return Error(Err, "Global Variable Collision on '" + - ToStr(SGV->getType(), Src) + " %" + SGV->getName() + - "' - Global variables differ in const'ness"); - - if (!SGV->hasLinkOnceLinkage()) - DGV->setLinkage(SGV->getLinkage()); // Inherit linkage! - ValueMap.insert(std::make_pair(SGV, DGV)); - - } else if (SGV->getLinkage() != DGV->getLinkage()) { - return Error(Err, "Global variables named '" + SGV->getName() + - "' have different linkage specifiers!"); - // Inherit 'const' information. - if (SGV->isConstant()) DGV->setConstant(true); - - } else if (SGV->hasExternalLinkage()) { - // Allow linking two exactly identical external global variables... - if (SGV->isConstant() != DGV->isConstant()) - return Error(Err, "Global Variable Collision on '" + - ToStr(SGV->getType(), Src) + " %" + SGV->getName() + - "' - Global variables differ in const'ness"); - - if (SGV->getInitializer() != DGV->getInitializer()) - return Error(Err, "Global Variable Collision on '" + - ToStr(SGV->getType(), Src) + " %" + SGV->getName() + - "' - External linkage globals have different initializers"); - - ValueMap.insert(std::make_pair(SGV, DGV)); - } else if (SGV->hasAppendingLinkage()) { + } else if (DGV->hasAppendingLinkage()) { // No linking is performed yet. Just insert a new copy of the global, and // keep track of the fact that it is an appending variable in the // AppendingVars map. The name is cleared out so that no linkage is @@ -518,7 +500,42 @@ // Keep track that this is an appending variable... AppendingVars.insert(std::make_pair(SGV->getName(), NewDGV)); } else { - assert(0 && "Unknown linkage!"); + // Otherwise, perform the mapping as instructed by GetLinkageResult. If + // the types don't match, and if we are to link from the source, nuke DGV + // and create a new one of the appropriate type. + if (SGV->getType() != DGV->getType() && LinkFromSrc) { + GlobalVariable *NewDGV = + new GlobalVariable(SGV->getType()->getElementType(), + DGV->isConstant(), DGV->getLinkage()); + Dest->getGlobalList().insert(DGV, NewDGV); + DGV->replaceAllUsesWith(ConstantExpr::getCast(NewDGV, DGV->getType())); + DGV->eraseFromParent(); + NewDGV->setName(SGV->getName()); + DGV = NewDGV; + } + + DGV->setLinkage(NewLinkage); + + if (LinkFromSrc) { + if (DGV->isConstant() && !SGV->isConstant()) + return Error(Err, "Global Variable Collision on global '" + + SGV->getName() + "': variables differ in const'ness"); + // Inherit const as appropriate + if (SGV->isConstant()) DGV->setConstant(true); + DGV->setInitializer(0); + } else { + if (SGV->isConstant() && !DGV->isConstant()) { + if (!DGV->isExternal()) + return Error(Err, "Global Variable Collision on global '" + + SGV->getName() + "': variables differ in const'ness"); + else + DGV->setConstant(true); + } + } + + ValueMap.insert(std::make_pair(SGV, + ConstantExpr::getCast(DGV, + SGV->getType()))); } } return false; From lattner at cs.uiuc.edu Fri Dec 3 16:44:32 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 16:44:32 -0600 Subject: [llvm-commits] CVS: llvm-www/testresults/index.html Message-ID: <200412032244.iB3MiWvS008255@apoc.cs.uiuc.edu> Changes in directory llvm-www/testresults: index.html updated: 1.19 -> 1.20 --- Log message: PPC has JIT too! --- Diffs of the changes: (+1 -2) Index: llvm-www/testresults/index.html diff -u llvm-www/testresults/index.html:1.19 llvm-www/testresults/index.html:1.20 --- llvm-www/testresults/index.html:1.19 Fri Nov 19 02:40:35 2004 +++ llvm-www/testresults/index.html Fri Dec 3 16:44:20 2004 @@ -34,8 +34,7 @@
    1. PPC: Mac OS X -10.3 "Panther" on PowerPC G5 (dual 1.8Ghz CPU) (CBE and LLC -only)
    2. +10.3 "Panther" on PowerPC G5 (dual 1.8Ghz CPU)

    Sparc V9:

    From lattner at cs.uiuc.edu Fri Dec 3 16:53:46 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 16:53:46 -0600 Subject: [llvm-commits] CVS: llvm-www/testresults/index.html Message-ID: <200412032253.iB3Mrk4j009015@apoc.cs.uiuc.edu> Changes in directory llvm-www/testresults: index.html updated: 1.20 -> 1.21 --- Log message: Misha is such a whiner :-) --- Diffs of the changes: (+1 -1) Index: llvm-www/testresults/index.html diff -u llvm-www/testresults/index.html:1.20 llvm-www/testresults/index.html:1.21 --- llvm-www/testresults/index.html:1.20 Fri Dec 3 16:44:20 2004 +++ llvm-www/testresults/index.html Fri Dec 3 16:53:36 2004 @@ -34,7 +34,7 @@
    1. PPC: Mac OS X -10.3 "Panther" on PowerPC G5 (dual 1.8Ghz CPU)
    2. +10.3 "Panther" on PowerPC G5 (dual 1.8Ghz CPU)

    Sparc V9:

    From lattner at cs.uiuc.edu Fri Dec 3 17:02:56 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 17:02:56 -0600 Subject: [llvm-commits] CVS: llvm/lib/System/DynamicLibrary.cpp Message-ID: <200412032302.iB3N2uC2009353@apoc.cs.uiuc.edu> Changes in directory llvm/lib/System: DynamicLibrary.cpp updated: 1.4 -> 1.5 --- Log message: Move darwin-specific majik here. --- Diffs of the changes: (+27 -5) Index: llvm/lib/System/DynamicLibrary.cpp diff -u llvm/lib/System/DynamicLibrary.cpp:1.4 llvm/lib/System/DynamicLibrary.cpp:1.5 --- llvm/lib/System/DynamicLibrary.cpp:1.4 Mon Nov 29 07:33:28 2004 +++ llvm/lib/System/DynamicLibrary.cpp Fri Dec 3 17:02:42 2004 @@ -14,6 +14,8 @@ #include "llvm/System/DynamicLibrary.h" #include "ltdl.h" #include +using namespace llvm; +using namespace llvm::sys; //===----------------------------------------------------------------------===// //=== WARNING: Implementation here must contain only TRULY operating system @@ -32,10 +34,6 @@ static std::vector OpenedHandles; -namespace llvm { - -using namespace sys; - DynamicLibrary::DynamicLibrary() : handle(0) { check_ltdl_initialization(); @@ -101,6 +99,31 @@ if (ptr) return ptr; } + + // If this is darwin, it has some funky issues, try to solve them here. Some + // important symbols are marked 'private external' which doesn't allow + // SearchForAddressOfSymbol to find them. As such, we special case them here, + // there is only a small handful of them. +#ifdef __APPLE__ + { + extern void *__ashldi3; if (Name == "__ashldi3") return &__ashldi3; + extern void *__ashrdi3; if (Name == "__ashrdi3") return &__ashrdi3; + extern void *__cmpdi2; if (Name == "__cmpdi2") return &__cmpdi2; + extern void *__divdi3; if (Name == "__divdi3") return &__divdi3; + extern void *__eprintf; if (Name == "__eprintf") return &__eprintf; + extern void *__fixdfdi; if (Name == "__fixdfdi") return &__fixdfdi; + extern void *__fixsfdi; if (Name == "__fixsfdi") return &__fixsfdi; + extern void *__fixunsdfdi; if (Name == "__fixunsdfdi") return &__fixunsdfdi; + extern void *__fixunssfdi; if (Name == "__fixunssfdi") return &__fixunssfdi; + extern void *__floatdidf; if (Name == "__floatdidf") return &__floatdidf; + extern void *__floatdisf; if (Name == "__floatdisf") return &__floatdisf; + extern void *__lshrdi3; if (Name == "__lshrdi3") return &__lshrdi3; + extern void *__moddi3; if (Name == "__moddi3") return &__moddi3; + extern void *__udivdi3; if (Name == "__udivdi3") return &__udivdi3; + extern void *__umoddi3; if (Name == "__umoddi3") return &__umoddi3; + } +#endif + return 0; } @@ -109,4 +132,3 @@ return lt_dlsym((lt_dlhandle) handle, symbolName); } -} // namespace llvm From lattner at cs.uiuc.edu Fri Dec 3 17:03:08 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 17:03:08 -0600 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/Intercept.cpp Message-ID: <200412032303.iB3N38ik009362@apoc.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: Intercept.cpp updated: 1.19 -> 1.20 --- Log message: Remove darwin specific majik --- Diffs of the changes: (+0 -24) Index: llvm/lib/ExecutionEngine/JIT/Intercept.cpp diff -u llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.19 llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.20 --- llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.19 Fri Dec 3 01:16:51 2004 +++ llvm/lib/ExecutionEngine/JIT/Intercept.cpp Fri Dec 3 17:02:55 2004 @@ -99,30 +99,6 @@ void *Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(Name); if (Ptr) return Ptr; - // If this is darwin, it has some funky issues, try to solve them here. Some - // important symbols are marked 'private external' which doesn't allow - // SearchForAddressOfSymbol to find them. As such, we special case them here, - // there is only a small handful of them. -#ifdef __APPLE__ - { - extern void *__ashldi3; if (Name == "__ashldi3") return &__ashldi3; - extern void *__ashrdi3; if (Name == "__ashrdi3") return &__ashrdi3; - extern void *__cmpdi2; if (Name == "__cmpdi2") return &__cmpdi2; - extern void *__divdi3; if (Name == "__divdi3") return &__divdi3; - extern void *__eprintf; if (Name == "__eprintf") return &__eprintf; - extern void *__fixdfdi; if (Name == "__fixdfdi") return &__fixdfdi; - extern void *__fixsfdi; if (Name == "__fixsfdi") return &__fixsfdi; - extern void *__fixunsdfdi; if (Name == "__fixunsdfdi") return &__fixunsdfdi; - extern void *__fixunssfdi; if (Name == "__fixunssfdi") return &__fixunssfdi; - extern void *__floatdidf; if (Name == "__floatdidf") return &__floatdidf; - extern void *__floatdisf; if (Name == "__floatdisf") return &__floatdisf; - extern void *__lshrdi3; if (Name == "__lshrdi3") return &__lshrdi3; - extern void *__moddi3; if (Name == "__moddi3") return &__moddi3; - extern void *__udivdi3; if (Name == "__udivdi3") return &__udivdi3; - extern void *__umoddi3; if (Name == "__umoddi3") return &__umoddi3; - } -#endif - std::cerr << "ERROR: Program used external function '" << Name << "' which could not be resolved!\n"; abort(); From brukman at cs.uiuc.edu Fri Dec 3 17:26:34 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Fri, 3 Dec 2004 17:26:34 -0600 Subject: [llvm-commits] CVS: llvm/docs/index.html Message-ID: <200412032326.RAA21011@zion.cs.uiuc.edu> Changes in directory llvm/docs: index.html updated: 1.36 -> 1.37 --- Log message: Remove extraneous space in link --- Diffs of the changes: (+3 -3) Index: llvm/docs/index.html diff -u llvm/docs/index.html:1.36 llvm/docs/index.html:1.37 --- llvm/docs/index.html:1.36 Sun Nov 21 08:58:12 2004 +++ llvm/docs/index.html Fri Dec 3 17:26:23 2004 @@ -138,8 +138,8 @@ understand how to use the libraries produced when LLVM is compiled.
  • Doxygen generated -documentation ( -classes)
  • +documentation (classes)
  • CVSWeb CVS Tree Browser
  • @@ -229,6 +229,6 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"> LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/11/21 14:58:12 $ + Last modified: $Date: 2004/12/03 23:26:23 $ From lattner at cs.uiuc.edu Fri Dec 3 17:54:48 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 17:54:48 -0600 Subject: [llvm-commits] CVS: llvm-test/External/SPEC/CINT2000/Makefile Message-ID: <200412032354.iB3NsmY8011549@apoc.cs.uiuc.edu> Changes in directory llvm-test/External/SPEC/CINT2000: Makefile updated: 1.18 -> 1.19 --- Log message: eon sends the V9 backend spinning into swapsville --- Diffs of the changes: (+1 -0) Index: llvm-test/External/SPEC/CINT2000/Makefile diff -u llvm-test/External/SPEC/CINT2000/Makefile:1.18 llvm-test/External/SPEC/CINT2000/Makefile:1.19 --- llvm-test/External/SPEC/CINT2000/Makefile:1.18 Mon Sep 6 23:18:02 2004 +++ llvm-test/External/SPEC/CINT2000/Makefile Fri Dec 3 17:54:33 2004 @@ -19,6 +19,7 @@ # Disable crafty until it stops infinite-looping on Sparc ifeq ($(ARCH), Sparc) PARALLEL_DIRS := $(filter-out 186.crafty, $(PARALLEL_DIRS)) +PARALLEL_DIRS := $(filter-out 252.eon, $(PARALLEL_DIRS)) endif include $(LEVEL)/Makefile.programs From lattner at cs.uiuc.edu Fri Dec 3 17:57:13 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 17:57:13 -0600 Subject: [llvm-commits] CVS: llvm/Makefile Message-ID: <200412032357.iB3NvD7l011695@apoc.cs.uiuc.edu> Changes in directory llvm: Makefile updated: 1.43 -> 1.44 --- Log message: check is now a single colon rule. Also make it default to running dejagnu instead of qmtest --- Diffs of the changes: (+2 -4) Index: llvm/Makefile diff -u llvm/Makefile:1.43 llvm/Makefile:1.44 --- llvm/Makefile:1.43 Sun Nov 28 22:57:55 2004 +++ llvm/Makefile Fri Dec 3 17:57:00 2004 @@ -43,10 +43,8 @@ $(TopDistDir)/include/llvm/Support/DataTypes.h \ $(TopDistDir)/include/llvm/Support/ThreadSupport.h -check :: - $(MAKE) -C test +check : + $(MAKE) -C test check-dejagnu TESTSUITE=$(TESTSUITE) tools-only: all -check-dejagnu: - $(MAKE) -C test check-dejagnu TESTSUITE=$(TESTSUITE) From lattner at cs.uiuc.edu Fri Dec 3 17:57:23 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 17:57:23 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200412032357.iB3NvNnZ011701@apoc.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.248 -> 1.249 --- Log message: Remove all recursive check support from Makefile.rules --- Diffs of the changes: (+2 -4) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.248 llvm/Makefile.rules:1.249 --- llvm/Makefile.rules:1.248 Fri Dec 3 15:05:57 2004 +++ llvm/Makefile.rules Fri Dec 3 17:56:41 2004 @@ -20,7 +20,7 @@ # Define the various target sets #-------------------------------------------------------------------- RecursiveTargets := all clean clean-all install uninstall install-bytecode -LocalTargets := all-local clean-local clean-all-local check-local \ +LocalTargets := all-local clean-local clean-all-local \ install-local printvars uninstall-local \ install-bytecode-local TopLevelTargets := dist dist-check dist-clean tags dist-gzip dist-bzip2 \ @@ -131,12 +131,10 @@ $(UserTargets):: $(PreConditions) all:: all-local -check:: check-local clean:: clean-local clean-all:: clean-local clean-all-local install:: install-local uninstall:: uninstall-local -check-local:: all-local install-local:: all-local install-bytecode:: install-bytecode-local @@ -1075,7 +1073,7 @@ DistCheckTop := else -DistCheckTop := check +DistCheckTop := #------------------------------------------------------------------------ # Prevent catastrophic remove From brukman at cs.uiuc.edu Fri Dec 3 17:58:29 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Fri, 3 Dec 2004 17:58:29 -0600 Subject: [llvm-commits] CVS: llvm/docs/FAQ.html Message-ID: <200412032358.RAA21776@zion.cs.uiuc.edu> Changes in directory llvm/docs: FAQ.html updated: 1.24 -> 1.25 --- Log message: * Link to the license file from release 1.3 (should we link to CVS version instead?) * Encapsulate code and header file names with and * Arrange

    and

    tags to be inline with the text they contain --- Diffs of the changes: (+19 -20) Index: llvm/docs/FAQ.html diff -u llvm/docs/FAQ.html:1.24 llvm/docs/FAQ.html:1.25 --- llvm/docs/FAQ.html:1.24 Thu Sep 9 11:36:47 2004 +++ llvm/docs/FAQ.html Fri Dec 3 17:58:18 2004 @@ -123,7 +123,7 @@

    Yes. The modified source distribution must retain the copyright notice and follow the three bulletted conditions listed in the LLVM license.

    +href="http://llvm.cs.uiuc.edu/releases/1.3/LICENSE.TXT">LLVM license.

    @@ -519,34 +519,33 @@ -

    -What is this llvm.global_ctors and _GLOBAL__I__tmp_webcompile... stuff that happens when I #include <iostream>? -

    +
    +

    What is this llvm.global_ctors and +_GLOBAL__I__tmp_webcompile... stuff that happens when I #include +<iostream>?

    +
    -

    -If you #include the <iostream> header into a C++ translation unit, the + +

    If you #include the <iostream> header into a C++ translation unit, the file will probably use the std::cin/std::cout/... global objects. However, C++ does not guarantee an order of initialization between static objects in different translation units, so if a static ctor/dtor in your .cpp file used std::cout, for example, the object would not necessarily -be automatically initialized before your use. -

    +be automatically initialized before your use.

    -

    -To make std::cout and friends work correctly in these scenarios, the +

    To make std::cout and friends work correctly in these scenarios, the STL that we use declares a static object that gets created in every translation -unit that includes <iostream>. This object has a static constructor and -destructor that initializes and destroys the global iostream objects before they -could possibly be used in the file. The code that you see in the .ll file -corresponds to the constructor and destructor registration code. +unit that includes <iostream>. This object has a static +constructor and destructor that initializes and destroys the global iostream +objects before they could possibly be used in the file. The code that you see +in the .ll file corresponds to the constructor and destructor registration code.

    -

    -If you would like to make it easier to understand the LLVM code generated -by the compiler in the demo page, consider using printf instead of iostreams to -print values. -

    +

    If you would like to make it easier to understand the LLVM code +generated by the compiler in the demo page, consider using printf() +instead of iostreams to print values.

    +
    @@ -559,7 +558,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"> LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/09/09 16:36:47 $ + Last modified: $Date: 2004/12/03 23:58:18 $ From lattner at cs.uiuc.edu Fri Dec 3 18:05:03 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 18:05:03 -0600 Subject: [llvm-commits] CVS: llvm/docs/MakefileGuide.html Message-ID: <200412040005.iB4053fo012961@apoc.cs.uiuc.edu> Changes in directory llvm/docs: MakefileGuide.html updated: 1.16 -> 1.17 --- Log message: Update for changes to check targets. --- Diffs of the changes: (+5 -30) Index: llvm/docs/MakefileGuide.html diff -u llvm/docs/MakefileGuide.html:1.16 llvm/docs/MakefileGuide.html:1.17 --- llvm/docs/MakefileGuide.html:1.16 Mon Nov 29 01:47:16 2004 +++ llvm/docs/MakefileGuide.html Fri Dec 3 18:04:48 2004 @@ -41,7 +41,6 @@
  • all
  • all-local
  • check
  • -
  • check-local
  • clean
  • clean-local
  • dist
  • @@ -313,8 +312,8 @@

    This section describes each of the targets that can be built using the LLVM Makefile system. Any target can be invoked from any directory but not all are - applicable to a given directory (e.g. "dist" and "install" will always operate - as if invoked from the top level directory).

    + applicable to a given directory (e.g. "check", "dist", and "install" will + always operate as if invoked from the top level directory).

    @@ -324,11 +323,8 @@ - - - - +
    Target NameImplied TargetsTarget Description
    all-local Compile the software in the local directory only.
    checkallTest the software recursively. -
    check-localall-localTest the software in the local directory only. +
    checkChange to the llvm/test directory and run regression tests.
    clean Remove built objects recursively. @@ -382,27 +378,6 @@ - -
    -

    This target is used to perform any functional, unit or sanity tests as the - software is being built. The check target depends on the - all target so the software is built in each - directory first and then the "check" is applied.

    -

    The definition of "check" is pretty general. It depends on the value of the - TESTS variable. This variable should be set to a - list of executables to run in order to test the software. If they all return - 0 then the check succeeds, otherwise not. The programs run can be anything but - they should either be local to the directory or in your path.

    -
    - - - -
    -

    This target does the same thing as check but only for the current - (local) directory.

    -
    - -

    This target cleans the build directory, recursively removing all things @@ -895,7 +870,7 @@ Reid Spencer
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/11/29 07:47:16 $ + Last modified: $Date: 2004/12/04 00:04:48 $ From brukman at cs.uiuc.edu Fri Dec 3 18:32:23 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Fri, 3 Dec 2004 18:32:23 -0600 Subject: [llvm-commits] CVS: llvm/docs/CodingStandards.html Message-ID: <200412040032.SAA22255@zion.cs.uiuc.edu> Changes in directory llvm/docs: CodingStandards.html updated: 1.24 -> 1.25 --- Log message: Documentation which contains smileys won't be taken seriously by some people. --- Diffs of the changes: (+7 -8) Index: llvm/docs/CodingStandards.html diff -u llvm/docs/CodingStandards.html:1.24 llvm/docs/CodingStandards.html:1.25 --- llvm/docs/CodingStandards.html:1.24 Tue Oct 26 11:18:43 2004 +++ llvm/docs/CodingStandards.html Fri Dec 3 18:32:12 2004 @@ -111,7 +111,7 @@

    Comments are one critical part of readability and maintainability. Everyone -knows they should comment, so should you. :) Although we all should probably +knows they should comment, so should you. Although we all should probably comment our code more than we do, there are a few very critical places that documentation is very useful:

    @@ -164,7 +164,7 @@ a class definition should have a comment block that explains what the class is used for... if it's not obvious. If it's so completely obvious your grandma could figure it out, it's probably safe to leave it out. Naming classes -something sane goes a long ways towards avoiding writing documentation. :)

    +something sane goes a long ways towards avoiding writing documentation.

    Method information @@ -194,7 +194,7 @@
    1. When writing a C code: Obviously if you are writing C code, use C style - comments. :)
    2. + comments.
    3. When writing a header file that may be #included by a C source file.
    4. When writing a source file that is used by a tool that only accepts C @@ -470,7 +470,7 @@

      Many modules have a complex implementation that causes them to use more than one implementation (.cpp) file. It is often tempting to put the internal communication interface (helper classes, extra functions, etc) in the -public module header file. Don't do this. :)

      +public module header file. Don't do this.

      If you really need to do something like this, put a private header file in the same directory as the source files, and include it locally. This ensures @@ -594,8 +594,7 @@

      For these reasons, come to know and love the contents of your local <algorithm> header file. Know about <functional> -and what it can do for you. C++ is just a tool that wants you to master it. -:)

      +and what it can do for you. C++ is just a tool that wants you to master it.

    @@ -625,7 +624,7 @@

    If you get some free time, and you haven't read them: do so, you might learn -something. :)

    +something.

    @@ -640,7 +639,7 @@ Chris Lattner
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/10/26 16:18:43 $ + Last modified: $Date: 2004/12/04 00:32:12 $ From brukman at cs.uiuc.edu Fri Dec 3 18:33:45 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Fri, 3 Dec 2004 18:33:45 -0600 Subject: [llvm-commits] CVS: llvm/docs/SourceLevelDebugging.html Message-ID: <200412040033.SAA22420@zion.cs.uiuc.edu> Changes in directory llvm/docs: SourceLevelDebugging.html updated: 1.9 -> 1.10 --- Log message: Remove more smileys. I kept the one in WritingAnLLVMPass because it is actually funny. --- Diffs of the changes: (+3 -3) Index: llvm/docs/SourceLevelDebugging.html diff -u llvm/docs/SourceLevelDebugging.html:1.9 llvm/docs/SourceLevelDebugging.html:1.10 --- llvm/docs/SourceLevelDebugging.html:1.9 Mon Nov 1 02:19:36 2004 +++ llvm/docs/SourceLevelDebugging.html Fri Dec 3 18:33:34 2004 @@ -223,7 +223,7 @@

    For someone so inclined, it should be straight-forward to write different front-ends for the LLVM debugger, as the LLVM debugging engine is cleanly separated from the llvm-db front-end. A new LLVM GUI debugger or IDE -would be nice. :)

    +would be nice.

    @@ -246,7 +246,7 @@ provides the subset of GDB commands that are applicable to LLVM debugging users. If there is a command missing that make a reasonable amount of sense within the limitations of llvm-db, please report it as -a bug or, better yet, submit a patch to add it. :)

    +a bug or, better yet, submit a patch to add it.

    @@ -1109,7 +1109,7 @@ Chris Lattner
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/11/01 08:19:36 $ + Last modified: $Date: 2004/12/04 00:33:34 $ From brukman at cs.uiuc.edu Fri Dec 3 18:45:19 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Fri, 3 Dec 2004 18:45:19 -0600 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200412040045.SAA22712@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.272 -> 1.273 --- Log message: Use the standard PR### notation for referencing bugs in bugzilla --- Diffs of the changes: (+2 -3) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.272 llvm/docs/ReleaseNotes.html:1.273 --- llvm/docs/ReleaseNotes.html:1.272 Fri Dec 3 11:21:33 2004 +++ llvm/docs/ReleaseNotes.html Fri Dec 3 18:45:09 2004 @@ -419,8 +419,7 @@
  • Initialization of global union variables can only be done with the largest union -member.
  • +href="http://llvm.cs.uiuc.edu/PR162">with the largest union member.
  • [llvm-gcc] Error when an implicitly external function is re-declared as static
  • @@ -735,7 +734,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/12/03 17:21:33 $ + Last modified: $Date: 2004/12/04 00:45:09 $ From lattner at cs.uiuc.edu Fri Dec 3 19:22:24 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 19:22:24 -0600 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveInterval.cpp Message-ID: <200412040122.iB41MOPR019177@apoc.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveInterval.cpp updated: 1.18 -> 1.19 --- Log message: Prevent accessing past the end of the intervals vector, this fixes Prolang-C/bison in the JIT --- Diffs of the changes: (+3 -1) Index: llvm/lib/CodeGen/LiveInterval.cpp diff -u llvm/lib/CodeGen/LiveInterval.cpp:1.18 llvm/lib/CodeGen/LiveInterval.cpp:1.19 --- llvm/lib/CodeGen/LiveInterval.cpp:1.18 Wed Nov 17 23:28:21 2004 +++ llvm/lib/CodeGen/LiveInterval.cpp Fri Dec 3 19:22:09 2004 @@ -74,7 +74,9 @@ i = std::upper_bound(i, ie, j->start); if (i != ranges.begin()) --i; } else if (j->start < i->start) { - if ((++StartPos)->start <= i->start) { + ++StartPos; + if (StartPos != other.end() && StartPos->start <= i->start) { + assert(StartPos < other.end() && i < end()); j = std::upper_bound(j, je, i->start); if (j != other.ranges.begin()) --j; } From alkis at cs.uiuc.edu Fri Dec 3 19:25:17 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Fri, 3 Dec 2004 19:25:17 -0600 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp Message-ID: <200412040125.TAA23191@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Verifier.cpp updated: 1.121 -> 1.122 --- Log message: Make error msg reflect what exactly went wrong. --- Diffs of the changes: (+3 -3) Index: llvm/lib/VMCore/Verifier.cpp diff -u llvm/lib/VMCore/Verifier.cpp:1.121 llvm/lib/VMCore/Verifier.cpp:1.122 --- llvm/lib/VMCore/Verifier.cpp:1.121 Fri Oct 29 13:43:17 2004 +++ llvm/lib/VMCore/Verifier.cpp Fri Dec 3 19:25:06 2004 @@ -379,9 +379,9 @@ void Verifier::visitReturnInst(ReturnInst &RI) { Function *F = RI.getParent()->getParent(); if (RI.getNumOperands() == 0) - Assert1(F->getReturnType() == Type::VoidTy, - "Function returns no value, but ret instruction found that does!", - &RI); + Assert2(F->getReturnType() == Type::VoidTy, + "Found return instr that returns void in Function of non-void " + "return type!", &RI, F->getReturnType()); else Assert2(F->getReturnType() == RI.getOperand(0)->getType(), "Function return type does not match operand " From lattner at cs.uiuc.edu Fri Dec 3 19:30:05 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 19:30:05 -0600 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/SetjmpLongjmp/C++/SimpleC++Test.cpp Message-ID: <200412040130.iB41U5D1019796@apoc.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/SetjmpLongjmp/C++: SimpleC++Test.cpp (r1.1) removed --- Log message: This test will always fail, because gcc doesn't implement longjmp right. Remove it to avoid looking like we have something broken that is "simple" --- Diffs of the changes: (+0 -0) From alkis at cs.uiuc.edu Fri Dec 3 19:44:16 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Fri, 3 Dec 2004 19:44:16 -0600 Subject: [llvm-commits] CVS: llvm-java/include/llvm/Java/BytecodeParser.h Message-ID: <200412040144.TAA23614@zion.cs.uiuc.edu> Changes in directory llvm-java/include/llvm/Java: BytecodeParser.h updated: 1.13 -> 1.14 --- Log message: On the areturn bytecode call do_areturn().. duh! --- Diffs of the changes: (+1 -1) Index: llvm-java/include/llvm/Java/BytecodeParser.h diff -u llvm-java/include/llvm/Java/BytecodeParser.h:1.13 llvm-java/include/llvm/Java/BytecodeParser.h:1.14 --- llvm-java/include/llvm/Java/BytecodeParser.h:1.13 Wed Nov 3 02:15:59 2004 +++ llvm-java/include/llvm/Java/BytecodeParser.h Fri Dec 3 19:44:05 2004 @@ -546,7 +546,7 @@ THIS->do_dreturn(); break; case ARETURN: - THIS->do_return(); + THIS->do_areturn(); break; case RETURN: THIS->do_return(); From alkis at cs.uiuc.edu Fri Dec 3 20:01:49 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Fri, 3 Dec 2004 20:01:49 -0600 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200412040201.UAA23878@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.152 -> 1.153 --- Log message: Cast to correct type when returning a value. --- Diffs of the changes: (+2 -1) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.152 llvm-java/lib/Compiler/Compiler.cpp:1.153 --- llvm-java/lib/Compiler/Compiler.cpp:1.152 Thu Dec 2 18:29:42 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Fri Dec 3 20:01:38 2004 @@ -1893,7 +1893,8 @@ void do_return_common() { Value* r = currentOpStack_->pop(currentBB_); - new ReturnInst(r, currentBB_); + const Type* retTy = currentBB_->getParent()->getReturnType(); + new ReturnInst(new CastInst(r, retTy, TMP, currentBB_), currentBB_); } void do_return() { From alkis at cs.uiuc.edu Fri Dec 3 20:04:46 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Fri, 3 Dec 2004 20:04:46 -0600 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200412040204.UAA23919@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.153 -> 1.154 --- Log message: Cast to correct type (pointer to llvm_base_obj) when calling an interface or virtual method. --- Diffs of the changes: (+4 -2) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.153 llvm-java/lib/Compiler/Compiler.cpp:1.154 --- llvm-java/lib/Compiler/Compiler.cpp:1.153 Fri Dec 3 20:01:38 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Fri Dec 3 20:04:35 2004 @@ -2053,7 +2053,8 @@ objRef = new CastInst(objRef, PointerType::get(ci->type), "this", currentBB_); Value* objBase = - new CastInst(objRef, ClassInfo::ObjectBaseTy, TMP, currentBB_); + new CastInst(objRef, PointerType::get(ClassInfo::ObjectBaseTy), + TMP, currentBB_); Function* f = module_.getOrInsertFunction( LLVM_JAVA_GETOBJECTCLASS, PointerType::get(VTableInfo::VTableTy), objBase->getType(), NULL); @@ -2122,7 +2123,8 @@ objRef = new CastInst(objRef, PointerType::get(ci->type), "this", currentBB_); Value* objBase = - new CastInst(objRef, ClassInfo::ObjectBaseTy, TMP, currentBB_); + new CastInst(objRef, PointerType::get(ClassInfo::ObjectBaseTy), + TMP, currentBB_); Function* f = module_.getOrInsertFunction( LLVM_JAVA_GETOBJECTCLASS, PointerType::get(VTableInfo::VTableTy), objBase->getType(), NULL); From alkis at cs.uiuc.edu Fri Dec 3 20:10:47 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Fri, 3 Dec 2004 20:10:47 -0600 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200412040210.UAA24012@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.154 -> 1.155 --- Log message: Cast to correct type (pointer to llvm_base_obj) when performing checkcast or instanceof functions. --- Diffs of the changes: (+4 -2) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.154 llvm-java/lib/Compiler/Compiler.cpp:1.155 --- llvm-java/lib/Compiler/Compiler.cpp:1.154 Fri Dec 3 20:04:35 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Fri Dec 3 20:10:36 2004 @@ -2279,7 +2279,8 @@ Value* objRef = currentOpStack_->pop(currentBB_); Value* objBase = - new CastInst(objRef, ClassInfo::ObjectBaseTy, TMP, currentBB_); + new CastInst(objRef, PointerType::get(ClassInfo::ObjectBaseTy), + TMP, currentBB_); Function* f = module_.getOrInsertFunction( LLVM_JAVA_ISINSTANCEOF, Type::IntTy, objBase->getType(), PointerType::get(VTableInfo::VTableTy), NULL); @@ -2306,7 +2307,8 @@ Value* objRef = currentOpStack_->pop(currentBB_); Value* objBase = - new CastInst(objRef, ClassInfo::ObjectBaseTy, TMP, currentBB_); + new CastInst(objRef, PointerType::get(ClassInfo::ObjectBaseTy), + TMP, currentBB_); Function* f = module_.getOrInsertFunction( LLVM_JAVA_ISINSTANCEOF, Type::IntTy, objBase->getType(), PointerType::get(VTableInfo::VTableTy), NULL); From alkis at cs.uiuc.edu Fri Dec 3 20:30:52 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Fri, 3 Dec 2004 20:30:52 -0600 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp Message-ID: <200412040230.UAA24198@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Verifier.cpp updated: 1.122 -> 1.123 --- Log message: Check if a block has a terminator first before calling front() on it. If a block has a terminator then it is certainly non-empty so the verifier will not crash on it. --- Diffs of the changes: (+3 -3) Index: llvm/lib/VMCore/Verifier.cpp diff -u llvm/lib/VMCore/Verifier.cpp:1.122 llvm/lib/VMCore/Verifier.cpp:1.123 --- llvm/lib/VMCore/Verifier.cpp:1.122 Fri Dec 3 19:25:06 2004 +++ llvm/lib/VMCore/Verifier.cpp Fri Dec 3 20:30:42 2004 @@ -321,6 +321,9 @@ void Verifier::visitBasicBlock(BasicBlock &BB) { InstsInThisBlock.clear(); + // Ensure that basic blocks have terminators! + Assert1(BB.getTerminator(), "Basic Block does not have terminator!", &BB); + // Check constraints that this basic block imposes on all of the PHI nodes in // it. if (isa(BB.front())) { @@ -364,9 +367,6 @@ } } } - - // Ensure that basic blocks have terminators! - Assert1(BB.getTerminator(), "Basic Block does not have terminator!", &BB); } void Verifier::visitTerminatorInst(TerminatorInst &I) { From lattner at cs.uiuc.edu Fri Dec 3 22:17:38 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 22:17:38 -0600 Subject: [llvm-commits] CVS: llvm/lib/System/DynamicLibrary.cpp Message-ID: <200412040417.iB44Hcss020133@apoc.cs.uiuc.edu> Changes in directory llvm/lib/System: DynamicLibrary.cpp updated: 1.5 -> 1.6 --- Log message: Fix compilation error on Darwin. --- Diffs of the changes: (+18 -15) Index: llvm/lib/System/DynamicLibrary.cpp diff -u llvm/lib/System/DynamicLibrary.cpp:1.5 llvm/lib/System/DynamicLibrary.cpp:1.6 --- llvm/lib/System/DynamicLibrary.cpp:1.5 Fri Dec 3 17:02:42 2004 +++ llvm/lib/System/DynamicLibrary.cpp Fri Dec 3 22:17:20 2004 @@ -106,21 +106,24 @@ // there is only a small handful of them. #ifdef __APPLE__ { - extern void *__ashldi3; if (Name == "__ashldi3") return &__ashldi3; - extern void *__ashrdi3; if (Name == "__ashrdi3") return &__ashrdi3; - extern void *__cmpdi2; if (Name == "__cmpdi2") return &__cmpdi2; - extern void *__divdi3; if (Name == "__divdi3") return &__divdi3; - extern void *__eprintf; if (Name == "__eprintf") return &__eprintf; - extern void *__fixdfdi; if (Name == "__fixdfdi") return &__fixdfdi; - extern void *__fixsfdi; if (Name == "__fixsfdi") return &__fixsfdi; - extern void *__fixunsdfdi; if (Name == "__fixunsdfdi") return &__fixunsdfdi; - extern void *__fixunssfdi; if (Name == "__fixunssfdi") return &__fixunssfdi; - extern void *__floatdidf; if (Name == "__floatdidf") return &__floatdidf; - extern void *__floatdisf; if (Name == "__floatdisf") return &__floatdisf; - extern void *__lshrdi3; if (Name == "__lshrdi3") return &__lshrdi3; - extern void *__moddi3; if (Name == "__moddi3") return &__moddi3; - extern void *__udivdi3; if (Name == "__udivdi3") return &__udivdi3; - extern void *__umoddi3; if (Name == "__umoddi3") return &__umoddi3; +#define EXPLICIT_SYMBOL(SYM) \ + extern void *SYM; if (!strcmp(symbolName, #SYM)) return &SYM + EXPLICIT_SYMBOL(__ashldi3); + EXPLICIT_SYMBOL(__ashrdi3); + EXPLICIT_SYMBOL(__cmpdi2); + EXPLICIT_SYMBOL(__divdi3); + EXPLICIT_SYMBOL(__eprintf); + EXPLICIT_SYMBOL(__fixdfdi); + EXPLICIT_SYMBOL(__fixsfdi); + EXPLICIT_SYMBOL(__fixunsdfdi); + EXPLICIT_SYMBOL(__fixunssfdi); + EXPLICIT_SYMBOL(__floatdidf); + EXPLICIT_SYMBOL(__floatdisf); + EXPLICIT_SYMBOL(__lshrdi3); + EXPLICIT_SYMBOL(__moddi3); + EXPLICIT_SYMBOL(__udivdi3); + EXPLICIT_SYMBOL(__umoddi3); +#undef EXPLICIT_SYMBOL } #endif From lattner at cs.uiuc.edu Fri Dec 3 23:27:33 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 23:27:33 -0600 Subject: [llvm-commits] CVS: llvm-test/External/SPEC/CINT2000/Makefile Message-ID: <200412040527.iB45RXZd027968@apoc.cs.uiuc.edu> Changes in directory llvm-test/External/SPEC/CINT2000: Makefile updated: 1.19 -> 1.20 --- Log message: slide farther down the slipery slope of disabling stuff that doesn't work on sparc. None of these programs work and they are all larger than the V9 backend can handle it a reasonable amount of time. --- Diffs of the changes: (+4 -0) Index: llvm-test/External/SPEC/CINT2000/Makefile diff -u llvm-test/External/SPEC/CINT2000/Makefile:1.19 llvm-test/External/SPEC/CINT2000/Makefile:1.20 --- llvm-test/External/SPEC/CINT2000/Makefile:1.19 Fri Dec 3 17:54:33 2004 +++ llvm-test/External/SPEC/CINT2000/Makefile Fri Dec 3 23:27:15 2004 @@ -18,8 +18,12 @@ # Disable crafty until it stops infinite-looping on Sparc ifeq ($(ARCH), Sparc) +PARALLEL_DIRS := $(filter-out 176.gcc, $(PARALLEL_DIRS)) PARALLEL_DIRS := $(filter-out 186.crafty, $(PARALLEL_DIRS)) PARALLEL_DIRS := $(filter-out 252.eon, $(PARALLEL_DIRS)) +PARALLEL_DIRS := $(filter-out 253.perlbmk, $(PARALLEL_DIRS)) +PARALLEL_DIRS := $(filter-out 254.gap, $(PARALLEL_DIRS)) + endif include $(LEVEL)/Makefile.programs From lattner at cs.uiuc.edu Fri Dec 3 23:28:40 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 3 Dec 2004 23:28:40 -0600 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp Message-ID: <200412040528.iB45Se2j028455@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: Reader.cpp updated: 1.144 -> 1.145 --- Log message: Do not allow bytecode files with unresolved references to be read. Doing so lets wierd ConstantPlaceholder objects sneak into the system which confuses it greatly. --- Diffs of the changes: (+7 -1) Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.144 llvm/lib/Bytecode/Reader/Reader.cpp:1.145 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.144 Tue Nov 30 10:58:18 2004 +++ llvm/lib/Bytecode/Reader/Reader.cpp Fri Dec 3 23:28:27 2004 @@ -1312,7 +1312,7 @@ // Construct a ConstantExpr of the appropriate kind if (isExprNumArgs == 1) { // All one-operand expressions if (Opcode != Instruction::Cast) - error("Only Cast instruction has one argument for ConstantExpr"); + error("Only cast instruction has one argument for ConstantExpr"); Constant* Result = ConstantExpr::getCast(ArgVec[0], getType(TypeID)); if (Handler) Handler->handleConstantExpression(Opcode, ArgVec, Result); @@ -1568,6 +1568,12 @@ } } } + + // After we have finished parsing the constant pool, we had better not have + // any dangling references left. + if (!ConstantFwdRefs.empty()) + error("Unresolved constant references exist!"); + checkPastBlockEnd("Constant Pool"); if (Handler) Handler->handleGlobalConstantsEnd(); } From tbrethou at cs.uiuc.edu Sat Dec 4 00:26:06 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Sat, 4 Dec 2004 00:26:06 -0600 (CST) Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl Message-ID: <200412040626.AAA28187@kain.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.75 -> 1.76 --- Log message: Removed QMTest functions. The nightly tester no longer runs qmtest. It now runs dejagnu by default and you must turn it off using -nodejagnu. --- Diffs of the changes: (+5 -74) Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.75 llvm/utils/NightlyTest.pl:1.76 --- llvm/utils/NightlyTest.pl:1.75 Fri Dec 3 15:56:30 2004 +++ llvm/utils/NightlyTest.pl Sat Dec 4 00:25:50 2004 @@ -13,15 +13,13 @@ # -nocheckout Do not create, checkout, update, or configure # the source tree. # -noremove Do not remove the BUILDDIR after it has been built. -# -nofeaturetests Do not run the feature tests. -# -noregressiontests Do not run the regression tests. # -notest Do not even attempt to run the test programs. Implies # -norunningtests. # -norunningtests Do not run the Olden benchmark suite with # LARGE_PROBLEM_SIZE enabled. # -noexternals Do not run the external tests (for cases where povray # or SPEC are not installed) -# -rundejagnu Runs features and regressions using Dejagnu +# -nodejagnu Do not run feature or regression tests # -parallel Run two parallel jobs with GNU Make. # -release Build an LLVM Release version # -pedantic Enable additional GCC warnings to detect possible errors. @@ -73,8 +71,6 @@ # Command line argument settings... my $NOCHECKOUT = 0; my $NOREMOVE = 0; -my $NOFEATURES = 0; -my $NOREGRESSIONS = 0; my $NOTEST = 0; my $NORUNNINGTESTS = 0; my $NOEXTERNALS = 0; @@ -84,7 +80,7 @@ my $DEBUG = 0; my $CONFIGUREARGS = ""; my $NICE = ""; -my $RUNDEJAGNU = 0; +my $NODEJAGNU = 0; sub ReadFile { if (open (FILE, $_[0])) { @@ -197,67 +193,6 @@ return GetRegex $Regex2, $Items[$Num]; } -sub GetQMTestResults { # (filename) - my ($filename) = @_; - my @lines; - my $firstline; - $/ = "\n"; #Make sure we're going line at a time. - if (open SRCHFILE, $filename) { - # Skip stuff before ---TEST RESULTS - while ( ) { - if ( m/^--- TEST RESULTS/ ) { last; } - } - # Process test results - push(@lines,"

    TEST RESULTS

    1. \n"); - my $first_list = 1; - my $should_break = 1; - my $nocopy = 0; - while ( ) { - if ( length($_) > 1 ) { - chomp($_); - if ( ! m/: PASS[ ]*$/ && - ! m/^ qmtest.target:/ && - ! m/^ local/ && - ! m/^gmake:/ ) { - if ( m/: XFAIL/ ) { - $nocopy = 1; - } elsif ( m/: XPASS/ || m/: FAIL/ ) { - $nocopy = 0; - if ( $first_list ) { - $first_list = 0; - $should_break = 1; - push(@lines,"$_
      \n"); - } else { - push(@lines,"
    2. $_
      \n"); - } - } elsif ( m/^--- STATISTICS/ ) { - if ( $first_list ) { push(@lines,"PERFECT!"); } - push(@lines,"

    STATISTICS

    \n");
    -            $should_break = 0;
    -            $nocopy = 0;
    -          } elsif ( m/^--- TESTS WITH/ ) {
    -            $should_break = 1;
    -            $first_list = 1;
    -            $nocopy = 0;
    -            push(@lines,"

    TESTS WITH UNEXPECTED RESULTS

    1. \n"); - } elsif ( m/^real / ) { - last; - } elsif (!$nocopy) { - if ( $should_break ) { - push(@lines,"$_
      \n"); - } else { - push(@lines,"$_\n"); - } - } - } - } - } - close SRCHFILE; - } - my $content = join("", at lines); - return "$content
    \n"; -} - sub GetDejagnuTestResults { # (filename, log) my ($filename, $DejagnuLog) = @_; my @lines; @@ -317,8 +252,6 @@ # List command line options here... if (/^-nocheckout$/) { $NOCHECKOUT = 1; next; } if (/^-noremove$/) { $NOREMOVE = 1; next; } - if (/^-nofeaturetests$/) { $NOFEATURES = 1; next; } - if (/^-noregressiontests$/){ $NOREGRESSIONS = 1; next; } if (/^-notest$/) { $NOTEST = 1; $NORUNNINGTESTS = 1; next; } if (/^-norunningtests$/) { $NORUNNINGTESTS = 1; next; } if (/^-parallel$/) { $MAKEOPTS = "$MAKEOPTS -j2 -l3.0"; next; } @@ -344,7 +277,7 @@ $CONFIGUREARGS .= " CC=$ARGV[0]/gcc CXX=$ARGV[0]/g++"; shift; next; } if (/^-noexternals$/) { $NOEXTERNALS = 1; next; } - if(/^-rundejagnu$/) { $RUNDEJAGNU = 1; next; } + if(/^-nodejagnu$/) { $NODEJAGNU = 1; next; } print "Unknown option: $_ : ignoring!\n"; } @@ -369,8 +302,6 @@ #define the file names we'll use my $BuildLog = "$Prefix-Build-Log.txt"; my $CVSLog = "$Prefix-CVS-Log.txt"; -my $FeatureTestsLog = "$Prefix-FeatureTests-Log.txt"; -my $RegressionTestsLog = "$Prefix-RegressionTests-Log.txt"; my $OldenTestsLog = "$Prefix-Olden-tests.txt"; my $SingleSourceLog = "$Prefix-SingleSource-ProgramTest.txt.gz"; my $MultiSourceLog = "$Prefix-MultiSource-ProgramTest.txt.gz"; @@ -491,7 +422,7 @@ if ($VERBOSE) { print "BUILD ERROR\n"; } } -if ($BuildError) { $NOFEATURES = 1; $NOREGRESSIONS = 1; $RUNDEJAGNU=0; } +if ($BuildError) { $NODEJAGNU=1; } my $DejangnuTestResults; # String containing the results of the dejagnu if($RUNDEJAGNU) { @@ -501,7 +432,7 @@ #Run the feature and regression tests, results are put into testrun.sum #Full log in testrun.log - system "(time -p gmake $MAKEOPTS check-dejagnu) > $dejagnu_output 2>&1"; + system "(time -p gmake $MAKEOPTS check) > $dejagnu_output 2>&1"; #Extract time of dejagnu tests my $DejagnuTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$dejagnu_output"; From tbrethou at cs.uiuc.edu Sat Dec 4 00:26:16 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Sat, 4 Dec 2004 00:26:16 -0600 (CST) Subject: [llvm-commits] CVS: llvm/Makefile Message-ID: <200412040626.AAA28193@kain.cs.uiuc.edu> Changes in directory llvm: Makefile updated: 1.44 -> 1.45 --- Log message: Made it default to check instead of check-dejagnu. --- Diffs of the changes: (+1 -2) Index: llvm/Makefile diff -u llvm/Makefile:1.44 llvm/Makefile:1.45 --- llvm/Makefile:1.44 Fri Dec 3 17:57:00 2004 +++ llvm/Makefile Sat Dec 4 00:25:03 2004 @@ -44,7 +44,6 @@ $(TopDistDir)/include/llvm/Support/ThreadSupport.h check : - $(MAKE) -C test check-dejagnu TESTSUITE=$(TESTSUITE) + $(MAKE) -C test check TESTSUITE=$(TESTSUITE) tools-only: all - From tbrethou at cs.uiuc.edu Sat Dec 4 00:26:25 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Sat, 4 Dec 2004 00:26:25 -0600 (CST) Subject: [llvm-commits] CVS: llvm/test/Makefile Message-ID: <200412040626.AAA28197@kain.cs.uiuc.edu> Changes in directory llvm/test: Makefile updated: 1.71 -> 1.72 --- Log message: Made it default to check instead of check-dejagnu. --- Diffs of the changes: (+4 -25) Index: llvm/test/Makefile diff -u llvm/test/Makefile:1.71 llvm/test/Makefile:1.72 --- llvm/test/Makefile:1.71 Tue Nov 30 13:13:06 2004 +++ llvm/test/Makefile Sat Dec 4 00:25:08 2004 @@ -11,14 +11,9 @@ DIRS = # -# Make QMTest the default for testing features and regressions -# Do this first to force QMTest to run first +# Make Dejagnu the default for testing # -ifdef TESTSUITE -all:: check-dejagnu -else -all:: qmtest -endif +all:: check # Include other test rules include Makefile.tests @@ -110,8 +105,6 @@ $(QMTEST) gui --no-browser --daemon # Also get rid of qmtest garbage when we 'make clean' in this directory. -clean:: qmtest-clean - qmtest-clean: $(RM) -rf $(LLVM_OBJ_ROOT)/test/tmp $(RM) -f $(LLVM_SRC_ROOT)/test/QMTest/*.pyo \ @@ -127,12 +120,11 @@ RUNTESTFLAGS := --tool $(TESTSUITE) endif -check-dejagnu: site.exp +check:: site.exp -PATH=$(LLVMToolDir):$(LLVM_SRC_ROOT)/test/Scripts:$(PATH) \ $(RUNTEST) $(RUNTESTFLAGS) - -dejagnu-clean: +clean:: $(RM) -rf `find $(LLVM_OBJ_ROOT)/test/Regression -name Output -type d -print` site.exp: Makefile $(LLVM_OBJ_ROOT)/Makefile.config @@ -153,16 +145,3 @@ @test ! -f site.exp || mv site.exp site.bak @mv site.tmp site.exp -#===------------------------------------------------------------------------===# -# quick-test utility. Just runs TestRunner.sh on all the *.ll files in a -# directory. Use like this: -# cd llvm/test ; make quick-test QUICKTEST=Regression/Bytecode -# where QUICKTEST specifies the directory you want to run the tests on. -#===------------------------------------------------------------------------===# -quick-test: - @if test -d "${QUICKTEST}" ; then \ - cd $(LLVM_SRC_ROOT)/test/$(QUICKTEST) ; \ - find . -name \*.ll -print -exec $(LLVM_SRC_ROOT)/test/TestRunner.sh {} \; ; \ - else \ - echo "Set QUICKTEST= Changes in directory llvm/utils: NightlyTest.pl updated: 1.76 -> 1.77 --- Log message: Run dejagnu by default. --- Diffs of the changes: (+1 -1) Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.76 llvm/utils/NightlyTest.pl:1.77 --- llvm/utils/NightlyTest.pl:1.76 Sat Dec 4 00:25:50 2004 +++ llvm/utils/NightlyTest.pl Sat Dec 4 00:35:14 2004 @@ -425,7 +425,7 @@ if ($BuildError) { $NODEJAGNU=1; } my $DejangnuTestResults; # String containing the results of the dejagnu -if($RUNDEJAGNU) { +if(!$NODEJAGNU) { if($VERBOSE) { print "DEJAGNU FEATURE/REGRESSION TEST STAGE\n"; } my $dejagnu_output = "$DejagnuTestsLog"; From lattner at cs.uiuc.edu Sat Dec 4 00:47:22 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 00:47:22 -0600 Subject: [llvm-commits] CVS: llvm/test/Makefile Message-ID: <200412040647.iB46lMrf003802@apoc.cs.uiuc.edu> Changes in directory llvm/test: Makefile updated: 1.72 -> 1.73 --- Log message: Clean feature also --- Diffs of the changes: (+1 -0) Index: llvm/test/Makefile diff -u llvm/test/Makefile:1.72 llvm/test/Makefile:1.73 --- llvm/test/Makefile:1.72 Sat Dec 4 00:25:08 2004 +++ llvm/test/Makefile Sat Dec 4 00:47:07 2004 @@ -126,6 +126,7 @@ clean:: $(RM) -rf `find $(LLVM_OBJ_ROOT)/test/Regression -name Output -type d -print` + $(RM) -rf `find $(LLVM_OBJ_ROOT)/test/Feature -name Output -type d -print` site.exp: Makefile $(LLVM_OBJ_ROOT)/Makefile.config @echo 'Making a new site.exp file...' From lattner at cs.uiuc.edu Sat Dec 4 00:51:37 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 00:51:37 -0600 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Applications/sgefa/driver.c Message-ID: <200412040651.iB46pbo8003957@apoc.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Applications/sgefa: driver.c updated: 1.4 -> 1.5 --- Log message: Tweak output to let this test pass --- Diffs of the changes: (+1 -1) Index: llvm-test/MultiSource/Applications/sgefa/driver.c diff -u llvm-test/MultiSource/Applications/sgefa/driver.c:1.4 llvm-test/MultiSource/Applications/sgefa/driver.c:1.5 --- llvm-test/MultiSource/Applications/sgefa/driver.c:1.4 Sun Jun 27 19:39:14 2004 +++ llvm-test/MultiSource/Applications/sgefa/driver.c Sat Dec 4 00:51:22 2004 @@ -49,7 +49,7 @@ /* For a successful return from SGEFA test SGESL. */ if( retval ) - printf("Zero Column %d found \n", retval ); + ;//printf("Zero Column %d found \n", retval ); else { /* Solve system. */ (void)sgesl( &a, ipvt, b, 0 ); From reid at x10sys.com Sat Dec 4 02:13:30 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 4 Dec 2004 02:13:30 -0600 Subject: [llvm-commits] CVS: llvm/docs/CFEBuildInstrs.html Message-ID: <200412040813.CAA27817@zion.cs.uiuc.edu> Changes in directory llvm/docs: CFEBuildInstrs.html updated: 1.31 -> 1.32 --- Log message: Use the install-bytecode target to install just the bytecode libs into the CFE's install/bytecode-libs directory. --- Diffs of the changes: (+2 -2) Index: llvm/docs/CFEBuildInstrs.html diff -u llvm/docs/CFEBuildInstrs.html:1.31 llvm/docs/CFEBuildInstrs.html:1.32 --- llvm/docs/CFEBuildInstrs.html:1.31 Wed Dec 1 08:12:30 2004 +++ llvm/docs/CFEBuildInstrs.html Sat Dec 4 02:13:20 2004 @@ -233,7 +233,7 @@
      % gmake
      % mkdir $CFEINSTALL/bytecode-libs
    - % gmake -C runtime install
    + % gmake -C runtime install-bytecode
      % setenv LLVM_LIB_SEARCH_PATH $CFEINSTALL/bytecode-libs
     
    @@ -333,7 +333,7 @@ Brian Gaeke
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/12/01 14:12:30 $ + Last modified: $Date: 2004/12/04 08:13:20 $ From lattner at cs.uiuc.edu Sat Dec 4 12:55:03 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 12:55:03 -0600 Subject: [llvm-commits] CVS: llvm/lib/Linker/LinkModules.cpp Message-ID: <200412041855.iB4It367008072@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Linker: LinkModules.cpp updated: 1.96 -> 1.97 --- Log message: Fix linkage of mismatched weak globals. This unbreaks 300.twolf --- Diffs of the changes: (+2 -0) Index: llvm/lib/Linker/LinkModules.cpp diff -u llvm/lib/Linker/LinkModules.cpp:1.96 llvm/lib/Linker/LinkModules.cpp:1.97 --- llvm/lib/Linker/LinkModules.cpp:1.96 Fri Dec 3 16:18:41 2004 +++ llvm/lib/Linker/LinkModules.cpp Sat Dec 4 12:54:48 2004 @@ -531,6 +531,8 @@ else DGV->setConstant(true); } + SGV->setLinkage(GlobalValue::ExternalLinkage); + SGV->setInitializer(0); } ValueMap.insert(std::make_pair(SGV, From lattner at cs.uiuc.edu Sat Dec 4 13:14:51 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 13:14:51 -0600 Subject: [llvm-commits] CVS: llvm/win32/Analysis/Analysis.vcproj Message-ID: <200412041914.iB4JEpmh009314@apoc.cs.uiuc.edu> Changes in directory llvm/win32/Analysis: Analysis.vcproj updated: 1.2 -> 1.3 --- Log message: Update the win32 project files, contributed by Morton Ofstad! --- Diffs of the changes: (+87 -0) Index: llvm/win32/Analysis/Analysis.vcproj diff -u llvm/win32/Analysis/Analysis.vcproj:1.2 llvm/win32/Analysis/Analysis.vcproj:1.3 --- llvm/win32/Analysis/Analysis.vcproj:1.2 Sat Nov 6 11:07:36 2004 +++ llvm/win32/Analysis/Analysis.vcproj Sat Dec 4 13:14:36 2004 @@ -167,6 +167,93 @@ Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From lattner at cs.uiuc.edu Sat Dec 4 13:14:57 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 13:14:57 -0600 Subject: [llvm-commits] CVS: llvm/win32/ExecutionEngine/ExecutionEngine.vcproj Message-ID: <200412041914.iB4JEv6X009319@apoc.cs.uiuc.edu> Changes in directory llvm/win32/ExecutionEngine: ExecutionEngine.vcproj updated: 1.2 -> 1.3 --- Log message: Update the win32 project files, contributed by Morton Ofstad! --- Diffs of the changes: (+9 -3) Index: llvm/win32/ExecutionEngine/ExecutionEngine.vcproj diff -u llvm/win32/ExecutionEngine/ExecutionEngine.vcproj:1.2 llvm/win32/ExecutionEngine/ExecutionEngine.vcproj:1.3 --- llvm/win32/ExecutionEngine/ExecutionEngine.vcproj:1.2 Sat Nov 6 11:07:36 2004 +++ llvm/win32/ExecutionEngine/ExecutionEngine.vcproj Sat Dec 4 13:14:38 2004 @@ -113,14 +113,17 @@ Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + + + + - - + + From lattner at cs.uiuc.edu Sat Dec 4 13:14:58 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 13:14:58 -0600 Subject: [llvm-commits] CVS: llvm/win32/Target/Target.vcproj Message-ID: <200412041914.iB4JEwM0009325@apoc.cs.uiuc.edu> Changes in directory llvm/win32/Target: Target.vcproj updated: 1.2 -> 1.3 --- Log message: Update the win32 project files, contributed by Morton Ofstad! --- Diffs of the changes: (+27 -0) Index: llvm/win32/Target/Target.vcproj diff -u llvm/win32/Target/Target.vcproj:1.2 llvm/win32/Target/Target.vcproj:1.3 --- llvm/win32/Target/Target.vcproj:1.2 Sat Nov 6 11:07:36 2004 +++ llvm/win32/Target/Target.vcproj Sat Dec 4 13:14:38 2004 @@ -131,6 +131,33 @@ Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + + + + + + + + + + + + + + + + + + From lattner at cs.uiuc.edu Sat Dec 4 13:14:58 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 13:14:58 -0600 Subject: [llvm-commits] CVS: llvm/win32/x86/x86.vcproj Message-ID: <200412041914.iB4JEwQG009322@apoc.cs.uiuc.edu> Changes in directory llvm/win32/x86: x86.vcproj updated: 1.2 -> 1.3 --- Log message: Update the win32 project files, contributed by Morton Ofstad! --- Diffs of the changes: (+6 -3) Index: llvm/win32/x86/x86.vcproj diff -u llvm/win32/x86/x86.vcproj:1.2 llvm/win32/x86/x86.vcproj:1.3 --- llvm/win32/x86/x86.vcproj:1.2 Sat Nov 6 11:07:36 2004 +++ llvm/win32/x86/x86.vcproj Sat Dec 4 13:14:38 2004 @@ -142,6 +142,9 @@ RelativePath="..\..\lib\Target\X86\X86ISelSimple.cpp"> + + - - + + From lattner at cs.uiuc.edu Sat Dec 4 13:14:59 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 13:14:59 -0600 Subject: [llvm-commits] CVS: llvm/win32/CodeGen/CodeGen.vcproj Message-ID: <200412041914.iB4JExnH009333@apoc.cs.uiuc.edu> Changes in directory llvm/win32/CodeGen: CodeGen.vcproj updated: 1.2 -> 1.3 --- Log message: Update the win32 project files, contributed by Morton Ofstad! --- Diffs of the changes: (+54 -0) Index: llvm/win32/CodeGen/CodeGen.vcproj diff -u llvm/win32/CodeGen/CodeGen.vcproj:1.2 llvm/win32/CodeGen/CodeGen.vcproj:1.3 --- llvm/win32/CodeGen/CodeGen.vcproj:1.2 Sat Nov 6 11:07:36 2004 +++ llvm/win32/CodeGen/CodeGen.vcproj Sat Dec 4 13:14:38 2004 @@ -171,15 +171,69 @@ Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From lattner at cs.uiuc.edu Sat Dec 4 13:14:58 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 13:14:58 -0600 Subject: [llvm-commits] CVS: llvm/win32/Transforms/Transforms.vcproj Message-ID: <200412041914.iB4JEwCZ009327@apoc.cs.uiuc.edu> Changes in directory llvm/win32/Transforms: Transforms.vcproj updated: 1.3 -> 1.4 --- Log message: Update the win32 project files, contributed by Morton Ofstad! --- Diffs of the changes: (+27 -0) Index: llvm/win32/Transforms/Transforms.vcproj diff -u llvm/win32/Transforms/Transforms.vcproj:1.3 llvm/win32/Transforms/Transforms.vcproj:1.4 --- llvm/win32/Transforms/Transforms.vcproj:1.3 Mon Nov 8 12:46:09 2004 +++ llvm/win32/Transforms/Transforms.vcproj Sat Dec 4 13:14:38 2004 @@ -387,6 +387,33 @@ Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + + + + + + + + + + + + + + + + + + From lattner at cs.uiuc.edu Sat Dec 4 13:14:59 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 13:14:59 -0600 Subject: [llvm-commits] CVS: llvm/win32/Support/Support.vcproj Message-ID: <200412041914.iB4JEx1s009337@apoc.cs.uiuc.edu> Changes in directory llvm/win32/Support: Support.vcproj updated: 1.3 -> 1.4 --- Log message: Update the win32 project files, contributed by Morton Ofstad! --- Diffs of the changes: (+67 -6) Index: llvm/win32/Support/Support.vcproj diff -u llvm/win32/Support/Support.vcproj:1.3 llvm/win32/Support/Support.vcproj:1.4 --- llvm/win32/Support/Support.vcproj:1.3 Mon Nov 15 11:27:00 2004 +++ llvm/win32/Support/Support.vcproj Sat Dec 4 13:14:38 2004 @@ -114,14 +114,17 @@ + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From lattner at cs.uiuc.edu Sat Dec 4 13:14:59 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 13:14:59 -0600 Subject: [llvm-commits] CVS: llvm/win32/Configure/Configure.vcproj Message-ID: <200412041914.iB4JExq6009335@apoc.cs.uiuc.edu> Changes in directory llvm/win32/Configure: Configure.vcproj updated: 1.2 -> 1.3 --- Log message: Update the win32 project files, contributed by Morton Ofstad! --- Diffs of the changes: (+3 -4) Index: llvm/win32/Configure/Configure.vcproj diff -u llvm/win32/Configure/Configure.vcproj:1.2 llvm/win32/Configure/Configure.vcproj:1.3 --- llvm/win32/Configure/Configure.vcproj:1.2 Sat Nov 6 11:07:36 2004 +++ llvm/win32/Configure/Configure.vcproj Sat Dec 4 13:14:38 2004 @@ -72,8 +72,7 @@ Name="Configure|Win32"> @@ -94,7 +93,7 @@ Name="Configure|Win32"> @@ -105,7 +104,7 @@ Name="Configure|Win32"> From lattner at cs.uiuc.edu Sat Dec 4 13:14:59 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 13:14:59 -0600 Subject: [llvm-commits] CVS: llvm/win32/System/System.vcproj Message-ID: <200412041914.iB4JExUc009341@apoc.cs.uiuc.edu> Changes in directory llvm/win32/System: System.vcproj updated: 1.4 -> 1.5 --- Log message: Update the win32 project files, contributed by Morton Ofstad! --- Diffs of the changes: (+66 -1) Index: llvm/win32/System/System.vcproj diff -u llvm/win32/System/System.vcproj:1.4 llvm/win32/System/System.vcproj:1.5 --- llvm/win32/System/System.vcproj:1.4 Tue Nov 16 00:57:30 2004 +++ llvm/win32/System/System.vcproj Sat Dec 4 13:14:38 2004 @@ -107,6 +107,24 @@ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + + + + + + + + + + + RelativePath="..\..\include\llvm\System\DynamicLibrary.h"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + From lattner at cs.uiuc.edu Sat Dec 4 13:14:59 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 13:14:59 -0600 Subject: [llvm-commits] CVS: llvm/win32/VMCore/VMCore.vcproj Message-ID: <200412041914.iB4JExuj009339@apoc.cs.uiuc.edu> Changes in directory llvm/win32/VMCore: VMCore.vcproj updated: 1.3 -> 1.4 --- Log message: Update the win32 project files, contributed by Morton Ofstad! --- Diffs of the changes: (+87 -0) Index: llvm/win32/VMCore/VMCore.vcproj diff -u llvm/win32/VMCore/VMCore.vcproj:1.3 llvm/win32/VMCore/VMCore.vcproj:1.4 --- llvm/win32/VMCore/VMCore.vcproj:1.3 Mon Nov 15 11:28:08 2004 +++ llvm/win32/VMCore/VMCore.vcproj Sat Dec 4 13:14:38 2004 @@ -171,14 +171,101 @@ Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From lattner at cs.uiuc.edu Sat Dec 4 13:57:41 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 13:57:41 -0600 Subject: [llvm-commits] CVS: llvm/utils/NightlyTestTemplate.html Message-ID: <200412041957.iB4Jvfnh009523@apoc.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTestTemplate.html updated: 1.34 -> 1.35 --- Log message: Remove last remnants of qmtest stuff --- Diffs of the changes: (+0 -21) Index: llvm/utils/NightlyTestTemplate.html diff -u llvm/utils/NightlyTestTemplate.html:1.34 llvm/utils/NightlyTestTemplate.html:1.35 --- llvm/utils/NightlyTestTemplate.html:1.34 Mon Nov 22 12:36:12 2004 +++ llvm/utils/NightlyTestTemplate.html Sat Dec 4 13:57:27 2004 @@ -16,8 +16,6 @@ Changes
    Trends
    Programs
    -Feature
    -Regression
    Dejagnu Tests
    @@ -70,8 +68,6 @@ ItemCPU TimeWall Clock Configure CVS Tree$ConfigTime$ConfigWallTime Build CVS Tree$BuildTime$BuildWallTime -Run Feature Tests$FeatureTime$FeatureWallTime -Run Regression Tests$RegressionTime$RegressionWallTime Run Dejagnu Tests$DejagnuTime$DejagnuWallTime
  • Number of object files compiled: $NumObjects
  • @@ -241,23 +237,6 @@ - -

    -
    -
    Feature Test Results -
    -
    -$FeatureTestResults - -

    -
    -
    Regression Test Results -
    -
    -$RegressionTestResults -

    Changes in directory llvm/utils: NightlyTestTemplate.html updated: 1.35 -> 1.36 --- Log message: Move the dejagnu section to immediately before the 'trends' section. --- Diffs of the changes: (+12 -11) Index: llvm/utils/NightlyTestTemplate.html diff -u llvm/utils/NightlyTestTemplate.html:1.35 llvm/utils/NightlyTestTemplate.html:1.36 --- llvm/utils/NightlyTestTemplate.html:1.35 Sat Dec 4 13:57:27 2004 +++ llvm/utils/NightlyTestTemplate.html Sat Dec 4 14:18:21 2004 @@ -14,9 +14,9 @@
    Overview
    Changes
    +Dejagnu Tests
    Trends
    Programs
    -Dejagnu Tests

    @@ -109,6 +109,17 @@

  • Newly failing tests: $TestsBroken + + +

    +
    +
    Dejagnu Test Results +
    +
    +$DejagnuTestResults +

    A complete log of testing Feature and Regression is available for further analysis.

    +

    From lattner at cs.uiuc.edu Sat Dec 4 14:49:58 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 14:49:58 -0600 Subject: [llvm-commits] CVS: llvm-test/External/SPEC/CFP95/102.swim/Makefile Message-ID: <200412042049.iB4Knwkh011418@apoc.cs.uiuc.edu> Changes in directory llvm-test/External/SPEC/CFP95/102.swim: Makefile updated: 1.4 -> 1.5 --- Log message: Use the same tolerance that the SPEC harness uses --- Diffs of the changes: (+2 -0) Index: llvm-test/External/SPEC/CFP95/102.swim/Makefile diff -u llvm-test/External/SPEC/CFP95/102.swim/Makefile:1.4 llvm-test/External/SPEC/CFP95/102.swim/Makefile:1.5 --- llvm-test/External/SPEC/CFP95/102.swim/Makefile:1.4 Thu Oct 7 17:13:39 2004 +++ llvm-test/External/SPEC/CFP95/102.swim/Makefile Sat Dec 4 14:49:43 2004 @@ -1,6 +1,8 @@ LEVEL = ../../../.. include $(LEVEL)/Makefile.f2c +FP_TOLERANCE = 0.2 + STDIN_FILENAME = swim.in STDOUT_FILENAME = swim.out From lattner at cs.uiuc.edu Sat Dec 4 14:54:47 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 14:54:47 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp Message-ID: <200412042054.iB4KslaP011758@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: ScalarEvolution.cpp updated: 1.28 -> 1.29 --- Log message: This patch prevents an infinite recursion while compiling 103.su2cor. All SPEC CFP 95 programs now work, though the JIT isn't loading -lf2c right so they aren't testing correctly. --- Diffs of the changes: (+3 -3) Index: llvm/lib/Analysis/ScalarEvolution.cpp diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.28 llvm/lib/Analysis/ScalarEvolution.cpp:1.29 --- llvm/lib/Analysis/ScalarEvolution.cpp:1.28 Mon Oct 25 13:40:08 2004 +++ llvm/lib/Analysis/ScalarEvolution.cpp Sat Dec 4 14:54:32 2004 @@ -635,8 +635,7 @@ for (unsigned MulOp = 0, e = Mul->getNumOperands(); MulOp != e; ++MulOp) { SCEV *MulOpSCEV = Mul->getOperand(MulOp); for (unsigned AddOp = 0, e = Ops.size(); AddOp != e; ++AddOp) - if (MulOpSCEV == Ops[AddOp] && - (Mul->getNumOperands() != 2 || !isa(MulOpSCEV))) { + if (MulOpSCEV == Ops[AddOp] && !isa(MulOpSCEV)) { // Fold W + X + (X * Y * Z) --> W + (X * ((Y*Z)+1)) SCEVHandle InnerMul = Mul->getOperand(MulOp == 0); if (Mul->getNumOperands() != 2) { @@ -937,7 +936,8 @@ std::vector SCEVOps(Ops.begin(), Ops.end()); SCEVCommutativeExpr *&Result = SCEVCommExprs[std::make_pair(scMulExpr, SCEVOps)]; - if (Result == 0) Result = new SCEVMulExpr(Ops); + if (Result == 0) + Result = new SCEVMulExpr(Ops); return Result; } From lattner at cs.uiuc.edu Sat Dec 4 15:29:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 15:29:01 -0600 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/SlotCalculator.cpp Writer.cpp Message-ID: <200412042129.iB4LT14A025847@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Writer: SlotCalculator.cpp updated: 1.65 -> 1.66 Writer.cpp updated: 1.91 -> 1.92 --- Log message: Check in some patches for better assertions --- Diffs of the changes: (+4 -0) Index: llvm/lib/Bytecode/Writer/SlotCalculator.cpp diff -u llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.65 llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.66 --- llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.65 Sat Oct 23 23:27:59 2004 +++ llvm/lib/Bytecode/Writer/SlotCalculator.cpp Sat Dec 4 15:28:47 2004 @@ -691,6 +691,9 @@ int SlotNo = getSlot(V); // Check to see if it's already in! if (SlotNo != -1) return SlotNo; + if (const GlobalValue *GV = dyn_cast(V)) + assert(GV->getParent() != 0 && "Global not embedded into a module!"); + if (!isa(V)) // Initializers for globals are handled explicitly if (const Constant *C = dyn_cast(V)) { assert(CompactionNodeMap.empty() && Index: llvm/lib/Bytecode/Writer/Writer.cpp diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.91 llvm/lib/Bytecode/Writer/Writer.cpp:1.92 --- llvm/lib/Bytecode/Writer/Writer.cpp:1.91 Thu Nov 25 13:38:05 2004 +++ llvm/lib/Bytecode/Writer/Writer.cpp Sat Dec 4 15:28:47 2004 @@ -295,6 +295,7 @@ if (const ConstantExpr *CE = dyn_cast(CPV)) { // FIXME: Encoding of constant exprs could be much more compact! assert(CE->getNumOperands() > 0 && "ConstantExpr with 0 operands"); + assert(CE->getNumOperands() != 1 || CE->getOpcode() == Instruction::Cast); output_vbr(1+CE->getNumOperands()); // flags as an expr output_vbr(CE->getOpcode()); // flags as an expr From lattner at cs.uiuc.edu Sat Dec 4 15:45:09 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 15:45:09 -0600 Subject: [llvm-commits] CVS: llvm-gcc/gcc/llvm-types.c Message-ID: <200412042145.iB4Lj9wV032035@apoc.cs.uiuc.edu> Changes in directory llvm-gcc/gcc: llvm-types.c updated: 1.19 -> 1.20 --- Log message: Finish fixing CFrontend/2004-11-27-VariableSizeInStructure.c --- Diffs of the changes: (+7 -4) Index: llvm-gcc/gcc/llvm-types.c diff -u llvm-gcc/gcc/llvm-types.c:1.19 llvm-gcc/gcc/llvm-types.c:1.20 --- llvm-gcc/gcc/llvm-types.c:1.19 Tue Nov 30 13:15:44 2004 +++ llvm-gcc/gcc/llvm-types.c Sat Dec 4 15:44:55 2004 @@ -618,15 +618,18 @@ */ static unsigned GetFieldOffset(tree Field) { assert(DECL_FIELD_BIT_OFFSET(Field) != 0 && DECL_FIELD_OFFSET(Field) != 0); - return TREE_INT_CST_LOW(DECL_FIELD_BIT_OFFSET(Field)) + - TREE_INT_CST_LOW(DECL_FIELD_OFFSET(Field))*8; + unsigned Result = TREE_INT_CST_LOW(DECL_FIELD_BIT_OFFSET(Field)); + if (TREE_CODE(DECL_FIELD_OFFSET(Field)) == INTEGER_CST) + Result += TREE_INT_CST_LOW(DECL_FIELD_OFFSET(Field))*8; + return Result; } /* GetDeclSize - Return the size of the declaration, in bits. */ static unsigned GetDeclSize(tree Field) { - if (DECL_SIZE(Field)) + if (DECL_SIZE(Field) && TREE_CODE(DECL_SIZE(Field)) == INTEGER_CST) return TREE_INT_CST_LOW(DECL_SIZE(Field)); - else if (TYPE_SIZE(TREE_TYPE(Field))) + else if (TYPE_SIZE(TREE_TYPE(Field)) && + TREE_CODE(TYPE_SIZE(TREE_TYPE(Field))) == INTEGER_CST) return TREE_INT_CST_LOW(TYPE_SIZE(TREE_TYPE(Field))); else return 0; /* Must be something like a "flexible array" member in a struct */ From reid at x10sys.com Sat Dec 4 16:18:39 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 4 Dec 2004 16:18:39 -0600 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl Message-ID: <200412042218.QAA28446@zion.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.77 -> 1.78 --- Log message: Print out something useful instead of a blank table when the external tests are skipped by user option. --- Diffs of the changes: (+1 -0) Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.77 llvm/utils/NightlyTest.pl:1.78 --- llvm/utils/NightlyTest.pl:1.77 Sat Dec 4 00:35:14 2004 +++ llvm/utils/NightlyTest.pl Sat Dec 4 16:18:28 2004 @@ -604,6 +604,7 @@ system "cat $Prefix-SingleSource-Tests.txt $Prefix-MultiSource-Tests.txt ". " $Prefix-External-Tests.txt | sort > $Prefix-Tests.txt"; } else { + $ExternalProgramsTable = ''; if ( $VERBOSE ) { print "External TEST STAGE SKIPPED\n"; } From reid at x10sys.com Sat Dec 4 16:20:04 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 4 Dec 2004 16:20:04 -0600 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp Message-ID: <200412042220.QAA28464@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: Reader.cpp updated: 1.145 -> 1.146 --- Log message: Provide more information in the error message that occurs when there are unresolved constants remaining. --- Diffs of the changes: (+10 -2) Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.145 llvm/lib/Bytecode/Reader/Reader.cpp:1.146 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.145 Fri Dec 3 23:28:27 2004 +++ llvm/lib/Bytecode/Reader/Reader.cpp Sat Dec 4 16:19:53 2004 @@ -1571,8 +1571,16 @@ // After we have finished parsing the constant pool, we had better not have // any dangling references left. - if (!ConstantFwdRefs.empty()) - error("Unresolved constant references exist!"); + if (!ConstantFwdRefs.empty()) { + typedef std::map, Constant*> ConstantRefsType; + ConstantRefsType::const_iterator I = ConstantFwdRefs.begin(); + const Type* missingType = I->first.first; + Constant* missingConst = I->second; + error(utostr(ConstantFwdRefs.size()) + + " unresolved constant reference exist. First one is '" + + missingConst->getName() + "' of type '" + + missingType->getDescription() + "'."); + } checkPastBlockEnd("Constant Pool"); if (Handler) Handler->handleGlobalConstantsEnd(); From reid at x10sys.com Sat Dec 4 16:34:08 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 4 Dec 2004 16:34:08 -0600 Subject: [llvm-commits] CVS: llvm/Makefile Message-ID: <200412042234.QAA28560@zion.cs.uiuc.edu> Changes in directory llvm: Makefile updated: 1.45 -> 1.46 --- Log message: CVS directory elimination moved to Makefile.rules --- Diffs of the changes: (+0 -2) Index: llvm/Makefile diff -u llvm/Makefile:1.45 llvm/Makefile:1.46 --- llvm/Makefile:1.45 Sat Dec 4 00:25:03 2004 +++ llvm/Makefile Sat Dec 4 16:33:58 2004 @@ -32,8 +32,6 @@ $(Verb) $(MAKE) ENABLE_PROFILING=1 dist-hook:: - $(Echo) Eliminating CVS directories from distribution - $(Verb) $(RM) -rf `find $(TopDistDir) -type d -name CVS -print` $(Echo) Eliminating files constructed by configure $(Verb) $(RM) -f \ $(TopDistDir)/include/llvm/ADT/hash_map \ From reid at x10sys.com Sat Dec 4 16:34:20 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 4 Dec 2004 16:34:20 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200412042234.QAA28572@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.249 -> 1.250 --- Log message: Getting dist-check to work:\ * Implement the FAKE_SOURCES feature for GCCLibraries/crtend \ * Search for distribution files >first< in srcdir and >second< in objdir \ * Make dist-hook only run in top level directory. \ * Make dist-check run correctly in parallel builds \ * Wrap lines to 80 cols \ * Standardize variable names --- Diffs of the changes: (+71 -46) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.249 llvm/Makefile.rules:1.250 --- llvm/Makefile.rules:1.249 Fri Dec 3 17:56:41 2004 +++ llvm/Makefile.rules Sat Dec 4 16:34:09 2004 @@ -298,28 +298,38 @@ endif #---------------------------------------------------------- -# Get the list of source files +# Get the list of source files and compute object file +# names from them. #---------------------------------------------------------- -ifndef SOURCES - Sources := $(notdir $(wildcard $(BUILD_SRC_DIR)/*.cpp \ - $(BUILD_SRC_DIR)/*.cc $(BUILD_SRC_DIR)/*.c $(BUILD_SRC_DIR)/*.y \ - $(BUILD_SRC_DIR)/*.l)) +ifdef FAKE_SOURCES + Sources := + FakeSources := $(FAKE_SOURCES) + ifdef BUILT_SOURCES + FakeSources += $(filter %.cpp %.c %.cc %.y %.l,$(BUILT_SOURCES)) + endif + BaseNameSources := $(sort $(basename $(FakeSources))) + ObjectsO := $(BaseNameSources:%=$(ObjDir)/%.o) + ObjectsLO := $(BaseNameSources:%=$(ObjDir)/%.lo) + ObjectsBC := $(BaseNameSources:%=$(ObjDir)/%.bc) else - Sources := $(SOURCES) + ifndef SOURCES + Sources := $(notdir $(wildcard $(BUILD_SRC_DIR)/*.cpp \ + $(BUILD_SRC_DIR)/*.cc $(BUILD_SRC_DIR)/*.c $(BUILD_SRC_DIR)/*.y \ + $(BUILD_SRC_DIR)/*.l)) + else + Sources := $(SOURCES) + endif + + ifdef BUILT_SOURCES + Sources += $(filter %.cpp %.c %.cc %.y %.l,$(BUILT_SOURCES)) + endif + + BaseNameSources := $(sort $(basename $(Sources))) + ObjectsO := $(BaseNameSources:%=$(ObjDir)/%.o) + ObjectsLO := $(BaseNameSources:%=$(ObjDir)/%.lo) + ObjectsBC := $(BaseNameSources:%=$(ObjDir)/%.bc) endif -ifdef BUILT_SOURCES -Sources += $(filter %.cpp %.c %.cc %.y %.l,$(BUILT_SOURCES)) -endif - -#---------------------------------------------------------- -# Types of objects that can be built from sources -#---------------------------------------------------------- -BaseNameSources := $(sort $(basename $(Sources))) -ObjectsO := $(BaseNameSources:%=$(ObjDir)/%.o) -ObjectsLO := $(BaseNameSources:%=$(ObjDir)/%.lo) -ObjectsBC := $(BaseNameSources:%=$(ObjDir)/%.bc) - ############################################################################### # DIRECTORIES: Handle recursive descent of directory structure ############################################################################### @@ -396,9 +406,9 @@ uninstall:: $(addsuffix /.makeuninstall,$(PARALLEL_DIRS)) install-bytecode :: $(addsuffix /.makeinstall-bytecode,$(PARALLEL_DIRS)) -Parallel_Targets := $(foreach T,$(RecursiveTargets),%/.make$(T)) +ParallelTargets := $(foreach T,$(RecursiveTargets),%/.make$(T)) -$(Parallel_Targets) : +$(ParallelTargets) : $(Verb) if [ ! -f $(@D)/Makefile ]; then \ $(MKDIR) $(@D); \ cp $(BUILD_SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \ @@ -525,7 +535,7 @@ $(Verb) $(BCLinkLib) -o $(ObjDir)/$(LIBRARYNAME).o $(ObjectsBC) $(Verb) $(LArchive) $@ $(ObjDir)/$(LIBRARYNAME).o else -$(LibName.BCA): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir $(GCCLD) +$(LibName.BCA): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir $(Echo) Building $(BuildMode) Bytecode Archive $(notdir $@) $(Verb) $(LArchive) $@ $(ObjectsBC) @@ -1070,11 +1080,8 @@ dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip :: $(Echo) ERROR: Target $@ only available with OBJ_DIR != SRC_DIR -DistCheckTop := else -DistCheckTop := - #------------------------------------------------------------------------ # Prevent catastrophic remove #------------------------------------------------------------------------ @@ -1098,21 +1105,21 @@ dist-gzip:: $(DistTarGZip) -$(DistTarGZip) : distdir +$(DistTarGZip) : $(TopDistDir)/.makedistdir $(Echo) Packing gzipped distribution tar file. $(Verb) cd $(BUILD_OBJ_ROOT) ; $(TAR) chf - "$(DistName)" | \ $(GZIP) -c > "$(DistTarGZip)" dist-bzip2:: $(DistTarBZ2) -$(DistTarBZ2) : distdir +$(DistTarBZ2) : $(TopDistDir)/.makedistdir $(Echo) Packing bzipped distribution tar file. $(Verb) cd $(BUILD_OBJ_ROOT) ; $(TAR) chf - $(DistName) | \ $(BZIP2) -c >$(DistTarBZ2) dist-zip:: $(DistZip) -$(DistZip) : distdir +$(DistZip) : $(TopDistDir)/.makedistdir $(Echo) Packing zipped distribution file. $(Verb) rm -f $(DistZip) $(Verb) cd $(BUILD_OBJ_ROOT) ; $(ZIP) -rq $(DistZip) $(DistName) @@ -1122,7 +1129,7 @@ DistCheckDir := $(LLVM_OBJ_ROOT)/_distcheckdir -dist-check:: $(DistCheckTop) $(DistTarGZip) +dist-check:: $(DistTarGZip) $(Echo) Checking distribution tar file. $(Verb) if test -d $(DistCheckDir) ; then \ $(RM) -rf $(DistCheckDir) ; \ @@ -1135,6 +1142,7 @@ cd build && \ ../$(DistName)/configure --prefix="$(DistCheckDir)/install" \ --srcdir=../$(DistName) --with-llvmgccdir="$(LLVMGCCDIR)" && \ + $(MAKE) all && \ $(MAKE) check && \ $(MAKE) install && \ $(MAKE) uninstall && \ @@ -1145,21 +1153,25 @@ dist-clean:: $(Echo) Cleaning distribution files - -$(Verb) $(RM) -rf $(DistTarGZip) $(DistTarBZ2) $(DistZip) $(DistName) $(DistCheckDir) + -$(Verb) $(RM) -rf $(DistTarGZip) $(DistTarBZ2) $(DistZip) $(DistName) \ + $(DistCheckDir) endif #------------------------------------------------------------------------ # Provide the recursive distdir target for building the distribution directory #------------------------------------------------------------------------ -distdir : $(DistSources) +distdir: $(DistDir)/.makedistdir +$(DistDir)/.makedistdir: $(DistSources) $(Verb) if test "$(DistDir)" = "$(TopDistDir)" ; then \ if test -d "$(DistDir)" ; then \ find $(DistDir) -type d ! -perm -200 -exec chmod u+w {} ';' || \ exit 1 ; \ fi ; \ - $(EchoCmd) Removing $(DistDir) ; \ + $(EchoCmd) Removing old $(DistDir) ; \ $(RM) -rf $(DistDir); \ + $(EchoCmd) Making 'all' to be sure. ; \ + $(MAKE) all ; \ fi $(Echo) Building Distribution Directory $(DistDir) $(Verb) $(MKDIR) $(DistDir) @@ -1167,15 +1179,21 @@ srcrootstrip=`echo "$(BUILD_SRC_ROOT)" | sed 's|.|.|g'`; \ for file in $(DistFiles) ; do \ case "$$file" in \ - $(BUILD_SRC_DIR)/*) file=`echo "$$file" | sed "s#^$$srcdirstrip/##"`;; \ - $(BUILD_SRC_ROOT)/*) file=`echo "$$file" | sed "s#^$$srcrootstrip/#$(BUILD_OBJ_ROOT)/#"`;; \ + $(BUILD_SRC_DIR)/*) \ + file=`echo "$$file" | sed "s#^$$srcdirstrip/##"` \ + ;; \ + $(BUILD_SRC_ROOT)/*) \ + file=`echo "$$file" | \ + sed "s#^$$srcrootstrip/##"` \ + ;; \ esac; \ - if test -f "$$file" || test -d "$$file" ; then \ + if test -f "$(BUILD_SRC_DIR)/$$file" || \ + test -d "$(BUILD_SRC_DIR)/$$file" ; then \ + from_dir="$(BUILD_SRC_DIR)" ; \ + elif test -f "$$file" || test -d "$$file" ; then \ from_dir=. ; \ - else \ - from_dir=$(BUILD_SRC_DIR); \ - fi; \ - to_dir=`echo "$$file" | sed -e 's#/[^/]*$$##'`; \ + fi ; \ + to_dir=`echo "$$file" | sed -e 's#/[^/]*$$##'` ; \ if test "$$to_dir" != "$$file" && test "$$to_dir" != "."; then \ to_dir="$(DistDir)/$$dir"; \ $(MKDIR) "$$to_dir" ; \ @@ -1197,7 +1215,8 @@ elif test -L "$$from_dir/$$file" ; then \ cp -pd "$$from_dir/$$file" $(DistDir)/$$file || exit 1; \ elif echo "$(DistAlways)" | grep -v "$$file" >/dev/null ; then \ - $(EchoCmd) "===== WARNING: Distribution Source $$from_dir/$$file Not Found!" ; \ + $(EchoCmd) "===== WARNING: Distribution Source " \ + "$$from_dir/$$file Not Found!" ; \ elif test "$(Verb)" != '@' ; then \ $(EchoCmd) "Skipping non-existent $$from_dir/$$file" ; \ fi; \ @@ -1206,15 +1225,21 @@ if test "$$subdir" \!= "." ; then \ new_distdir="$(DistDir)/$$subdir" ; \ test -d "$$new_distdir" || $(MKDIR) "$$new_distdir" || exit 1; \ - ( cd $$subdir && $(MAKE) DistDir="$$new_distdir" distdir ) || exit 1; \ + ( cd $$subdir && $(MAKE) DistDir="$$new_distdir" distdir ) || \ + exit 1; \ fi; \ done - $(Verb) $(MAKE) DistDir="$(DistDir)" dist-hook || exit 1 - -$(Verb) find $(DistDir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(INSTALL_SH) -c -m a+r {} {} \; \ - || chmod -R a+r $(DistDir) + $(Verb) if test "$(DistDir)" = "$(TopDistDir)" ; then \ + $(EchoCmd) Eliminating CVS directories from distribution ; \ + $(RM) -rf `find $(TopDistDir) -type d -name CVS -print` ;\ + $(MAKE) dist-hook ; \ + $(FIND) $(TopDistDir) -type d ! -perm -777 -exec chmod a+rwx {} \; \ + -o ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; \ + -o ! -type d ! -perm -400 -exec chmod a+r {} \; \ + -o ! -type d ! -perm -444 -exec \ + $(SHELL) $(INSTALL_SH) -c -m a+r {} {} \; \ + || chmod -R a+r $(DistDir) ; \ + fi # This is invoked by distdir target, define it as a no-op to avoid errors if not # defined by user. From reid at x10sys.com Sat Dec 4 16:34:32 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 4 Dec 2004 16:34:32 -0600 Subject: [llvm-commits] CVS: llvm/lib/Support/bzip2/Makefile Message-ID: <200412042234.QAA28583@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support/bzip2: Makefile updated: 1.2 -> 1.3 --- Log message: Distribute headers and license files too --- Diffs of the changes: (+5 -3) Index: llvm/lib/Support/bzip2/Makefile diff -u llvm/lib/Support/bzip2/Makefile:1.2 llvm/lib/Support/bzip2/Makefile:1.3 --- llvm/lib/Support/bzip2/Makefile:1.2 Thu Nov 25 10:12:25 2004 +++ llvm/lib/Support/bzip2/Makefile Sat Dec 4 16:34:21 2004 @@ -8,9 +8,11 @@ ##===----------------------------------------------------------------------===## LEVEL = ../../.. LIBRARYNAME = LLVMbzip2 -SOURCES= blocksort.c bzlib.c -SOURCES=blocksort.c huffman.c crctable.c randtable.c compress.c decompress.c \ - bzlib.c +SOURCES = blocksort.c huffman.c crctable.c randtable.c compress.c decompress.c \ + bzlib.c +EXTRA_DIST = bzlib.h bzlib_private.h CHANGES LICENSE README \ + README.COMPILATION.PROBLEMS Y2K_INFO + CFLAGS=-fno-strength-reduce include $(LEVEL)/Makefile.common From reid at x10sys.com Sat Dec 4 16:34:44 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 4 Dec 2004 16:34:44 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/crtend/Makefile Message-ID: <200412042234.QAA28594@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/crtend: Makefile updated: 1.22 -> 1.23 --- Log message: Use the FAKE_SOURCES feature for proper distribution of contents --- Diffs of the changes: (+12 -9) Index: llvm/runtime/GCCLibraries/crtend/Makefile diff -u llvm/runtime/GCCLibraries/crtend/Makefile:1.22 llvm/runtime/GCCLibraries/crtend/Makefile:1.23 --- llvm/runtime/GCCLibraries/crtend/Makefile:1.22 Thu Dec 2 03:58:08 2004 +++ llvm/runtime/GCCLibraries/crtend/Makefile Sat Dec 4 16:34:33 2004 @@ -20,21 +20,24 @@ BYTECODE_LIBRARY = 1 LIBRARYNAME = crtend -# Note: We're fooling Makefile.rules here. The sources listed don't exist but -# it doesn't matter. Makefile.rules just uses $(SOURCES) to generate the set of -# object files to put in the library. Since we've specified BYTECODE_LIBRARY -# above, it changes the .c suffix to .bc suffix. Below are rules to build -# each of those bytecode objects from the sources we do have in this directory. -SOURCES = comp_main.c comp_genericeh.c comp_sjljeh.c +# Note: We're using FAKE_SOURCES because the comp_*.c don't really exists. +# However this makefile builds comp_*.bc and that's what we want in the library. +# The FAKE_SOURCES variable supports this kind of construction. It uses the +# FAKE_SOURCES to determine a list of things to build, but doesn't use +# FAKE_SOURCES for dependencies, distribution, etc. It is assumed the makefile +# will know how to build the objects eventhough the sources don't exist. -EXTRA_DIST := comp_main.lst comp_genericeh.lst comp_sjljeh.lst - -include $(LEVEL)/Makefile.common +FAKE_SOURCES := comp_main.c comp_genericeh.c comp_sjljeh.c MainSrc := crtend.c listend.ll GenericEHSrc := Exception.cpp SJLJEHSrc := SJLJ-Exception.cpp +EXTRA_DIST := $(MainSrc) $(GenericEHSrc) $(SJLJEHSrc) \ + comp_main.lst comp_genericeh.lst comp_sjljeh.lst + +include $(LEVEL)/Makefile.common + MainObj := $(ObjDir)/crtend.bc $(ObjDir)/listend.bc GenericEHObj := $(ObjDir)/Exception.bc SJLJEHObj := $(ObjDir)/SJLJ-Exception.bc From reid at x10sys.com Sat Dec 4 16:34:58 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 4 Dec 2004 16:34:58 -0600 Subject: [llvm-commits] CVS: llvm/test/Makefile Message-ID: <200412042234.QAA28605@zion.cs.uiuc.edu> Changes in directory llvm/test: Makefile updated: 1.73 -> 1.74 --- Log message: Failing Feature/Regression test should fail the build --- Diffs of the changes: (+1 -1) Index: llvm/test/Makefile diff -u llvm/test/Makefile:1.73 llvm/test/Makefile:1.74 --- llvm/test/Makefile:1.73 Sat Dec 4 00:47:07 2004 +++ llvm/test/Makefile Sat Dec 4 16:34:47 2004 @@ -121,7 +121,7 @@ endif check:: site.exp - -PATH=$(LLVMToolDir):$(LLVM_SRC_ROOT)/test/Scripts:$(PATH) \ + PATH=$(LLVMToolDir):$(LLVM_SRC_ROOT)/test/Scripts:$(PATH) \ $(RUNTEST) $(RUNTESTFLAGS) clean:: From lattner at cs.uiuc.edu Sat Dec 4 17:20:30 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 17:20:30 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/ExecutionEngine/test-arith.ll test-cast.ll Message-ID: <200412042320.iB4NKUD2014451@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/ExecutionEngine: test-arith.ll updated: 1.10 -> 1.11 test-cast.ll updated: 1.9 -> 1.10 --- Log message: These tests pass on darwin now that the __ thing is fixed. --- Diffs of the changes: (+0 -2) Index: llvm/test/Regression/ExecutionEngine/test-arith.ll diff -u llvm/test/Regression/ExecutionEngine/test-arith.ll:1.10 llvm/test/Regression/ExecutionEngine/test-arith.ll:1.11 --- llvm/test/Regression/ExecutionEngine/test-arith.ll:1.10 Thu Dec 2 15:28:37 2004 +++ llvm/test/Regression/ExecutionEngine/test-arith.ll Sat Dec 4 17:20:14 2004 @@ -1,4 +1,3 @@ -; XFAIL: darwin ; RUN: llvm-as -f %s -o %t.bc ; RUN: lli %t.bc > /dev/null Index: llvm/test/Regression/ExecutionEngine/test-cast.ll diff -u llvm/test/Regression/ExecutionEngine/test-cast.ll:1.9 llvm/test/Regression/ExecutionEngine/test-cast.ll:1.10 --- llvm/test/Regression/ExecutionEngine/test-cast.ll:1.9 Thu Dec 2 15:28:37 2004 +++ llvm/test/Regression/ExecutionEngine/test-cast.ll Sat Dec 4 17:20:14 2004 @@ -1,4 +1,3 @@ -; XFAIL: darwin ; RUN: llvm-as -f %s -o %t.bc ; RUN: lli %t.bc > /dev/null From lattner at cs.uiuc.edu Sat Dec 4 17:21:53 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 17:21:53 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/C++Frontend/2003-08-28-ForwardType.cpp Message-ID: <200412042321.iB4NLr4A014466@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/C++Frontend: 2003-08-28-ForwardType.cpp updated: 1.3 -> 1.4 --- Log message: This test passes on all platforms --- Diffs of the changes: (+0 -1) Index: llvm/test/Regression/C++Frontend/2003-08-28-ForwardType.cpp diff -u llvm/test/Regression/C++Frontend/2003-08-28-ForwardType.cpp:1.3 llvm/test/Regression/C++Frontend/2003-08-28-ForwardType.cpp:1.4 --- llvm/test/Regression/C++Frontend/2003-08-28-ForwardType.cpp:1.3 Sat Nov 6 16:29:57 2004 +++ llvm/test/Regression/C++Frontend/2003-08-28-ForwardType.cpp Sat Dec 4 17:21:41 2004 @@ -1,6 +1,5 @@ // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null -// XFAIL: darwin,sun // Default placement versions of operator new. inline void* operator new(unsigned, void* __p) throw(); From lattner at cs.uiuc.edu Sat Dec 4 17:24:42 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 17:24:42 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/CFrontend/2004-06-17-UnorderedCompares.c.tr Message-ID: <200412042324.iB4NOgN0014491@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/CFrontend: 2004-06-17-UnorderedCompares.c.tr updated: 1.1 -> 1.2 --- Log message: This fails due to the sun headers. --- Diffs of the changes: (+1 -0) Index: llvm/test/Regression/CFrontend/2004-06-17-UnorderedCompares.c.tr diff -u llvm/test/Regression/CFrontend/2004-06-17-UnorderedCompares.c.tr:1.1 llvm/test/Regression/CFrontend/2004-06-17-UnorderedCompares.c.tr:1.2 --- llvm/test/Regression/CFrontend/2004-06-17-UnorderedCompares.c.tr:1.1 Fri Jun 18 00:42:50 2004 +++ llvm/test/Regression/CFrontend/2004-06-17-UnorderedCompares.c.tr Sat Dec 4 17:24:30 2004 @@ -1,4 +1,5 @@ // RUN: llvmgcc -xc -std=c99 %s -c -o - | llvm-dis | grep -v llvm.isunordered | not grep call +// XFAIL: sparcv9 #include From lattner at cs.uiuc.edu Sat Dec 4 17:44:57 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 4 Dec 2004 17:44:57 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Debugger/funccall.ll Message-ID: <200412042344.iB4NivBs014624@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Debugger: funccall.ll updated: 1.6 -> 1.7 --- Log message: Darwin and solaris don't support echo -e. This should get the test passing for them. --- Diffs of the changes: (+8 -1) Index: llvm/test/Regression/Debugger/funccall.ll diff -u llvm/test/Regression/Debugger/funccall.ll:1.6 llvm/test/Regression/Debugger/funccall.ll:1.7 --- llvm/test/Regression/Debugger/funccall.ll:1.6 Tue Nov 30 11:47:13 2004 +++ llvm/test/Regression/Debugger/funccall.ll Sat Dec 4 17:44:42 2004 @@ -1,5 +1,12 @@ +;; RUN: echo create > %t.commands +;; RUN: echo s >> %t.commands +;; RUN: echo s >> %t.commands +;; RUN: echo finish >> %t.commands +;; RUN: echo bt >> %t.commands +;; RUN: echo q >> %t.commands +;; RUN: echo y >> %t.commands ;; RUN: llvm-as -f %s -o %t.bc -;; RUN: echo -e "create\ns\ns\nfinish\nbt\nq\ny" | llvm-db %t.bc | grep 'in main at funccall.c:11:2' +;; RUN: llvm-db %t.bc < %t.commands | grep 'in main at funccall.c:11:2' ;; Debugger type declarations From alkis at cs.uiuc.edu Sat Dec 4 19:30:13 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sat, 4 Dec 2004 19:30:13 -0600 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200412050130.TAA30669@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.155 -> 1.156 --- Log message: Remove empty basic blocks after we compile a function (we get empty basic blocks because exceptions are not implemented). --- Diffs of the changes: (+9 -0) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.155 llvm-java/lib/Compiler/Compiler.cpp:1.156 --- llvm-java/lib/Compiler/Compiler.cpp:1.155 Fri Dec 3 20:10:36 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Sat Dec 4 19:30:03 2004 @@ -1289,6 +1289,15 @@ } } + // FIXME: remove empty basic blocks (we have empty basic blocks + // because of our lack of exception support). + for (Function::iterator bb = function->begin(), be = function->end(); + bb != be; ) + if (bb->empty()) + bb = function->getBasicBlockList().erase(bb); + else + ++bb; + DEBUG(std::cerr << "Finished compilation of method: " << classMethodDesc << '\n'); // DEBUG(function->dump()); From alkis at cs.uiuc.edu Sat Dec 4 19:44:57 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sat, 4 Dec 2004 19:44:57 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll Message-ID: <200412050144.TAA30801@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/ExecutionEngine: 2004-12-04-LazyCompileFuncs.ll added (r1.1) --- Log message: Add testcast for bug475: http://llvm.cs.uiuc.edu/PR475 --- Diffs of the changes: (+36 -0) Index: llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll diff -c /dev/null llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll:1.1 *** /dev/null Sat Dec 4 19:44:56 2004 --- llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll Sat Dec 4 19:44:46 2004 *************** *** 0 **** --- 1,36 ---- + ; RUN: llvm-as -f %s -o %t.bc + ; RUN: lli -debug-only=jit %t.bc 2>&1 | not grep 'G()' + + target endian = little + target pointersize = 32 + deplibs = [ "c", "crtend" ] + %.str_1 = internal constant [7 x sbyte] c"IN F!\0A\00" ; <[7 x sbyte]*> [#uses=1] + %.str_2 = internal constant [7 x sbyte] c"IN G!\0A\00" ; <[7 x sbyte]*> [#uses=1] + %Ptrs = internal constant [2 x void (...)*] [ void (...)* cast (void ()* %F to void (...)*), void (...)* cast (void ()* %G to void (...)*) ] ; <[2 x void (...)*]*> [#uses=1] + + implementation ; Functions: + + declare int %printf(sbyte*, ...) + + internal void %F() { + entry: + %tmp.0 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([7 x sbyte]* %.str_1, int 0, int 0) ) ; [#uses=0] + ret void + } + + internal void %G() { + entry: + %tmp.0 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([7 x sbyte]* %.str_2, int 0, int 0) ) ; [#uses=0] + ret void + } + + int %main(int %argc, sbyte** %argv) { + entry: + %tmp.3 = and int %argc, 1 ; [#uses=1] + %tmp.4 = getelementptr [2 x void (...)*]* %Ptrs, int 0, int %tmp.3 ; [#uses=1] + %tmp.5 = load void (...)** %tmp.4 ; [#uses=1] + %tmp.5_c = cast void (...)* %tmp.5 to void ()* ; [#uses=1] + call void %tmp.5_c( ) + ret int undef + } + From alkis at cs.uiuc.edu Sat Dec 4 19:50:43 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sat, 4 Dec 2004 19:50:43 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll Message-ID: <200412050150.TAA30916@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/ExecutionEngine: 2004-12-04-LazyCompileFuncs.ll updated: 1.1 -> 1.2 --- Log message: Match codegen string better --- Diffs of the changes: (+1 -1) Index: llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll diff -u llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll:1.1 llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll:1.2 --- llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll:1.1 Sat Dec 4 19:44:46 2004 +++ llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll Sat Dec 4 19:50:32 2004 @@ -1,5 +1,5 @@ ; RUN: llvm-as -f %s -o %t.bc -; RUN: lli -debug-only=jit %t.bc 2>&1 | not grep 'G()' +; RUN: lli -debug-only=jit %t.bc 2>&1 | not grep 'Finished CodeGen of .* G' target endian = little target pointersize = 32 From alkis at cs.uiuc.edu Sat Dec 4 19:51:31 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sat, 4 Dec 2004 19:51:31 -0600 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JIT.cpp Message-ID: <200412050151.TAA30949@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: JIT.cpp updated: 1.49 -> 1.50 --- Log message: Fix PR475: http://llvm.cs.uiuc.edu/PR475 . --- Diffs of the changes: (+4 -0) Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.49 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.50 --- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.49 Mon Nov 29 08:11:29 2004 +++ llvm/lib/ExecutionEngine/JIT/JIT.cpp Sat Dec 4 19:51:20 2004 @@ -274,6 +274,10 @@ if (void *Addr = getPointerToGlobalIfAvailable(F)) return Addr; + // Get a stub if the target supports it + if (void *Addr = TJI.emitFunctionStub(F, *MCE)) + return Addr; + // Otherwise, if the target doesn't support it, just codegen the function. return getPointerToFunction(F); } From alkis at cs.uiuc.edu Sat Dec 4 20:03:26 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sat, 4 Dec 2004 20:03:26 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll Message-ID: <200412050203.UAA31153@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/ExecutionEngine: 2004-12-04-LazyCompileFuncs.ll updated: 1.2 -> 1.3 --- Log message: Remove unneeded code --- Diffs of the changes: (+0 -3) Index: llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll diff -u llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll:1.2 llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll:1.3 --- llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll:1.2 Sat Dec 4 19:50:32 2004 +++ llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll Sat Dec 4 20:03:16 2004 @@ -1,9 +1,6 @@ ; RUN: llvm-as -f %s -o %t.bc ; RUN: lli -debug-only=jit %t.bc 2>&1 | not grep 'Finished CodeGen of .* G' -target endian = little -target pointersize = 32 -deplibs = [ "c", "crtend" ] %.str_1 = internal constant [7 x sbyte] c"IN F!\0A\00" ; <[7 x sbyte]*> [#uses=1] %.str_2 = internal constant [7 x sbyte] c"IN G!\0A\00" ; <[7 x sbyte]*> [#uses=1] %Ptrs = internal constant [2 x void (...)*] [ void (...)* cast (void ()* %F to void (...)*), void (...)* cast (void ()* %G to void (...)*) ] ; <[2 x void (...)*]*> [#uses=1] From alkis at cs.uiuc.edu Sat Dec 4 22:05:14 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sat, 4 Dec 2004 22:05:14 -0600 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200412050405.WAA32448@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.156 -> 1.157 --- Log message: Add debug statement whenever a function is added to the list of functions to compile. --- Diffs of the changes: (+19 -7) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.156 llvm-java/lib/Compiler/Compiler.cpp:1.157 --- llvm-java/lib/Compiler/Compiler.cpp:1.156 Sat Dec 4 19:30:03 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Sat Dec 4 22:05:04 2004 @@ -135,6 +135,17 @@ } private: + /// Schedule a method for compilation. Returns true if this is the + /// first time this function was scheduled. + bool scheduleFunction(Function* function) { + if (toCompileFunctions_.insert(function)) { + DEBUG(std::cerr << "Scheduling function: " << function->getName() + << " for compilation\n"); + return true; + } + return false; + } + /// Given a llvm::Java::Constant returns a llvm::Constant. llvm::Constant* getConstant(Constant* c) { if (dynamic_cast(c)) @@ -392,7 +403,7 @@ getType(method->getDescriptor(), ci.type)); Function* vfun = module_.getOrInsertFunction(funcName, funcTy); - toCompileFunctions_.insert(vfun); + scheduleFunction(vfun); unsigned& index = vi.m2iMap[methodDescr]; if (!index) { @@ -762,7 +773,8 @@ const FunctionType* funcTy = cast( getType(method->getDescriptor(), getClassInfo(cf).type)); Function* vfun = module_.getOrInsertFunction(funcName, funcTy); - toCompileFunctions_.insert(vfun); + if (!method->isAbstract()) + scheduleFunction(vfun); unsigned& index = vi.m2iMap[methodDescr]; if (!index) { @@ -1352,7 +1364,7 @@ // Insert a call to it right before the terminator of the only // basic block in llvm_java_static_init. - bool inserted = toCompileFunctions_.insert(init); + bool inserted = scheduleFunction(init); assert(inserted && "Class initialization method already called!"); assert(hook->front().getTerminator() && LLVM_JAVA_STATIC_INIT " should have a terminator!"); @@ -1427,12 +1439,12 @@ // Create the method requested. Function* function = getFunction(getMethod(classMethodDesc)); - toCompileFunctions_.insert(function); + scheduleFunction(function); // Compile the transitive closure of methods called by this method. for (unsigned i = 0; i != toCompileFunctions_.size(); ++i) { Function* f = toCompileFunctions_[i]; compileMethodOnly(f->getName()); - DEBUG(std::cerr << i << '/' << toCompileFunctions_.size() + DEBUG(std::cerr << i+1 << '/' << toCompileFunctions_.size() << " functions compiled\n"); } @@ -2097,14 +2109,14 @@ FunctionType* funcTy = cast(getType(nameAndType->getDescriptor(), ci.type)); Function* function = module_.getOrInsertFunction(funcName, funcTy); - toCompileFunctions_.insert(function); + scheduleFunction(function); makeCall(function, getParams(funcTy)); } void do_invokestatic(unsigned index) { Method* method = getMethod(cf_->getConstantMethodRef(index)); Function* function = getFunction(method); - toCompileFunctions_.insert(function); + scheduleFunction(function); makeCall(function, getParams(function->getFunctionType())); } From alkis at cs.uiuc.edu Sat Dec 4 22:07:38 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sat, 4 Dec 2004 22:07:38 -0600 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200412050407.WAA32501@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.157 -> 1.158 --- Log message: Make check for constructor methods more efficient. --- Diffs of the changes: (+2 -2) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.157 llvm-java/lib/Compiler/Compiler.cpp:1.158 --- llvm-java/lib/Compiler/Compiler.cpp:1.157 Sat Dec 4 22:05:04 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Sat Dec 4 22:07:27 2004 @@ -393,7 +393,7 @@ Method* method = methods[i]; // The contructor is the only non-static method that is not // dynamically dispatched so we skip it. - if (!method->isStatic() && method->getName()->str() != "") { + if (!method->isStatic() && method->getName()->str()[0] != '<') { std::string methodDescr = method->getName()->str() + method->getDescriptor()->str(); @@ -764,7 +764,7 @@ Method* method = methods[i]; // The contructor is the only non-static method that is not // dynamically dispatched so we skip it. - if (!method->isStatic() && method->getName()->str() != "") { + if (!method->isStatic() && method->getName()->str()[0] != '<') { const std::string& methodDescr = method->getName()->str() + method->getDescriptor()->str(); From alkis at cs.uiuc.edu Sat Dec 4 22:10:55 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sat, 4 Dec 2004 22:10:55 -0600 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200412050410.WAA32570@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.158 -> 1.159 --- Log message: Make first argument of member functions always of type java/lang/Object. This allows jni calls to type check properly. --- Diffs of the changes: (+17 -9) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.158 llvm-java/lib/Compiler/Compiler.cpp:1.159 --- llvm-java/lib/Compiler/Compiler.cpp:1.158 Sat Dec 4 22:07:27 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Sat Dec 4 22:10:44 2004 @@ -400,7 +400,8 @@ std::string funcName = "java/lang/Object/" + methodDescr; const FunctionType* funcTy = cast( - getType(method->getDescriptor(), ci.type)); + getType(method->getDescriptor(), + PointerType::get(ClassInfo::ObjectBaseTy))); Function* vfun = module_.getOrInsertFunction(funcName, funcTy); scheduleFunction(vfun); @@ -771,7 +772,8 @@ std::string funcName = className + '/' + methodDescr; const FunctionType* funcTy = cast( - getType(method->getDescriptor(), getClassInfo(cf).type)); + getType(method->getDescriptor(), + PointerType::get(ClassInfo::ObjectBaseTy))); Function* vfun = module_.getOrInsertFunction(funcName, funcTy); if (!method->isAbstract()) scheduleFunction(vfun); @@ -1220,7 +1222,8 @@ PointerType::get(ClassInfo::ObjectBaseTy))); for (Function::aiterator A = function->abegin(), E = function->aend(); A != E; ++A) { - params.push_back(&*A); + params.push_back( + new CastInst(A, funcTy->getParamType(params.size()), TMP, bb)); } new ReturnInst(new CallInst(jniFunction, params, "", bb), bb); @@ -1381,7 +1384,7 @@ FunctionType* funcTy = cast( getType(method->getDescriptor(), - method->isStatic() ? NULL : getClassInfo(clazz).type)); + method->isStatic() ? NULL : PointerType::get(ClassInfo::ObjectBaseTy))); std::string funcName = clazz->getThisClass()->getName()->str() + '/' + method->getName()->str() + method->getDescriptor()->str(); @@ -2066,7 +2069,8 @@ nameAndType->getDescriptor()->str(); FunctionType* funTy = - cast(getType(nameAndType->getDescriptor(), ci->type)); + cast(getType(nameAndType->getDescriptor(), + PointerType::get(ClassInfo::ObjectBaseTy))); std::vector params(getParams(funTy)); @@ -2090,7 +2094,8 @@ indices.push_back(ConstantUInt::get(Type::UIntTy, vSlot)); Value* vfunPtr = new GetElementPtrInst(vtable, indices, TMP, currentBB_); - Value* vfun = new LoadInst(vfunPtr, methodDescr, currentBB_); + Value* vfun = new LoadInst(vfunPtr, className + '/' + methodDescr, + currentBB_); makeCall(vfun, params); } @@ -2107,7 +2112,8 @@ const ClassInfo& ci = getClassInfo(ClassFile::get(className)); FunctionType* funcTy = - cast(getType(nameAndType->getDescriptor(), ci.type)); + cast(getType(nameAndType->getDescriptor(), + PointerType::get(ClassInfo::ObjectBaseTy))); Function* function = module_.getOrInsertFunction(funcName, funcTy); scheduleFunction(function); makeCall(function, getParams(funcTy)); @@ -2136,7 +2142,8 @@ nameAndType->getDescriptor()->str(); FunctionType* funTy = - cast(getType(nameAndType->getDescriptor(), ci->type)); + cast(getType(nameAndType->getDescriptor(), + PointerType::get(ClassInfo::ObjectBaseTy))); std::vector params(getParams(funTy)); @@ -2173,7 +2180,8 @@ indices.push_back(ConstantUInt::get(Type::UIntTy, vSlot)); Value* vfunPtr = new GetElementPtrInst(interfaceVTable, indices, TMP, currentBB_); - Value* vfun = new LoadInst(vfunPtr, methodDescr, currentBB_); + Value* vfun = new LoadInst(vfunPtr, className + '/' + methodDescr, + currentBB_); makeCall(vfun, params); } From alkis at cs.uiuc.edu Sat Dec 4 22:12:35 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sat, 4 Dec 2004 22:12:35 -0600 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200412050412.WAA32611@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.159 -> 1.160 --- Log message: Ignore already compiled methods. --- Diffs of the changes: (+4 -1) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.159 llvm-java/lib/Compiler/Compiler.cpp:1.160 --- llvm-java/lib/Compiler/Compiler.cpp:1.159 Sat Dec 4 22:10:44 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Sat Dec 4 22:12:24 2004 @@ -1181,7 +1181,10 @@ cf_ = method->getParent(); Function* function = getFunction(method); - assert(function->empty() && "Compiling an already compiled method!"); + if (!function->empty()) { + DEBUG(std::cerr << "Function: " << function->getName() << " is already compiled!\n"); + return function; + } if (method->isNative()) { DEBUG(std::cerr << "Adding stub for natively implemented method: " From alkis at cs.uiuc.edu Sat Dec 4 22:14:38 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sat, 4 Dec 2004 22:14:38 -0600 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200412050414.WAA32671@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.160 -> 1.161 --- Log message: Make all methods external (even private ones) and add hacks to allow us to completely compile a module and have it run through the jit. --- Diffs of the changes: (+35 -19) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.160 llvm-java/lib/Compiler/Compiler.cpp:1.161 --- llvm-java/lib/Compiler/Compiler.cpp:1.160 Sat Dec 4 22:12:24 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Sat Dec 4 22:14:28 2004 @@ -1213,9 +1213,6 @@ } Function* jniFunction = module_.getOrInsertFunction(funcName, funcTy); - jniFunction->setLinkage(method->isPrivate() ? - Function::InternalLinkage : - Function::ExternalLinkage); BasicBlock* bb = new BasicBlock("entry", function); std::vector params; @@ -1232,9 +1229,23 @@ return function; } - else if (method->isAbstract()) { - DEBUG(std::cerr << "Ignoring abstract method: "; - std::cerr << classMethodDesc << '\n'); + + assert (!method->isAbstract() && "Trying to compile an abstract method!"); + + // HACK: skip compiling java/lang/Class*, java/lang/reflect/*, + // java/lang/io/*, java/nio/*, java/security/*, java/text/* methods + if (classMethodDesc.find("java/lang/Object") != 0 && + classMethodDesc.find("java/lang/StringBuffer") != 0 && + (classMethodDesc.find("java/lang/Class") == 0 || + classMethodDesc.find("java/lang/") == 0 || + classMethodDesc.find("java/util/") == 0 || + classMethodDesc.find("java/net/") == 0 || + classMethodDesc.find("java/io/") == 0 || + classMethodDesc.find("java/nio/") == 0 || + classMethodDesc.find("java/text/") == 0 || + classMethodDesc.find("java/security/") == 0)) { + DEBUG(std::cerr << "Skipping compilation of method: " + << classMethodDesc << '\n'); return function; } @@ -1335,10 +1346,10 @@ Field* field = fields[i]; if (field->isStatic()) { Type* globalTy = getType(field->getDescriptor()); - llvm::Constant* init = NULL; - if (ConstantValueAttribute* cv = field->getConstantValueAttribute()) - init = - ConstantExpr::getCast(getConstant(cv->getValue()), globalTy); + ConstantValueAttribute* cv = field->getConstantValueAttribute(); + llvm::Constant* init = cv ? + ConstantExpr::getCast(getConstant(cv->getValue()), globalTy) : + llvm::Constant::getNullValue(globalTy); std::string globalName = classfile->getThisClass()->getName()->str() + '/' + @@ -1346,17 +1357,13 @@ DEBUG(std::cerr << "Adding global: " << globalName << '\n'); new GlobalVariable(globalTy, field->isFinal(), - (field->isPrivate() & bool(init) ? - GlobalVariable::InternalLinkage : - GlobalVariable::ExternalLinkage), + GlobalVariable::ExternalLinkage, init, globalName, &module_); } } -// FIXME: This pulls in too many methods for now so we disable it. -#if 0 // Call its class initialization method if it exists. if (const Method* method = classfile->getMethod("()V")) { std::string name = classfile->getThisClass()->getName()->str(); @@ -1376,7 +1383,6 @@ LLVM_JAVA_STATIC_INIT " should have a terminator!"); new CallInst(init, "", hook->front().getTerminator()); } -#endif } } @@ -1393,9 +1399,7 @@ method->getName()->str() + method->getDescriptor()->str(); Function* function = module_.getOrInsertFunction(funcName, funcTy); - function->setLinkage(method->isPrivate() ? - Function::InternalLinkage : - Function::ExternalLinkage); + return function; } @@ -2391,5 +2395,17 @@ "", bb); new ReturnInst(NULL, bb); + + // HACK: for all functions that are not compiled, add a + // dummy return. + for (Module::iterator F = m->begin(), E = m->end(); F != E; ++F) + if (F->getName().find("") != std::string::npos) { + BasicBlock* entry = new BasicBlock("entry", F); + if (F->getReturnType() == Type::VoidTy) + new ReturnInst(NULL, entry); + else + new ReturnInst(UndefValue::get(F->getReturnType())); + } + return m; } From alkis at cs.uiuc.edu Sat Dec 4 22:15:48 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sat, 4 Dec 2004 22:15:48 -0600 Subject: [llvm-commits] CVS: llvm-java/test/Programs/SingleSource/UnitTests/Makefile Message-ID: <200412050415.WAA32755@zion.cs.uiuc.edu> Changes in directory llvm-java/test/Programs/SingleSource/UnitTests: Makefile updated: 1.7 -> 1.8 --- Log message: Now we pass these tests well :-) --- Diffs of the changes: (+4 -4) Index: llvm-java/test/Programs/SingleSource/UnitTests/Makefile diff -u llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.7 llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.8 --- llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.7 Thu Dec 2 17:24:34 2004 +++ llvm-java/test/Programs/SingleSource/UnitTests/Makefile Sat Dec 4 22:15:37 2004 @@ -10,18 +10,18 @@ JAVA_TESTS := Arithm \ BigConstants \ + FieldAccess \ + FloatCompare \ ForLoop \ If \ + LongCompare \ LookupSwitch \ Return \ StaticInitializers \ TableSwitch \ +# VTable \ # ClassTest \ -# FieldAccess \ -# FloatCompare \ -# LongCompare \ # InstanceOf \ -# VTable CPPFLAGS+=-I$(BUILD_SRC_ROOT)/include/llvm/Java BYTECODE_LIBRARY=1 From reid at x10sys.com Sat Dec 4 23:17:33 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 4 Dec 2004 23:17:33 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200412050517.XAA00879@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.250 -> 1.251 --- Log message: Add ability to make a single bytecode module from others --- Diffs of the changes: (+43 -0) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.250 llvm/Makefile.rules:1.251 --- llvm/Makefile.rules:1.250 Sat Dec 4 16:34:09 2004 +++ llvm/Makefile.rules Sat Dec 4 23:17:22 2004 @@ -465,6 +465,47 @@ # Library Build Rules: Four ways to build a library ############################################################################### +#--------------------------------------------------------- +# Bytecode Module Targets: +# If the user set MODULE_NAME then they want to build a +# bytecode module from the sources. We compile all the +# sources and link it together into a single bytecode +# module. +#--------------------------------------------------------- + +ifdef MODULE_NAME + +Module := $(LibDir)/$(MODULE_NAME).bc +LinkModule := $(LLVMGCC) -shared -nostdlib + +ifdef EXPORTED_SYMBOL_FILE +LinkMOdule += -Xlinker -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE) +endif + +$(Module): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir $(GCCLD) + $(Echo) Building $(BuildMOde) Bytecode Module $(notdir $@) + $(Verb) $(LinkModule) -o $@ $(ObjectsBC) + +all-local:: $(Module) + +clean-local:: +ifneq ($(strip $(Module)),) + -$(Verb) $(RM) -f $(Module) +endif + +DestModule := $(bytecode_libdir)/$(MODULE_NAME).bc + +install-local:: $(DestModule) + +$(DestModule): $(bytecode_libdir) $(Module) + $(Echo) Installing $(BuildMode) Bytecode Module $(DestModule) + $(Verb) $(INSTALL) $(Module) $@ + +uninstall-local:: + $(Echo) Uninstalling $(BuildMode) Bytecode Module $(DestModule) + -$(Verb) $(RM) -f $(DestModule) + +endif # if we're building a library ... ifdef LIBRARYNAME @@ -1299,6 +1340,7 @@ $(Echo) "LibDir : " '$(LibDir)' $(Echo) "ToolDir : " '$(ToolDir)' $(Echo) "ExmplDir : " '$(ExmplDir)' + $(Echo) "Sources : " '$(Sources)' $(Echo) "TDFiles : " '$(TDFiles)' $(Echo) "INCFiles : " '$(INCFiles)' $(Echo) "Compile.CXX : " '$(Compile.CXX)' @@ -1306,3 +1348,4 @@ $(Echo) "Archive : " '$(Archive)' $(Echo) "YaccFiles : " '$(YaccFiles)' $(Echo) "LexFiles : " '$(LexFiles)' + $(Echo) "Module : " '$(Module)' From reid at x10sys.com Sat Dec 4 23:17:45 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 4 Dec 2004 23:17:45 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/CommandLine.h Message-ID: <200412050517.XAA00902@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: CommandLine.h updated: 1.39 -> 1.40 --- Log message: Make a const method const --- Diffs of the changes: (+1 -1) Index: llvm/include/llvm/Support/CommandLine.h diff -u llvm/include/llvm/Support/CommandLine.h:1.39 llvm/include/llvm/Support/CommandLine.h:1.40 --- llvm/include/llvm/Support/CommandLine.h:1.39 Tue Nov 16 00:11:52 2004 +++ llvm/include/llvm/Support/CommandLine.h Sat Dec 4 23:17:34 2004 @@ -915,7 +915,7 @@ public: ParserClass &getParser() { return Parser; } - unsigned getPosition(unsigned optnum) { + unsigned getPosition(unsigned optnum) const { assert(optnum < this->size() && "Invalid option index"); return Positions[optnum]; } From reid at x10sys.com Sat Dec 4 23:18:27 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 4 Dec 2004 23:18:27 -0600 Subject: [llvm-commits] CVS: llvm/projects/Stacker/lib/runtime/Makefile Message-ID: <200412050518.XAA00919@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker/lib/runtime: Makefile updated: 1.3 -> 1.4 --- Log message: Build a module instead of a library so main() is not missed --- Diffs of the changes: (+9 -13) Index: llvm/projects/Stacker/lib/runtime/Makefile diff -u llvm/projects/Stacker/lib/runtime/Makefile:1.3 llvm/projects/Stacker/lib/runtime/Makefile:1.4 --- llvm/projects/Stacker/lib/runtime/Makefile:1.3 Sat Sep 4 14:48:50 2004 +++ llvm/projects/Stacker/lib/runtime/Makefile Sat Dec 4 23:18:16 2004 @@ -1,18 +1,14 @@ ##===- projects/Stacker/lib/runtime/Makefile ---------------*- Makefile -*-===## - -# -# Indicate where we are relative to the top of the source tree. +# +# The LLVM Compiler Infrastructure # -LEVEL=../../ +# This file was developed by Reid Spencer and is distributed under the +# University of Illinois Open Source License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## -# -# Give the name of a library. This will build a dynamic version. -# -BYTECODE_LIBRARY=1 -DONT_BUILD_RELINKED=1 -LIBRARYNAME=stkr_runtime +LEVEL = ../.. +DONT_BUILD_RELINKED = 1 +MODULE_NAME = stkr_runtime -# -# Include Makefile.common so we know what to do. -# include $(LEVEL)/Makefile.common From reid at x10sys.com Sat Dec 4 23:18:39 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 4 Dec 2004 23:18:39 -0600 Subject: [llvm-commits] CVS: llvm/projects/Stacker/test/Makefile Message-ID: <200412050518.XAA00930@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker/test: Makefile updated: 1.8 -> 1.9 --- Log message: Correct build script for stkr_runtime module --- Diffs of the changes: (+1 -1) Index: llvm/projects/Stacker/test/Makefile diff -u llvm/projects/Stacker/test/Makefile:1.8 llvm/projects/Stacker/test/Makefile:1.9 --- llvm/projects/Stacker/test/Makefile:1.8 Sat Nov 20 15:03:34 2004 +++ llvm/projects/Stacker/test/Makefile Sat Dec 4 23:18:28 2004 @@ -42,7 +42,7 @@ % : %.st Makefile testing.bc $(Echo) "Building $*" - $(Verb)$(LLVMC) -O4 -o $@ $< testing.bc -lstkr_runtime -lcrtend + $(Verb)$(LLVMC) -O4 -o $@ $< testing.bc $(LibDir)/stkr_runtime.bc -lcrtend testing.bc : testing.st Makefile $(Echo) "Compiling $*" From lattner at cs.uiuc.edu Sun Dec 5 00:18:49 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 5 Dec 2004 00:18:49 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll Message-ID: <200412050618.iB56InLN022495@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Assembler: 2004-12-05-LocalGlobalSymtabConflict.ll added (r1.1) --- Log message: New testcase for the bug affecting 255.vortex in CBE mode. --- Diffs of the changes: (+20 -0) Index: llvm/test/Regression/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll diff -c /dev/null llvm/test/Regression/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll:1.1 *** /dev/null Sun Dec 5 00:18:45 2004 --- llvm/test/Regression/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll Sun Dec 5 00:18:35 2004 *************** *** 0 **** --- 1,20 ---- + ; RUN: llvm-as < %s | opt -inline | llvm-dis | llvm-as | lli + + ; In this testcase, %bar stores to the global G. Make sure that inlining does + ; not cause it to store to the G in main instead. + + %G = global int 7 + + int %main() { + %G = alloca int + store int 0, int* %G + call void %bar() + %RV = load int* %G + ret int %RV + } + + internal void %bar() { + store int 123, int* %G + ret void + } + From lattner at cs.uiuc.edu Sun Dec 5 00:33:30 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 5 Dec 2004 00:33:30 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/SymbolTable.h Message-ID: <200412050633.iB56XUj4026967@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm: SymbolTable.h updated: 1.38 -> 1.39 --- Log message: Fix typeo --- Diffs of the changes: (+1 -1) Index: llvm/include/llvm/SymbolTable.h diff -u llvm/include/llvm/SymbolTable.h:1.38 llvm/include/llvm/SymbolTable.h:1.39 --- llvm/include/llvm/SymbolTable.h:1.38 Mon Nov 15 13:02:35 2004 +++ llvm/include/llvm/SymbolTable.h Sun Dec 5 00:33:15 2004 @@ -34,7 +34,7 @@ /// There is a TypeMap typedef that is the mapping of names to Types. /// Similarly there is a ValueMap typedef that is the mapping of /// names to Values. Finally, there is a PlaneMap typedef that is the -/// mapping of types to planes of ValueMap. THis is the basic structure +/// mapping of types to planes of ValueMap. This is the basic structure /// of the symbol table. When you call type_begin() you're asking /// for an iterator at the start of the TypeMap. When you call /// plane_begin(), you're asking for an iterator at the start of From lattner at cs.uiuc.edu Sun Dec 5 00:43:31 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 5 Dec 2004 00:43:31 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Function.h Message-ID: <200412050643.iB56hVpg030972@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm: Function.h updated: 1.55 -> 1.56 --- Log message: Add a new method --- Diffs of the changes: (+7 -0) Index: llvm/include/llvm/Function.h diff -u llvm/include/llvm/Function.h:1.55 llvm/include/llvm/Function.h:1.56 --- llvm/include/llvm/Function.h:1.55 Mon Nov 15 13:02:35 2004 +++ llvm/include/llvm/Function.h Sun Dec 5 00:43:16 2004 @@ -106,6 +106,13 @@ unsigned getIntrinsicID() const; bool isIntrinsic() const { return getIntrinsicID() != 0; } + /// renameLocalSymbols - This method goes through the Function's symbol table + /// and renames any symbols that conflict with symbols at global scope. This + /// is required before printing out to a textual form, to ensure that there is + /// no ambiguity when parsing. + void renameLocalSymbols(); + + /// deleteBody - This method deletes the body of the function, and converts /// the linkage to external. /// From lattner at cs.uiuc.edu Sun Dec 5 00:43:40 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 5 Dec 2004 00:43:40 -0600 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Function.cpp Message-ID: <200412050643.iB56hemd030980@apoc.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Function.cpp updated: 1.82 -> 1.83 --- Log message: Add a new method --- Diffs of the changes: (+41 -0) Index: llvm/lib/VMCore/Function.cpp diff -u llvm/lib/VMCore/Function.cpp:1.82 llvm/lib/VMCore/Function.cpp:1.83 --- llvm/lib/VMCore/Function.cpp:1.82 Fri Oct 29 13:43:17 2004 +++ llvm/lib/VMCore/Function.cpp Sun Dec 5 00:43:27 2004 @@ -17,6 +17,7 @@ #include "llvm/IntrinsicInst.h" #include "llvm/Support/LeakDetector.h" #include "SymbolTableListTraitsImpl.h" +#include "llvm/ADT/StringExtras.h" using namespace llvm; BasicBlock *ilist_traits::createNode() { @@ -153,6 +154,46 @@ getParent()->getFunctionList().erase(this); } + +/// renameLocalSymbols - This method goes through the Function's symbol table +/// and renames any symbols that conflict with symbols at global scope. This is +/// required before printing out to a textual form, to ensure that there is no +/// ambiguity when parsing. +void Function::renameLocalSymbols() { + SymbolTable &LST = getSymbolTable(); // Local Symtab + SymbolTable &GST = getParent()->getSymbolTable(); // Global Symtab + + for (SymbolTable::plane_iterator LPI = LST.plane_begin(), E = LST.plane_end(); + LPI != E; ++LPI) + // All global symbols are of pointer type, ignore any non-pointer planes. + if (isa(LPI->first)) { + // Only check if the global plane has any symbols of this type. + SymbolTable::plane_iterator GPI = GST.find(LPI->first); + if (GPI != GST.plane_end()) { + SymbolTable::ValueMap &LVM = LPI->second; + const SymbolTable::ValueMap &GVM = GPI->second; + + // Loop over all local symbols, renaming those that are in the global + // symbol table already. + for (SymbolTable::value_iterator VI = LVM.begin(), E = LVM.end(); + VI != E;) { + Value *V = VI->second; + const std::string &Name = VI->first; + ++VI; + if (GVM.count(Name)) { + static unsigned UniqueNum = 0; + // Find a name that does not conflict! + while (GVM.count(Name + "_" + utostr(++UniqueNum)) || + LVM.count(Name + "_" + utostr(UniqueNum))) + /* scan for UniqueNum that works */; + V->setName(Name + "_" + utostr(UniqueNum)); + } + } + } + } +} + + // dropAllReferences() - This function causes all the subinstructions to "let // go" of all references that they are maintaining. This allows one to // 'delete' a whole class at a time, even though there may be circular From lattner at cs.uiuc.edu Sun Dec 5 00:44:21 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 5 Dec 2004 00:44:21 -0600 Subject: [llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Message-ID: <200412050644.iB56iLwB031000@apoc.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: AsmWriter.cpp updated: 1.165 -> 1.166 --- Log message: When printing out a function, make sure that local and global symbols don't conflict. This fixes Assembler/2004-12-05-LocalGlobalSymtabConflict.ll --- Diffs of the changes: (+3 -0) Index: llvm/lib/VMCore/AsmWriter.cpp diff -u llvm/lib/VMCore/AsmWriter.cpp:1.165 llvm/lib/VMCore/AsmWriter.cpp:1.166 --- llvm/lib/VMCore/AsmWriter.cpp:1.165 Mon Nov 15 13:30:05 2004 +++ llvm/lib/VMCore/AsmWriter.cpp Sun Dec 5 00:44:09 2004 @@ -879,6 +879,9 @@ // Print out the return type and name... Out << "\n"; + // Ensure that no local symbols conflict with global symbols. + const_cast(F)->renameLocalSymbols(); + if (AnnotationWriter) AnnotationWriter->emitFunctionAnnot(F, Out); if (F->isExternal()) From lattner at cs.uiuc.edu Sun Dec 5 00:45:42 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 5 Dec 2004 00:45:42 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll Message-ID: <200412050645.iB56jg8a031032@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Assembler: 2004-12-05-LocalGlobalSymtabConflict.ll updated: 1.1 -> 1.2 --- Log message: Change this test to not require execution of the program. --- Diffs of the changes: (+1 -1) Index: llvm/test/Regression/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll diff -u llvm/test/Regression/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll:1.1 llvm/test/Regression/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll:1.2 --- llvm/test/Regression/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll:1.1 Sun Dec 5 00:18:35 2004 +++ llvm/test/Regression/Assembler/2004-12-05-LocalGlobalSymtabConflict.ll Sun Dec 5 00:45:30 2004 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -inline | llvm-dis | llvm-as | lli +; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep '%G = alloca int' ; In this testcase, %bar stores to the global G. Make sure that inlining does ; not cause it to store to the G in main instead. From lattner at cs.uiuc.edu Sun Dec 5 00:49:56 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 5 Dec 2004 00:49:56 -0600 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp Message-ID: <200412050649.iB56nufN032382@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.212 -> 1.213 --- Log message: Move lower intrinsics before FP constant emission, in case intrinsic lowering ever introduces constants. Rename local symbols before printing function bodies, fixing 255.vortex with the CBE!!! --- Diffs of the changes: (+7 -2) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.212 llvm/lib/Target/CBackend/Writer.cpp:1.213 --- llvm/lib/Target/CBackend/Writer.cpp:1.212 Fri Dec 3 11:19:10 2004 +++ llvm/lib/Target/CBackend/Writer.cpp Sun Dec 5 00:49:44 2004 @@ -85,10 +85,15 @@ bool runOnFunction(Function &F) { LI = &getAnalysis(); + // Get rid of intrinsics we can't handle. + lowerIntrinsics(F); + // Output all floating point constants that cannot be printed accurately. printFloatingPointConstants(F); - - lowerIntrinsics(F); + + // Ensure that no local symbols conflict with global symbols. + F.renameLocalSymbols(); + printFunction(F); FPConstantMap.clear(); return false; From lattner at cs.uiuc.edu Sun Dec 5 01:00:12 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 5 Dec 2004 01:00:12 -0600 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JIT.cpp Message-ID: <200412050700.iB570C2U012237@apoc.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: JIT.cpp updated: 1.50 -> 1.51 --- Log message: Revert this patch, it broke a ton of programs. --- Diffs of the changes: (+0 -4) Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.50 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.51 --- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.50 Sat Dec 4 19:51:20 2004 +++ llvm/lib/ExecutionEngine/JIT/JIT.cpp Sun Dec 5 00:59:59 2004 @@ -274,10 +274,6 @@ if (void *Addr = getPointerToGlobalIfAvailable(F)) return Addr; - // Get a stub if the target supports it - if (void *Addr = TJI.emitFunctionStub(F, *MCE)) - return Addr; - // Otherwise, if the target doesn't support it, just codegen the function. return getPointerToFunction(F); } From lattner at cs.uiuc.edu Sun Dec 5 01:15:37 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 5 Dec 2004 01:15:37 -0600 Subject: [llvm-commits] CVS: llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll Message-ID: <200412050715.iB57FbGP018301@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/ExecutionEngine: 2004-12-04-LazyCompileFuncs.ll updated: 1.3 -> 1.4 --- Log message: Make this test actually capable of passing. --- Diffs of the changes: (+1 -1) Index: llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll diff -u llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll:1.3 llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll:1.4 --- llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll:1.3 Sat Dec 4 20:03:16 2004 +++ llvm/test/Regression/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll Sun Dec 5 01:15:21 2004 @@ -1,5 +1,5 @@ ; RUN: llvm-as -f %s -o %t.bc -; RUN: lli -debug-only=jit %t.bc 2>&1 | not grep 'Finished CodeGen of .* G' +; RUN: lli -debug-only=jit %t.bc 2>&1 | not grep 'Finished CodeGen of .*Function: F' %.str_1 = internal constant [7 x sbyte] c"IN F!\0A\00" ; <[7 x sbyte]*> [#uses=1] %.str_2 = internal constant [7 x sbyte] c"IN G!\0A\00" ; <[7 x sbyte]*> [#uses=1] From lattner at cs.uiuc.edu Sun Dec 5 01:19:30 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 5 Dec 2004 01:19:30 -0600 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JIT.cpp JITEmitter.cpp Message-ID: <200412050719.iB57JUlA018596@apoc.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: JIT.cpp updated: 1.51 -> 1.52 JITEmitter.cpp updated: 1.58 -> 1.59 --- Log message: Properly implement a fix for PR475: http://llvm.cs.uiuc.edu/PR475 --- Diffs of the changes: (+15 -13) Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.51 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.52 --- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.51 Sun Dec 5 00:59:59 2004 +++ llvm/lib/ExecutionEngine/JIT/JIT.cpp Sun Dec 5 01:19:16 2004 @@ -265,19 +265,6 @@ return Addr; } -// getPointerToFunctionOrStub - If the specified function has been -// code-gen'd, return a pointer to the function. If not, compile it, or use -// a stub to implement lazy compilation if available. -// -void *JIT::getPointerToFunctionOrStub(Function *F) { - // If we have already code generated the function, just return the address. - if (void *Addr = getPointerToGlobalIfAvailable(F)) - return Addr; - - // Otherwise, if the target doesn't support it, just codegen the function. - return getPointerToFunction(F); -} - /// getOrEmitGlobalVariable - Return the address of the specified global /// variable, possibly emitting it to memory if needed. This is used by the /// Emitter. Index: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp diff -u llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.58 llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.59 --- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.58 Wed Dec 1 11:13:05 2004 +++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Sun Dec 5 01:19:16 2004 @@ -208,6 +208,21 @@ } +// getPointerToFunctionOrStub - If the specified function has been +// code-gen'd, return a pointer to the function. If not, compile it, or use +// a stub to implement lazy compilation if available. +// +void *JIT::getPointerToFunctionOrStub(Function *F) { + // If we have already code generated the function, just return the address. + if (void *Addr = getPointerToGlobalIfAvailable(F)) + return Addr; + + // Get a stub if the target supports it + return getJITResolver(MCE).getFunctionStub(F); +} + + + //===----------------------------------------------------------------------===// // JITEmitter code. // From alkis at cs.uiuc.edu Sun Dec 5 03:10:14 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 03:10:14 -0600 Subject: [llvm-commits] CVS: llvm-java/test/Makefile.test Message-ID: <200412050910.DAA24603@zion.cs.uiuc.edu> Changes in directory llvm-java/test: Makefile.test updated: 1.20 -> 1.21 --- Log message: Add libjrt to the module generated by class2llvm. --- Diffs of the changes: (+1 -1) Index: llvm-java/test/Makefile.test diff -u llvm-java/test/Makefile.test:1.20 llvm-java/test/Makefile.test:1.21 --- llvm-java/test/Makefile.test:1.20 Thu Dec 2 17:34:49 2004 +++ llvm-java/test/Makefile.test Sun Dec 5 03:10:02 2004 @@ -24,7 +24,7 @@ # rule to link bytecode with runtime %.llvm %.llvm.bc: %.linked.bc $(LibDir)/libjrt.bca $(EXTRA_OBJS) $(LOPT) $(Echo) Linking $< with the Java runtime - $(Verb)$(GCCLD) -disable-opt -o=$*.llvm $< -L $(LibDir) -ljrt $(EXTRA_OBJS) + $(Verb)$(GCCLD) -disable-opt -o=$*.llvm $< -L $(LibDir) $(EXTRA_OBJS) # rule to make assembly from bytecode %.dis-ll: %.bc From alkis at cs.uiuc.edu Sun Dec 5 03:10:14 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 03:10:14 -0600 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200412050910.DAA24604@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.161 -> 1.162 --- Log message: Add libjrt to the module generated by class2llvm. --- Diffs of the changes: (+2 -0) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.161 llvm-java/lib/Compiler/Compiler.cpp:1.162 --- llvm-java/lib/Compiler/Compiler.cpp:1.161 Sat Dec 4 22:14:28 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Sun Dec 5 03:10:02 2004 @@ -2380,6 +2380,8 @@ DEBUG(std::cerr << "Compiling class: " << className << '\n'); std::auto_ptr m(new Module(className)); + // Require the Java runtime. + m->addLibrary("jrt"); Compiler c(*m); Function* main = c.compileMethod(className + "/main([Ljava/lang/String;)V"); From alkis at cs.uiuc.edu Sun Dec 5 03:12:16 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 03:12:16 -0600 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200412050912.DAA28730@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.162 -> 1.163 --- Log message: Intercept java/lang/System/loadLibrary calls and define this function to do nothing. --- Diffs of the changes: (+13 -1) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.162 llvm-java/lib/Compiler/Compiler.cpp:1.163 --- llvm-java/lib/Compiler/Compiler.cpp:1.162 Sun Dec 5 03:10:02 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Sun Dec 5 03:12:05 2004 @@ -2129,7 +2129,19 @@ void do_invokestatic(unsigned index) { Method* method = getMethod(cf_->getConstantMethodRef(index)); Function* function = getFunction(method); - scheduleFunction(function); + // Intercept java/lang/System/loadLibrary() calls and add + // library deps to the module + if (function->getName().find( + "java/lang/System/loadLibrary(Ljava/lang/String;)V") == 0) { + // FIXME: we should get the string and add this library to the + // module. + + // If this function is not defined, define it now. + if (function->empty()) + new ReturnInst(NULL, new BasicBlock("entry", function)); + } + else + scheduleFunction(function); makeCall(function, getParams(function->getFunctionType())); } From alkis at cs.uiuc.edu Sun Dec 5 03:13:14 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 03:13:14 -0600 Subject: [llvm-commits] CVS: llvm-java/test/Makefile.test Message-ID: <200412050913.DAA32753@zion.cs.uiuc.edu> Changes in directory llvm-java/test: Makefile.test updated: 1.21 -> 1.22 --- Log message: Automate testing against the host JVM. --- Diffs of the changes: (+27 -1) Index: llvm-java/test/Makefile.test diff -u llvm-java/test/Makefile.test:1.21 llvm-java/test/Makefile.test:1.22 --- llvm-java/test/Makefile.test:1.21 Sun Dec 5 03:10:02 2004 +++ llvm-java/test/Makefile.test Sun Dec 5 03:13:03 2004 @@ -38,12 +38,38 @@ $(Verb)mkdir -p Output $(Verb)$(JAVAC) -d Output $? $(Verb)touch $@ + +all:: Output/.compile-java endif +PREFIXED_JAVA_TESTS := $(addprefix Output/, $(JAVA_TESTS)) + +# Compiled bytecode for tests +BYTECODE := $(addsuffix .llvm.bc, $(PREFIXED_JAVA_TESTS)) + +# Output produced by tests +NATIVE_OUTPUT := $(addsuffix .out-nat, $(PREFIXED_JAVA_TESTS)) +JIT_OUTPUT := $(addsuffix .out-jit, $(PREFIXED_JAVA_TESTS)) + +# Diffs of output produced by native and llvm-java runs +DIFFS := $(addsuffix .diff, $(PREFIXED_JAVA_TESTS)) + +# Keep the output and diffs +.PRECIOUS: %.out-nat %.out-jit %.diff + +all:: $(BYTECODE) +all:: $(DIFFS) + # rule to run a .class file with the jvm %.out-nat: %.class - $(Verb)$(JAVA) -cp Output $(subst /,.,$(subst Output/,,$*)) > $*.out-nat || rm -f $*.out-nat + $(Echo) Running $(notdir $*) with the host JVM + $(Verb)LD_LIBRARY_PATH=$(LibDir) $(JAVA) -cp Output $(notdir $*) > $*.out-nat || rm -f $*.out-nat # rule to run a .class file with the llvm jit %.out-jit: %.llvm.bc + $(Echo) Running $(notdir $*) with the llvm JIT $(Verb)$(LLI) $< > $*.out-jit + +# rule to diff test output +%.diff: %.out-nat %.out-jit + $(Verb)diff $*.out-nat $*.out-jit > $@ || echo "FAIL: $*" From alkis at cs.uiuc.edu Sun Dec 5 03:13:14 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 03:13:14 -0600 Subject: [llvm-commits] CVS: llvm-java/test/Programs/SingleSource/UnitTests/Makefile Message-ID: <200412050913.DAA32750@zion.cs.uiuc.edu> Changes in directory llvm-java/test/Programs/SingleSource/UnitTests: Makefile updated: 1.8 -> 1.9 --- Log message: Automate testing against the host JVM. --- Diffs of the changes: (+2 -3) Index: llvm-java/test/Programs/SingleSource/UnitTests/Makefile diff -u llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.8 llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.9 --- llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.8 Sat Dec 4 22:15:37 2004 +++ llvm-java/test/Programs/SingleSource/UnitTests/Makefile Sun Dec 5 03:13:03 2004 @@ -10,7 +10,6 @@ JAVA_TESTS := Arithm \ BigConstants \ - FieldAccess \ FloatCompare \ ForLoop \ If \ @@ -19,16 +18,16 @@ Return \ StaticInitializers \ TableSwitch \ +# FieldAccess \ # VTable \ # ClassTest \ # InstanceOf \ CPPFLAGS+=-I$(BUILD_SRC_ROOT)/include/llvm/Java BYTECODE_LIBRARY=1 +SHARED_LIBRARY=1 LIBRARYNAME=test EXTRA_OBJS = $(LibDir)/libtest.bca -all:: Output/.compile-java $(addprefix Output/, $(addsuffix .llvm.bc, $(JAVA_TESTS))) - include ../Makefile.singlesrc From alkis at cs.uiuc.edu Sun Dec 5 03:25:27 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 03:25:27 -0600 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200412050925.DAA21071@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.163 -> 1.164 --- Log message: Actually insert the return instruction to the basic block. --- Diffs of the changes: (+1 -1) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.163 llvm-java/lib/Compiler/Compiler.cpp:1.164 --- llvm-java/lib/Compiler/Compiler.cpp:1.163 Sun Dec 5 03:12:05 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Sun Dec 5 03:25:16 2004 @@ -2418,7 +2418,7 @@ if (F->getReturnType() == Type::VoidTy) new ReturnInst(NULL, entry); else - new ReturnInst(UndefValue::get(F->getReturnType())); + new ReturnInst(UndefValue::get(F->getReturnType()), entry); } return m; From alkis at cs.uiuc.edu Sun Dec 5 03:51:05 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 03:51:05 -0600 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200412050951.DAA23779@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.164 -> 1.165 --- Log message: Make first argument of a member function be a pointer to llvm_java_object_base not a pointer to a pointer. --- Diffs of the changes: (+6 -8) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.164 llvm-java/lib/Compiler/Compiler.cpp:1.165 --- llvm-java/lib/Compiler/Compiler.cpp:1.164 Sun Dec 5 03:25:16 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Sun Dec 5 03:50:54 2004 @@ -400,8 +400,7 @@ std::string funcName = "java/lang/Object/" + methodDescr; const FunctionType* funcTy = cast( - getType(method->getDescriptor(), - PointerType::get(ClassInfo::ObjectBaseTy))); + getType(method->getDescriptor(), ClassInfo::ObjectBaseTy)); Function* vfun = module_.getOrInsertFunction(funcName, funcTy); scheduleFunction(vfun); @@ -772,8 +771,7 @@ std::string funcName = className + '/' + methodDescr; const FunctionType* funcTy = cast( - getType(method->getDescriptor(), - PointerType::get(ClassInfo::ObjectBaseTy))); + getType(method->getDescriptor(), ClassInfo::ObjectBaseTy)); Function* vfun = module_.getOrInsertFunction(funcName, funcTy); if (!method->isAbstract()) scheduleFunction(vfun); @@ -1393,7 +1391,7 @@ FunctionType* funcTy = cast( getType(method->getDescriptor(), - method->isStatic() ? NULL : PointerType::get(ClassInfo::ObjectBaseTy))); + method->isStatic() ? NULL : ClassInfo::ObjectBaseTy)); std::string funcName = clazz->getThisClass()->getName()->str() + '/' + method->getName()->str() + method->getDescriptor()->str(); @@ -2077,7 +2075,7 @@ FunctionType* funTy = cast(getType(nameAndType->getDescriptor(), - PointerType::get(ClassInfo::ObjectBaseTy))); + ClassInfo::ObjectBaseTy)); std::vector params(getParams(funTy)); @@ -2120,7 +2118,7 @@ FunctionType* funcTy = cast(getType(nameAndType->getDescriptor(), - PointerType::get(ClassInfo::ObjectBaseTy))); + ClassInfo::ObjectBaseTy)); Function* function = module_.getOrInsertFunction(funcName, funcTy); scheduleFunction(function); makeCall(function, getParams(funcTy)); @@ -2162,7 +2160,7 @@ FunctionType* funTy = cast(getType(nameAndType->getDescriptor(), - PointerType::get(ClassInfo::ObjectBaseTy))); + ClassInfo::ObjectBaseTy)); std::vector params(getParams(funTy)); From lattner at cs.uiuc.edu Sun Dec 5 11:48:18 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 5 Dec 2004 11:48:18 -0600 Subject: [llvm-commits] CVS: llvm/docs/GettingStarted.html Message-ID: <200412051748.iB5HmImo030445@apoc.cs.uiuc.edu> Changes in directory llvm/docs: GettingStarted.html updated: 1.81 -> 1.82 --- Log message: Suggest people run cvs up -P -d after checking out the tree so they don't get empty directories --- Diffs of the changes: (+2 -1) Index: llvm/docs/GettingStarted.html diff -u llvm/docs/GettingStarted.html:1.81 llvm/docs/GettingStarted.html:1.82 --- llvm/docs/GettingStarted.html:1.81 Tue Nov 23 16:06:24 2004 +++ llvm/docs/GettingStarted.html Sun Dec 5 11:48:03 2004 @@ -129,6 +129,7 @@
  • cvs -z3 -d :pserver:anon at llvm-cvs.cs.uiuc.edu:/var/cvs/llvm co llvm
  • cd llvm
  • +
  • cvs up -P -d
  • @@ -1443,7 +1444,7 @@ Chris Lattner
    Reid Spencer
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/11/23 22:06:24 $ + Last modified: $Date: 2004/12/05 17:48:03 $ From reid at x10sys.com Sun Dec 5 13:14:30 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Dec 2004 13:14:30 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200412051914.NAA10783@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.251 -> 1.252 --- Log message: Provide a variable to compute where the libstdc++.a is --- Diffs of the changes: (+1 -0) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.251 llvm/Makefile.rules:1.252 --- llvm/Makefile.rules:1.251 Sat Dec 4 23:17:22 2004 +++ llvm/Makefile.rules Sun Dec 5 13:14:19 2004 @@ -216,6 +216,7 @@ # Need a better way to compute this. LLVMGCCLibDir := $(dir $(shell $(LLVMGCC) -print-file-name=libgcc.a))/ +LLVMGCCStdCXXLibDir := $(dir $(shell $(LLVMGCC) -print-file-name=libstdc++.a))/ #-------------------------------------------------------------------- # Adjust to user's request From reid at x10sys.com Sun Dec 5 13:14:42 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Dec 2004 13:14:42 -0600 Subject: [llvm-commits] CVS: llvm/docs/MakefileGuide.html Message-ID: <200412051914.NAA10826@zion.cs.uiuc.edu> Changes in directory llvm/docs: MakefileGuide.html updated: 1.17 -> 1.18 --- Log message: Describe the MODULE_NAME control variable --- Diffs of the changes: (+6 -1) Index: llvm/docs/MakefileGuide.html diff -u llvm/docs/MakefileGuide.html:1.17 llvm/docs/MakefileGuide.html:1.18 --- llvm/docs/MakefileGuide.html:1.17 Fri Dec 3 18:04:48 2004 +++ llvm/docs/MakefileGuide.html Sun Dec 5 13:14:31 2004 @@ -558,6 +558,11 @@
    LLVMLIBS
    Specifies the set of libraries from the LLVM $(ObjDir) that will be linked into the tool or library.
    +
    MODULE_NAME
    +
    Specifies the name of a bytecode module to be created. A bytecode + module can be specified in conjunction with other kinds of library builds + or by itself. It constructs from the sources a single linked bytecode + file.
    OPTIONAL_DIRS
    Specify a set of directories that may be built, if they exist, but its not an error for them not to exist.
    @@ -870,7 +875,7 @@ Reid Spencer
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/12/04 00:04:48 $ + Last modified: $Date: 2004/12/05 19:14:31 $ From reid at x10sys.com Sun Dec 5 13:14:53 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Dec 2004 13:14:53 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Linker.h Message-ID: <200412051914.NAA10837@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Linker.h updated: 1.12 -> 1.13 --- Log message: Fix PR139: http://llvm.cs.uiuc.edu/PR139 : \ Add support for ordered linking with the LinkItems function --- Diffs of the changes: (+37 -0) Index: llvm/include/llvm/Linker.h diff -u llvm/include/llvm/Linker.h:1.12 llvm/include/llvm/Linker.h:1.13 --- llvm/include/llvm/Linker.h:1.12 Tue Nov 16 10:46:22 2004 +++ llvm/include/llvm/Linker.h Sun Dec 5 13:14:43 2004 @@ -14,6 +14,7 @@ #ifndef LLVM_LINKER_H #define LLVM_LINKER_H +#include "llvm/Support/CommandLine.h" #include #include #include @@ -22,6 +23,42 @@ class Module; +/// This type is used to pass the linkage items (libraries and files) to +/// the LinkItems function. It is composed of string/bool pairs. The string +/// provides the name of the file or library (as with the -l option). The bool +/// should be true for libraries, false for files, signifying "isLibrary". +/// @brief A list of string/bool pairs +typedef std::vector > LinkItemList; + +/// This function can be used to link a set of linkage items into a module. A +/// linkage item is one of the three things identified by the LinkItemKind +/// enumeration. This function allows linking to preserve the order of +/// specification associated with a command line, or for other purposes. Each +/// item will be linked in turn as it occurs in \p Items. Note that library +/// path items will only be in effect after they have been processed. +/// @returns The aggregated/linked Module. +/// @throws nothing +Module* LinkItems ( + const char * progname, ///< Name of the program being linked (for output) + const LinkItemList& Items, // Set of libraries/files to link in + const std::vector& LibPaths, // Paths to search for libraries + bool Verbose, ///< Link verbosely, indicating each action + bool Native ///< Linking is for a native executable +); + +/// This function provides some utility for tools that need to build the list +/// of link items from a triplet of command line options: Files, Libraries, and +/// LibraryPaths. The command line ordering is preserved by this function even +/// though the options are split into three separate cl::list. The +/// resulting \p OutList is suitable for use with LinkItems. +/// @see LinkItems +/// @throws nothing +void BuildLinkItems( + LinkItemList& OutList, + const cl::list& Files, ///< List of files to put in list + const cl::list& Libs ///< List of libraries to put in list +); + /// This is the heart of the linker. The \p Src module is linked into the \p /// Dest module. If an error occurs, true is returned, otherwise false. If \p /// ErrorMsg is not null and an error occurs, \p *ErrorMsg will be set to a From reid at x10sys.com Sun Dec 5 13:15:05 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Dec 2004 13:15:05 -0600 Subject: [llvm-commits] CVS: llvm/lib/Linker/LinkItems.cpp Message-ID: <200412051915.NAA10853@zion.cs.uiuc.edu> Changes in directory llvm/lib/Linker: LinkItems.cpp added (r1.1) --- Log message: Fix PR139: http://llvm.cs.uiuc.edu/PR139 : \ Implement LinkItems and BuildLinkItems interfaces. --- Diffs of the changes: (+159 -0) Index: llvm/lib/Linker/LinkItems.cpp diff -c /dev/null llvm/lib/Linker/LinkItems.cpp:1.1 *** /dev/null Sun Dec 5 13:15:05 2004 --- llvm/lib/Linker/LinkItems.cpp Sun Dec 5 13:14:55 2004 *************** *** 0 **** --- 1,159 ---- + //===- lib/Linker/LinkItems.cpp - Link LLVM objects and libraries ---------===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by Reid Spencer and is distributed under the + // University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This file contains routines to handle linking together LLVM bytecode files, + // and to handle annoying things like static libraries. + // + //===----------------------------------------------------------------------===// + + #include "llvm/Linker.h" + #include "llvm/Module.h" + #include "llvm/ModuleProvider.h" + #include "llvm/PassManager.h" + #include "llvm/ADT/SetOperations.h" + #include "llvm/Bytecode/Reader.h" + #include "llvm/Bytecode/Archive.h" + #include "llvm/Bytecode/WriteBytecodePass.h" + #include "llvm/Target/TargetData.h" + #include "llvm/Transforms/IPO.h" + #include "llvm/Transforms/Scalar.h" + #include "llvm/Config/config.h" + #include "llvm/Support/CommandLine.h" + #include "llvm/Support/FileUtilities.h" + #include "llvm/Support/Timer.h" + #include "llvm/System/Signals.h" + #include "llvm/Support/SystemUtils.h" + #include + #include + #include + #include + using namespace llvm; + + static bool + LinkOneLibrary(const char*progname, Module* HeadModule, + const std::string& Lib, + const std::vector& LibPaths, + bool Verbose, bool Native) { + + // String in which to receive error messages. + std::string ErrorMessage; + + // Determine where this library lives. + std::string Pathname = FindLib(Lib, LibPaths); + if (Pathname.empty()) { + // If the pathname does not exist, then simply return if we're doing a + // native link and give a warning if we're doing a bytecode link. + if (!Native) { + std::cerr << progname << ": error: Cannot find library '" + << Lib << "'\n"; + return true; + } + } + + // A user may specify an ar archive without -l, perhaps because it + // is not installed as a library. Detect that and link the library. + if (IsArchive(Pathname)) { + if (Verbose) + std::cerr << "Trying to link archive '" << Pathname << "' (-l" + << Lib << ")\n"; + + if (LinkInArchive(HeadModule, Pathname, &ErrorMessage, Verbose)) { + std::cerr << progname << ": " << ErrorMessage + << ": Error linking in archive '" << Pathname << "' (-l" + << Lib << ")\n"; + return true; + } + } else { + std::cerr << progname << ": WARNING: Supposed library -l" + << Lib << " isn't a library.\n"; + } + return false; + } + + // LinkItems - preserve link order for an arbitrary set of linkage items. + Module* + llvm::LinkItems(const char *progname, const LinkItemList& Items, + const std::vector& LibPaths, + bool Verbose, bool Native) { + + // Construct the HeadModule to contain the result of the linkage + std::auto_ptr HeadModule(new Module(progname)); + + // Construct a mutable path list we can add paths to. This list will always + // have LLVM_LIB_SEARCH_PATH at the end so we place it there now. + std::vector MyLibPaths(LibPaths); + MyLibPaths.insert(MyLibPaths.begin(),"."); + char* SearchPath = getenv("LLVM_LIB_SEARCH_PATH"); + if (SearchPath) + MyLibPaths.push_back(SearchPath); + + // For each linkage item ... + for (LinkItemList::const_iterator I = Items.begin(), E = Items.end(); + I != E; ++I) { + if (I->second) { + // Link in the library suggested. + if (LinkOneLibrary(progname,HeadModule.get(),I->first,MyLibPaths, + Verbose,Native)) + return 0; + } else { + std::vector Files; + Files.push_back(I->first); + if (LinkFiles(progname,HeadModule.get(),Files,Verbose)) + return 0; + } + } + + // At this point we have processed all the link items provided to us. Since + // we have an aggregated module at this point, the dependent libraries in + // that module should also be aggregated with duplicates eliminated. This is + // now the time to process the dependent libraries to resolve any remaining + // symbols. + const Module::LibraryListType& DepLibs = HeadModule->getLibraries(); + for (Module::LibraryListType::const_iterator I = DepLibs.begin(), + E = DepLibs.end(); I != E; ++I) { + if(LinkOneLibrary(progname,HeadModule.get(),*I,MyLibPaths,Verbose,Native)) + return 0; + } + + return HeadModule.release(); + } + + // BuildLinkItems -- This function + void llvm::BuildLinkItems( + LinkItemList& Items, + const cl::list& Files, + const cl::list& Libraries) { + + // Build the list of linkage items for LinkItems. + + cl::list::const_iterator fileIt = Files.begin(); + cl::list::const_iterator libIt = Libraries.begin(); + + int libPos = -1, filePos = -1; + while ( 1 ) { + if (libIt != Libraries.end()) + libPos = Libraries.getPosition(libIt - Libraries.begin()); + else + libPos = -1; + if (fileIt != Files.end()) + filePos = Files.getPosition(fileIt - Files.begin()); + else + filePos = -1; + + if (filePos != -1 && (libPos == -1 || filePos < libPos)) { + // Add a source file + Items.push_back(std::make_pair(*fileIt++, false)); + } else if (libPos != -1 && (filePos == -1 || libPos < filePos)) { + // Add a library + Items.push_back(std::make_pair(*libIt++, true)); + } else { + break; // we're done with the list + } + } + } From reid at x10sys.com Sun Dec 5 13:15:17 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Dec 2004 13:15:17 -0600 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/crtend/Makefile Message-ID: <200412051915.NAA10864@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/crtend: Makefile updated: 1.23 -> 1.24 --- Log message: Make use of the LLVMGCCStdCXXLibDir variable to link objects --- Diffs of the changes: (+3 -3) Index: llvm/runtime/GCCLibraries/crtend/Makefile diff -u llvm/runtime/GCCLibraries/crtend/Makefile:1.23 llvm/runtime/GCCLibraries/crtend/Makefile:1.24 --- llvm/runtime/GCCLibraries/crtend/Makefile:1.23 Sat Dec 4 16:34:33 2004 +++ llvm/runtime/GCCLibraries/crtend/Makefile Sun Dec 5 13:15:06 2004 @@ -47,18 +47,18 @@ $(Echo) Linking $(notdir $@) component... $(Verb) $(GCCLD) -link-as-library \ -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_main.lst \ - $(MainObj) -o $@ \ + $(MainObj) -o $@ -L$(LLVMGCCStdCXXLibDir) # Generic exception handling support runtime. $(ObjDir)/comp_genericeh.bc: $(GenericEHObj) $(Echo) Linking $(notdir $@) component... $(Verb) $(GCCLD) -link-as-library \ -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_genericeh.lst \ - $(GenericEHObj) -o $@ + $(GenericEHObj) -o $@ -L$(LLVMGCCStdCXXLibDir) # setjmp/longjmp exception handling support runtime. $(ObjDir)/comp_sjljeh.bc: $(SJLJEHObj) $(Echo) Linking $(notdir $@) component... $(Verb) $(GCCLD) -link-as-library \ -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_sjljeh.lst \ - $(SJLJEHObj) -o $@ + $(SJLJEHObj) -o $@ -L$(LLVMGCCStdCXXLibDir) From reid at x10sys.com Sun Dec 5 13:15:28 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Dec 2004 13:15:28 -0600 Subject: [llvm-commits] CVS: llvm/tools/gccld/gccld.cpp Message-ID: <200412051915.NAA10876@zion.cs.uiuc.edu> Changes in directory llvm/tools/gccld: gccld.cpp updated: 1.82 -> 1.83 --- Log message: Fix PR139: http://llvm.cs.uiuc.edu/PR139 :\ When not linking as a library, use LinkItems to retain command line order of \ linking, otherwise use LinkFiles --- Diffs of the changes: (+19 -20) Index: llvm/tools/gccld/gccld.cpp diff -u llvm/tools/gccld/gccld.cpp:1.82 llvm/tools/gccld/gccld.cpp:1.83 --- llvm/tools/gccld/gccld.cpp:1.82 Thu Dec 2 15:26:10 2004 +++ llvm/tools/gccld/gccld.cpp Sun Dec 5 13:15:17 2004 @@ -168,31 +168,30 @@ int exitCode = 0; try { - std::string ModuleID("gccld-output"); - std::auto_ptr Composite(new Module(ModuleID)); - - // We always look first in the current directory when searching for - // libraries. - LibPaths.insert(LibPaths.begin(), "."); - - // If the user specified an extra search path in their environment, respect - // it. - if (char *SearchPath = getenv("LLVM_LIB_SEARCH_PATH")) - LibPaths.push_back(SearchPath); - // Remove any consecutive duplicates of the same library... Libraries.erase(std::unique(Libraries.begin(), Libraries.end()), Libraries.end()); - // Link in all of the files - if (LinkFiles(argv[0], Composite.get(), InputFilenames, Verbose)) - return 1; // Error already printed - - if (!LinkAsLibrary) - LinkLibraries(argv[0], Composite.get(), Libraries, LibPaths, - Verbose, Native); + // Set up the Composite module. + std::auto_ptr Composite(0); - // Link in all of the libraries next... + if (LinkAsLibrary) { + // Link in only the files, we ignore libraries in this case. + Composite.reset( new Module(argv[0]) ); + if (LinkFiles(argv[0], Composite.get(), InputFilenames, Verbose)) + return 1; // Error already printed + } else { + // Build a list of the items from our command line + LinkItemList Items; + BuildLinkItems(Items, InputFilenames, Libraries); + + // Link all the items together + Composite.reset( LinkItems(argv[0], Items, LibPaths, Verbose, Native) ); + + // Check for an error during linker + if (!Composite.get()) + return 1; // Error already printed + } // Create the output file. std::string RealBytecodeOutput = OutputFilename; From reid at x10sys.com Sun Dec 5 13:15:40 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Dec 2004 13:15:40 -0600 Subject: [llvm-commits] CVS: llvm/tools/llvm-ld/llvm-ld.cpp Message-ID: <200412051915.NAA10893@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-ld: llvm-ld.cpp updated: 1.5 -> 1.6 --- Log message: Fix PR139: http://llvm.cs.uiuc.edu/PR139 :\ When not linking as a library, use LinkItems to retain command line order of \ linking, otherwise use LinkFiles --- Diffs of the changes: (+20 -19) Index: llvm/tools/llvm-ld/llvm-ld.cpp diff -u llvm/tools/llvm-ld/llvm-ld.cpp:1.5 llvm/tools/llvm-ld/llvm-ld.cpp:1.6 --- llvm/tools/llvm-ld/llvm-ld.cpp:1.5 Sat Nov 20 14:02:56 2004 +++ llvm/tools/llvm-ld/llvm-ld.cpp Sun Dec 5 13:15:29 2004 @@ -389,29 +389,30 @@ cl::ParseCommandLineOptions(argc, argv, " llvm linker for GCC\n"); sys::PrintStackTraceOnErrorSignal(); - std::string ModuleID("llvm-ld-output"); - std::auto_ptr Composite(new Module(ModuleID)); - - // We always look first in the current directory when searching for libraries. - LibPaths.insert(LibPaths.begin(), "."); - - // If the user specified an extra search path in their environment, respect - // it. - if (char *SearchPath = getenv("LLVM_LIB_SEARCH_PATH")) - LibPaths.push_back(SearchPath); - // Remove any consecutive duplicates of the same library... Libraries.erase(std::unique(Libraries.begin(), Libraries.end()), Libraries.end()); - // Link in all of the files - if (LinkFiles(argv[0], Composite.get(), InputFilenames, Verbose)) - return 1; // Error already printed - - // Link in all of the libraries next... - if (!LinkAsLibrary) - LinkLibraries(argv[0], Composite.get(), Libraries, LibPaths, - Verbose, Native); + // Set up the Composite module. + std::auto_ptr Composite(0); + + if (LinkAsLibrary) { + // Link in only the files, we ignore libraries in this case. + Composite.reset( new Module(argv[0]) ); + if (LinkFiles(argv[0], Composite.get(), InputFilenames, Verbose)) + return 1; // Error already printed + } else { + // Build a list of the items from our command line + LinkItemList Items; + BuildLinkItems(Items, InputFilenames, Libraries); + + // Link all the items together + Composite.reset( LinkItems(argv[0], Items, LibPaths, Verbose, Native) ); + + // Check for an error during linker + if (!Composite.get()) + return 1; // Error already printed + } // Optimize the module Optimize(Composite.get()); From alkis at cs.uiuc.edu Sun Dec 5 14:09:29 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 14:09:29 -0600 Subject: [llvm-commits] CVS: llvm/include/llvm/Constants.h Message-ID: <200412052009.OAA11403@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Constants.h updated: 1.63 -> 1.64 --- Log message: Add accessors for Constants in a ConstantStruct. --- Diffs of the changes: (+8 -0) Index: llvm/include/llvm/Constants.h diff -u llvm/include/llvm/Constants.h:1.63 llvm/include/llvm/Constants.h:1.64 --- llvm/include/llvm/Constants.h:1.63 Sat Oct 23 22:18:30 2004 +++ llvm/include/llvm/Constants.h Sun Dec 5 14:09:18 2004 @@ -418,6 +418,14 @@ return false; } + Constant* getElementAt(unsigned i) const { + return cast(Operands[i]); + } + + unsigned getNumElements() const { + return Operands.size(); + } + virtual void destroyConstant(); virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, bool DisableChecking = false); From reid at x10sys.com Sun Dec 5 14:19:55 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Dec 2004 14:19:55 -0600 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200412052019.OAA11589@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.273 -> 1.274 --- Log message: PR139: http://llvm.cs.uiuc.edu/PR139 fixed. --- Diffs of the changes: (+5 -3) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.273 llvm/docs/ReleaseNotes.html:1.274 --- llvm/docs/ReleaseNotes.html:1.273 Fri Dec 3 18:45:09 2004 +++ llvm/docs/ReleaseNotes.html Sun Dec 5 14:19:45 2004 @@ -244,6 +244,10 @@

    Bugs fixed in the LLVM Core:

      +
    1. [Linker] gccld does not link + objects/archives in order specified on the command line
    2. +
    3. [X86] llc output for functions + w/certain names tickles GNU 'as' bugs
    4. [licm] LICM invalidates alias analysis info and uses broken information (optimizer crash)
    5. [asmwriter] Asmwriter is really @@ -252,8 +256,6 @@ completely broken in LLVM 1.3
    6. [bcwriter] Empty compaction tables defined
    7. -
    8. [X86] llc output for functions - w/certain names tickles GNU 'as' bugs
    9. [cbackend] Static globals are prototyped as 'extern'
    @@ -734,7 +736,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/12/04 00:45:09 $ + Last modified: $Date: 2004/12/05 20:19:45 $ From alkis at cs.uiuc.edu Sun Dec 5 15:44:19 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 15:44:19 -0600 Subject: [llvm-commits] CVS: llvm-java/test/Makefile.test Message-ID: <200412052144.PAA22036@zion.cs.uiuc.edu> Changes in directory llvm-java/test: Makefile.test updated: 1.22 -> 1.23 --- Log message: Prettify output. --- Diffs of the changes: (+1 -1) Index: llvm-java/test/Makefile.test diff -u llvm-java/test/Makefile.test:1.22 llvm-java/test/Makefile.test:1.23 --- llvm-java/test/Makefile.test:1.22 Sun Dec 5 03:13:03 2004 +++ llvm-java/test/Makefile.test Sun Dec 5 15:44:09 2004 @@ -72,4 +72,4 @@ # rule to diff test output %.diff: %.out-nat %.out-jit - $(Verb)diff $*.out-nat $*.out-jit > $@ || echo "FAIL: $*" + $(Verb)diff $*.out-nat $*.out-jit > $@ || echo "FAIL: $(notdir $*)" From alkis at cs.uiuc.edu Sun Dec 5 15:52:53 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 15:52:53 -0600 Subject: [llvm-commits] CVS: llvm-java/test/Makefile.test Message-ID: <200412052152.PAA22212@zion.cs.uiuc.edu> Changes in directory llvm-java/test: Makefile.test updated: 1.23 -> 1.24 --- Log message: Don't stop if the llvm-jit crashes. --- Diffs of the changes: (+2 -2) Index: llvm-java/test/Makefile.test diff -u llvm-java/test/Makefile.test:1.23 llvm-java/test/Makefile.test:1.24 --- llvm-java/test/Makefile.test:1.23 Sun Dec 5 15:44:09 2004 +++ llvm-java/test/Makefile.test Sun Dec 5 15:52:42 2004 @@ -63,12 +63,12 @@ # rule to run a .class file with the jvm %.out-nat: %.class $(Echo) Running $(notdir $*) with the host JVM - $(Verb)LD_LIBRARY_PATH=$(LibDir) $(JAVA) -cp Output $(notdir $*) > $*.out-nat || rm -f $*.out-nat + -$(Verb)LD_LIBRARY_PATH=$(LibDir) $(JAVA) -cp Output $(notdir $*) > $*.out-nat || rm -f $*.out-nat # rule to run a .class file with the llvm jit %.out-jit: %.llvm.bc $(Echo) Running $(notdir $*) with the llvm JIT - $(Verb)$(LLI) $< > $*.out-jit + -$(Verb)$(LLI) $< > $*.out-jit # rule to diff test output %.diff: %.out-nat %.out-jit From alkis at cs.uiuc.edu Sun Dec 5 15:53:42 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 15:53:42 -0600 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200412052153.PAA22247@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.165 -> 1.166 --- Log message: Fix some issues with vtables. Although not completely correct we can now compile and run some programs. --- Diffs of the changes: (+14 -9) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.165 llvm-java/lib/Compiler/Compiler.cpp:1.166 --- llvm-java/lib/Compiler/Compiler.cpp:1.165 Sun Dec 5 03:50:54 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Sun Dec 5 15:53:31 2004 @@ -607,15 +607,11 @@ for (VTableInfo::Method2IndexMap::const_iterator i = interfaceVI.m2iMap.begin(), e = interfaceVI.m2iMap.end(); i != e; ++i) { - std::vector indices; - indices.reserve(2); - indices.push_back(ConstantUInt::get(Type::UIntTy, 0)); assert(classVI.m2iMap.find(i->first) != classVI.m2iMap.end() && "Interface method not found in class definition!"); unsigned classMethodIdx = classVI.m2iMap.find(i->first)->second; - indices.push_back(ConstantUInt::get(Type::UIntTy, classMethodIdx)); init[i->second] = - ConstantExpr::getGetElementPtr(classVI.vtable, indices); + cast(classVI.vtable->getInitializer())->getElementAt(classMethodIdx); } llvm::Constant* vtable = ConstantStruct::get(init); @@ -624,13 +620,15 @@ interface->getThisClass()->getName()->str() + ""; module_.addTypeName(globalName, vtable->getType()); - return new GlobalVariable( + GlobalVariable* gv = new GlobalVariable( vtable->getType(), true, GlobalVariable::ExternalLinkage, vtable, globalName, &module_); + + return gv; } /// Builds the interfaces vtable array for this classfile and its @@ -772,9 +770,13 @@ const FunctionType* funcTy = cast( getType(method->getDescriptor(), ClassInfo::ObjectBaseTy)); - Function* vfun = module_.getOrInsertFunction(funcName, funcTy); - if (!method->isAbstract()) - scheduleFunction(vfun); + llvm::Constant* vfun = + llvm::Constant::getNullValue(PointerType::get(funcTy)); + if (!cf->isInterface()) { + vfun = module_.getOrInsertFunction(funcName, funcTy); + if (!method->isAbstract()) + scheduleFunction(cast(vfun)); + } unsigned& index = vi.m2iMap[methodDescr]; if (!index) { @@ -2419,5 +2421,8 @@ new ReturnInst(UndefValue::get(F->getReturnType()), entry); } +// for (Module::giterator G = m->gbegin(), E = m->gend(); G != E; ++G) +// std::cerr << *G << "\n\n"; + return m; } From alkis at cs.uiuc.edu Sun Dec 5 15:54:01 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 15:54:01 -0600 Subject: [llvm-commits] CVS: llvm-java/test/Programs/SingleSource/UnitTests/Makefile Message-ID: <200412052154.PAA22265@zion.cs.uiuc.edu> Changes in directory llvm-java/test/Programs/SingleSource/UnitTests: Makefile updated: 1.9 -> 1.10 --- Log message: Now we can compile all of these. --- Diffs of the changes: (+4 -4) Index: llvm-java/test/Programs/SingleSource/UnitTests/Makefile diff -u llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.9 llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.10 --- llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.9 Sun Dec 5 03:13:03 2004 +++ llvm-java/test/Programs/SingleSource/UnitTests/Makefile Sun Dec 5 15:53:51 2004 @@ -10,18 +10,18 @@ JAVA_TESTS := Arithm \ BigConstants \ + ClassTest \ + FieldAccess \ FloatCompare \ ForLoop \ If \ + InstanceOf LongCompare \ LookupSwitch \ Return \ StaticInitializers \ TableSwitch \ -# FieldAccess \ -# VTable \ -# ClassTest \ -# InstanceOf \ + VTable \ CPPFLAGS+=-I$(BUILD_SRC_ROOT)/include/llvm/Java BYTECODE_LIBRARY=1 From alkis at cs.uiuc.edu Sun Dec 5 17:03:42 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 17:03:42 -0600 Subject: [llvm-commits] CVS: llvm-java/test/Programs/SingleSource/UnitTests/Makefile Message-ID: <200412052303.RAA23556@zion.cs.uiuc.edu> Changes in directory llvm-java/test/Programs/SingleSource/UnitTests: Makefile updated: 1.10 -> 1.11 --- Log message: Fix typo. --- Diffs of the changes: (+2 -2) Index: llvm-java/test/Programs/SingleSource/UnitTests/Makefile diff -u llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.10 llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.11 --- llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.10 Sun Dec 5 15:53:51 2004 +++ llvm-java/test/Programs/SingleSource/UnitTests/Makefile Sun Dec 5 17:03:31 2004 @@ -15,13 +15,13 @@ FloatCompare \ ForLoop \ If \ - InstanceOf + InstanceOf \ LongCompare \ LookupSwitch \ Return \ StaticInitializers \ TableSwitch \ - VTable \ + VTable CPPFLAGS+=-I$(BUILD_SRC_ROOT)/include/llvm/Java BYTECODE_LIBRARY=1 From alkis at cs.uiuc.edu Sun Dec 5 17:04:11 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 17:04:11 -0600 Subject: [llvm-commits] CVS: llvm-java/test/Makefile.test Message-ID: <200412052304.RAA23574@zion.cs.uiuc.edu> Changes in directory llvm-java/test: Makefile.test updated: 1.24 -> 1.25 --- Log message: Capture both stdout and stderr. --- Diffs of the changes: (+3 -4) Index: llvm-java/test/Makefile.test diff -u llvm-java/test/Makefile.test:1.24 llvm-java/test/Makefile.test:1.25 --- llvm-java/test/Makefile.test:1.24 Sun Dec 5 15:52:42 2004 +++ llvm-java/test/Makefile.test Sun Dec 5 17:04:01 2004 @@ -62,13 +62,12 @@ # rule to run a .class file with the jvm %.out-nat: %.class - $(Echo) Running $(notdir $*) with the host JVM - -$(Verb)LD_LIBRARY_PATH=$(LibDir) $(JAVA) -cp Output $(notdir $*) > $*.out-nat || rm -f $*.out-nat + -$(Verb)LD_LIBRARY_PATH=$(LibDir) $(JAVA) -cp Output $(notdir $*) \ + > $*.out-nat 2>&1 # rule to run a .class file with the llvm jit %.out-jit: %.llvm.bc - $(Echo) Running $(notdir $*) with the llvm JIT - -$(Verb)$(LLI) $< > $*.out-jit + -$(Verb)$(LLI) $< > $*.out-jit 2>&1 # rule to diff test output %.diff: %.out-nat %.out-jit From alkis at cs.uiuc.edu Sun Dec 5 17:31:36 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 17:31:36 -0600 Subject: [llvm-commits] CVS: llvm-java/test/Programs/SingleSource/UnitTests/InstanceOf.java Message-ID: <200412052331.RAA24022@zion.cs.uiuc.edu> Changes in directory llvm-java/test/Programs/SingleSource/UnitTests: InstanceOf.java updated: 1.2 -> 1.3 --- Log message: Make test print soemthing out. --- Diffs of the changes: (+9 -9) Index: llvm-java/test/Programs/SingleSource/UnitTests/InstanceOf.java diff -u llvm-java/test/Programs/SingleSource/UnitTests/InstanceOf.java:1.2 llvm-java/test/Programs/SingleSource/UnitTests/InstanceOf.java:1.3 --- llvm-java/test/Programs/SingleSource/UnitTests/InstanceOf.java:1.2 Wed Sep 15 15:16:12 2004 +++ llvm-java/test/Programs/SingleSource/UnitTests/InstanceOf.java Sun Dec 5 17:31:23 2004 @@ -18,16 +18,16 @@ InstanceOfBase ab = new InstanceOf(); InstanceOfInterface bb = new InstanceOf(); - boolean aaA = aa instanceof InstanceOfBase; - boolean aaB = aa instanceof InstanceOf; - boolean aaI = aa instanceof InstanceOfInterface; + Test.print_boolean_ln(aa instanceof InstanceOfBase); + Test.print_boolean_ln(aa instanceof InstanceOf); + Test.print_boolean_ln(aa instanceof InstanceOfInterface); - boolean abA = ab instanceof InstanceOfBase; - boolean abB = ab instanceof InstanceOf; - boolean abI = ab instanceof InstanceOfInterface; + Test.print_boolean_ln(ab instanceof InstanceOfBase); + Test.print_boolean_ln(ab instanceof InstanceOf); + Test.print_boolean_ln(ab instanceof InstanceOfInterface); - boolean bbA = bb instanceof InstanceOfBase; - boolean bbB = bb instanceof InstanceOf; - boolean bbI = bb instanceof InstanceOfInterface; + Test.print_boolean_ln(bb instanceof InstanceOfBase); + Test.print_boolean_ln(bb instanceof InstanceOf); + Test.print_boolean_ln(bb instanceof InstanceOfInterface); } } From alkis at cs.uiuc.edu Sun Dec 5 17:32:44 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 17:32:44 -0600 Subject: [llvm-commits] CVS: llvm-java/test/Programs/SingleSource/UnitTests/VirtualCall.java Makefile Message-ID: <200412052332.RAA24143@zion.cs.uiuc.edu> Changes in directory llvm-java/test/Programs/SingleSource/UnitTests: VirtualCall.java added (r1.1) Makefile updated: 1.11 -> 1.12 --- Log message: Remove bogus tests and add another for virtual function calls. --- Diffs of the changes: (+29 -2) Index: llvm-java/test/Programs/SingleSource/UnitTests/VirtualCall.java diff -c /dev/null llvm-java/test/Programs/SingleSource/UnitTests/VirtualCall.java:1.1 *** /dev/null Sun Dec 5 17:32:43 2004 --- llvm-java/test/Programs/SingleSource/UnitTests/VirtualCall.java Sun Dec 5 17:32:33 2004 *************** *** 0 **** --- 1,28 ---- + class VirtualCallBase + { + public int foo() { return 1; } + public int bar() { return 2; } + } + + class VirtualCallDerived extends VirtualCallBase + { + public int foo() { return 100; } + public int bar() { return super.bar() + super.foo(); } + } + + public class VirtualCall + { + public static void main(String[] args) { + VirtualCallBase a = new VirtualCallBase(); + Test.print_int_ln(a.foo()); + Test.print_int_ln(a.bar()); + + a = new VirtualCallDerived(); + Test.print_int_ln(a.foo()); + Test.print_int_ln(a.bar()); + + VirtualCallDerived b = new VirtualCallDerived(); + Test.print_int_ln(b.foo()); + Test.print_int_ln(b.bar()); + } + } Index: llvm-java/test/Programs/SingleSource/UnitTests/Makefile diff -u llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.11 llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.12 --- llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.11 Sun Dec 5 17:03:31 2004 +++ llvm-java/test/Programs/SingleSource/UnitTests/Makefile Sun Dec 5 17:32:33 2004 @@ -10,7 +10,6 @@ JAVA_TESTS := Arithm \ BigConstants \ - ClassTest \ FieldAccess \ FloatCompare \ ForLoop \ @@ -18,9 +17,9 @@ InstanceOf \ LongCompare \ LookupSwitch \ - Return \ StaticInitializers \ TableSwitch \ + VirtualCall \ VTable CPPFLAGS+=-I$(BUILD_SRC_ROOT)/include/llvm/Java From alkis at cs.uiuc.edu Sun Dec 5 18:20:22 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 18:20:22 -0600 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200412060020.SAA24784@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.166 -> 1.167 --- Log message: Prettify array vtable names. --- Diffs of the changes: (+2 -2) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.166 llvm-java/lib/Compiler/Compiler.cpp:1.167 --- llvm-java/lib/Compiler/Compiler.cpp:1.166 Sun Dec 5 15:53:31 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Sun Dec 5 18:20:11 2004 @@ -844,7 +844,7 @@ #endif const std::string& globalName = - elementTy->getDescription() + ""; + elementTy->getDescription() + "[]"; llvm::Constant* vtable = ConstantStruct::get(init); module_.addTypeName(globalName, vtable->getType()); @@ -868,7 +868,7 @@ true, GlobalVariable::ExternalLinkage, ConstantArray::get(vtablesArrayTy, vi.superVtables), - elementTy->getDescription() + "", + elementTy->getDescription() + "[]", &module_); typeInfoInit.push_back( From alkis at cs.uiuc.edu Sun Dec 5 19:00:42 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 19:00:42 -0600 Subject: [llvm-commits] CVS: llvm-java/test/Programs/SingleSource/Makefile.singlesrc Message-ID: <200412060100.TAA25334@zion.cs.uiuc.edu> Changes in directory llvm-java/test/Programs/SingleSource: Makefile.singlesrc updated: 1.10 -> 1.11 --- Log message: Add more optimization passes (use as many as possible from gccas). --- Diffs of the changes: (+15 -1) Index: llvm-java/test/Programs/SingleSource/Makefile.singlesrc diff -u llvm-java/test/Programs/SingleSource/Makefile.singlesrc:1.10 llvm-java/test/Programs/SingleSource/Makefile.singlesrc:1.11 --- llvm-java/test/Programs/SingleSource/Makefile.singlesrc:1.10 Thu Dec 2 17:24:34 2004 +++ llvm-java/test/Programs/SingleSource/Makefile.singlesrc Sun Dec 5 19:00:31 2004 @@ -12,9 +12,23 @@ $(Echo) Compiling $< to bytecode $(Verb)$(CLASS2LLVM) -cp $(CLASSPATH):Output $(subst /,.,$(*F)) -o=$@ +# OPT_PASSES := -simplifycfg -mem2reg -globalopt -globaldce \ +# -ipconstprop -deadargelim -instcombine -simplifycfg \ +# -inline -argpromotion -raise -tailduplicate -simplifycfg \ +# -scalarrepl -instcombine -tailcallelim -simplifycfg \ +# -licm -instcombine -indvars -loop-unroll -instcombine \ +# -load-vn -gcse -sccp -instcombine -dse -adce -simplifycfg \ +# -deadtypeelim -constmerge + +OPT_PASSES := -simplifycfg -mem2reg -globalopt -globaldce \ + -ipconstprop -deadargelim -instcombine -simplifycfg \ + -inline -argpromotion -raise -tailduplicate -simplifycfg \ + -gcse -sccp -adce -simplifycfg \ + -deadtypeelim -constmerge + # optimize raw bytecode %.linked.bc: %.raw.bc $(LOPT) $(Echo) Optimizing $< - $(Verb)$(LOPT) -simplifycfg -mem2reg -instcombine -f -o=$@ $< + $(Verb)$(LOPT) $(OPT_PASSES) -f -o=$@ $< include $(LEVEL)/test/Makefile.test From alkis at cs.uiuc.edu Sun Dec 5 19:00:57 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 19:00:57 -0600 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200412060100.TAA25357@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.167 -> 1.168 --- Log message: Fix virtual function calls. --- Diffs of the changes: (+2 -3) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.167 llvm-java/lib/Compiler/Compiler.cpp:1.168 --- llvm-java/lib/Compiler/Compiler.cpp:1.167 Sun Dec 5 18:20:11 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Sun Dec 5 19:00:46 2004 @@ -2091,9 +2091,8 @@ LLVM_JAVA_GETOBJECTCLASS, PointerType::get(VTableInfo::VTableTy), objBase->getType(), NULL); Value* vtable = new CallInst(f, objBase, TMP, currentBB_); - vtable = new CastInst(vtable, PointerType::get(vi->vtable->getType()), - TMP, currentBB_); - vtable = new LoadInst(vtable, className + "", currentBB_); + vtable = new CastInst(vtable, vi->vtable->getType(), + className + "", currentBB_); std::vector indices(1, ConstantUInt::get(Type::UIntTy, 0)); assert(vi->m2iMap.find(methodDescr) != vi->m2iMap.end() && "could not find slot for virtual function!"); From alkis at cs.uiuc.edu Sun Dec 5 19:05:34 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sun, 5 Dec 2004 19:05:34 -0600 Subject: [llvm-commits] CVS: llvm-java/test/Programs/SingleSource/UnitTests/InterfaceCall.java Makefile Message-ID: <200412060105.TAA25515@zion.cs.uiuc.edu> Changes in directory llvm-java/test/Programs/SingleSource/UnitTests: InterfaceCall.java added (r1.1) Makefile updated: 1.12 -> 1.13 --- Log message: New testcase for interface calls. --- Diffs of the changes: (+28 -0) Index: llvm-java/test/Programs/SingleSource/UnitTests/InterfaceCall.java diff -c /dev/null llvm-java/test/Programs/SingleSource/UnitTests/InterfaceCall.java:1.1 *** /dev/null Sun Dec 5 19:05:33 2004 --- llvm-java/test/Programs/SingleSource/UnitTests/InterfaceCall.java Sun Dec 5 19:05:23 2004 *************** *** 0 **** --- 1,27 ---- + class InterfaceCallBase implements InterfaceCallInterface + { + public int foo() { return 1; } + public int bar() { return 2; } + } + + class InterfaceCallDerived extends InterfaceCallBase + { + public int foo() { return 100; } + public int bar() { return super.bar() + super.foo(); } + } + + interface InterfaceCallInterface + { + public int bar(); + } + + public class InterfaceCall + { + public static void main(String[] args) { + InterfaceCallInterface i = new InterfaceCallBase(); + Test.print_int_ln(i.bar()); + + i = new InterfaceCallDerived(); + Test.print_int_ln(i.bar()); + } + } Index: llvm-java/test/Programs/SingleSource/UnitTests/Makefile diff -u llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.12 llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.13 --- llvm-java/test/Programs/SingleSource/UnitTests/Makefile:1.12 Sun Dec 5 17:32:33 2004 +++ llvm-java/test/Programs/SingleSource/UnitTests/Makefile Sun Dec 5 19:05:23 2004 @@ -15,6 +15,7 @@ ForLoop \ If \ InstanceOf \ + InterfaceCall \ LongCompare \ LookupSwitch \ StaticInitializers \ From gaeke at cs.uiuc.edu Sun Dec 5 20:09:57 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun, 5 Dec 2004 20:09:57 -0600 (CST) Subject: [llvm-commits] CVS: reopt/lib/Inst/lib/BinInterface/ Message-ID: <200412060209.UAA03531@kain.cs.uiuc.edu> Changes in directory reopt/lib/Inst/lib/BinInterface: --- Log message: Directory /home/vadve/shared/InternalCVS/reopt/lib/Inst/lib/BinInterface added to the repository --- Diffs of the changes: (+0 -0) From tbrethou at cs.uiuc.edu Sun Dec 5 20:12:03 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Sun, 5 Dec 2004 20:12:03 -0600 Subject: [llvm-commits] CVS: llvm/docs/TestingGuide.html Message-ID: <200412060212.UAA26436@zion.cs.uiuc.edu> Changes in directory llvm/docs: TestingGuide.html updated: 1.16 -> 1.17 --- Log message: Added DejaGNU information to the testing guide. This should go into the 1.4 release. I left the QMTest stuff in place but made it appear to be optional. --- Diffs of the changes: (+103 -12) Index: llvm/docs/TestingGuide.html diff -u llvm/docs/TestingGuide.html:1.16 llvm/docs/TestingGuide.html:1.17 --- llvm/docs/TestingGuide.html:1.16 Mon Nov 1 02:30:14 2004 +++ llvm/docs/TestingGuide.html Sun Dec 5 20:11:52 2004 @@ -22,6 +22,7 @@
  • LLVM Test Suite Tree
  • +
  • DejaGNU Structure
  • QMTest Structure
  • llvm-test Structure
  • Running the LLVM Tests
  • @@ -29,8 +30,8 @@
    -

    Written by John T. Criswell and Reid Spencer

    +

    Written by John T. Criswell, Reid Spencer, and Tanya Lattner

    @@ -55,15 +56,22 @@ required to build LLVM, plus the following:

    +
    DejaGNU
    +
    The Feature and Regressions tests are organized and run by DejaGNU.
    +
    Expect
    +
    Expect is required by DejaGNU.
    +
    tclsh
    +
    Tclsh is required by DejaGNU.
    +
    QMTest
    The LLVM test suite uses QMTest to organize and run tests. Note: you will need QMTest 2.0.3 (source tar.gz file) to be successful. The tests do not run with -any other version.
    +any other version. (optional, required only for QMTest)
    Python
    You will need a Python interpreter that works with QMTest. Python will -need zlib and SAX support enabled.
    +need zlib and SAX support enabled. (optional, required only for QMTest)
    F2C
    For now, LLVM does not have a Fortran front-end, but using F2C, we can run @@ -106,14 +114,23 @@ be checked out to the llvm/projects directory. When you configure the llvm module, the llvm-test module will be automatically configured. Or you can do it manually.

    -

    To run all of the simple tests in LLVM, use the master Makefile in the +

    To run all of the simple tests in LLVM using DejaGNU, use the master Makefile in the llvm/test directory:

     % gmake -C llvm/test
     
    +or
    +
    +% gmake check
    +
    +

    To run only a subdirectory of tests in llvm/test using DejaGNU (ie. Regression/Transforms). Just substitute the path to the subdirectory:

    +
    +% gmake -C llvm/test TESTSUITE=Regression/Transforms
    +
    +
    Note: If you are running the tests with objdir != subdir you must have run the complete testsuite before you can specify a subdirectory.
    -

    To run only the code fragment tests (i.e. those that do basic testing of -LLVM), run the tests organized by QMTest:

    +

    To run the simple tests (i.e. those that do basic testing of +LLVM), using QMTest:

     % gmake -C llvm/test qmtest
     
    @@ -169,7 +186,7 @@

    Code fragments are not complete programs, and they are never executed to determine correct behavior.

    -

    Thes code fragment tests are located in the llvm/test/Features and +

    These code fragment tests are located in the llvm/test/Features and llvm/test/Regression directories.

    @@ -261,6 +278,82 @@ + + + + +
    +

    The LLVM test suite is partially driven by DejaGNU and partially +driven by GNU Make. Specifically, the Features and Regression tests +are all driven by DejaGNU (and optionally QMTest). The llvm-test +module is currently driven by a set of Makefiles.

    + +

    The DejaGNU structure is very simple, but does require some +information to be set. This information is gathered via configure and +is written to a file, site.exp in llvm/test. The llvm/test +Makefile does this work for you.

    + +

    In order for DejaGNU to work, each directory of tests must have a +dg.exp file. This file is a program written in tcl that calls +the llvm-runtests procedure on each test file. The +llvm-runtests procedure is defined in +llvm/test/lib/llvm-dg.exp. Any directory that contains only +directories does not need the dg.exp file.

    + +

    In order for a test to be run, it must contain information within +the test file on how to run the test. These are called RUN +lines. Run lines are specified in the comments of the test program +using the keyword RUN followed by a colon, and lastly the +commands to execute. These commands will be executed in a bash script, +so any bash syntax is acceptable. You can specify as many RUN lines as +necessary. Each RUN line translates to one line in the resulting bash +script. Below is an example of legal RUN lines in a .ll +file:

    +
    +; RUN: llvm-as < %s | llvm-dis > %t1
    +; RUN: llvm-dis < %s.bc-13 > %t2
    +; RUN: diff %t1 %t2
    +
    +

    There are a couple patterns within a RUN line that the +llvm-runtest procedure looks for and replaces with the appropriate +syntax:

    +
      +
      %p
      +
      The path to the source directory. This is for locating +any supporting files that are not generated by the test, but used by +the test.
      +
      %s
      +
      The test file.
      + +
      $t
      +
      Temporary filename: testscript.test_filename.tmp, where +test_filename is the name of the test file. All temporary files are +placed in the Output directory within the directory the test is +located.
      + +
      %prcontext
      +
      Path to a script that performs grep -C. Use this since not all +platforms support grep -C.
      + +
      %llvmgcc
      Full path to the llvmgcc executable.
      +
      %llvmgxx
      Full path to the llvmg++ executable.
      +
    + +

    There are also several scripts in the llvm/test/Scripts directory +that you might find useful when writing RUN lines.

    + +

    Lastly, you can easily mark a test that is expected to fail on a +specific platform by using the XFAIL keyword. Xfail lines are +specified in the comments of the test program using XFAIL, +followed by a colon, and one or more regular expressions (separated by +a comma) that will match against the target triplet for the +machine. You can use * to match all targets. Here is an example of an +XFAIL line:

    +
    +; XFAIL: darwin,sun
    +
    + +
    @@ -268,9 +361,7 @@
    -

    The LLVM test suite is partially driven by QMTest and partially driven by GNU -Make. Specifically, the Features and Regression tests are all driven by QMTest. -The llvm-test module is currently driven by a set of Makefiles.

    +

    The Feature and Regression tests can also be run using QMTest.

    The QMTest system needs to have several pieces of information available; these pieces of configuration information are known collectively as the @@ -500,7 +591,7 @@ John T. Criswell
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/11/01 08:30:14 $ + Last modified: $Date: 2004/12/06 02:11:52 $ From gaeke at cs.uiuc.edu Sun Dec 5 20:14:16 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun, 5 Dec 2004 20:14:16 -0600 (CST) Subject: [llvm-commits] CVS: reopt/lib/Inst/lib/InstManip.h Phases.cpp SparcInstManip.cpp SparcInstManip.h Message-ID: <200412060214.UAA04282@kain.cs.uiuc.edu> Changes in directory reopt/lib/Inst/lib: InstManip.h updated: 1.21 -> 1.22 Phases.cpp updated: 1.39 -> 1.40 SparcInstManip.cpp updated: 1.22 -> 1.23 SparcInstManip.h updated: 1.17 -> 1.18 --- Log message: Streamline the interfaces here so that usage of BinInterface is minimized. Move the pieces of BinInterface that this code uses here, and dump the rest. --- Diffs of the changes: (+3 -47) Index: reopt/lib/Inst/lib/InstManip.h diff -u reopt/lib/Inst/lib/InstManip.h:1.21 reopt/lib/Inst/lib/InstManip.h:1.22 --- reopt/lib/Inst/lib/InstManip.h:1.21 Fri Sep 24 16:22:43 2004 +++ reopt/lib/Inst/lib/InstManip.h Sun Dec 5 20:14:03 2004 @@ -113,7 +113,6 @@ virtual unsigned getBranchAlways(uint64_t dest, uint64_t pc, bool annulHigh = true) const = 0; virtual bool isBranch(unsigned inst) const = 0; - virtual void printRange(unsigned* start, unsigned* end) const = 0; virtual void printInst(unsigned inst) const = 0; void makePhase3SpillRegion(unsigned numFuncs); @@ -122,7 +121,6 @@ void copySnippetToSlot(std::vector& snippet, uint64_t slotBase); - inline void printRange(uint64_t start, uint64_t end) const; unsigned getSharedSize() const { return m_sharedSize; } unsigned getInstWidth() const { return m_instWidth; } @@ -148,11 +146,6 @@ unsigned m_nopInst; }; -void InstManip::printRange(uint64_t start, uint64_t end) const -{ - printRange((unsigned*) start, (unsigned*) end); -} - /// InstCandidate is a class that represents a location in the code that is /// determined to be a candidate for instrumentation. Because the /// transformation action required for a particular candidate requires auxiliary Index: reopt/lib/Inst/lib/Phases.cpp diff -u reopt/lib/Inst/lib/Phases.cpp:1.39 reopt/lib/Inst/lib/Phases.cpp:1.40 --- reopt/lib/Inst/lib/Phases.cpp:1.39 Wed Nov 19 14:49:53 2003 +++ reopt/lib/Inst/lib/Phases.cpp Sun Dec 5 20:14:03 2004 @@ -436,15 +436,6 @@ uint64_t repInstAddr = m_pIM->getStartAddr(range.first); unsigned origInst = vm->readInstrFrmVm(repInstAddr); -#if 0 -#if VERBOSE > 3 - DEBUG_MSG(4, "printing function before writing branch-to-slot\n"); - DEBUG_MSG(4, "range goes from " << HEX(range.first) << " to " << HEX(range.second) << endl); - m_pIM->printRange(range.first, range.second); - DEBUG_MSG(4, "done printing function...\n"); -#endif -#endif - assert(!m_pIM->isBranch(origInst) && "Unhandled case: branch instruction first in function body"); @@ -453,15 +444,6 @@ // Replace instruction at repInstAddr with a branch to start of a new slot. uint64_t slotBase = replaceInstWithBrToSlot(repInstAddr, slotSize, m_pTC, m_pIM); -#if 0 -#if VERBOSE > 3 - DEBUG_MSG(4, "printing function after writing branch-to-slot\n"); - DEBUG_MSG(4, "range goes from " << HEX(range.first) << " to " << HEX(range.second) << endl); - m_pIM->printRange(range.first, range.second); - DEBUG_MSG(4, "done printing function...\n"); -#endif -#endif - // Build the Phase3Info structure and generate the phase 3 slot. Phase3Info* p3info = new Phase3Info(range, origInst, repInstAddr, Index: reopt/lib/Inst/lib/SparcInstManip.cpp diff -u reopt/lib/Inst/lib/SparcInstManip.cpp:1.22 reopt/lib/Inst/lib/SparcInstManip.cpp:1.23 --- reopt/lib/Inst/lib/SparcInstManip.cpp:1.22 Wed Nov 19 14:49:53 2003 +++ reopt/lib/Inst/lib/SparcInstManip.cpp Sun Dec 5 20:14:04 2004 @@ -70,8 +70,8 @@ #include "reopt/TraceCache.h" #include "reopt/VirtualMem.h" #include "reopt/MemoryManager.h" -#include "reopt/BinInterface/sparc9.h" -#include "reopt/BinInterface/bitmath.h" +#include "BinInterface/SparcV9.h" +#include "BinInterface/BitMath.h" #include "reopt/InstrUtils.h" #include "SparcInstManip.h" #include "PhaseInfo.h" @@ -465,25 +465,6 @@ } -void SparcInstManip::printRange(unsigned* start, - unsigned* end) const -{ - // Dumps contents (and corresponding disassembly) of memory range given by range - // to stdout. TODO: Parameterize by an ostream instance; cannot do this yet - // because BinInterface is hard-coded to use printf and must be changed. - - cout << "Sparc dissassembly of range [" - << start << ", " << end << "]:" << endl; - - for(; start <= end; ++start) { - cout << start << " | " - << std::setw(8) << std::setfill('0') - << HEX(*start) << " | "; - sparc_print(*start); - cout << endl; - } -} - void SparcInstManip::printInst(unsigned inst) const { sparc_print(inst); Index: reopt/lib/Inst/lib/SparcInstManip.h diff -u reopt/lib/Inst/lib/SparcInstManip.h:1.17 reopt/lib/Inst/lib/SparcInstManip.h:1.18 --- reopt/lib/Inst/lib/SparcInstManip.h:1.17 Wed Nov 19 14:49:53 2003 +++ reopt/lib/Inst/lib/SparcInstManip.h Sun Dec 5 20:14:04 2004 @@ -16,7 +16,7 @@ #ifndef SPARCINSTMANIP_H #define SPARCINSTMANIP_H -#include "reopt/BinInterface/sparcdis.h" +#include "BinInterface/SparcDis.h" #include "reopt/InstrUtils.h" // getCallInstr, getUndepJumpInstr, etc. #include "InstManip.h" #include From gaeke at cs.uiuc.edu Sun Dec 5 20:14:20 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun, 5 Dec 2004 20:14:20 -0600 (CST) Subject: [llvm-commits] CVS: reopt/lib/Inst/lib/BinInterface/BitMath.h README SparcDis.cpp SparcDis.h SparcV9.h Message-ID: <200412060214.UAA04297@kain.cs.uiuc.edu> Changes in directory reopt/lib/Inst/lib/BinInterface: BitMath.h added (r1.1) README added (r1.1) SparcDis.cpp added (r1.1) SparcDis.h added (r1.1) SparcV9.h added (r1.1) --- Log message: Streamline the interfaces here so that usage of BinInterface is minimized. Move the pieces of BinInterface that this code uses here, and dump the rest. --- Diffs of the changes: (+1470 -0) Index: reopt/lib/Inst/lib/BinInterface/BitMath.h diff -c /dev/null reopt/lib/Inst/lib/BinInterface/BitMath.h:1.1 *** /dev/null Sun Dec 5 20:14:19 2004 --- reopt/lib/Inst/lib/BinInterface/BitMath.h Sun Dec 5 20:14:06 2004 *************** *** 0 **** --- 1,143 ---- + //===-- BinInterface/BitMath.h -----------------------------------*- C++ -*--=// + // + // High Performance Bit Utility Functions + // Contains + // * Routines for rounding to specific powers of 2 + // * Bitfield access macros + // * Sign extend macro + // * Extract bitmask of lowest bit set + // * Fast bit-set counting for sparse and dense bitfields + // * Fast modulo 3 test and remainder calculation + // * Fast parity calculation + // * Fast log2 (for 32-bit numbers ONLY!) + // + //===----------------------------------------------------------------------===// + + #ifndef BININTERFACE_BITMATH_H + #define BININTERFACE_BITMATH_H + + #include "llvm/Support/DataTypes.h" + + namespace llvm { + + //********************************* + // Misc functions + //********************************* + #define P2KM1(k) ((1 << (k))-1) // (2 ^ K) - 1 + #define ROUNDUP_P2(x, k) ((x+P2KM1(k)) &~ P2KM1(k)) + #define ROUNDUP32(x) ROUNDUP_P2(x,5) // round up to nearest mult of 32 + + + //********************************* + // Bitfield manipulation Macros + //********************************* + #define FLD_UPPER(FLD_DEF) (1 ? FLD_DEF) + #define FLD_LOWER(FLD_DEF) (0 ? FLD_DEF) + #define MASKBELOW(V) ((((uint64_t) 1) << V) - 1) // 64-bit '1' constant here to avoid overflow warnings + #define MASKEQBELOW(V) ((1 << V) | MASKBELOW(V)) //masks off everything ABOVE + #define RD_FLD(x, FLD) (unsigned)(((x & MASKEQBELOW(FLD_UPPER(FLD))) >> FLD_LOWER(FLD))) + #define MK_FLD(FLD, val) ((val << FLD_LOWER(FLD)) & MASKEQBELOW(FLD_UPPER(FLD))) + #define MASK_FLD(FLD) (MASKEQBELOW(FLD_UPPER(FLD)) & ~MASKBELOW(FLD_LOWER(FLD))) + #define RM_FLD(FLD, val) (val & ~(MASK_FLD(FLD))) + + //********************************** + // Portable sign extend macros + //********************************** + #define SIGN_EXTEND13(x) (x & 0x1000 ? -(-x & 0x1FFF): x) + #define SIGN_EXTEND(x, bits) (x & (1 << (bits-1)) ? -(-x & ((1 << bits)-1)):x) + + #define IS_POWER_2(x) !(x & (x-1)) + #define LOWEST_BIT(x) (x & ~(x & (x-1))) + #define UPPER_BITS(x) (x & (x-1)) + + // Good if expected number of bits set < 4 + static int countbits_sparse(unsigned m) //VALIDATED + { + int c = 0; + while (m) + { + c++; + m = UPPER_BITS(m); + } + return c; + } + + // base 2 sum of digits (hardwired for 32-bit) + static int countbits_dense(unsigned w) //VALIDATED + { + w = (0x55555555 & w) + (0x55555555 & (w >> 1)); + w = (0x33333333 & w) + (0x33333333 & (w >> 2)); + w = (w + (w>>4)) & 0x0f0f0f0f; + w = w + (w>>16); + w = w + (w>>8); + return w&0xFF; + } + + static bool ismod3(unsigned w) //VALIDATED + { + w = (w >> 16) + (w&0xFFFF); + w = (w >> 8) + (w&0xFF); + w = (w >> 4) + (w&0xF); + w = (w >> 2) + (w&0x3); + return (0xB6DB6DB6 >> w) & 1; + } + + + static int mod3(unsigned w) //VALIDATED + { + w = (w >> 16) + (w&0xFFFF); + w = (w >> 8) + (w&0xFF); + w = (w >> 4) + (w&0xF); + w = (w >> 2) + (w&0x3); + //use lookuptable + return (0x24924924 >> (w<<1)) & 3; + } + + + static int parity(unsigned w) //VALIDATED + { + w ^= w >> 16; + w ^= w >> 8; + w ^= w >> 4; + w ^= w >> 2; + w ^= w >> 1; + return w & 1; + } + + // + // Note: users of this function may depend on the fact + // that log2(0) will return 0. Since it is + // undefined I have chosen this value. + // + static int log2_bits32(unsigned w) //VALIDATED + { + int n = 0; + + if (w >> 16) + { + w >>= 16; + n+=16; + } + if (w >> 8) + { + w >>= 8; + n+=8; + } + if (w >> 4) + { + w >>= 4; + n+=4; + } + + w <<= 1; + return ((0xFFFFAA50 >> w) & 3)+n; // this is a LUT + } + + static unsigned LOW10(unsigned value) { return value & 0x000003ff; } + static unsigned HIGH22(unsigned value) { return value >> 10; } + static unsigned HIGHWORD(uint64_t value) { return (unsigned) (value >> 32); } + static unsigned LOWWORD(uint64_t value) { return (unsigned) value; } + + } // end namespace llvm + + #endif // BININTERFACE_BITMATH_H Index: reopt/lib/Inst/lib/BinInterface/README diff -c /dev/null reopt/lib/Inst/lib/BinInterface/README:1.1 *** /dev/null Sun Dec 5 20:14:19 2004 --- reopt/lib/Inst/lib/BinInterface/README Sun Dec 5 20:14:07 2004 *************** *** 0 **** --- 1,16 ---- + + This contains a few pieces of BinInterface, which could originally be used to + analyze SPARC machine instructions, construct pseudo-SSA form, and manipulate + traces. It also includes a SPARC disassembler. It was primarily written by + Cameron Buschardt. + + The only remaining user of BinInterface is the + Inst/lib/SparcInstManip.{cpp,h} module; therefore, the pieces which are + still used (SPARC binary instruction generator & disassembler) have + been moved into this directory. + + Portability notes: Supports SPARC binaries only. Should compile & link + fine on X86. + + Last modified $Date: 2004/12/06 02:14:07 $ + Index: reopt/lib/Inst/lib/BinInterface/SparcDis.cpp diff -c /dev/null reopt/lib/Inst/lib/BinInterface/SparcDis.cpp:1.1 *** /dev/null Sun Dec 5 20:14:19 2004 --- reopt/lib/Inst/lib/BinInterface/SparcDis.cpp Sun Dec 5 20:14:07 2004 *************** *** 0 **** --- 1,726 ---- + //===-- BinInterface/SparcDis.cpp --------------------------------*- C++ -*--=// + // + // SPARC Instruction Disassembler + // + // Disassembler API + // + // * Initial implementation + // * Added support for MOVcc (somehow I missed it?!) + // * Added support for pseudo-disassembly + // ( In the print routine for bin-interface we want + // to be able to print the internal SSA form with + // labels instead of registers. And we wish to + // ommit RD from the view when we are not explicitly + // reading from it) + // + // Todo: + // * On the instructions that don't read from RD + // do not print the label field (we get l-1 when we print) + // + //===----------------------------------------------------------------------===// + + #include "BitMath.h" // binary math routines + #include "Sparc9.h" // SPARC9 opcode definitions + #include + #include + + using namespace llvm; + + void sparc_printop_rs1(unsigned instr, int labelrs1) + { + if (labelrs1) + printf("l%d", labelrs1); + else + printf("%s", reg_names[RD_FLD(instr, INSTR_RS1)]); + } + + void sparc_printop_rs2(unsigned instr, int labelrs2) + { + if (labelrs2) + printf("l%d", labelrs2); + else + printf("%s", reg_names[RD_FLD(instr, INSTR_RS2)]); + } + + void sparc_printop_rrd(unsigned instr, int labelrrd) + { + if (labelrrd) + printf("l%d", labelrrd); + else + printf("%s", reg_names[RD_FLD(instr, INSTR_RD)]); + } + + void sparc_printbr(unsigned instr, bool labels, int labelrs1, int labelrs2, int labelrd, int labelccf) + { + // look at the OP2 field + if (RD_FLD(instr,INSTR_OP2)==OP2_ILLTRAP) + printf("ILLTRAP"); + else if (RD_FLD(instr, INSTR_OP2)==OP2_SETHI) + { + if (RD_FLD(instr, INSTR_RD) == 0) + printf("NOP"); + else + { + printf("SETHI %%hi(%08X), ", RD_FLD(instr, INSTR_IMM22) << 10); + sparc_printop_rrd(instr, labelrd); + } + } + else if (RD_FLD(instr, INSTR_OP2)==OP2_BICC || RD_FLD(instr, INSTR_OP2)==OP2_FB) + { + printf("b%s disp:%08X",icond_names[RD_FLD(instr, INSTR_COND_H)], + SIGN_EXTEND(RD_FLD(instr,INSTR_DISP22),22)); + } + else if (RD_FLD(instr, INSTR_OP2)==OP2_BPICC || + RD_FLD(instr, INSTR_OP2)==OP2_FBP) + { + printf("b%s",icond_names[RD_FLD(instr, INSTR_COND_H)]); + } + else if (RD_FLD(instr, INSTR_OP2)==OP2_BPR) + { + //A, RCOND_H, D16HI, P, RS1, D16LO + printf("P%s%s%s ", rcond_names[RD_FLD(instr, INSTR_RCOND_H)], + RD_FLD(instr, INSTR_A) ? ",a" : "", + RD_FLD(instr, INSTR_P) ? ",pt" : ",pn"); + sparc_printop_rs1(instr, labelrs1); + } + else if (RD_FLD(instr, INSTR_OP2)==OP2_FB) + { + // cond, A, disp22 + printf("%s%s %08X", fcond_names[RD_FLD(instr, INSTR_COND_H)], + RD_FLD(instr, INSTR_A) ? ",a" : "", + RD_FLD(instr, INSTR_DISP22)); + } + else if (RD_FLD(instr, INSTR_OP2)==OP2_BPICC) + { + // TODO + printf("[BPICC -- currently not handled]"); + } + else{ + printf("Unknown:OP=0b00 OP2 = 0x%04X", RD_FLD(instr, INSTR_OP2)); + assert(0); + } + } + + void sparc_printalu(const char * basename , unsigned instr, bool labels, + int labelrs1, int labelrs2, int labelrd, int labelccf) + { + // OP=OP_2 : RD, OP3, RS1: {I=0 -> RS2 I=1->SIMM13} + if (RD_FLD(instr, INSTR_I)==0) + { + printf("%s ", basename); + if (!labels) + printf("%s, ", reg_names[RD_FLD(instr, INSTR_RD)]); + sparc_printop_rs1(instr, labelrs1); + printf(" ,"); + sparc_printop_rs2(instr, labelrs2); + } + else + { + printf("%s ", basename); + if (!labels) + printf("%s, ", reg_names[RD_FLD(instr, INSTR_RD)]); + sparc_printop_rs1(instr, labelrs1); + printf(" , %d", SIGN_EXTEND13(RD_FLD(instr, INSTR_SIMM13))); + } + } + + void sparc_printshf(const char * basename, unsigned instr, bool labels, + int labelrs1, int labelrs2, int labelrd, int labelccf) + { + //OP=OP_2: RD, OP_3 RS1: {I=0 -> X & RS2 ,I=1 -> + // {X=0 -> SHCNT32 X=1->SHCNT64 }} + + if (RD_FLD(instr, INSTR_I)==0) + { + printf("%s%d ", basename, (RD_FLD(instr, INSTR_X)==0 ? 32 : 64)); + if (!labels) + printf("%s, ", reg_names[RD_FLD(instr, INSTR_RD)]); + + sparc_printop_rs1(instr, labelrs1); + printf(", "); + sparc_printop_rs2(instr, labelrs2); + } + else + { + + printf("%s%d ", basename, (RD_FLD(instr, INSTR_X)==0 ? 32 : 64)); + if (!labels) + printf("%s, ", reg_names[RD_FLD(instr, INSTR_RD)]); + + + sparc_printop_rs1(instr, labelrs1); + + printf(", 0x%04X, ", (RD_FLD(instr, INSTR_X)==0 + ? RD_FLD(instr, INSTR_SHCNT32) + : RD_FLD(instr, INSTR_SHCNT64))); + if (!labels) + printf("%s", reg_names[RD_FLD(instr, INSTR_RD)]); + } + + } + + // Op2 class instructions + void sparc_printfpu(unsigned instr, bool labels, int labelrs1, int labelrs2, + int labelrd, int labelccf) + { + switch(RD_FLD(instr, INSTR_OPF) &~ OPF_MASK_ON) + { + case OPF_FADDn: + printf("FADDn"); + return; + case OPF_FSUBn: + printf("FSUBn"); + return; + case OPF_FMOVn: + printf("FMOVn"); + return; + case OPF_FNEGn: + printf("FNEGn"); + return; + case OPF_FABSn: + printf("FABSn"); + return; + case OPF_FMULn: + printf("FMULn"); + return; + case OPF_FDIVn: + printf("FDIVn"); + return; + case OPF_FSQRTn: + printf("FSQRTn"); + return; + } + switch (RD_FLD(instr, INSTR_OPF) &~OPF_MASK_TO) + { + case OPF_FxTOt: + printf("FxTOt"); + return; + case OPF_FiTOt: + printf("FiTOt"); + return; + } + + switch(RD_FLD(instr, INSTR_OPF)) + { + case OPF_FsTOx: + printf("OPF_FsTOx"); + return; + case OPF_FsTOi: + printf("OPF_FsTOi"); + return; + case OPF_FsTOd: + printf("OPF_FsTOd"); + return; + case OPF_FsTOq: + printf("OPF_FsTOq"); + return; + case OPF_FdTOx: + printf("OPF_FdTOx"); + return; + case OPF_FdTOi: + printf("OPF_FdTOi"); + return; + case OPF_FqTOx: + printf("OPF_FqTOx"); + return; + case OPF_FdTOs: + printf("OPF_FdTOs"); + return; + case OPF_FdTOq: + printf("OPF_FdTOq"); + return; + case OPF_FqTOi: + printf("OPF_FqTOi"); + return; + case OPF_FqTOs: + printf("OPF_FqTOs"); + return; + case OPF_FqTOd: + printf("OPF_FqTOd"); + return; + case OPF_FsMULd: + printf("OPF_FsMULd"); + return; + case OPF_FdMULq: + printf("OPF_FdMULq"); + return; + } + + assert(0); // we don't know the FPU instruction yet + } + + void sparc_print2(unsigned instr, bool labels, int labelrs1, int labelrs2, + int labelrd, int labelccf) + { + switch(RD_FLD(instr, INSTR_OP3)) + { + + case OP3_MOVcc: + { + printf("mov%s(%s) ", icond_names[RD_FLD(instr, INSTR_COND_L)], + cc_names[(RD_FLD(instr, INSTR_CC2) << 2) | (RD_FLD(instr, INSTR_MOV_CC1) << 1) | RD_FLD(instr, INSTR_MOV_CC0)]); + + if (!labels) + printf("%s, ", reg_names[RD_FLD(instr, INSTR_RD)]); + + if (RD_FLD(instr, INSTR_I)==0) // RS2 + sparc_printop_rs2(instr, labelrs2); + else + printf("%d", SIGN_EXTEND(RD_FLD(instr, INSTR_SIMM11), 11)); + + + return; + } + + case OP3_ADD: + sparc_printalu("ADD", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_ADDcc: + sparc_printalu("ADDcc", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_ADDC: + sparc_printalu("ADDC", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_ADDCcc: + sparc_printalu("ADDCcc", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_AND: + sparc_printalu("AND", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_ANDcc: + sparc_printalu("ANDcc", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_OR: + sparc_printalu("OR", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_ORcc: + sparc_printalu("ORcc", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_XOR: + sparc_printalu("XOR", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_XORcc: + sparc_printalu("XORcc", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_SUB: + sparc_printalu("SUB", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_SUBcc: + sparc_printalu("SUBcc", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_ANDN: + sparc_printalu("ANDN", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_ANDNcc: + sparc_printalu("ANDNcc", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_ORN: + sparc_printalu("ORN", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_ORNcc: + sparc_printalu("ORNcc", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_XNOR: + sparc_printalu("XNOR", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_XNORcc: + sparc_printalu("XNORcc", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_SUBC: + sparc_printalu("SUBC", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_SUBCcc: + sparc_printalu("SUBCcc", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_MULX: + sparc_printalu("MULX", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_SDIVX: + sparc_printalu("SDIVX", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_UDIVX: + sparc_printalu("UDIVX", instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_SLL: + sparc_printshf("SLL",instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + case OP3_SRL: + sparc_printshf("SRL",instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + case OP3_SRA: + sparc_printshf("SRA",instr, labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_DONERETRY: + { + if (RD_FLD(instr, INSTR_FCN)==FCN_DONE) + printf("DONE"); + else if (RD_FLD(instr, INSTR_FCN)==FCN_RETRY) + printf("RETRY"); + return; + } + + case OP3_FCMP: + { + unsigned fop_n =RD_FLD(instr, INSTR_OPF) &~ OPF_MASK_ON; + if (fop_n==OPF_FCMPn) + printf("FCMP"); + else if (fop_n==OPF_FCMPEn) + printf("FCMPE"); + return; + } + + case OP3_FPU: + sparc_printfpu(instr, labels, labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_FLUSH: //OP=OP_2 RS1 {I=0 -> rs2, I=1->simm13} + printf("OP3_FLUSH"); + return; + case OP3_FLUSHW: //OP=OP_2 I = 0 + printf("OP3_FLUSHW"); + return; + case OP3_JMPL: //OP=OP_2 RD, RS1 {I=0-> RS2, I=1->SIMM13} + if (RD_FLD(instr, INSTR_I)==0) + { + printf("jmpl link:"); + sparc_printop_rrd(instr, labelrd); + printf(", to: "); + sparc_printop_rs1(instr, labelrs1); + printf("+"); + sparc_printop_rs2(instr, labelrs2); + } + else + { + printf("jmpl link:"); + sparc_printop_rrd(instr, labelrd); + printf(", to: "); + sparc_printop_rs1(instr, labelrs1); + printf("+%d",SIGN_EXTEND13(RD_FLD(instr, INSTR_SIMM13))); + } + return; + + case OP3_POPC: + printf("POPC ????"); + return; + + case OP3_RETURN: + if (RD_FLD(instr, INSTR_I) == 0) + { + printf("return "); + sparc_printop_rs1(instr, labelrs1); + printf("+"); + sparc_printop_rs2(instr, labelrs2); + } + else + { + printf("return "); + sparc_printop_rs1(instr, labelrs1); + printf("+%d",SIGN_EXTEND13(RD_FLD(instr, INSTR_SIMM13))); + } + return; + + case OP3_SAVE: + if (RD_FLD(instr, INSTR_I) == 0) + { + printf("save "); + sparc_printop_rs1(instr, labelrs1); + printf(", "); + sparc_printop_rs2(instr, labelrs2); + printf(", "); + sparc_printop_rrd(instr, labelrd); + } + else + { + printf("save "); + sparc_printop_rs1(instr, labelrs1); + printf(", %d, ", SIGN_EXTEND13(RD_FLD(instr, INSTR_SIMM13))); + sparc_printop_rrd(instr, labelrd); + } + return; + + case OP3_RESTORE: + if (RD_FLD(instr, INSTR_I) == 0) + { + printf("restore "); + sparc_printop_rs1(instr, labelrs1); + printf(", "); + sparc_printop_rs2(instr, labelrs2); + printf(", "); + sparc_printop_rrd(instr, labelrd); + } + else + { + printf("restore "); + sparc_printop_rs1(instr, labelrs1); + printf(", %d, ", SIGN_EXTEND13(RD_FLD(instr, INSTR_SIMM13))); + sparc_printop_rrd(instr, labelrd); + } + return; + + + } + + printf("Unknown:OP=0b10 OP3 = 0x%04X", RD_FLD(instr, INSTR_OP3)); + assert(0); + } + + void sparc_printload(const char * basename, unsigned instr, bool labels, + int labelrs1, int labelrs2, int labelrd , int labelccf) + { + if (RD_FLD(instr, INSTR_I)==0) + { + printf("%s ", basename); + if (!labels) + { + sparc_printop_rrd(instr, labelrd); + printf(", "); + } + sparc_printop_rs1(instr, labelrs1); + printf("+"); + sparc_printop_rs2(instr, labelrs2); + } + else + { + printf("%s ", basename); + if (!labels) + { + sparc_printop_rrd(instr, labelrd); + printf(", "); + } + sparc_printop_rs1(instr, labelrs1); + printf("+%d", SIGN_EXTEND13(RD_FLD(instr, INSTR_SIMM13))); + } + } + + void sparc_printstore(const char * basename, unsigned instr, bool labels, + int labelrs1, int labelrs2, int labelrd , int labelccf) + { + if (RD_FLD(instr, INSTR_I)==0) + { + printf("%s ", basename); + sparc_printop_rrd(instr, labelrd); + printf(", "); + sparc_printop_rs1(instr, labelrs1); + printf("+"); + sparc_printop_rs2(instr, labelrs2); + + } + else + { + printf("%s ", basename); + sparc_printop_rrd(instr, labelrd); + printf(", "); + sparc_printop_rs1(instr, labelrs1); + printf("+%d", SIGN_EXTEND13(RD_FLD(instr, INSTR_SIMM13))); + } + } + + void sparc_print3(unsigned instr, bool labels, int labelrs1, int labelrs2, + int labelrd, int labelccf) + { + // OP3_LDF OP=OP_3 RD, Rs1, {I=0->IMM_ASI, RS2 I=1->SIMM13} + // OP3_LDDFA OP=OP_3 RD, Rs1, {I=0->IMM_ASI, RS2 I=1->SIMM13} + // OP3_LDQFA OP=OP_3 RD, Rs1, {I=0->IMM_ASI, RS2 I=1->SIMM13} + // OP3_LDSTUB OP=OP_3 RD, Rs1 {I=0->RS2, I=1->SIMM13} + // OP3_LDSTUBA OP=OP_3 RD, RS1 {I=0->RS2, IMM_ASI, I=1->SIMM13} + + + switch(RD_FLD(instr, INSTR_OP3)) + { + //OP=OP_3 RD, Rs1 {I=0->RS2, I=1->SIMM13} + case OP3_LDSTUB: + sparc_printload("LDSTUB", instr,labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_STB: + sparc_printstore("STB", instr,labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_STH: + sparc_printstore("STH", instr,labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_STW: + sparc_printstore("STW", instr,labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_STX: + sparc_printstore("STX", instr,labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_LDSB: + sparc_printload("LDSB", instr,labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_LDSH: + sparc_printload("LDSH", instr,labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_LDSW: + sparc_printload("LDSW", instr,labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_LDUB: + sparc_printload("LDUB", instr,labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_LDUH: + sparc_printload("LDUH", instr,labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_LDUW: + sparc_printload("LDUW", instr,labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_LDX: + sparc_printload("LDX", instr,labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_CASA: + if (RD_FLD(instr, INSTR_I)==0) + { + if (!labels) + printf("CASA [r%d] %%%d, r%d, r%d", + RD_FLD(instr, INSTR_RS1), + RD_FLD(instr, INSTR_IMMASI), + RD_FLD(instr, INSTR_RS2), + RD_FLD(instr, INSTR_RD)); + + else + printf("CASA [l%d] %%%d, l%d, l%d", + labelrs1, + RD_FLD(instr, INSTR_IMMASI), + labelrs2, + labelrd); + } + else + { + if (!labels) + printf("CASA [r%d] , r%d, r%d", + RD_FLD(instr, INSTR_RS1), + RD_FLD(instr, INSTR_RS2), + RD_FLD(instr, INSTR_RD)); + else + printf("CASA [l%d] , l%d, l%d", labelrs1, labelrs2, labelrd); + } + + sparc_printalu("CASA", instr,labels, + labelrs1, labelrs2, labelrd, labelccf); + + return; + + case OP3_CASXA: + sparc_printalu("CASXA", instr,labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + case OP3_STFA: + sparc_printalu("STFA",instr,labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + case OP3_STDFA: + sparc_printalu("STDFA",instr,labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + case OP3_STQFA: + sparc_printalu("STQFA",instr,labels, + labelrs1, labelrs2, labelrd, labelccf); + return; + + case OP3_PREFETCH: + printf("PREFETCH ??? "); + return; + + case OP3_PREFETCHA: + printf("PREFETCHA ??? "); + return; + } + + printf("Unknown OP_3: OP3 = %08X", RD_FLD(instr, INSTR_OP3)); + assert(0); + } + + void sparc_print_pseudo(unsigned instr, int labelrs1, int labelrs2, int labelrd, int labelccf) + { + if (RD_FLD(instr,INSTR_OP)==OP_CALL) + printf("CALL disp:+%08X", instr & 0x3FFFFFFF); + else if (RD_FLD(instr,INSTR_OP)==OP_BRANCH) + sparc_printbr(instr,true,labelrs1, labelrs2, labelrd, labelccf); + else if (RD_FLD(instr,INSTR_OP)==OP_2) + sparc_print2(instr,true,labelrs1, labelrs2, labelrd, labelccf); + else if (RD_FLD(instr,INSTR_OP)==OP_3) + sparc_print3(instr,true,labelrs1, labelrs2, labelrd, labelccf); + } + + void sparc_print(unsigned instr) + { + if (RD_FLD(instr,INSTR_OP)==OP_CALL) + printf("CALL disp:+%08X", instr & 0x3FFFFFFF); + else if (RD_FLD(instr,INSTR_OP)==OP_BRANCH) + sparc_printbr(instr,false,0, 0, 0, 0); + else if (RD_FLD(instr,INSTR_OP)==OP_2) + sparc_print2(instr,false,0, 0, 0, 0); + else if (RD_FLD(instr,INSTR_OP)==OP_3) + sparc_print3(instr,false,0, 0, 0, 0 ); + } Index: reopt/lib/Inst/lib/BinInterface/SparcDis.h diff -c /dev/null reopt/lib/Inst/lib/BinInterface/SparcDis.h:1.1 *** /dev/null Sun Dec 5 20:14:19 2004 --- reopt/lib/Inst/lib/BinInterface/SparcDis.h Sun Dec 5 20:14:08 2004 *************** *** 0 **** --- 1,36 ---- + //===-- BinInterface/SparcDis.h ----------------------------------*- C++ -*--=// + // + // Disassembler API Header + // + // * Initial implementation + // * Added support for MOVcc (somehow I missed it?!) + // * Added support for pseudo-disassembly + // ( In the print routine for bin-interface we want + // to be able to print the internal SSA form with + // labels instead of registers. And we wish to + // ommit RD from the view when we are not explicitly + // reading from it) + // + // Todo: + // * On the instructions that don't read from RD + // do not print the label field (we get l-1 when we print) + // + //===----------------------------------------------------------------------===// + + #ifndef BININTERFACE_SPARCDIS_H + #define BININTERFACE_SPARCDIS_H + + namespace llvm { + + // Conventional Disassembly. Prints instruction (no newline) + void sparc_print(unsigned instr); + + // Pseudo disasm + // uses the integers in labelrs1, labelrs2, labelrd, and labelccf as + // gen labels for the parameter sources + // instead of printing rxx for rs1, it will print l__labelrs1__ + void sparc_print_pseudo(unsigned instr, int labelrs1, int labelrs2, int labelrd, int labelccf); + + } // end namespace llvm + + #endif // BININTERFACE_SPARCDIS_H Index: reopt/lib/Inst/lib/BinInterface/SparcV9.h diff -c /dev/null reopt/lib/Inst/lib/BinInterface/SparcV9.h:1.1 *** /dev/null Sun Dec 5 20:14:19 2004 --- reopt/lib/Inst/lib/BinInterface/SparcV9.h Sun Dec 5 20:14:08 2004 *************** *** 0 **** --- 1,549 ---- + //===-- BinInterface/SparcV9.h -----------------------------------*- C++ -*--=// + // + // Portable SPARC v9 Machine Code Definition Header + // + //===----------------------------------------------------------------------===// + + #ifndef BININTERFACE_SPARCV9_H + #define BININTERFACE_SPARCV9_H + + namespace llvm { + + //***************************************************************************** + // Register Names + //***************************************************************************** + #define R_I7 31 + #define R_I6 30 + #define R_I5 29 + #define R_I4 28 + #define R_I3 27 + #define R_I2 26 + #define R_I1 25 + #define R_I0 24 + + #define R_L7 23 + #define R_L6 22 + #define R_L5 21 + #define R_L4 20 + #define R_L3 19 + #define R_L2 18 + #define R_L1 17 + #define R_L0 16 + + #define R_O7 15 + #define R_O6 14 + #define R_O5 13 + #define R_O4 12 + #define R_O3 11 + #define R_O2 10 + #define R_O1 9 + #define R_O0 8 + + #define R_G7 7 + #define R_G6 6 + #define R_G5 5 + #define R_G4 4 + #define R_G3 3 + #define R_G2 2 + #define R_G1 1 + #define R_G0 0 + + #define R_SP R_O6 + #define R_BP R_I6 // frame pointer + + #define BR_ANNUL 1 + #define BR_NOT_ANNUL 0 + #define BPR 3 + #define Bicc 2 + #define Bpcc 1 + #define FBfcc 6 + #define FBPfcc 5 + #define NOT_TAKEN_BR 0 + #define TAKEN_BR 1 + + extern const char * reg_names[]; + + //***************************************************************************** + // Instruction bitfield definitions + //***************************************************************************** + #define INSTR_OP 31:30 + #define INSTR_A 29:29 + #define INSTR_FCN 29:25 + #define INSTR_DISP30 29:0 + #define INSTR_COND_H 28:25 + #define INSTR_RCOND_H 27:25 + #define INSTR_CC1_H 26:26 + #define INSTR_CC0_H 25:25 + #define INSTR_OP2 24:22 + #define INSTR_OP3 24:19 + #define INSTR_CC1_L 21:21 + #define INSTR_D16HI 21:20 + #define INSTR_D16LO 13:0 + #define INSTR_IMM22 21:0 + #define INSTR_DISP22 21:0 + #define INSTR_CC0_L 20:20 + #define INSTR_P 19:19 + #define INSTR_CC2 18:18 + #define INSTR_MOV_CC0 11:11 + #define INSTR_MOV_CC1 12:12 + #define INSTR_DISP19 18:0 + #define INSTR_IMPLDEP 18:0 + #define INSTR_COND_L 17:14 + #define INSTR_I 13:13 + #define INSTR_OPFCC 13:11 + #define INSTR_OPF 13:5 + #define INSTR_X 12:12 + #define INSTR_RCOND_L 12:10 + #define INSTR_IMMASI 12:5 + #define INSTR_SIMM13 12:0 + #define INSTR_OPFLOW_B 10:5 + #define INSTR_OPFLOW_S 9:5 + #define INSTR_SIMM11 10:0 + #define INSTR_SIMM10 9:0 + #define INSTR_CMASK 6:4 + #define INSTR_SWTRAP 6:0 + #define INSTR_SHCNT64 5:0 + #define INSTR_SHCNT32 4:0 + #define INSTR_MMASK 3:0 + + #define INSTR_RS1 18:14 + #define INSTR_RS2 4:0 + #define INSTR_RD 29:25 + + #define INSTR_BRANCH_ANNUL 29:29 + #define INSTR_BPR_COND 27:25 + #define INSTR_INTBR_COND 28:25 + #define INSTR_BPR 24:22 + #define INSTR_INT_BR 24:22 + #define BR_PREDICT 19:19 + + #define RD_D16(i) ((RD_FLD(i, INSTR_D16HI) << 14) | RD_FLD(i, INSTR_D16LO)) + + + //***************************************************************************** + // Op-code classification + //***************************************************************************** + #define OP_CALL 0x00000001 /* 0b01 */ + #define OP_BRANCH 0x00000000 /* 0b00 */ + #define OP_2 0x00000002 /* 0b10 */ + #define OP_3 0x00000003 /* 0b11 */ + + //***************************************************************************** + // Branch Class Instructions + //***************************************************************************** + #define OP2_ILLTRAP 0x00000000 /* 0b000 */ //OP=OP_BRANCH + #define OP2_NOP 0x00000004 /* 0b100 */ //BRANCH + #define OP2_SETHI 0x00000004 /* 0b100 */ //BRANCH - uhh? duplicate? + //DOH =p + #define OP2_BICC 0x00000002 /* 0b010 */ + #define OP2_BPR 0x00000003 /* 0b011 */ + #define OP2_FB 0x00000006 /* 0b110 */ + #define OP2_FBP 0x00000005 /* 0b101 */ + #define OP2_BPICC 0x00000001 /* 0b001 */ + + //***************************************************************************** + // Register Condition Codes + //***************************************************************************** + #define RCOND_RZ 0x00000001 /* 0b001 */ + #define RCOND_RLEZ 0x00000002 /* 0b010 */ + #define RCOND_RNZ 0x00000005 /* 0b101 */ + #define RCOND_RGZ 0x00000006 /* 0b110 */ + #define RCOND_RGEZ 0x00000007 /* 0b111 */ + + //***************************************************************************** + // FPU Branch Conditions + //***************************************************************************** + #define COND_FBN 0x00000000 /* 0b0000 */ + #define COND_FBNE 0x00000001 /* 0b0001 */ + #define COND_FBLG 0x00000002 /* 0b0010 */ + #define COND_FBUL 0x00000003 /* 0b0011 */ + #define COND_FBL 0x00000004 /* 0b0100 */ + #define COND_FBUG 0x00000005 /* 0b0101 */ + #define COND_FBG 0x00000006 /* 0b0110 */ + #define COND_FBU 0x00000007 /* 0b0111 */ + #define COND_FBA 0x00000008 /* 0b1000 */ + #define COND_FBE 0x00000009 /* 0b1001 */ + #define COND_FBUE 0x0000000A /* 0b1010 */ + #define COND_FBGE 0x0000000B /* 0b1011 */ + #define COND_FBUGE 0x0000000C /* 0b1100 */ + #define COND_FBLE 0x0000000D /* 0b1101 */ + #define COND_FBULE 0x0000000E /* 0b1110 */ + #define COND_FBO 0x0000000F /* 0b1111 */ + + //***************************************************************************** + // Integer Branch Conditions + //***************************************************************************** + #define COND_BN 0x00000000 /* 0b0000 */ + #define COND_BE 0x00000001 /* 0b0001 */ + #define COND_BLE 0x00000002 /* 0b0010 */ + #define COND_BL 0x00000003 /* 0b0011 */ + #define COND_BLEU 0x00000004 /* 0b0100 */ + #define COND_BCS 0x00000005 /* 0b0101 */ + #define COND_BNEG 0x00000006 /* 0b0110 */ + #define COND_BVS 0x00000007 /* 0b0111 */ + #define COND_BA 0x00000008 /* 0b1000 */ + #define COND_BNE 0x00000009 /* 0b1001 */ + #define COND_BG 0x0000000A /* 0b1010 */ + #define COND_BGE 0x0000000B /* 0b1011 */ + #define COND_BGU 0x0000000C /* 0b1100 */ + #define COND_BCC 0x0000000D /* 0b1101 */ + #define COND_BPOS 0x0000000E /* 0b1110 */ + #define COND_BVC 0x0000000F /* 0b1111 */ + + + //***************************************************************************** + // Name Lookup tables + // index is Condition code + //***************************************************************************** + + extern const char * fcond_names[]; + extern const char * icond_names[]; + extern const char * rcond_names[]; + + //***************************************************************************** + // Flag register encoding + //***************************************************************************** + + #define FLAG_FCC0 0x00000000 /* 0b000 */ + #define FLAG_FCC1 0x00000001 /* 0b001 */ + #define FLAG_FCC2 0x00000002 /* 0b010 */ + #define FLAG_FCC3 0x00000003 /* 0b011 */ + #define FLAG_ICC 0x00000004 /* 0b100 */ + #define FLAG_XCC 0x00000006 /* 0b110 */ + + extern const char * cc_names[]; + + + //***************************************************************************** + // OP_2 class instructions + // + // present members: + // RD, OP3, RS1 + // if I=0 + // RS2 + // else + // SIMM13 + //***************************************************************************** + + #define OP3_ADD 0x00000000 /* 0b000000 */ + #define OP3_ADDC 0x00000008 /* 0b001000 */ + #define OP3_AND 0x00000001 /* 0b000001 */ + #define OP3_OR 0x00000002 /* 0b000010 */ + #define OP3_XOR 0x00000003 /* 0b000011 */ + #define OP3_SUB 0x00000004 /* 0b000100 */ + #define OP3_ANDN 0x00000005 /* 0b000101 */ + #define OP3_ORN 0x00000006 /* 0b000110 */ + #define OP3_XNOR 0x00000007 /* 0b000111 */ + #define OP3_SUBC 0x0000000C /* 0b001100 */ + #define OP3_ADDcc 0x00000010 /* 0b010000 */ + #define OP3_ADDCcc 0x00000018 /* 0b011000 */ + #define OP3_ANDcc 0x00000011 /* 0b010001 */ + #define OP3_ORcc 0x00000012 /* 0b010010 */ + #define OP3_XORcc 0x00000013 /* 0b010011 */ + #define OP3_SUBcc 0x00000014 /* 0b010100 */ + #define OP3_ANDNcc 0x00000015 /* 0b010101 */ + #define OP3_ORNcc 0x00000016 /* 0b010110 */ + #define OP3_XNORcc 0x00000017 /* 0b010111 */ + #define OP3_SUBCcc 0x0000001C /* 0b011100 */ + #define OP3_MULX 0x00000009 /* 0b001001 */ + #define OP3_SDIVX 0x0000002D /* 0b101101 */ + #define OP3_UDIVX 0x0000000D /* 0b001101 */ + + //Op3 members + #define OP3_CASA 0x0000003C /* 0b111100 */ + #define OP3_CASXA 0x0000003E /* 0b111110 */ + + //Instructions below generated with: + //OP=OP_2: RD, OP_3 RS1: {I=0 -> X & RS2 ,I=1 -> {X=0 -> SHCNT32 X=1->SHCNT64 }} + #define OP3_SLL 0x00000025 /* 0b100101 */ + #define OP3_SRL 0x00000026 /* 0b100110 */ + #define OP3_SRA 0x00000027 /* 0b100111 */ + + // class OP_3 + #define OP3_STFA 0x00000034 /* 0b110100 */ + #define OP3_STDFA 0x00000037 /* 0b110111 */ + #define OP3_STQFA 0x00000036 /* 0b110110 */ + + //Instructions below generated with: + //OP=OP_2: FCN + #define OP3_DONERETRY 0x0000003E /* 0b111110 */ + #define FCN_DONE 0 + #define FCN_RETRY 1 + + //These masks are valid for the instructions below + #define OPF_MASK_ONs 0x00000001 /* 0b0001 */ //these are valid for 'n' field + #define OPF_MASK_ONd 0x00000002 /* 0b0010 */ + #define OPF_MASK_ONq 0x00000003 /* 0b0011 */ + #define OPF_MASK_TOs 0x00000004 /* 0b0100 */ //these are valid for 't' field + #define OPF_MASK_TOd 0x00000008 /* 0b1000 */ + #define OPF_MASK_TOq 0x0000000C /* 0b1100 */ + + #define OPF_MASK_ON 0x00000003 /* 0b0011 */ + #define OPF_MASK_TO 0x0000000C /* 0b1100 */ + + //Instructions below generated with + //OP=OP_2: CC1_H, CC0_H, RS1, OPF, RS2 + #define OP3_FCMP 0x00000035 /* 0b110101 */ + #define OPF_FCMPn 0x00000050 /* 0b001010000 */ + #define OPF_FCMPEn 0x00000054 /* 0b001010100 */ + + //Instructions below generated with + //OP=OP_2: RD, OP3 RS1, OPF, RS2 + #define OP3_FPU 0x00000034 /* 0b110100 */ + #define OPF_FADDn 0x00000040 /* 0b001000000 */ + #define OPF_FSUBn 0x00000044 /* 0b001000100 */ + #define OPF_FMOVn 0x00000000 /* 0b000000000 */ + #define OPF_FNEGn 0x00000004 /* 0b000000100 */ + #define OPF_FABSn 0x00000008 /* 0b000001000 */ + #define OPF_FMULn 0x00000048 /* 0b001001000 */ + #define OPF_FDIVn 0x0000004C /* 0b001001100 */ + #define OPF_FSQRTn 0x00000028 /* 0b000101000 */ + #define OPF_FsTOx 0x00000081 /* 0b010000001 */ + #define OPF_FsTOi 0x000000D1 /* 0b011010001 */ + #define OPF_FsTOd 0x000000C9 /* 0b011001001 */ + #define OPF_FsTOq 0x000000CD /* 0b011001101 */ + #define OPF_FdTOx 0x00000082 /* 0b010000010 */ + #define OPF_FdTOi 0x000000D2 /* 0b011010010 */ + #define OPF_FdTOs 0x000000C6 /* 0b011000110 */ + #define OPF_FdTOq 0x000000CE /* 0b011001110 */ + #define OPF_FqTOx 0x00000083 /* 0b010000011 */ + #define OPF_FqTOi 0x000000D3 /* 0b011010011 */ + #define OPF_FqTOs 0x000000C7 /* 0b011000111 */ + #define OPF_FqTOd 0x000000CB /* 0b011001011 */ + #define OPF_FxTOt 0x00000080 /* 0b010000000 */ + #define OPF_FiTOt 0x000000C0 /* 0b011000000 */ + #define OPF_FsMULd 0x00000069 /* 0b001101001 */ + #define OPF_FdMULq 0x0000006E /* 0b001101110 */ + + + #define OP3_FLUSH 0x0000003B /* 0b111011 */ + //OP=OP_2 RS1 {I=0 -> rs2, I=1->simm13} + + #define OP3_FLUSHW 0x0000002B /* 0b101011 */ + //OP=OP_2 I = 0 + + #define OP3_JMPL 0x00000038 /* 0b111000 */ + //OP=OP_2 RD, RS1 {I=0-> RS2, I=1->SIMM13} + + #define OP3_LDFA 0x00000030 /* 0b110000 */ + //OP=OP_3 RD, Rs1, {I=0->IMM_ASI, RS2 I=1->SIMM13} + + #define OP3_LDDFA 0x00000033 /* 0b110011 */ + //OP=OP_3 RD, Rs1, {I=0->IMM_ASI, RS2 I=1->SIMM13} + + #define OP3_LDQFA 0x00000032 /* 0b110010 */ + //OP=OP_3 RD, Rs1, {I=0->IMM_ASI, RS2 I=1->SIMM13} + + #define OP3_LDSTUB 0x0000000D /* 0b001101 */ + //OP=OP_3 RD, Rs1 {I=0->RS2, I=1->SIMM13} + + #define OP3_STB 0x00000005 /* 0b000101 */ + #define OP3_STH 0x00000006 /* 0b000110 */ + #define OP3_STW 0x00000004 /* 0b000100 */ + + #define OP3_STD 0x00000007 + #define OP3_STX 0x0000000e /* 0b001110 */ + + #define OP3_LDSB 0x00000009 /* 0b001001 */ + #define OP3_LDSH 0x0000000A /* 0b001010 */ + #define OP3_LDSW 0x00000008 /* 0b001000 */ + #define OP3_LDUB 0x00000001 /* 0b000001 */ + #define OP3_LDUH 0x00000002 /* 0b000010 */ + #define OP3_LDUW 0x00000000 /* 0b000000 */ + #define OP3_LDX 0x0000000B /* 0b001011 */ + + + + #define OP3_LDSTUBA 0x0000001D /* 0b011101 */ + //OP=OP_3 RD, RS1 {I=0->RS2, IMM_ASI, I=1->SIMM13} + + #define OP3_MEMBAR 0x00000028 /* 0b101000 */ + //OP=OP_2 CMASK, MMASK //WTF?!?! some bits get set + + //These two instructions are FUNKY as hell + #define OP3_FMOVcc 0x00000035 /* 0b110101 */ + //OP=OP_2 RD, COND, OPF_CC, OPF_LOW, RS2 + + #define OP3_MOVcc 0x0000002C /* 0b101100 */ // + + + #define OP3_POPC 0x0000002E /* 0b101110 */ + #define OP3_PREFETCH 0x0000002D /* 0b101101 */ + #define OP3_PREFETCHA 0x0000003D /* 0b111101 */ + #define OP3_RETURN 0x00000039 /* 0b111001 */ + #define OP3_SAVE 0x0000003C /* 0b111100 */ + #define OP3_RESTORE 0x0000003D /* 0b111101 */ + + #define OP3_SAVDRESTD 0x00000031 /* 0b110001 */ + #define FCN_SAVED 0 + #define FCN_RESTORED 1 + + #define OP3_TRAP 0x0000003A /* 0b111010 */ //integer trap + + + //***************************************************************************** + // Macros for generating useful instructions + //***************************************************************************** + + // Generic Load worm Reg+Offs + #define MK_LDX_ROFFS(dreg,regoffs ,stackoffs) \ + (MK_FLD(INSTR_OP, OP_3) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_OP3, OP3_LDX) | \ + MK_FLD(INSTR_RS1, regoffs) | \ + MK_FLD(INSTR_I , 1 ) | \ + MK_FLD(INSTR_SIMM13, stackoffs)) + + + // Load a word from O6/SP + stackoffs into dreg + #define MK_LDX_STACK(dreg, stackoffs) \ + (MK_FLD(INSTR_OP, OP_3) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_OP3, OP3_LDX) | \ + MK_FLD(INSTR_RS1, R_SP) | \ + MK_FLD(INSTR_I , 1 ) | \ + MK_FLD(INSTR_SIMM13, stackoffs)) + + + // Move a value between two registers + #define MK_MOV_R_R(dreg, sreg) \ + (MK_FLD(INSTR_OP, OP_2) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_OP3, OP3_MOVcc) | \ + MK_FLD(INSTR_RS2, sreg) | \ + MK_FLD(INSTR_I , 0 ) | \ + MK_FLD(INSTR_COND_L, COND_BA) | \ + MK_FLD(INSTR_CC2 , 1 ) | \ + MK_FLD(INSTR_MOV_CC1 , 1 ) | \ + MK_FLD(INSTR_MOV_CC0, 0 )) + + // Store a word in sreg to O6/SP + stackoffs + #define MK_STX_STACK(sreg, stackoffs) \ + (MK_FLD(INSTR_OP, OP_3) | \ + MK_FLD(INSTR_RD, sreg) | \ + MK_FLD(INSTR_OP3, OP3_STX) | \ + MK_FLD(INSTR_RS1, R_SP) | \ + MK_FLD(INSTR_I , 1 ) | \ + MK_FLD(INSTR_SIMM13, stackoffs)) + + // Add a constant to a register + #define MK_ADD_R_I(dreg, sreg, imm) \ + (MK_FLD(INSTR_OP, OP_2) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_RS1, sreg) | \ + MK_FLD(INSTR_SIMM13, imm) | \ + MK_FLD(INSTR_I, 1) | \ + MK_FLD(INSTR_OP3, OP3_ADD)) + + #define MK_INSTR_BRANCH_RS1(cond) \ + (MK_FLD(INSTR_OP, OP_BRANCH) | \ + MK_FLD(INSTR_BPR, BPR) | \ + MK_FLD(INSTR_BPR_COND, cond)) + + #define MK_INSTR_BRANCH_NO_RS1(cond) \ + (MK_FLD(INSTR_OP, OP_BRANCH) | \ + MK_FLD(INSTR_INT_BR, Bicc) | \ + MK_FLD(INSTR_INTBR_COND, cond)) + + // Add a register to a register + + #define MK_ADD_R_R(dreg, sreg1, sreg2) \ + (MK_FLD(INSTR_OP, OP_2) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_OP3, OP3_ADD) | \ + MK_FLD(INSTR_RS1, sreg1) | \ + MK_FLD(INSTR_I, 0) | \ + MK_FLD(INSTR_RS2, sreg2)) + + // Construct immediate-valued logical operation + + #define MK_LOGIC_IMM(op3, dreg, sreg, imm) \ + (MK_FLD(INSTR_OP, OP_2) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_RS1, sreg) | \ + MK_FLD(INSTR_SIMM13, imm) | \ + MK_FLD(INSTR_I, 1) | \ + MK_FLD(INSTR_OP3, op3)) + + // Construct reg-to-reg logical operation + + #define MK_LOGIC(op3, dreg, sreg1, sreg2) \ + (MK_FLD(INSTR_OP, OP_2) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_RS1, sreg1) | \ + MK_FLD(INSTR_RS2, sreg2) | \ + MK_FLD(INSTR_I, 0) | \ + MK_FLD(INSTR_OP3, op3)) + + // Construct sethi instruction + + #define MK_SETHI(dreg, imm) \ + (MK_FLD(INSTR_OP, OP_BRANCH) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_OP2, OP2_SETHI) | \ + MK_FLD(INSTR_IMM22, imm)) + + // Construct S{LL,RL,RA}X shift instruction. + + #define MK_SHIFTX(op3, dreg, sreg, shcnt) \ + (MK_FLD(INSTR_OP, OP_2) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_OP3, op3) | \ + MK_FLD(INSTR_RS1, sreg) | \ + MK_FLD(INSTR_I, 1) | \ + MK_FLD(INSTR_X, 1) | \ + MK_FLD(INSTR_SHCNT64, shcnt)) + + #define MK_STORE_IMM(srcreg, basereg, offset) \ + (MK_FLD(INSTR_OP, OP_3) | \ + MK_FLD(INSTR_RD, srcreg) | \ + MK_FLD(INSTR_OP3, OP3_STX) | \ + MK_FLD(INSTR_RS1, basereg) | \ + MK_FLD(INSTR_I, 1) | \ + MK_FLD(INSTR_SIMM13, offset)) + + #define MK_LOAD_IMM(destreg, basereg, offset) \ + (MK_FLD(INSTR_OP, OP_3) | \ + MK_FLD(INSTR_RD, destreg) | \ + MK_FLD(INSTR_OP3, OP3_LDX) | \ + MK_FLD(INSTR_RS1, basereg) | \ + MK_FLD(INSTR_I, 1) | \ + MK_FLD(INSTR_SIMM13, offset)) + + // Construct save instruction + + #define MK_SAVE_IMM(dreg, sreg, imm) \ + (MK_FLD(INSTR_OP, OP_2) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_OP3, OP3_SAVE) | \ + MK_FLD(INSTR_RS1, sreg) | \ + MK_FLD(INSTR_I, 1) | \ + MK_FLD(INSTR_SIMM13, imm)) + + #define MK_SAVE_REG(dreg, sreg1, sreg2) \ + (MK_FLD(INSTR_OP, OP_2) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_OP3, OP3_SAVE) | \ + MK_FLD(INSTR_RS1, sreg1) | \ + MK_FLD(INSTR_I, 0) | \ + MK_FLD(INSTR_RS2, sreg2)) + + #define MK_RESTORE_IMM(dreg, sreg, imm) \ + (MK_FLD(INSTR_OP, OP_2) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_OP3, OP3_RESTORE) | \ + MK_FLD(INSTR_RS1, sreg) | \ + MK_FLD(INSTR_I, 1) | \ + MK_FLD(INSTR_SIMM13, imm)) + + #define MK_JMPL_INDIRECT(dreg, sreg, imm) \ + (MK_FLD(INSTR_OP, OP_2) | \ + MK_FLD(INSTR_RD, dreg) | \ + MK_FLD(INSTR_OP3, OP3_JMPL) | \ + MK_FLD(INSTR_RS1, sreg) | \ + MK_FLD(INSTR_I, 1) | \ + MK_FLD(INSTR_SIMM13, imm)) + + } // end namespace llvm + + #endif // BININTERFACE_SPARCV9_H From gaeke at cs.uiuc.edu Sun Dec 5 20:15:15 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun, 5 Dec 2004 20:15:15 -0600 (CST) Subject: [llvm-commits] CVS: reopt/lib/Makefile Message-ID: <200412060215.UAA04368@kain.cs.uiuc.edu> Changes in directory reopt/lib: Makefile updated: 1.27 -> 1.28 --- Log message: Bye-bye, BinInterface... --- Diffs of the changes: (+1 -1) Index: reopt/lib/Makefile diff -u reopt/lib/Makefile:1.27 reopt/lib/Makefile:1.28 --- reopt/lib/Makefile:1.27 Fri Oct 15 14:31:19 2004 +++ reopt/lib/Makefile Sun Dec 5 20:15:05 2004 @@ -1,5 +1,5 @@ LEVEL = .. -DIRS := BinInterface Mapping TraceCache LightWtProfiling Inst TraceToFunction TraceJIT TraceIO +DIRS := Mapping TraceCache LightWtProfiling Inst TraceToFunction TraceJIT TraceIO include $(LEVEL)/Makefile.config From gaeke at cs.uiuc.edu Sun Dec 5 20:15:23 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun, 5 Dec 2004 20:15:23 -0600 (CST) Subject: [llvm-commits] CVS: reopt/lib/BinInterface/Makefile analyze.cpp construct.cpp emit.cpp select.cpp sparc9.cpp sparcbin.cpp sparcdis.cpp Message-ID: <200412060215.UAA04392@kain.cs.uiuc.edu> Changes in directory reopt/lib/BinInterface: Makefile (r1.3) removed analyze.cpp (r1.16) removed construct.cpp (r1.11) removed emit.cpp (r1.11) removed select.cpp (r1.12) removed sparc9.cpp (r1.9) removed sparcbin.cpp (r1.15) removed sparcdis.cpp (r1.18) removed --- Log message: Bye-bye, BinInterface... --- Diffs of the changes: (+0 -0) From gaeke at cs.uiuc.edu Sun Dec 5 20:16:04 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun, 5 Dec 2004 20:16:04 -0600 (CST) Subject: [llvm-commits] CVS: reopt/include/reopt/BinInterface/analyze.h bitmath.h regmask.h sparc9.h sparcbin.h sparcdis.h sparcpriv.h Message-ID: <200412060216.UAA04460@kain.cs.uiuc.edu> Changes in directory reopt/include/reopt/BinInterface: analyze.h (r1.3) removed bitmath.h (r1.14) removed regmask.h (r1.6) removed sparc9.h (r1.17) removed sparcbin.h (r1.8) removed sparcdis.h (r1.9) removed sparcpriv.h (r1.5) removed --- Log message: Bye-bye, BinInterface... --- Diffs of the changes: (+0 -0) From gaeke at cs.uiuc.edu Sun Dec 5 20:16:58 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun, 5 Dec 2004 20:16:58 -0600 (CST) Subject: [llvm-commits] CVS: reopt/include/reopt/Transforms/RuntimeLICM.h Message-ID: <200412060216.UAA04523@kain.cs.uiuc.edu> Changes in directory reopt/include/reopt/Transforms: RuntimeLICM.h (r1.1) removed --- Log message: This file is long-dead. --- Diffs of the changes: (+0 -0) From gaeke at cs.uiuc.edu Sun Dec 5 20:20:22 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun, 5 Dec 2004 20:20:22 -0600 Subject: [llvm-commits] CVS: reopt/lib/README Message-ID: <200412060220.UAA26808@zion.cs.uiuc.edu> Changes in directory reopt/lib: README updated: 1.8 -> 1.9 --- Log message: Updates based on changes in the last 6mos. --- Diffs of the changes: (+32 -36) Index: reopt/lib/README diff -u reopt/lib/README:1.8 reopt/lib/README:1.9 --- reopt/lib/README:1.8 Thu Jul 8 01:25:19 2004 +++ reopt/lib/README Sun Dec 5 20:20:12 2004 @@ -15,42 +15,31 @@ directories, ScratchMemory, LightWtProfiling, and Mapping subdirectories. -Inst - - Joel Stanley's project. - - The mkexcl tool that used to be here was moved to reopt/tools/mkexcl. - - Portability notes: - Inst/lib/ElfReader - Depends on libelf from Solaris. - Inst/lib/InstManip - Unportable assumptions about pointer sizes. - Inst/lib/SparcInstManip - Unportable assumptions about pointer sizes. - Inst/lib/Phases - Uses getexecname(), presumably from Solaris. - -Optimizations (formerly named SSAPRE) - - Contains a project by Tanya Brethour that does loop invariant - code motion for traces. - -Trigger - - Anand's OLD reoptimizer. - - Uses the Ball & Larus path profiling implementation (I think?). Mapping - - Functions to query the mapping between LLVM Instructions and MachineInstrs - which can be generated by opt and output as part of the SPARC - assembly by LLC. + - Functions to query the mapping between LLVM (Functions,BasicBlocks) and + (MachineFunctions,MachineBasicBlocks) which can be output as part of + the SPARC assembly by LLC. - Here is a list of the exported functions and the users of each function: + - getLLVMinfo.cpp: - unsigned getLLVMFunctionPositionInfo (Function *F) - Used by LightWtProfiling/UnpackTraceFunction only - - std::vector getLLVMInstrPositionInfo (Instruction *LI) - - Used by Trigger/TriggerAuxiliary and BinInterface/LLVMTrace - std::pair getBasicBlockInfo(BasicBlock *BB) - - Used by BinInterface/LLVMTrace, LightWtProfiling/SLI, - LightWtProfiling/UnpackTraceFunction, Trigger/Trigger, and - Trigger/TriggerAuxillary + - Used by LightWtProfiling/SLI and LightWtProfiling/UnpackTraceFunction - bool getReverseBBMap(uint64_t addr, Module *M, BasicBlock* &bb) - Used by LightWtProfiling/SLI, and LightWtProfiling/SecondTrigger - bool isInlinable (Function *F) - Used by LightWtProfiling/SLI, and LightWtProfiling/SecondTrigger - Function *getRevFunction(Module *M, uint64_t addr) - Used by LightWtProfiling/SLI, and LightWtProfiling/SecondTrigger + - ValueAllocState.cpp: + - AllocInfo GetTraceFnValueAllocState (TraceFunction *TF, Value *V, + bool preferLiveIn) + - AllocInfo GetMatrixFnValueAllocState (TraceFunction *TF, Value *V, + bool preferLiveIn) + - std::pair GetValueAllocState (TraceFunction *TF, + Value *V, bool preferLiveIn) + - These three functions are only used by UnpackTraceFunction. LightWtProfiling - Anand's redesigned tracing framework. Uses first-level and second-level @@ -68,9 +57,9 @@ - Uses SPARC inline assembly. TraceCache - - Manages traces for the reoptimizers. + - Manages traces for the reoptimizer. - Classes TraceCache, VirtualMem, MemoryManager. - - Used by: Trigger, LightWtProfiling, Inst/lib, BinInterface + - Used by: LightWtProfiling, Inst/lib ScratchMemory - Contains two functions containing nothing but empty text-segment space. @@ -78,15 +67,6 @@ the trace cache. - Used by: LightWtProfiling, TraceCache/MemoryManager.cpp -BinInterface - - Analyze SPARC instructions, construct pseudo-SSA form, and manipulate - traces. Also includes a SPARC disassembler. Primarily done by - Cameron Buschardt. - - Used by: Trigger, Optimizations/RuntimeLICM.cpp (only LLVMTrace), - Inst/lib/SparcInstManip.{cpp,h} - - Portability notes: Supports SPARC binaries only. Should compile & - link fine on X86. - TraceIO - Trace reading/writing library. - Requires bcreader, bcwriter libraries. @@ -102,5 +82,21 @@ - Pass written by Brian which turns Trace objects into Functions. - Test program in tools/ttftest. -Last updated $Date: 2004/07/08 06:25:19 $ +WholeReoptimizer + - Used to make an archive containing the entire Reoptimizer runtime library + (~14MB in a Release build; ~160MB in a Debug build). + +Inst + - Joel Stanley's project - this does not, strictly speaking, pertain to + the Reoptimizer. + - The pieces of BinInterface which are still used have been integrated + into this directory. + - The mkexcl tool that used to be here was moved to reopt/tools/mkexcl. + - Portability notes: + Inst/lib/ElfReader - Depends on libelf from Solaris. + Inst/lib/InstManip - Unportable assumptions about pointer sizes. + Inst/lib/SparcInstManip - Unportable assumptions about pointer sizes. + Inst/lib/Phases - Uses getexecname(), presumably from Solaris. + +Last updated $Date: 2004/12/06 02:20:12 $ From gaeke at cs.uiuc.edu Sun Dec 5 20:38:17 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun, 5 Dec 2004 20:38:17 -0600 Subject: [llvm-commits] CVS: reopt/lib/README Message-ID: <200412060238.UAA27285@zion.cs.uiuc.edu> Changes in directory reopt/lib: README updated: 1.9 -> 1.10 --- Log message: ValueAllocState moved to Mapping library --- Diffs of the changes: (+2 -2) Index: reopt/lib/README diff -u reopt/lib/README:1.9 reopt/lib/README:1.10 --- reopt/lib/README:1.9 Sun Dec 5 20:20:12 2004 +++ reopt/lib/README Sun Dec 5 20:38:07 2004 @@ -20,6 +20,7 @@ - Functions to query the mapping between LLVM (Functions,BasicBlocks) and (MachineFunctions,MachineBasicBlocks) which can be output as part of the SPARC assembly by LLC. + - Also contains the ValueAllocState register allocator mapping info extractor. - Here is a list of the exported functions and the users of each function: - getLLVMinfo.cpp: - unsigned getLLVMFunctionPositionInfo (Function *F) @@ -46,7 +47,6 @@ instrumentation. - This used to be in LightWtProfiling/Trigger. - Also contains the UnpackTraceFunction component of Brian's trace optimizer. - - Also contains the ValueAllocState register allocator mapping info extractor. - Portability notes: SecondTrigger - Depends on libcpc.h from Solaris - port to use PAPI. @@ -98,5 +98,5 @@ Inst/lib/SparcInstManip - Unportable assumptions about pointer sizes. Inst/lib/Phases - Uses getexecname(), presumably from Solaris. -Last updated $Date: 2004/12/06 02:20:12 $ +Last updated $Date: 2004/12/06 02:38:07 $ From reid at x10sys.com Sun Dec 5 23:35:11 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Dec 2004 23:35:11 -0600 Subject: [llvm-commits] CVS: llvm/Makefile Message-ID: <200412060535.XAA30240@zion.cs.uiuc.edu> Changes in directory llvm: Makefile updated: 1.46 -> 1.47 --- Log message: Remove the check target. Its now in Makefile.rules --- Diffs of the changes: (+0 -3) Index: llvm/Makefile diff -u llvm/Makefile:1.46 llvm/Makefile:1.47 --- llvm/Makefile:1.46 Sat Dec 4 16:33:58 2004 +++ llvm/Makefile Sun Dec 5 23:35:00 2004 @@ -41,7 +41,4 @@ $(TopDistDir)/include/llvm/Support/DataTypes.h \ $(TopDistDir)/include/llvm/Support/ThreadSupport.h -check : - $(MAKE) -C test check TESTSUITE=$(TESTSUITE) - tools-only: all From reid at x10sys.com Sun Dec 5 23:35:24 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Dec 2004 23:35:24 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200412060535.XAA30257@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.252 -> 1.253 --- Log message: Add the check target so all projects can have this functionality. --- Diffs of the changes: (+21 -4) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.252 llvm/Makefile.rules:1.253 --- llvm/Makefile.rules:1.252 Sun Dec 5 13:14:19 2004 +++ llvm/Makefile.rules Sun Dec 5 23:35:13 2004 @@ -20,10 +20,10 @@ # Define the various target sets #-------------------------------------------------------------------- RecursiveTargets := all clean clean-all install uninstall install-bytecode -LocalTargets := all-local clean-local clean-all-local \ +LocalTargets := all-local clean-local clean-all-local check-local \ install-local printvars uninstall-local \ install-bytecode-local -TopLevelTargets := dist dist-check dist-clean tags dist-gzip dist-bzip2 \ +TopLevelTargets := check dist dist-check dist-clean tags dist-gzip dist-bzip2 \ dist-zip UserTargets := $(RecursiveTargets) $(LocalTargets) $(TopLevelTargets) InternalTargets := preconditions distdir dist-hook @@ -1090,6 +1090,23 @@ endif ############################################################################### +# CHECK: Running the test suite +############################################################################### + +check:: + $(Verb) if test -d "$(BUILD_OBJ_ROOT)/test" ; then \ + if test -f "$(BUILD_OBJ_ROOT)/test/Makefile" ; then \ + $(EchoCmd) Running test suite ; \ + $(MAKE) -C $(BUILD_OBJ_ROOT)/test check-local \ + TESTSUITE=$(TESTSUITE) ; \ + else \ + $(EchoCmd) No Makefile in test directory ; \ + fi ; \ + else \ + $(EchoCmd) No test directory ; \ + fi + +############################################################################### # DISTRIBUTION: Handle construction of a distribution tarball ############################################################################### @@ -1212,7 +1229,7 @@ fi ; \ $(EchoCmd) Removing old $(DistDir) ; \ $(RM) -rf $(DistDir); \ - $(EchoCmd) Making 'all' to be sure. ; \ + $(EchoCmd) Making 'all' to verify build ; \ $(MAKE) all ; \ fi $(Echo) Building Distribution Directory $(DistDir) @@ -1296,7 +1313,7 @@ ifeq ($(LEVEL),.) #------------------------------------------------------------------------ -# Install support for project's include files: +# Install support for the project's include files: #------------------------------------------------------------------------ install-local:: $(Echo) Installing include files From reid at x10sys.com Sun Dec 5 23:35:36 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Dec 2004 23:35:36 -0600 Subject: [llvm-commits] CVS: llvm/docs/MakefileGuide.html Message-ID: <200412060535.XAA30300@zion.cs.uiuc.edu> Changes in directory llvm/docs: MakefileGuide.html updated: 1.18 -> 1.19 --- Log message: Upgrade documentation to reflect Makefile.rules changes. --- Diffs of the changes: (+167 -89) Index: llvm/docs/MakefileGuide.html diff -u llvm/docs/MakefileGuide.html:1.18 llvm/docs/MakefileGuide.html:1.19 --- llvm/docs/MakefileGuide.html:1.18 Sun Dec 5 13:14:31 2004 +++ llvm/docs/MakefileGuide.html Sun Dec 5 23:35:25 2004 @@ -28,7 +28,11 @@

  • Tutorial
      -
    1. Libraries
    2. +
    3. Libraries +
        +
      1. Bytecode Modules
      2. +
      +
    4. Tools
      1. JIT Tools
      2. @@ -41,6 +45,7 @@
      3. all
      4. all-local
      5. check
      6. +
      7. check-local
      8. clean
      9. clean-local
      10. dist
      11. @@ -195,7 +200,7 @@

        User Makefiles need not have comments in them unless the construction is - unusual or it doesn't strictly follow the rules and patterns of the LLVM + unusual or it does not strictly follow the rules and patterns of the LLVM makefile system. Makefile comments are invoked with the pound (#) character. The # character and any text following it, to the end of the line, are ignored by make.

        @@ -236,6 +241,27 @@
        + +
        +

        In some situations, it is desireable to build a single bytecode module from + a variety of sources, instead of an archive, shared library, or bytecode + library. Bytecode modules can be specified in addition to any of the other + types of libraries by defining the MODULE_NAME + variable. For example:

        +
        
        +      LIBRARYNAME = mylib
        +      BYTECODE_LIBRARY = 1
        +      MODULE_NAME = mymod
        +  
        +

        will build a module named mymod.bc from the sources in the + directory. This module will be an aggregation of all the bytecode modules + derived from the sources. The example will also build a bytecode archive + containing a bytecode module for each compiled source file. The difference is + subtle, but important depending on how the module or library is to be linked. +

        +
        + +

        For building executable programs (tools), you must provide the name of the @@ -312,11 +338,13 @@

        This section describes each of the targets that can be built using the LLVM Makefile system. Any target can be invoked from any directory but not all are - applicable to a given directory (e.g. "check", "dist", and "install" will + applicable to a given directory (e.g. "check", "dist" and "install" will always operate as if invoked from the top level directory).

  • - -

    -
    -
    Dejagnu Test Results -
    -
    -$DejagnuTestResults -

    A complete log of testing Feature and Regression is available for further analysis.

    -
    External TEST STAGE SKIPPED
    - + + + @@ -324,7 +352,12 @@ - + +
    Target NameImplied TargetsTarget Description
    Target NameImplied TargetsTarget Description
    all Compile the software recursively. Default target.
    Compile the software in the local directory only.
    checkChange to the llvm/test directory and run regression tests. + Change to the test directory in a project and run the + test suite there. +
    check-localRun a local test suite. Generally this is only defined in the + Makefile of the project's test directory.
    clean Remove built objects recursively. @@ -378,11 +411,40 @@ + +
    +

    This target can be invoked from anywhere within a project's directories + but always invokes the check-local target + in the project's test directory, if it exists and has a + Makefile. A warning is produced otherwise. If + TESTSUITE is defined on the make + command line, it will be passed down to the invocation of + make check-local in the test directory. The intended usage + for this is to assist in running specific suites of tests. If + TESTSUITE is not set, the implementation of check-local + should run all normal tests. It is up to the project to define what + different values for TESTSUTE will do. See the + TestingGuide for further details.

    +
    + + + +
    +

    This target should be implemented by the Makefile in the project's + test directory. It is invoked by the check target elsewhere. + Each project is free to define the actions of check-local as + appropriate for that project. The LLVM project itself uses dejagnu to run a + suite of feature and regresson tests. Other projects may choose to use + dejagnu or any other testing mechanism.

    +
    + +

    This target cleans the build directory, recursively removing all things - that the Makefile builds. Despite once or twice attempting to remove /*, the - cleaning rules have been made guarded so they shouldn't go awry.

    + that the Makefile builds. The cleaning rules have been made guarded so they + shouldn't go awry (via rm -f $(UNSET_VARIABLE)/* which will attempt + to erase the entire directory structure.

    @@ -453,8 +515,8 @@
    -

    This utility target just causes LLVM to print out some of its variables so - that you can double check how things are set.

    +

    This utility target just causes the LLVM makefiles to print out some of + the makefile variables so that you can double check how things are set.

    @@ -544,6 +606,14 @@ source files, all built sources, all Makefiles, and most documentation files will be automatically distributed. Use this variable to distribute any files that are not automatically distributed. +
    FAKE_SOURCES(optional) +
    +
    This variable is like SOURCES except that + the source files don't need to exist. The makefiles only use + FAKE_SOURCES to create the names of derived objects that should be + included in the directory's result. It is assumed that the project's + Makefile will define how to build the derived objects + necessary.
    KEEP_SYMBOLS
    If set to any value, specifies that when linking executables the makefiles should retain debug symbols in the executable. Normally, symbols @@ -619,7 +689,7 @@
  • In the Makefile (only after the inclusion of $(LEVEL)/Makefile.common).
  • -

    The overridable variables are given below:

    +

    The override variables are given below:

    AR (defaulted)
    Specifies the path to the ar tool.
    @@ -772,7 +842,8 @@
    The configuration specific directory into which executables are placed before they are installed.
    TopDistDir
    -
    The top most directory into which the distribution files are copied.
    +
    The top most directory into which the distribution files are copied. +
    Verb
    Use this as the first thing on your build script lines to enable or disable verbose mode. It expands to either an @ (quiet mode) or nothing @@ -786,83 +857,90 @@

    Variables listed below are used by the LLVM Makefile System and considered internal. You should not use these variables under any circumstances.

    -
    -
    Archive
    -
    AR.Flags
    -
    BaseNameSources
    -
    BCCompile.C
    -
    BCCompile.CXX
    -
    BCLinkLib
    -
    Burg
    -
    C.Flags
    -
    Compile.C
    -
    CompileCommonOpts
    -
    Compile.CXX
    -
    ConfigStatusScript
    -
    ConfigureScript
    -
    CPP.Flags
    -
    CPP.Flags
    -
    CXX.Flags
    -
    DependFiles
    -
    DestArchiveLib
    -
    DestBytecodeLib
    -
    DestRelinkedLib
    -
    DestSharedLib
    -
    DestTool
    -
    DistAlways
    -
    DistCheckDir
    -
    DistCheckTop
    -
    DistFiles
    -
    DistName
    -
    DistOther
    -
    DistSources
    -
    DistSubDirs
    -
    DistTarBZ2
    -
    DistTarGZip
    -
    DistZip
    -
    ExtraLibs
    -
    INCFiles
    -
    InternalTargets
    -
    LD.Flags
    -
    LexOutput
    -
    LibName.A
    -
    LibName.BC
    -
    LibName.LA
    -
    LibName.O
    -
    LibTool.Flags
    -
    Link
    -
    LLVMGCCLibDir
    -
    LLVMLibDir
    -
    LLVMLibsOptions
    -
    LLVMLibsPaths
    -
    LLVMToolDir
    -
    LLVMUsedLibs
    -
    LocalTargets
    -
    LTCompile.C
    -
    LTCompile.CXX
    -
    LTInstall
    -
    ObjectsBC
    -
    ObjectsLO
    -
    ObjectsO
    -
    ObjMakefiles
    -
    Parallel_Targets
    -
    PreConditions
    -
    ProjLibsOptions
    -
    ProjLibsPaths
    -
    ProjUsedLibs
    -
    Ranlib
    -
    RecursiveTargets
    -
    Relink
    -
    SrcMakefiles
    -
    Strip
    -
    StripWarnMsg
    -
    TableGen
    -
    TDFiles
    -
    ToolBuildPath
    -
    TopLevelTargets
    -
    UserTargets
    -
    YaccOutput
    -
    +

    + Archive + AR.Flags + BaseNameSources + BCCompile.C + BCCompile.CXX + BCLinkLib + Burg + C.Flags + Compile.C + CompileCommonOpts + Compile.CXX + ConfigStatusScript + ConfigureScript + CPP.Flags + CPP.Flags + CXX.Flags + DependFiles + DestArchiveLib + DestBytecodeLib + DestModule + DestRelinkedLib + DestSharedLib + DestTool + DistAlways + DistCheckDir + DistCheckTop + DistFiles + DistName + DistOther + DistSources + DistSubDirs + DistTarBZ2 + DistTarGZip + DistZip + ExtraLibs + FakeSources + INCFiles + InternalTargets + LD.Flags + LexFiles + LexOutput + LibName.A + LibName.BC + LibName.LA + LibName.O + LibTool.Flags + Link + LinkModule + LLVMGCCLibDir + LLVMGCCStdCXXLibDir + LLVMLibDir + LLVMLibsOptions + LLVMLibsPaths + LLVMToolDir + LLVMUsedLibs + LocalTargets + LTCompile.C + LTCompile.CXX + LTInstall + Module + ObjectsBC + ObjectsLO + ObjectsO + ObjMakefiles + ParallelTargets + PreConditions + ProjLibsOptions + ProjLibsPaths + ProjUsedLibs + Ranlib + RecursiveTargets + Relink + SrcMakefiles + Strip + StripWarnMsg + TableGen + TDFiles + ToolBuildPath + TopLevelTargets + UserTargets + YaccFiles + YaccOutput +

    @@ -875,7 +953,7 @@ Reid Spencer
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/12/05 19:14:31 $ + Last modified: $Date: 2004/12/06 05:35:25 $ From reid at x10sys.com Sun Dec 5 23:35:49 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Dec 2004 23:35:49 -0600 Subject: [llvm-commits] CVS: llvm/test/Makefile Message-ID: <200412060535.XAA30313@zion.cs.uiuc.edu> Changes in directory llvm/test: Makefile updated: 1.74 -> 1.75 --- Log message: Change check to check-local per Makefile.rules changes. --- Diffs of the changes: (+2 -2) Index: llvm/test/Makefile diff -u llvm/test/Makefile:1.74 llvm/test/Makefile:1.75 --- llvm/test/Makefile:1.74 Sat Dec 4 16:34:47 2004 +++ llvm/test/Makefile Sun Dec 5 23:35:38 2004 @@ -13,7 +13,7 @@ # # Make Dejagnu the default for testing # -all:: check +all:: check-local # Include other test rules include Makefile.tests @@ -120,7 +120,7 @@ RUNTESTFLAGS := --tool $(TESTSUITE) endif -check:: site.exp +check-local:: site.exp PATH=$(LLVMToolDir):$(LLVM_SRC_ROOT)/test/Scripts:$(PATH) \ $(RUNTEST) $(RUNTESTFLAGS) From reid at x10sys.com Sun Dec 5 23:59:27 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 5 Dec 2004 23:59:27 -0600 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Prolangs-C/bison/files.c Message-ID: <200412060559.XAA30571@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C/bison: files.c updated: 1.2 -> 1.3 --- Log message: Stop the program from SegFaulting if no input files are given. --- Diffs of the changes: (+7 -5) Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/bison/files.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/bison/files.c:1.2 llvm-test/MultiSource/Benchmarks/Prolangs-C/bison/files.c:1.3 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/bison/files.c:1.2 Tue Oct 5 13:37:45 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/bison/files.c Sun Dec 5 23:59:14 2004 @@ -131,13 +131,15 @@ /* Discard any directory names from the input file name to make the base of the output. */ + if (!name_base) + exit(1); cp = name_base; while (*cp) - { - if (*cp == '/') - name_base = cp+1; - cp++; - } + { + if (*cp == '/') + name_base = cp+1; + cp++; + } /* BASE_LENGTH gets length of NAME_BASE, sans ".y" suffix if any. */