From lattner at cs.uiuc.edu Mon Jun 30 00:11:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 30 00:11:01 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DataStructure.h Message-ID: <200306300510.AAA02673@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DataStructure.h updated: 1.65 -> 1.66 --- Log message: Constness changes --- Diffs of the changes: Index: llvm/include/llvm/Analysis/DataStructure.h diff -u llvm/include/llvm/Analysis/DataStructure.h:1.65 llvm/include/llvm/Analysis/DataStructure.h:1.66 --- llvm/include/llvm/Analysis/DataStructure.h:1.65 Sun Jun 29 22:13:28 2003 +++ llvm/include/llvm/Analysis/DataStructure.h Mon Jun 30 00:10:09 2003 @@ -33,7 +33,7 @@ // class LocalDataStructures : public Pass { // DSInfo, one graph for each function - hash_map DSInfo; + hash_map DSInfo; DSGraph *GlobalsGraph; public: ~LocalDataStructures() { releaseMemory(); } @@ -41,12 +41,13 @@ virtual bool run(Module &M); bool hasGraph(const Function &F) const { - return DSInfo.find(&F) != DSInfo.end(); + return DSInfo.find(const_cast(&F)) != DSInfo.end(); } // getDSGraph - Return the data structure graph for the specified function. DSGraph &getDSGraph(const Function &F) const { - hash_map::const_iterator I = DSInfo.find(&F); + hash_map::const_iterator I = + DSInfo.find(const_cast(&F)); assert(I != DSInfo.end() && "Function not in module!"); return *I->second; } @@ -72,7 +73,7 @@ // class BUDataStructures : public Pass { // DSInfo, one graph for each function - hash_map DSInfo; + hash_map DSInfo; DSGraph *GlobalsGraph; public: ~BUDataStructures() { releaseMemory(); } @@ -80,12 +81,13 @@ virtual bool run(Module &M); bool hasGraph(const Function &F) const { - return DSInfo.find(&F) != DSInfo.end(); + return DSInfo.find(const_cast(&F)) != DSInfo.end(); } // getDSGraph - Return the data structure graph for the specified function. DSGraph &getDSGraph(const Function &F) const { - hash_map::const_iterator I = DSInfo.find(&F); + hash_map::const_iterator I = + DSInfo.find(const_cast(&F)); assert(I != DSInfo.end() && "Function not in module!"); return *I->second; } @@ -103,7 +105,7 @@ AU.addRequired(); } private: - DSGraph &calculateGraph(Function &F); + void calculateGraph(DSGraph &G); // inlineNonSCCGraphs - This method is almost like the other two calculate // graph methods. This one is used to inline function graphs (from functions @@ -132,7 +134,7 @@ // class TDDataStructures : public Pass { // DSInfo, one graph for each function - hash_map DSInfo; + hash_map DSInfo; hash_set GraphDone; DSGraph *GlobalsGraph; public: @@ -141,12 +143,13 @@ virtual bool run(Module &M); bool hasGraph(const Function &F) const { - return DSInfo.find(&F) != DSInfo.end(); + return DSInfo.find(const_cast(&F)) != DSInfo.end(); } // getDSGraph - Return the data structure graph for the specified function. DSGraph &getDSGraph(const Function &F) const { - hash_map::const_iterator I = DSInfo.find(&F); + hash_map::const_iterator I = + DSInfo.find(const_cast(&F)); assert(I != DSInfo.end() && "Function not in module!"); return *I->second; } From lattner at cs.uiuc.edu Mon Jun 30 00:11:04 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 30 00:11:04 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Message-ID: <200306300510.AAA02659@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: BottomUpClosure.cpp updated: 1.55 -> 1.56 --- Log message: Reimplement the BU closure to collapse all SCC graphs into a single graph. Look at all of the code that gets deleted! --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.55 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.56 --- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.55 Sun Jun 29 22:15:25 2003 +++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Mon Jun 30 00:09:58 2003 @@ -11,7 +11,6 @@ #include "llvm/Analysis/DSGraph.h" #include "llvm/Module.h" #include "Support/Statistic.h" -#include "Support/hash_map" namespace { Statistic<> MaxSCC("budatastructure", "Maximum SCC Size in Call Graph"); @@ -205,7 +204,12 @@ DEBUG(std::cerr << "Visiting single node SCC #: " << MyID << " fn: " << F->getName() << "\n"); Stack.pop_back(); - DSGraph &G = calculateGraph(*F); + DSGraph &G = getDSGraph(*F); + DEBUG(std::cerr << " [BU] Calculating graph for: " << F->getName()<< "\n"); + calculateGraph(G); + DEBUG(std::cerr << " [BU] Done inlining: " << F->getName() << " [" + << G.getGraphSize() << "+" << G.getAuxFunctionCalls().size() + << "]\n"); if (MaxSCC < 1) MaxSCC = 1; @@ -225,61 +229,49 @@ Function *NF; std::vector::iterator FirstInSCC = Stack.end(); + DSGraph *SCCGraph = 0; do { NF = *--FirstInSCC; ValMap[NF] = ~0U; SCCFunctions.insert(NF); + + // Figure out which graph is the largest one, in order to speed things up + // a bit in situations where functions in the SCC have widely different + // graph sizes. + DSGraph &NFGraph = getDSGraph(*NF); + if (!SCCGraph || SCCGraph->getGraphSize() < NFGraph.getGraphSize()) + SCCGraph = &NFGraph; } while (NF != F); - std::cerr << "Identified SCC #: " << MyID << " of size: " - << (Stack.end()-FirstInSCC) << "\n"; + std::cerr << "Calculating graph for SCC #: " << MyID << " of size: " + << SCCFunctions.size() << "\n"; // Compute the Max SCC Size... - if (MaxSCC < unsigned(Stack.end()-FirstInSCC)) - MaxSCC = Stack.end()-FirstInSCC; - - std::vector::iterator I = Stack.end(); - do { - --I; -#ifndef NDEBUG - /*DEBUG*/(std::cerr << " Fn #" << (Stack.end()-I) << "/" - << (Stack.end()-FirstInSCC) << " in SCC: " - << (*I)->getName()); - DSGraph &G = getDSGraph(**I); - std::cerr << " [" << G.getGraphSize() << "+" - << G.getAuxFunctionCalls().size() << "] "; -#endif - - // Eliminate all call sites in the SCC that are not to functions that are - // in the SCC. - inlineNonSCCGraphs(**I, SCCFunctions); + if (MaxSCC < SCCFunctions.size()) + MaxSCC = SCCFunctions.size(); -#ifndef NDEBUG - std::cerr << "after Non-SCC's [" << G.getGraphSize() << "+" - << G.getAuxFunctionCalls().size() << "]\n"; -#endif - } while (I != FirstInSCC); - - I = Stack.end(); - do { - --I; -#ifndef NDEBUG - /*DEBUG*/(std::cerr << " Fn #" << (Stack.end()-I) << "/" - << (Stack.end()-FirstInSCC) << " in SCC: " - << (*I)->getName()); + // First thing first, collapse all of the DSGraphs into a single graph for + // the entire SCC. We computed the largest graph, so clone all of the other + // (smaller) graphs into it. Discard all of the old graphs. + // + for (hash_set::iterator I = SCCFunctions.begin(), + E = SCCFunctions.end(); I != E; ++I) { DSGraph &G = getDSGraph(**I); - std::cerr << " [" << G.getGraphSize() << "+" - << G.getAuxFunctionCalls().size() << "] "; -#endif - // Inline all graphs into the SCC nodes... - calculateSCCGraph(**I, SCCFunctions); - -#ifndef NDEBUG - std::cerr << "after [" << G.getGraphSize() << "+" - << G.getAuxFunctionCalls().size() << "]\n"; -#endif - } while (I != FirstInSCC); + if (&G != SCCGraph) { + DSGraph::NodeMapTy NodeMap; + SCCGraph->cloneInto(G, SCCGraph->getScalarMap(), + SCCGraph->getReturnNodes(), NodeMap, 0); + // Update the DSInfo map and delete the old graph... + DSInfo[*I] = SCCGraph; + delete &G; + } + } + // Now that we have one big happy family, resolve all of the call sites in + // the graph... + calculateGraph(*SCCGraph); + DEBUG(std::cerr << " [BU] Done inlining SCC [" << SCCGraph->getGraphSize() + << "+" << SCCGraph->getAuxFunctionCalls().size() << "]\n"); std::cerr << "DONE with SCC #: " << MyID << "\n"; @@ -298,9 +290,12 @@ // our memory... here... // void BUDataStructures::releaseMemory() { - for (hash_map::iterator I = DSInfo.begin(), - E = DSInfo.end(); I != E; ++I) - delete I->second; + for (hash_map::iterator I = DSInfo.begin(), + E = DSInfo.end(); I != E; ++I) { + I->second->getReturnNodes().erase(I->first); + if (I->second->getReturnNodes().empty()) + delete I->second; + } // Empty map so next time memory is released, data structures are not // re-deleted. @@ -309,16 +304,15 @@ GlobalsGraph = 0; } -DSGraph &BUDataStructures::calculateGraph(Function &F) { - DSGraph &Graph = getDSGraph(F); - DEBUG(std::cerr << " [BU] Calculating graph for: " << F.getName() << "\n"); - +void BUDataStructures::calculateGraph(DSGraph &Graph) { // Move our call site list into TempFCs so that inline call sites go into the // new call site list and doesn't invalidate our iterators! std::vector TempFCs; std::vector &AuxCallsList = Graph.getAuxFunctionCalls(); TempFCs.swap(AuxCallsList); + DSGraph::ReturnNodesTy &ReturnNodes = Graph.getReturnNodes(); + // Loop over all of the resolvable call sites unsigned LastCallSiteIdx = ~0U; for (CallSiteIterator I = CallSiteIterator::begin(TempFCs), @@ -336,13 +330,13 @@ if (Callee->isExternal()) { // Ignore this case, simple varargs functions we cannot stub out! - } else if (Callee == &F) { + } else if (ReturnNodes.find(Callee) != ReturnNodes.end()) { // Self recursion... simply link up the formal arguments with the // actual arguments... - DEBUG(std::cerr << " Self Inlining: " << F.getName() << "\n"); + DEBUG(std::cerr << " Self Inlining: " << Callee->getName() << "\n"); // Handle self recursion by resolving the arguments and return value - Graph.mergeInGraph(CS, F, Graph, 0); + Graph.mergeInGraph(CS, *Callee, Graph, 0); } else { // Get the data structure graph for the called function. @@ -351,13 +345,9 @@ DEBUG(std::cerr << " Inlining graph for " << Callee->getName() << "[" << GI.getGraphSize() << "+" - << GI.getAuxFunctionCalls().size() << "] into: " << F.getName() - << "[" << Graph.getGraphSize() << "+" + << GI.getAuxFunctionCalls().size() << "] into [" + << Graph.getGraphSize() << "+" << Graph.getAuxFunctionCalls().size() << "]\n"); -#if 0 - Graph.writeGraphToFile(std::cerr, "bu_" + F.getName() + "_before_" + - Callee->getName()); -#endif // Handle self recursion by resolving the arguments and return value Graph.mergeInGraph(CS, *Callee, GI, @@ -384,186 +374,6 @@ // FIXME: materialize nodes from the globals graph as neccesary... Graph.removeDeadNodes(DSGraph::KeepUnreachableGlobals); - DEBUG(std::cerr << " [BU] Done inlining: " << F.getName() << " [" - << Graph.getGraphSize() << "+" << Graph.getAuxFunctionCalls().size() - << "]\n"); - //Graph.writeGraphToFile(std::cerr, "bu_" + F.getName()); - - return Graph; } - -// inlineNonSCCGraphs - This method is almost like the other two calculate graph -// methods. This one is used to inline function graphs (from functions outside -// of the SCC) into functions in the SCC. It is not supposed to touch functions -// IN the SCC at all. -// -DSGraph &BUDataStructures::inlineNonSCCGraphs(Function &F, - hash_set &SCCFunctions){ - DSGraph &Graph = getDSGraph(F); - DEBUG(std::cerr << " [BU] Inlining Non-SCC graphs for: " - << F.getName() << "\n"); - - // Move our call site list into TempFCs so that inline call sites go into the - // new call site list and doesn't invalidate our iterators! - std::vector TempFCs; - std::vector &AuxCallsList = Graph.getAuxFunctionCalls(); - TempFCs.swap(AuxCallsList); - - // Loop over all of the resolvable call sites - unsigned LastCallSiteIdx = ~0U; - for (CallSiteIterator I = CallSiteIterator::begin(TempFCs), - E = CallSiteIterator::end(TempFCs); I != E; ++I) { - // If we skipped over any call sites, they must be unresolvable, copy them - // to the real call site list. - LastCallSiteIdx++; - for (; LastCallSiteIdx < I.getCallSiteIdx(); ++LastCallSiteIdx) - AuxCallsList.push_back(TempFCs[LastCallSiteIdx]); - LastCallSiteIdx = I.getCallSiteIdx(); - - // Resolve the current call... - Function &Callee = **I; - DSCallSite &CS = I.getCallSite(); - - if (Callee.isExternal()) { - // Ignore this case, simple varargs functions we cannot stub out! - } else if (SCCFunctions.count(&Callee)) { - // Calling a function in the SCC, ignore it for now! - DEBUG(std::cerr << " SCC CallSite for: " << Callee.getName() << "\n"); - AuxCallsList.push_back(CS); - } else { - // Get the data structure graph for the called function. - // - DSGraph &GI = getDSGraph(Callee); // Graph to inline - - DEBUG(std::cerr << " Inlining graph for " << Callee.getName() - << "[" << GI.getGraphSize() << "+" - << GI.getAuxFunctionCalls().size() << "] into: " << F.getName() - << "[" << Graph.getGraphSize() << "+" - << Graph.getAuxFunctionCalls().size() << "]\n"); - - // Handle self recursion by resolving the arguments and return value - Graph.mergeInGraph(CS, Callee, GI, - DSGraph::KeepModRefBits | DSGraph::StripAllocaBit | - DSGraph::DontCloneCallNodes); - } - } - - // Make sure to catch any leftover unresolvable calls... - for (++LastCallSiteIdx; LastCallSiteIdx < TempFCs.size(); ++LastCallSiteIdx) - AuxCallsList.push_back(TempFCs[LastCallSiteIdx]); - - TempFCs.clear(); - - // Recompute the Incomplete markers. If there are any function calls left - // now that are complete, we must loop! - Graph.maskIncompleteMarkers(); - Graph.markIncompleteNodes(DSGraph::MarkFormalArgs); - Graph.removeDeadNodes(DSGraph::KeepUnreachableGlobals); - - DEBUG(std::cerr << " [BU] Done Non-SCC inlining: " << F.getName() << " [" - << Graph.getGraphSize() << "+" << Graph.getAuxFunctionCalls().size() - << "]\n"); - //Graph.writeGraphToFile(std::cerr, "nscc_" + F.getName()); - return Graph; -} - - -DSGraph &BUDataStructures::calculateSCCGraph(Function &F, - hash_set &SCCFunctions){ - DSGraph &Graph = getDSGraph(F); - DEBUG(std::cerr << " [BU] Calculating SCC graph for: " << F.getName()<<"\n"); - - std::vector UnresolvableCalls; - hash_map SCCCallSiteMap; - std::vector &AuxCallsList = Graph.getAuxFunctionCalls(); - - while (1) { // Loop until we run out of resolvable call sites! - // Move our call site list into TempFCs so that inline call sites go into - // the new call site list and doesn't invalidate our iterators! - std::vector TempFCs; - TempFCs.swap(AuxCallsList); - - // Loop over all of the resolvable call sites - unsigned LastCallSiteIdx = ~0U; - CallSiteIterator I = CallSiteIterator::begin(TempFCs), - E = CallSiteIterator::end(TempFCs); - if (I == E) { - TempFCs.swap(AuxCallsList); - break; // Done when no resolvable call sites exist - } - - for (; I != E; ++I) { - // If we skipped over any call sites, they must be unresolvable, copy them - // to the unresolvable site list. - LastCallSiteIdx++; - for (; LastCallSiteIdx < I.getCallSiteIdx(); ++LastCallSiteIdx) - UnresolvableCalls.push_back(TempFCs[LastCallSiteIdx]); - LastCallSiteIdx = I.getCallSiteIdx(); - - // Resolve the current call... - Function *Callee = *I; - DSCallSite &CS = I.getCallSite(); - - if (Callee->isExternal()) { - // Ignore this case, simple varargs functions we cannot stub out! - } else if (Callee == &F) { - // Self recursion... simply link up the formal arguments with the - // actual arguments... - DEBUG(std::cerr << " Self Inlining: " << F.getName() << "\n"); - - // Handle self recursion by resolving the arguments and return value - Graph.mergeInGraph(CS, *Callee, Graph, 0); - } else if (SCCCallSiteMap.count(Callee)) { - // We have already seen a call site in the SCC for this function, just - // merge the two call sites together and we are done. - SCCCallSiteMap.find(Callee)->second.mergeWith(CS); - } else { - // Get the data structure graph for the called function. - // - DSGraph &GI = getDSGraph(*Callee); // Graph to inline - DEBUG(std::cerr << " Inlining graph for " << Callee->getName() - << "[" << GI.getGraphSize() << "+" - << GI.getAuxFunctionCalls().size() << "] into: " << F.getName() - << "[" << Graph.getGraphSize() << "+" - << Graph.getAuxFunctionCalls().size() << "]\n"); - - // Handle self recursion by resolving the arguments and return value - Graph.mergeInGraph(CS, *Callee, GI, - DSGraph::KeepModRefBits | DSGraph::StripAllocaBit | - DSGraph::DontCloneCallNodes); - - if (SCCFunctions.count(Callee)) - SCCCallSiteMap.insert(std::make_pair(Callee, CS)); - } - } - - // Make sure to catch any leftover unresolvable calls... - for (++LastCallSiteIdx; LastCallSiteIdx < TempFCs.size(); ++LastCallSiteIdx) - UnresolvableCalls.push_back(TempFCs[LastCallSiteIdx]); - } - - // Reset the SCCCallSiteMap... - SCCCallSiteMap.clear(); - - AuxCallsList.insert(AuxCallsList.end(), UnresolvableCalls.begin(), - UnresolvableCalls.end()); - UnresolvableCalls.clear(); - - - // Recompute the Incomplete markers. If there are any function calls left - // now that are complete, we must loop! - Graph.maskIncompleteMarkers(); - Graph.markIncompleteNodes(DSGraph::MarkFormalArgs); - - // FIXME: materialize nodes from the globals graph as neccesary... - - Graph.removeDeadNodes(DSGraph::KeepUnreachableGlobals); - - DEBUG(std::cerr << " [BU] Done inlining: " << F.getName() << " [" - << Graph.getGraphSize() << "+" << Graph.getAuxFunctionCalls().size() - << "]\n"); - //Graph.writeGraphToFile(std::cerr, "bu_" + F.getName()); - return Graph; -} From lattner at cs.uiuc.edu Mon Jun 30 00:11:08 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 30 00:11:08 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200306300510.AAA02666@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.106 -> 1.107 --- Log message: Handle the case where OldNodeMap == &ScalarMap correctly --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.106 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.107 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.106 Sun Jun 29 22:36:09 2003 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Mon Jun 30 00:09:29 2003 @@ -784,18 +784,14 @@ // Copy the scalar map... merging all of the global nodes... for (ScalarMapTy::const_iterator I = G.ScalarMap.begin(), E = G.ScalarMap.end(); I != E; ++I) { - DSNodeHandle &H = OldValMap[I->first]; DSNodeHandle &MappedNode = OldNodeMap[I->second.getNode()]; - H.setOffset(I->second.getOffset()+MappedNode.getOffset()); - H.setNode(MappedNode.getNode()); + DSNodeHandle &H = OldValMap[I->first]; + H.mergeWith(DSNodeHandle(MappedNode.getNode(), + I->second.getOffset()+MappedNode.getOffset())); - if (isa(I->first)) { // Is this a global? - ScalarMapTy::iterator GVI = ScalarMap.find(I->first); - if (GVI != ScalarMap.end()) // Is the global value in this fn already? - GVI->second.mergeWith(H); - else - ScalarMap[I->first] = H; // Add global pointer to this graph - } + // If this is a global, add the global to this fn or merge if already exists + if (isa(I->first) && &OldNodeMap != &ScalarMap) + ScalarMap[I->first].mergeWith(H); } if (!(CloneFlags & DontCloneCallNodes)) { @@ -832,8 +828,7 @@ /// void DSGraph::mergeInGraph(DSCallSite &CS, Function &F, const DSGraph &Graph, unsigned CloneFlags) { - ScalarMapTy OldValMap; - ScalarMapTy *ScalarMap = &OldValMap; + ScalarMapTy OldValMap, *ScalarMap; DSNodeHandle RetVal; // If this is not a recursive call, clone the graph into this graph... From lattner at cs.uiuc.edu Mon Jun 30 00:19:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 30 00:19:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200306300518.AAA03044@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.107 -> 1.108 --- Log message: Fix bug in last checkin --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.107 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.108 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.107 Mon Jun 30 00:09:29 2003 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Mon Jun 30 00:18:26 2003 @@ -790,7 +790,7 @@ I->second.getOffset()+MappedNode.getOffset())); // If this is a global, add the global to this fn or merge if already exists - if (isa(I->first) && &OldNodeMap != &ScalarMap) + if (isa(I->first)) ScalarMap[I->first].mergeWith(H); } From lattner at cs.uiuc.edu Mon Jun 30 00:28:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 30 00:28:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200306300527.AAA04300@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.108 -> 1.109 --- Log message: Be more const-correct --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.108 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.109 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.108 Mon Jun 30 00:18:26 2003 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Mon Jun 30 00:27:18 2003 @@ -826,8 +826,8 @@ /// merges the nodes specified in the call site with the formal arguments in the /// graph. /// -void DSGraph::mergeInGraph(DSCallSite &CS, Function &F, const DSGraph &Graph, - unsigned CloneFlags) { +void DSGraph::mergeInGraph(const DSCallSite &CS, Function &F, + const DSGraph &Graph, unsigned CloneFlags) { ScalarMapTy OldValMap, *ScalarMap; DSNodeHandle RetVal; From lattner at cs.uiuc.edu Mon Jun 30 00:28:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 30 00:28:02 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DSGraph.h Message-ID: <200306300527.AAA04288@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DSGraph.h updated: 1.52 -> 1.53 --- Log message: Be more const correct --- Diffs of the changes: Index: llvm/include/llvm/Analysis/DSGraph.h diff -u llvm/include/llvm/Analysis/DSGraph.h:1.52 llvm/include/llvm/Analysis/DSGraph.h:1.53 --- llvm/include/llvm/Analysis/DSGraph.h:1.52 Sun Jun 29 22:14:23 2003 +++ llvm/include/llvm/Analysis/DSGraph.h Mon Jun 30 00:27:05 2003 @@ -211,7 +211,7 @@ /// the graph. If the StripAlloca's argument is 'StripAllocaBit' then Alloca /// markers are removed from nodes. /// - void mergeInGraph(DSCallSite &CS, Function &F, const DSGraph &Graph, + void mergeInGraph(const DSCallSite &CS, Function &F, const DSGraph &Graph, unsigned CloneFlags); // Methods for checking to make sure graphs are well formed... From lattner at cs.uiuc.edu Mon Jun 30 00:29:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 30 00:29:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h BottomUpClosure.cpp Message-ID: <200306300528.AAA04314@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DSCallSiteIterator.h added (r1.1) BottomUpClosure.cpp updated: 1.56 -> 1.57 --- Log message: Split CallSiteIterator out into DSCallSiteIterator.h, and generalize it a bit --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h diff -c /dev/null llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h:1.1 *** /dev/null Mon Jun 30 00:28:03 2003 --- llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h Mon Jun 30 00:27:53 2003 *************** *** 0 **** --- 1,118 ---- + //===- DSCallSiteIterator.h - Iterator for DSGraph call sites ---*- C++ -*-===// + // + // This file implements an iterator for complete call sites in DSGraphs. This + // code can either iterator over the normal call list or the aux calls list, and + // is used by the TD and BU passes. + // + //===----------------------------------------------------------------------===// + + #ifndef DSCALLSITEITERATOR_H + #define DSCALLSITEITERATOR_H + + #include "llvm/Analysis/DSGraph.h" + #include "llvm/Function.h" + + struct DSCallSiteIterator { + // FCs are the edges out of the current node are the call site targets... + const std::vector *FCs; + unsigned CallSite; + unsigned CallSiteEntry; + + DSCallSiteIterator(const std::vector &CS) : FCs(&CS) { + CallSite = 0; CallSiteEntry = 0; + advanceToValidCallee(); + } + + // End iterator ctor... + DSCallSiteIterator(const std::vector &CS, bool) : FCs(&CS) { + CallSite = FCs->size(); CallSiteEntry = 0; + } + + void advanceToValidCallee() { + while (CallSite < FCs->size()) { + if ((*FCs)[CallSite].isDirectCall()) { + if (CallSiteEntry == 0 && // direct call only has one target... + (!(*FCs)[CallSite].getCalleeFunc()->isExternal() || + isVAHackFn((*FCs)[CallSite].getCalleeFunc()))) // If not external + return; + } else { + DSNode *CalleeNode = (*FCs)[CallSite].getCalleeNode(); + if (CallSiteEntry || isCompleteNode(CalleeNode)) { + const std::vector &Callees = CalleeNode->getGlobals(); + + if (CallSiteEntry < Callees.size()) + return; + } + } + CallSiteEntry = 0; + ++CallSite; + } + } + + static bool isVAHackFn(const Function *F) { + return F->getName() == "printf" || F->getName() == "sscanf" || + F->getName() == "fprintf" || F->getName() == "open" || + F->getName() == "sprintf" || F->getName() == "fputs" || + F->getName() == "fscanf"; + } + + // isCompleteNode - Return true if we know all of the targets of this node, + // and if the call sites are not external. + // + static inline bool isCompleteNode(DSNode *N) { + if (N->isIncomplete()) return false; + const std::vector &Callees = N->getGlobals(); + for (unsigned i = 0, e = Callees.size(); i != e; ++i) + if (Callees[i]->isExternal()) + if (!isVAHackFn(cast(Callees[i]))) + return false; // External function found... + return true; // otherwise ok + } + + public: + static DSCallSiteIterator begin_aux(DSGraph &G) { + return G.getAuxFunctionCalls(); + } + static DSCallSiteIterator end_aux(DSGraph &G) { + return DSCallSiteIterator(G.getAuxFunctionCalls(), true); + } + static DSCallSiteIterator begin_std(DSGraph &G) { + return G.getFunctionCalls(); + } + static DSCallSiteIterator end_std(DSGraph &G) { + return DSCallSiteIterator(G.getFunctionCalls(), true); + } + static DSCallSiteIterator begin(std::vector &CSs) { return CSs; } + static DSCallSiteIterator end(std::vector &CSs) { + return DSCallSiteIterator(CSs, true); + } + bool operator==(const DSCallSiteIterator &CSI) const { + return CallSite == CSI.CallSite && CallSiteEntry == CSI.CallSiteEntry; + } + bool operator!=(const DSCallSiteIterator &CSI) const { + return !operator==(CSI); + } + + unsigned getCallSiteIdx() const { return CallSite; } + const DSCallSite &getCallSite() const { return (*FCs)[CallSite]; } + + Function *operator*() const { + if ((*FCs)[CallSite].isDirectCall()) { + return (*FCs)[CallSite].getCalleeFunc(); + } else { + DSNode *Node = (*FCs)[CallSite].getCalleeNode(); + return cast(Node->getGlobals()[CallSiteEntry]); + } + } + + DSCallSiteIterator& operator++() { // Preincrement + ++CallSiteEntry; + advanceToValidCallee(); + return *this; + } + DSCallSiteIterator operator++(int) { // Postincrement + DSCallSiteIterator tmp = *this; ++*this; return tmp; + } + }; + + #endif Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.56 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.57 --- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.56 Mon Jun 30 00:09:58 2003 +++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Mon Jun 30 00:27:53 2003 @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "DSCallSiteIterator.h" #include "llvm/Analysis/DataStructure.h" -#include "llvm/Analysis/DSGraph.h" #include "llvm/Module.h" #include "Support/Statistic.h" @@ -21,100 +21,6 @@ using namespace DS; -static bool isVAHackFn(const Function *F) { - return F->getName() == "printf" || F->getName() == "sscanf" || - F->getName() == "fprintf" || F->getName() == "open" || - F->getName() == "sprintf" || F->getName() == "fputs" || - F->getName() == "fscanf"; -} - -// isCompleteNode - Return true if we know all of the targets of this node, and -// if the call sites are not external. -// -static inline bool isCompleteNode(DSNode *N) { - if (N->isIncomplete()) return false; - const std::vector &Callees = N->getGlobals(); - for (unsigned i = 0, e = Callees.size(); i != e; ++i) - if (Callees[i]->isExternal()) - if (!isVAHackFn(cast(Callees[i]))) - return false; // External function found... - return true; // otherwise ok -} - -struct CallSiteIterator { - // FCs are the edges out of the current node are the call site targets... - std::vector *FCs; - unsigned CallSite; - unsigned CallSiteEntry; - - CallSiteIterator(std::vector &CS) : FCs(&CS) { - CallSite = 0; CallSiteEntry = 0; - advanceToValidCallee(); - } - - // End iterator ctor... - CallSiteIterator(std::vector &CS, bool) : FCs(&CS) { - CallSite = FCs->size(); CallSiteEntry = 0; - } - - void advanceToValidCallee() { - while (CallSite < FCs->size()) { - if ((*FCs)[CallSite].isDirectCall()) { - if (CallSiteEntry == 0 && // direct call only has one target... - (!(*FCs)[CallSite].getCalleeFunc()->isExternal() || - isVAHackFn((*FCs)[CallSite].getCalleeFunc()))) // If not external - return; - } else { - DSNode *CalleeNode = (*FCs)[CallSite].getCalleeNode(); - if (CallSiteEntry || isCompleteNode(CalleeNode)) { - const std::vector &Callees = CalleeNode->getGlobals(); - - if (CallSiteEntry < Callees.size()) - return; - } - } - CallSiteEntry = 0; - ++CallSite; - } - } -public: - static CallSiteIterator begin(DSGraph &G) { return G.getAuxFunctionCalls(); } - static CallSiteIterator end(DSGraph &G) { - return CallSiteIterator(G.getAuxFunctionCalls(), true); - } - static CallSiteIterator begin(std::vector &CSs) { return CSs; } - static CallSiteIterator end(std::vector &CSs) { - return CallSiteIterator(CSs, true); - } - bool operator==(const CallSiteIterator &CSI) const { - return CallSite == CSI.CallSite && CallSiteEntry == CSI.CallSiteEntry; - } - bool operator!=(const CallSiteIterator &CSI) const { return !operator==(CSI);} - - unsigned getCallSiteIdx() const { return CallSite; } - DSCallSite &getCallSite() const { return (*FCs)[CallSite]; } - - Function *operator*() const { - if ((*FCs)[CallSite].isDirectCall()) { - return (*FCs)[CallSite].getCalleeFunc(); - } else { - DSNode *Node = (*FCs)[CallSite].getCalleeNode(); - return cast(Node->getGlobals()[CallSiteEntry]); - } - } - - CallSiteIterator& operator++() { // Preincrement - ++CallSiteEntry; - advanceToValidCallee(); - return *this; - } - CallSiteIterator operator++(int) { // Postincrement - CallSiteIterator tmp = *this; ++*this; return tmp; - } -}; - - - // run - Calculate the bottom up data structure graphs for each function in the // program. // @@ -182,8 +88,8 @@ DSGraph &Graph = getOrCreateGraph(F); // The edges out of the current node are the call site targets... - for (CallSiteIterator I = CallSiteIterator::begin(Graph), - E = CallSiteIterator::end(Graph); I != E; ++I) { + for (DSCallSiteIterator I = DSCallSiteIterator::begin_aux(Graph), + E = DSCallSiteIterator::end_aux(Graph); I != E; ++I) { Function *Callee = *I; unsigned M; // Have we visited the destination function yet? @@ -214,7 +120,7 @@ if (MaxSCC < 1) MaxSCC = 1; // Should we revisit the graph? - if (CallSiteIterator::begin(G) != CallSiteIterator::end(G)) { + if (DSCallSiteIterator::begin_aux(G) != DSCallSiteIterator::end_aux(G)) { ValMap.erase(F); return calculateGraphs(F, Stack, NextID, ValMap); } else { @@ -315,8 +221,8 @@ // Loop over all of the resolvable call sites unsigned LastCallSiteIdx = ~0U; - for (CallSiteIterator I = CallSiteIterator::begin(TempFCs), - E = CallSiteIterator::end(TempFCs); I != E; ++I) { + for (DSCallSiteIterator I = DSCallSiteIterator::begin(TempFCs), + E = DSCallSiteIterator::end(TempFCs); I != E; ++I) { // If we skipped over any call sites, they must be unresolvable, copy them // to the real call site list. LastCallSiteIdx++; @@ -326,7 +232,7 @@ // Resolve the current call... Function *Callee = *I; - DSCallSite &CS = I.getCallSite(); + const DSCallSite &CS = I.getCallSite(); if (Callee->isExternal()) { // Ignore this case, simple varargs functions we cannot stub out! From lattner at cs.uiuc.edu Mon Jun 30 00:58:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 30 00:58:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Printer.cpp Message-ID: <200306300557.AAA08982@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: Printer.cpp updated: 1.54 -> 1.55 --- Log message: Use the getFunctionNames method --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/Printer.cpp diff -u llvm/lib/Analysis/DataStructure/Printer.cpp:1.54 llvm/lib/Analysis/DataStructure/Printer.cpp:1.55 --- llvm/lib/Analysis/DataStructure/Printer.cpp:1.54 Sun Jun 29 22:15:25 2003 +++ llvm/lib/Analysis/DataStructure/Printer.cpp Mon Jun 30 00:57:39 2003 @@ -68,14 +68,9 @@ struct DOTGraphTraits : public DefaultDOTGraphTraits { static std::string getGraphName(const DSGraph *G) { switch (G->getReturnNodes().size()) { - case 0: return "Global graph"; - case 1: return "Function " + G->getReturnNodes().begin()->first->getName(); - default: - std::string Return = "Functions: "; - for (DSGraph::ReturnNodesTy::const_iterator I=G->getReturnNodes().begin(); - I != G->getReturnNodes().end(); ++I) - Return += I->first->getName() + " "; - return Return; + case 0: return G->getFunctionNames(); + case 1: return "Function " + G->getFunctionNames(); + default: return "Functions: " + G->getFunctionNames(); } } From lattner at cs.uiuc.edu Mon Jun 30 00:58:04 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 30 00:58:04 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200306300557.AAA08973@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.109 -> 1.110 --- Log message: Add new method --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.109 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.110 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.109 Mon Jun 30 00:27:18 2003 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Mon Jun 30 00:57:30 2003 @@ -703,6 +703,23 @@ // DSGraph Implementation //===----------------------------------------------------------------------===// +/// getFunctionNames - Return a space separated list of the name of the +/// functions in this graph (if any) +std::string DSGraph::getFunctionNames() const { + switch (getReturnNodes().size()) { + case 0: return "Globals graph"; + case 1: return getReturnNodes().begin()->first->getName(); + default: + std::string Return; + for (DSGraph::ReturnNodesTy::const_iterator I = getReturnNodes().begin(); + I != getReturnNodes().end(); ++I) + Return += I->first->getName() + " "; + Return.erase(Return.end()-1, Return.end()); // Remove last space character + return Return; + } +} + + DSGraph::DSGraph(const DSGraph &G) : GlobalsGraph(0) { PrintAuxCalls = false; NodeMapTy NodeMap; From lattner at cs.uiuc.edu Mon Jun 30 00:58:06 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 30 00:58:06 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DSGraph.h Message-ID: <200306300557.AAA08959@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DSGraph.h updated: 1.53 -> 1.54 --- Log message: Add new method --- Diffs of the changes: Index: llvm/include/llvm/Analysis/DSGraph.h diff -u llvm/include/llvm/Analysis/DSGraph.h:1.53 llvm/include/llvm/Analysis/DSGraph.h:1.54 --- llvm/include/llvm/Analysis/DSGraph.h:1.53 Mon Jun 30 00:27:05 2003 +++ llvm/include/llvm/Analysis/DSGraph.h Mon Jun 30 00:57:18 2003 @@ -80,6 +80,10 @@ const std::vector &getNodes() const { return Nodes; } std::vector &getNodes() { return Nodes; } + /// getFunctionNames - Return a space separated list of the name of the + /// functions in this graph (if any) + std::string getFunctionNames() const; + /// addNode - Add a new node to the graph. /// void addNode(DSNode *N) { Nodes.push_back(N); } From criswell at choi.cs.uiuc.edu Mon Jun 30 10:17:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 10:17:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/Makefile Message-ID: <200306301516.h5UFGMX10789@choi.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: Makefile updated: 1.23.2.1 -> 1.23.2.2 --- Log message: Modified the Makefiles so that dependency rules use .lo files (libtool) as opposed to .o files to determine if targets are out of date. Note that the generated header file dependencies aren't handled properly yet. --- Diffs of the changes: Index: llvm/lib/Target/Sparc/Makefile diff -u llvm/lib/Target/Sparc/Makefile:1.23.2.1 llvm/lib/Target/Sparc/Makefile:1.23.2.2 --- llvm/lib/Target/Sparc/Makefile:1.23.2.1 Mon Jun 23 14:07:07 2003 +++ llvm/lib/Target/Sparc/Makefile Mon Jun 30 10:16:11 2003 @@ -14,15 +14,24 @@ Debug/Sparc.burm.cpp: Debug/Sparc.burm Debug/.dir $(RunBurg) $< -o $@ -$(BUILD_OBJ_DIR)/Debug/Sparc.burm.o: Debug/Sparc.burm.cpp +$(BUILD_OBJ_DIR)/Debug/Sparc.burm.lo: Debug/Sparc.burm.cpp $(CompileG) $< -o $@ -$(BUILD_OBJ_DIR)/Release/Sparc.burm.o: Debug/Sparc.burm.cpp +$(BUILD_OBJ_DIR)/Release/Sparc.burm.lo: Debug/Sparc.burm.cpp $(CompileO) $< -o $@ -$(BUILD_OBJ_DIR)/Profile/Sparc.burm.o: Debug/Sparc.burm.cpp +$(BUILD_OBJ_DIR)/Profile/Sparc.burm.lo: Debug/Sparc.burm.cpp $(CompileP) $< -o $@ +#$(BUILD_OBJ_DIR)/Debug/Sparc.burm.o: Debug/Sparc.burm.cpp +# $(CompileG) $< -o $@ + +#$(BUILD_OBJ_DIR)/Release/Sparc.burm.o: Debug/Sparc.burm.cpp +# $(CompileO) $< -o $@ + +#$(BUILD_OBJ_DIR)/Profile/Sparc.burm.o: Debug/Sparc.burm.cpp +# $(CompileP) $< -o $@ + Debug/Sparc.burg.in1 : Sparc.burg.in Debug/.dir $(CXX) -E -I$(LEVEL)/include $(DEBUG_FLAG) -x c++ $< | ${SED} '/^# /d' | ${SED} 's/Ydefine/#define/' > $@ @@ -40,3 +49,4 @@ clean:: ${RM} -f SparcV9CodeEmitter.inc + From criswell at choi.cs.uiuc.edu Mon Jun 30 10:17:03 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 10:17:03 2003 Subject: [llvm-commits] CVS: llvm/Makefile.common Message-ID: <200306301516.h5UFGJm10779@choi.cs.uiuc.edu> Changes in directory llvm: Makefile.common updated: 1.88.2.7 -> 1.88.2.8 --- Log message: Modified the Makefiles so that dependency rules use .lo files (libtool) as opposed to .o files to determine if targets are out of date. Note that the generated header file dependencies aren't handled properly yet. --- Diffs of the changes: Index: llvm/Makefile.common diff -u llvm/Makefile.common:1.88.2.7 llvm/Makefile.common:1.88.2.8 --- llvm/Makefile.common:1.88.2.7 Fri Jun 27 13:35:24 2003 +++ llvm/Makefile.common Mon Jun 30 10:16:08 2003 @@ -390,10 +390,10 @@ Source := $(ExtraSource) $(wildcard *.cpp *.c *.y *.l) endif -Objs := $(sort $(patsubst Debug/%.o, %.o, $(addsuffix .o,$(notdir $(basename $(Source)))))) -ObjectsO := $(addprefix $(BUILD_OBJ_DIR)/Release/,$(Objs)) -ObjectsP := $(addprefix $(BUILD_OBJ_DIR)/Profile/,$(Objs)) -ObjectsG := $(addprefix $(BUILD_OBJ_DIR)/Debug/,$(Objs)) +#Objs := $(sort $(patsubst Debug/%.o, %.o, $(addsuffix .o,$(notdir $(basename $(Source)))))) +#ObjectsO := $(addprefix $(BUILD_OBJ_DIR)/Release/,$(Objs)) +#ObjectsP := $(addprefix $(BUILD_OBJ_DIR)/Profile/,$(Objs)) +#ObjectsG := $(addprefix $(BUILD_OBJ_DIR)/Debug/,$(Objs)) LObjs := $(sort $(patsubst Debug/%.lo, %.lo, $(addsuffix .lo,$(notdir $(basename $(Source)))))) LObjectsO := $(addprefix $(BUILD_OBJ_DIR)/Release/,$(LObjs)) @@ -522,7 +522,7 @@ @$(RM) -f $@ $(VERB) $(Link) -03 $(PROFILE) -o $@ $(LObjectsP) $(LibSubDirs) -static -$(LIBNAME_AG): $(ObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir +$(LIBNAME_AG): $(LObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir @echo ======= Linking $(LIBRARYNAME) archive debug library ======= @$(RM) -f $@ $(VERB) $(Link) -g $(STRIP) -o $@ $(LObjectsG) $(LibSubDirs) -static @@ -530,17 +530,17 @@ # # Rules for building .o libraries. # -$(LIBNAME_OBJO): $(ObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir +$(LIBNAME_OBJO): $(LObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir @echo "Linking $@" - $(VERB) $(Relink) -o $@ $(ObjectsO) $(LibSubDirs) + $(VERB) $(Relink) -o $@ $(LObjectsO) $(LibSubDirs) -$(LIBNAME_OBJP): $(ObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir +$(LIBNAME_OBJP): $(LObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir @echo "Linking $@" - $(VERB) $(Relink) -o $@ $(ObjectsP) $(LibSubDirs) + $(VERB) $(Relink) -o $@ $(LObjectsP) $(LibSubDirs) -$(LIBNAME_OBJG): $(ObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir +$(LIBNAME_OBJG): $(LObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir @echo "Linking $@" - $(VERB) $(Relink) -o $@ $(ObjectsG) $(LibSubDirs) + $(VERB) $(Relink) -o $@ $(LObjectsG) $(LibSubDirs) endif @@ -622,17 +622,17 @@ clean:: $(VERB) $(RM) -f $(TOOLEXENAMES) -$(TOOLEXENAME_G): $(ObjectsG) $(USED_LIB_PATHS_G) $(DESTTOOLDEBUG)/.dir +$(TOOLEXENAME_G): $(LObjectsG) $(USED_LIB_PATHS_G) $(DESTTOOLDEBUG)/.dir @echo ======= Linking $(TOOLNAME) debug executable $(STRIP_WARN_MSG)======= - $(VERB) $(LinkG) -o $@ $(ObjectsG) $(LIB_OPTS_G) $(LINK_OPTS) $(LIBS) + $(VERB) $(LinkG) -o $@ $(LObjectsG) $(LIB_OPTS_G) $(LINK_OPTS) $(LIBS) -$(TOOLEXENAME_O): $(ObjectsO) $(USED_LIB_PATHS_O) $(DESTTOOLRELEASE)/.dir +$(TOOLEXENAME_O): $(LObjectsO) $(USED_LIB_PATHS_O) $(DESTTOOLRELEASE)/.dir @echo ======= Linking $(TOOLNAME) release executable ======= - $(VERB) $(LinkO) -o $@ $(ObjectsO) $(LIB_OPTS_O) $(LINK_OPTS) $(LIBS) + $(VERB) $(LinkO) -o $@ $(LObjectsO) $(LIB_OPTS_O) $(LINK_OPTS) $(LIBS) -$(TOOLEXENAME_P): $(ObjectsP) $(USED_LIB_PATHS_P) $(DESTTOOLPROFILE)/.dir +$(TOOLEXENAME_P): $(LObjectsP) $(USED_LIB_PATHS_P) $(DESTTOOLPROFILE)/.dir @echo ======= Linking $(TOOLNAME) profile executable ======= - $(VERB) $(LinkP) -o $@ $(ObjectsP) $(LIB_OPTS_P) $(LINK_OPTS) $(LIBS) + $(VERB) $(LinkP) -o $@ $(LObjectsP) $(LIB_OPTS_P) $(LINK_OPTS) $(LIBS) endif @@ -643,27 +643,27 @@ .PRECIOUS: $(BUILD_OBJ_DIR)/Debug/.dir $(BUILD_OBJ_DIR)/Release/.dir # Create .o files in the ObjectFiles directory from the .cpp and .c files... -$(BUILD_OBJ_DIR)/Release/%.o: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Release/.dir - @echo "Compiling $<" - $(VERB) $(CompileO) $< -o $@ - -$(BUILD_OBJ_DIR)/Release/%.o: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Release/.dir - $(VERB) $(CompileCO) $< -o $@ - -$(BUILD_OBJ_DIR)/Profile/%.o: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Profile/.dir - @echo "Compiling $<" - $(VERB) $(CompileP) $< -o $@ +#$(BUILD_OBJ_DIR)/Release/%.o: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Release/.dir + #@echo "Compiling $<" + #$(VERB) $(CompileO) $< -o $@ + +#$(BUILD_OBJ_DIR)/Release/%.o: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Release/.dir + #$(VERB) $(CompileCO) $< -o $@ + +#$(BUILD_OBJ_DIR)/Profile/%.o: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Profile/.dir + #@echo "Compiling $<" + #$(VERB) $(CompileP) $< -o $@ + +#$(BUILD_OBJ_DIR)/Profile/%.o: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Profile/.dir + #@echo "Compiling $<" + #$(VERB) $(CompileCP) $< -o $@ + +#$(BUILD_OBJ_DIR)/Debug/%.o: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Debug/.dir + #@echo "Compiling $<" + #$(VERB) $(CompileG) $< -o $@ -$(BUILD_OBJ_DIR)/Profile/%.o: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Profile/.dir - @echo "Compiling $<" - $(VERB) $(CompileCP) $< -o $@ - -$(BUILD_OBJ_DIR)/Debug/%.o: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Debug/.dir - @echo "Compiling $<" - $(VERB) $(CompileG) $< -o $@ - -$(BUILD_OBJ_DIR)/Debug/%.o: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Debug/.dir - $(VERB) $(CompileCG) $< -o $@ +#$(BUILD_OBJ_DIR)/Debug/%.o: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Debug/.dir + #$(VERB) $(CompileCG) $< -o $@ # Create .lo files in the ObjectFiles directory from the .cpp and .c files... $(BUILD_OBlJ_DIR)/Release/%.lo: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Release/.dir @@ -722,7 +722,7 @@ # To create the directories... %/.dir: - $(VERB) ${MKDIR} $* + $(VERB) ${MKDIR} $* > /dev/null @$(DATE) > $@ # To create postscript files from dot files... From lattner at cs.uiuc.edu Mon Jun 30 10:18:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 30 10:18:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Analysis/DSGraph/2003-06-30-TopDownResolve.ll Message-ID: <200306301517.KAA12718@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Analysis/DSGraph: 2003-06-30-TopDownResolve.ll added (r1.1) --- Log message: New testcase --- Diffs of the changes: Index: llvm/test/Regression/Analysis/DSGraph/2003-06-30-TopDownResolve.ll diff -c /dev/null llvm/test/Regression/Analysis/DSGraph/2003-06-30-TopDownResolve.ll:1.1 *** /dev/null Mon Jun 30 10:17:49 2003 --- llvm/test/Regression/Analysis/DSGraph/2003-06-30-TopDownResolve.ll Mon Jun 30 10:17:39 2003 *************** *** 0 **** --- 1,20 ---- + ; RUN: analyze %s -datastructure-gc -dsgc-dspass=td -dsgc-abort-if-incomplete=X + + %G = internal global int 5 + + implementation + + internal void %leaf(int *%X) { + store int 0, int* %X + ret void + } + + internal void %intermediate(void(int*)* %Fn, int* %Ptr) { + call void %Fn(int* %Ptr) + ret void + } + + int %main() { + call void %intermediate(void(int*)* %leaf, int* %G) + ret int 0 + } From lattner at cs.uiuc.edu Mon Jun 30 10:18:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 30 10:18:03 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Analysis/DSGraph/Makefile Message-ID: <200306301517.KAA12711@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Analysis/DSGraph: Makefile updated: 1.3 -> 1.4 --- Log message: Add dependency on analyze --- Diffs of the changes: Index: llvm/test/Regression/Analysis/DSGraph/Makefile diff -u llvm/test/Regression/Analysis/DSGraph/Makefile:1.3 llvm/test/Regression/Analysis/DSGraph/Makefile:1.4 --- llvm/test/Regression/Analysis/DSGraph/Makefile:1.3 Sun Jun 29 18:20:51 2003 +++ llvm/test/Regression/Analysis/DSGraph/Makefile Mon Jun 30 10:17:36 2003 @@ -7,7 +7,7 @@ all:: $(addprefix Output/, $(TESTS:%.ll=%.ll.out)) $(addprefix Output/, $(TESTS:%.ll=%.ll.out)): -Output/%.ll.out: %.ll Output/.dir $(LOPT) +Output/%.ll.out: %.ll Output/.dir $(LOPT) $(LANALYZE) -$(TESTRUNR) $< clean:: From brukman at cs.uiuc.edu Mon Jun 30 10:34:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Jun 30 10:34:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/CFrontend/2003-06-29-MultipleFunctionDefinition.c Message-ID: <200306301533.KAA12807@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CFrontend: 2003-06-29-MultipleFunctionDefinition.c updated: 1.1 -> 1.2 --- Log message: Spell `apparently' with an `e'. --- Diffs of the changes: Index: llvm/test/Regression/CFrontend/2003-06-29-MultipleFunctionDefinition.c diff -u llvm/test/Regression/CFrontend/2003-06-29-MultipleFunctionDefinition.c:1.1 llvm/test/Regression/CFrontend/2003-06-29-MultipleFunctionDefinition.c:1.2 --- llvm/test/Regression/CFrontend/2003-06-29-MultipleFunctionDefinition.c:1.1 Sun Jun 29 17:20:53 2003 +++ llvm/test/Regression/CFrontend/2003-06-29-MultipleFunctionDefinition.c Mon Jun 30 10:33:47 2003 @@ -1,4 +1,4 @@ -/* This is apparantly legal C. */ +/* This is apparently legal C. */ extern __inline__ void test() { } void test() { From gaeke at cs.uiuc.edu Mon Jun 30 13:07:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Mon Jun 30 13:07:01 2003 Subject: [llvm-commits] CVS: llvm/tools/lli/JIT/Emitter.cpp Message-ID: <200306301806.NAA05722@neo.cs.uiuc.edu> Changes in directory llvm/tools/lli/JIT: Emitter.cpp updated: 1.15 -> 1.16 --- Log message: Get rid of the duplicate '0x' in debug mode. --- Diffs of the changes: Index: llvm/tools/lli/JIT/Emitter.cpp diff -u llvm/tools/lli/JIT/Emitter.cpp:1.15 llvm/tools/lli/JIT/Emitter.cpp:1.16 --- llvm/tools/lli/JIT/Emitter.cpp:1.15 Tue Jun 17 18:14:06 2003 +++ llvm/tools/lli/JIT/Emitter.cpp Mon Jun 30 13:06:20 2003 @@ -107,7 +107,7 @@ ConstantPoolAddresses.clear(); NumBytes += CurByte-CurBlock; - DEBUG(std::cerr << "Finished CodeGen of [0x" << (void*)CurBlock + DEBUG(std::cerr << "Finished CodeGen of [" << (void*)CurBlock << "] Function: " << F.getFunction()->getName() << ": " << CurByte-CurBlock << " bytes of text\n"); } From criswell at choi.cs.uiuc.edu Mon Jun 30 13:43:02 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 13:43:02 2003 Subject: [llvm-commits] CVS: llvm/projects/ Message-ID: <200306301842.h5UIgJk15146@choi.cs.uiuc.edu> Changes in directory llvm/projects: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/projects added to the repository --> Using per-directory sticky tag `autoconf' --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 30 13:43:04 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 13:43:04 2003 Subject: [llvm-commits] CVS: llvm/Makefile.common Message-ID: <200306301842.h5UIg7715135@choi.cs.uiuc.edu> Changes in directory llvm: Makefile.common updated: 1.88.2.8 -> 1.88.2.9 --- Log message: Updated the generation of header file dependencies so that the libtool object files (*.lo) depends upon the header files. Modified the generation of C source code dependencies so that it generates dependencies inside the correct directory. --- Diffs of the changes: Index: llvm/Makefile.common diff -u llvm/Makefile.common:1.88.2.8 llvm/Makefile.common:1.88.2.9 --- llvm/Makefile.common:1.88.2.8 Mon Jun 30 10:16:08 2003 +++ llvm/Makefile.common Mon Jun 30 13:41:56 2003 @@ -768,12 +768,12 @@ # Create dependencies for the *.cpp files... #$(SourceDepend): \x $(BUILD_OBJ_DIR)/Depend/%.d: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Depend/.dir - $(VERB) $(Depend) $< | $(SED) 's|$*\.o *|$(BUILD_OBJ_DIR)/Release/& $(BUILD_OBJ_DIR)/Profile/& $(BUILD_OBJ_DIR)/Debug/& $(BUILD_OBJ_DIR)/Depend/$(@F)|g' > $@ + $(VERB) $(Depend) $< | $(SED) 's|\.o|\.lo|' | $(SED) 's|$*\.lo *|$(BUILD_OBJ_DIR)/Release/& $(BUILD_OBJ_DIR)/Profile/& $(BUILD_OBJ_DIR)/Debug/& $(BUILD_OBJ_DIR)/Depend/$(@F)|g' > $@ # Create dependencies for the *.c files... #$(SourceDepend): \x $(BUILD_OBJ_DIR)/Depend/%.d: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Depend/.dir - $(VERB) $(DependC) $< | $(SED) 's|$*\.o *|Release/& Profile/& Debug/& Depend/$(@F)|g' > $@ + $(VERB) $(DependC) -o $@ $< | $(SED) 's|\.o|\.lo|' | $(SED) 's|$*\.lo *|$(BUILD_OBJ_DIR)/Release/& $(BUILD_OBJ_DIR)/Profile/& $(BUILD_OBJ_DIR)/Debug/& $(BUILD_OBJ_DIR)/Depend/$(@F)|g' > $@ # # Include dependencies generated from C/C++ source files, but not if we From criswell at choi.cs.uiuc.edu Mon Jun 30 13:44:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 13:44:01 2003 Subject: [llvm-commits] CVS: llvm/projects/sample/tools/ Message-ID: <200306301843.h5UIhoR15203@choi.cs.uiuc.edu> Changes in directory llvm/projects/sample/tools: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/projects/sample/tools added to the repository --> Using per-directory sticky tag `autoconf' --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 30 13:44:03 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 13:44:03 2003 Subject: [llvm-commits] CVS: llvm/projects/sample/include/ Message-ID: <200306301843.h5UIhln15196@choi.cs.uiuc.edu> Changes in directory llvm/projects/sample/include: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/projects/sample/include added to the repository --> Using per-directory sticky tag `autoconf' --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 30 13:44:04 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 13:44:04 2003 Subject: [llvm-commits] CVS: llvm/projects/sample/lib/ Message-ID: <200306301843.h5UIhgt15189@choi.cs.uiuc.edu> Changes in directory llvm/projects/sample/lib: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/projects/sample/lib added to the repository --> Using per-directory sticky tag `autoconf' --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 30 13:44:06 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 13:44:06 2003 Subject: [llvm-commits] CVS: llvm/projects/sample/ Message-ID: <200306301843.h5UIhLD15173@choi.cs.uiuc.edu> Changes in directory llvm/projects/sample: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/projects/sample added to the repository --> Using per-directory sticky tag `autoconf' --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 30 13:45:02 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 13:45:02 2003 Subject: [llvm-commits] CVS: llvm/projects/sample/tools/sample/ Message-ID: <200306301844.h5UIibp15238@choi.cs.uiuc.edu> Changes in directory llvm/projects/sample/tools/sample: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/projects/sample/tools/sample added to the repository --> Using per-directory sticky tag `autoconf' --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 30 13:45:04 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 13:45:04 2003 Subject: [llvm-commits] CVS: llvm/projects/sample/lib/sample/ Message-ID: <200306301844.h5UIi7215216@choi.cs.uiuc.edu> Changes in directory llvm/projects/sample/lib/sample: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/projects/sample/lib/sample added to the repository --> Using per-directory sticky tag `autoconf' --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 30 13:46:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 13:46:01 2003 Subject: [llvm-commits] CVS: llvm/projects/Makefile Message-ID: <200306301845.h5UIjfA15335@choi.cs.uiuc.edu> Changes in directory llvm/projects: Makefile added (r1.1.2.1) --- Log message: Adding in a framework for internal projects. --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 30 13:46:03 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 13:46:03 2003 Subject: [llvm-commits] CVS: llvm/projects/sample/tools/sample/Makefile main.c Message-ID: <200306301845.h5UIjLN15321@choi.cs.uiuc.edu> Changes in directory llvm/projects/sample/tools/sample: Makefile added (r1.1.2.1) main.c added (r1.1.2.1) --- Log message: Adding the sample project into the projects tree. --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 30 13:46:04 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 13:46:04 2003 Subject: [llvm-commits] CVS: llvm/projects/sample/tools/Makefile Message-ID: <200306301845.h5UIjKD15311@choi.cs.uiuc.edu> Changes in directory llvm/projects/sample/tools: Makefile added (r1.1.2.1) --- Log message: Adding the sample project into the projects tree. --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 30 13:46:06 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 13:46:06 2003 Subject: [llvm-commits] CVS: llvm/projects/sample/lib/sample/Makefile sample.c Message-ID: <200306301845.h5UIjJQ15303@choi.cs.uiuc.edu> Changes in directory llvm/projects/sample/lib/sample: Makefile added (r1.1.2.1) sample.c added (r1.1.2.1) --- Log message: Adding the sample project into the projects tree. --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 30 13:46:08 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 13:46:08 2003 Subject: [llvm-commits] CVS: llvm/projects/sample/lib/Makefile Message-ID: <200306301845.h5UIjIT15293@choi.cs.uiuc.edu> Changes in directory llvm/projects/sample/lib: Makefile added (r1.1.2.1) --- Log message: Adding the sample project into the projects tree. --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 30 13:46:09 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 13:46:09 2003 Subject: [llvm-commits] CVS: llvm/projects/sample/include/sample.h Message-ID: <200306301845.h5UIjHF15285@choi.cs.uiuc.edu> Changes in directory llvm/projects/sample/include: sample.h added (r1.1.2.1) --- Log message: Adding the sample project into the projects tree. --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 30 13:46:11 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 13:46:11 2003 Subject: [llvm-commits] CVS: llvm/projects/sample/Makefile Makefile.common Makefile.config Message-ID: <200306301845.h5UIjFl15275@choi.cs.uiuc.edu> Changes in directory llvm/projects/sample: Makefile added (r1.1.2.1) Makefile.common added (r1.1.2.1) Makefile.config added (r1.1.2.1) --- Log message: Adding the sample project into the projects tree. --- Diffs of the changes: From brukman at cs.uiuc.edu Mon Jun 30 14:06:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Jun 30 14:06:01 2003 Subject: [llvm-commits] CVS: CVSROOT/commit-diffs.pl Message-ID: <200306301904.OAA31768@zion.cs.uiuc.edu> Changes in directory CVSROOT: commit-diffs.pl updated: 1.36 -> 1.37 --- Log message: Get the contents of a new file even if committed on a branch. How: stop hard-coding revision number 1.1 into the `cvs diff' command line, use the version number gotten from the cvs commit command. --- Diffs of the changes: Index: CVSROOT/commit-diffs.pl diff -u CVSROOT/commit-diffs.pl:1.36 CVSROOT/commit-diffs.pl:1.37 --- CVSROOT/commit-diffs.pl:1.36 Sun Jun 22 15:28:10 2003 +++ CVSROOT/commit-diffs.pl Mon Jun 30 14:04:22 2003 @@ -109,7 +109,7 @@ $subject .= "$m->{'filename'} "; if ($m->{'type'} eq 'add') { $msg .= "$m->{'filename'} added (r$m->{'newrev'})\n"; - $diffs .= `cvs -Qf rdiff -r0 -r1.1 $changedir/$m->{'filename'} 2> /dev/null` . "\n\n"; + $diffs .= `cvs -Qf rdiff -r0 -r$newrev $changedir/$m->{'filename'} 2> /dev/null` . "\n\n"; } elsif ($m->{'type'} eq 'rm') { $msg .= "$m->{'filename'} (r$m->{'oldrev'}) removed\n"; } else { From criswell at choi.cs.uiuc.edu Mon Jun 30 14:12:06 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 14:12:06 2003 Subject: [llvm-commits] CVS: llvm/Makefile.common Message-ID: <200306301911.h5UJBAc19442@choi.cs.uiuc.edu> Changes in directory llvm: Makefile.common updated: 1.88.2.9 -> 1.88.2.10 --- Log message: Corrected the spelling of BUILD_OBJ_DIR (removed an extraneous character) so that release builds would work correctly. --- Diffs of the changes: Index: llvm/Makefile.common diff -u llvm/Makefile.common:1.88.2.9 llvm/Makefile.common:1.88.2.10 --- llvm/Makefile.common:1.88.2.9 Mon Jun 30 13:41:56 2003 +++ llvm/Makefile.common Mon Jun 30 14:10:59 2003 @@ -666,11 +666,12 @@ #$(VERB) $(CompileCG) $< -o $@ # Create .lo files in the ObjectFiles directory from the .cpp and .c files... -$(BUILD_OBlJ_DIR)/Release/%.lo: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Release/.dir +$(BUILD_OBJ_DIR)/Release/%.lo: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Release/.dir @echo "Compiling $<" $(VERB) $(CompileO) $< -o $@ $(BUILD_OBJ_DIR)/Release/%.lo: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Release/.dir + @echo "Compiling $<" $(VERB) $(CompileCO) $< -o $@ $(BUILD_OBJ_DIR)/Profile/%.lo: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Profile/.dir @@ -686,6 +687,7 @@ $(VERB) $(CompileG) $< -o $@ $(BUILD_OBJ_DIR)/Debug/%.lo: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Debug/.dir + @echo "Compiling $<" $(VERB) $(CompileCG) $< -o $@ # From criswell at choi.cs.uiuc.edu Mon Jun 30 14:35:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 14:35:01 2003 Subject: [llvm-commits] CVS: llvm/projects/Makefile Message-ID: <200306301934.h5UJYWh20347@choi.cs.uiuc.edu> Changes in directory llvm/projects: Makefile updated: 1.1.2.1 -> 1.1.2.2 --- Log message: Removed CVS from the list of directories that can be built. --- Diffs of the changes: Index: llvm/projects/Makefile diff -u llvm/projects/Makefile:1.1.2.1 llvm/projects/Makefile:1.1.2.2 --- llvm/projects/Makefile:1.1.2.1 Mon Jun 30 13:45:31 2003 +++ llvm/projects/Makefile Mon Jun 30 14:34:22 2003 @@ -1,5 +1,6 @@ LEVEL=.. -OPTIONAL_DIRS:=$(shell ls) +DIRS= +OPTIONAL_DIRS:=$(shell ls | grep -v CVS) include $(LEVEL)/Makefile.common From lattner at cs.uiuc.edu Mon Jun 30 14:37:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 30 14:37:03 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/InstSelectSimple.cpp Message-ID: <200306301936.OAA15255@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: InstSelectSimple.cpp updated: 1.111 -> 1.112 --- Log message: Setjmp should always return zero if we don't implement longjmp. This avoids leaving trash in the register, fixing anagram --- Diffs of the changes: Index: llvm/lib/Target/X86/InstSelectSimple.cpp diff -u llvm/lib/Target/X86/InstSelectSimple.cpp:1.111 llvm/lib/Target/X86/InstSelectSimple.cpp:1.112 --- llvm/lib/Target/X86/InstSelectSimple.cpp:1.111 Sun Jun 29 11:42:32 2003 +++ llvm/lib/Target/X86/InstSelectSimple.cpp Mon Jun 30 14:35:54 2003 @@ -981,6 +981,8 @@ case LLVMIntrinsic::longjmp: BuildMI(X86::CALLpcrel32, 1).addExternalSymbol("abort", true); case LLVMIntrinsic::setjmp: + // Setjmp always returns zero... + BuildMI(BB, X86::MOVir32, 1, getReg(CI)).addZImm(0); return; default: assert(0 && "Unknown intrinsic for X86!"); } From criswell at choi.cs.uiuc.edu Mon Jun 30 14:37:05 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 14:37:05 2003 Subject: [llvm-commits] CVS: llvm/configure.ac configure Message-ID: <200306301936.h5UJa0L20931@choi.cs.uiuc.edu> Changes in directory llvm: configure.ac updated: 1.1.2.3 -> 1.1.2.4 configure updated: 1.1.2.3 -> 1.1.2.4 --- Log message: Removed the --enable-profiling option. --- Diffs of the changes: Index: llvm/configure.ac diff -u llvm/configure.ac:1.1.2.3 llvm/configure.ac:1.1.2.4 --- llvm/configure.ac:1.1.2.3 Tue Jun 24 17:10:24 2003 +++ llvm/configure.ac Mon Jun 30 14:35:50 2003 @@ -212,7 +212,6 @@ dnl ************************************************************************** AC_ARG_ENABLE(purify,AC_HELP_STRING([--enable-purify],[Compile with purify (default is NO)]), AC_SUBST(ENABLE_PURIFY,[[ENABLE_PURIFY=1]]), AC_SUBST(ENABLE_PURIFY,[[]])) AC_ARG_ENABLE(verbose,AC_HELP_STRING([--enable-verbose],[Enable verbose compilation messages (default is NO)]), AC_SUBST(ENABLE_VERBOSE,[[VERBOSE=1]]), AC_SUBST(ENABLE_VERBOSE,[[]])) -AC_ARG_ENABLE(profiling,AC_HELP_STRING([--enable-profiling],[Compile with profiling information (default is NO)]), AC_SUBST(ENABLE_PROFILING,[[ENABLE_PROFILING=1]]), AC_SUBST(ENABLE_PROFILING,[[]])) AC_ARG_ENABLE(optimized,AC_HELP_STRING([--enable-optimized],[Compile with optimizations enabled (default is NO)]), AC_SUBST(ENABLE_OPTIMIZED,[[ENABLE_OPTIMIZED=1]]), AC_SUBST(ENABLE_OPTIMIZED,[[]])) AC_ARG_ENABLE(spec,AC_HELP_STRING([--enable-spec],[Compile SPEC benchmarks (default is NO)]), AC_SUBST(USE_SPEC,[[USE_SPEC=1]]), AC_SUBST(USE_SPEC,[[]])) AC_ARG_ENABLE(precompiled_bytecode,AC_HELP_STRING([--enable-precompiled_bytecode],[Use pre-compiled bytecode (default is NO)]), AC_SUBST(UPB,[[USE_PRECOMPILED_BYTECODE=1]]), AC_SUBST(UPB,[[]])) @@ -222,6 +221,12 @@ *) ;; esac + +dnl +dnl Removed for now. It was suggested that profiling is a special option that +dnl people will not want on by default. +dnl +dnl AC_ARG_ENABLE(profiling,AC_HELP_STRING([--enable-profiling],[Compile with profiling information (default is NO)]), AC_SUBST(ENABLE_PROFILING,[[ENABLE_PROFILING=1]]), AC_SUBST(ENABLE_PROFILING,[[]])) dnl ************************************************************************** dnl * Set the location of various third-party software packages Index: llvm/configure diff -u llvm/configure:1.1.2.3 llvm/configure:1.1.2.4 --- llvm/configure:1.1.2.3 Tue Jun 24 17:10:24 2003 +++ llvm/configure Mon Jun 30 14:35:50 2003 @@ -1004,7 +1004,6 @@ --disable-libtool-lock avoid locking (might break parallel builds) --enable-purify Compile with purify (default is NO) --enable-verbose Enable verbose compilation messages (default is NO) - --enable-profiling Compile with profiling information (default is NO) --enable-optimized Compile with optimizations enabled (default is NO) --enable-spec Compile SPEC benchmarks (default is NO) --enable-precompiled_bytecode @@ -4297,7 +4296,7 @@ case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4300 "configure"' > conftest.$ac_ext + echo '#line 4299 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4847,7 +4846,7 @@ save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:4850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:4849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && 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 @@ -6678,7 +6677,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: Makefile.config.in updated: 1.1.2.3 -> 1.1.2.4 --- Log message: Removed the --enable-profiling option. --- Diffs of the changes: Index: llvm/Makefile.config.in diff -u llvm/Makefile.config.in:1.1.2.3 llvm/Makefile.config.in:1.1.2.4 --- llvm/Makefile.config.in:1.1.2.3 Fri Jun 27 16:44:42 2003 +++ llvm/Makefile.config.in Mon Jun 30 14:40:04 2003 @@ -132,7 +132,7 @@ # information to allow gprof to be used to get execution frequencies. # #ENABLE_PROFILING = 1 - at ENABLE_PROFILING@ +#@ENABLE_PROFILING@ # # This open tells the Makefiles to produce verbose output. From criswell at choi.cs.uiuc.edu Mon Jun 30 15:48:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 15:48:01 2003 Subject: [llvm-commits] CVS: llvm/projects/sample/Makefile.common Makefile.config Message-ID: <200306302047.h5UKlhP06318@choi.cs.uiuc.edu> Changes in directory llvm/projects/sample: Makefile.common updated: 1.1.2.1 -> 1.1.2.2 Makefile.config updated: 1.1.2.1 -> 1.1.2.2 --- Log message: Modified the Makefile's so that they can be used within the source tree without modification, and yet are simple enough to configure for use outside the source tree. --- Diffs of the changes: Index: llvm/projects/sample/Makefile.common diff -u llvm/projects/sample/Makefile.common:1.1.2.1 llvm/projects/sample/Makefile.common:1.1.2.2 --- llvm/projects/sample/Makefile.common:1.1.2.1 Mon Jun 30 13:45:05 2003 +++ llvm/projects/sample/Makefile.common Mon Jun 30 15:47:33 2003 @@ -1,16 +1,16 @@ # # Set this variable to the top of the LLVM source tree. # -LLVM_SRC_ROOT = /home/vadve/$(USER)/box/conf/llvm +LLVM_SRC_ROOT = $(LEVEL)/../.. # # Set this variable to the top level directory where LLVM was built -# (i.e. where all of the object files are located). +# (this is *not* the same as OBJ_ROOT as defined in LLVM's Makefile.config). # -LLVM_OBJ_ROOT = /localhome/$(USER)/box/conf/llvm/ +#LLVM_OBJ_ROOT = $(LEVEL)/../.. # -# Include LLVM's Makefile Makefile. +# Include LLVM's Master Makefile. # include $(LLVM_SRC_ROOT)/Makefile.common Index: llvm/projects/sample/Makefile.config diff -u llvm/projects/sample/Makefile.config:1.1.2.1 llvm/projects/sample/Makefile.config:1.1.2.2 --- llvm/projects/sample/Makefile.config:1.1.2.1 Mon Jun 30 13:45:05 2003 +++ llvm/projects/sample/Makefile.config Mon Jun 30 15:47:33 2003 @@ -1,13 +1,13 @@ # # Set this variable to the top of the LLVM source tree. # -LLVM_SRC_ROOT = /home/vadve/$(USER)/box/conf/llvm +LLVM_SRC_ROOT = $(LEVEL)/../.. # # Set this variable to the top level directory where LLVM was built # (i.e. where all of the object files are located). # -LLVM_OBJ_ROOT = /localhome/$(USER)/box/conf/llvm/ +#LLVM_OBJ_ROOT = $(LEVEL)/../.. # # Include LLVM's Makefile Makefile. From criswell at cs.uiuc.edu Mon Jun 30 17:00:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:00:01 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/InstrSelection/InstrForest.cpp Message-ID: <200306302159.QAA15073@tank.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/InstrSelection: InstrForest.cpp updated: 1.43 -> 1.44 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/lib/CodeGen/InstrSelection/InstrForest.cpp diff -u llvm/lib/CodeGen/InstrSelection/InstrForest.cpp:1.43 llvm/lib/CodeGen/InstrSelection/InstrForest.cpp:1.44 --- llvm/lib/CodeGen/InstrSelection/InstrForest.cpp:1.43 Mon Jun 16 17:29:09 2003 +++ llvm/lib/CodeGen/InstrSelection/InstrForest.cpp Mon Jun 30 16:58:44 2003 @@ -21,6 +21,7 @@ #include "llvm/Type.h" #include "llvm/CodeGen/MachineInstr.h" #include "Support/STLExtras.h" +#include "Config/alloca.h" //------------------------------------------------------------------------ // class InstrTreeNode From criswell at cs.uiuc.edu Mon Jun 30 17:00:05 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:00:05 2003 Subject: [llvm-commits] CVS: llvm/lib/Reoptimizer/BinInterface/analyze.cpp construct.cpp emit.cpp select.cpp sparcbin.cpp sparcdis.cpp Message-ID: <200306302159.QAA15111@tank.cs.uiuc.edu> Changes in directory llvm/lib/Reoptimizer/BinInterface: analyze.cpp updated: 1.10 -> 1.11 construct.cpp updated: 1.5 -> 1.6 emit.cpp updated: 1.5 -> 1.6 select.cpp updated: 1.6 -> 1.7 sparcbin.cpp updated: 1.9 -> 1.10 sparcdis.cpp updated: 1.12 -> 1.13 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/lib/Reoptimizer/BinInterface/analyze.cpp diff -u llvm/lib/Reoptimizer/BinInterface/analyze.cpp:1.10 llvm/lib/Reoptimizer/BinInterface/analyze.cpp:1.11 --- llvm/lib/Reoptimizer/BinInterface/analyze.cpp:1.10 Thu Jun 5 01:06:03 2003 +++ llvm/lib/Reoptimizer/BinInterface/analyze.cpp Mon Jun 30 16:58:46 2003 @@ -15,9 +15,8 @@ #include "llvm/Reoptimizer/BinInterface/analyze.h" // SPARC analysis library #include "llvm/Reoptimizer/BinInterface/bitmath.h" // binary math routines #include "llvm/Reoptimizer/BinInterface/sparc9.h" // SPARC9 opcode definitions -#include -#include -#include +#include "Config/stdio.h" +#include "Config/stdlib.h" //***************************************************************************** // unsigned sparc_analyzebr(unsigned instr) Index: llvm/lib/Reoptimizer/BinInterface/construct.cpp diff -u llvm/lib/Reoptimizer/BinInterface/construct.cpp:1.5 llvm/lib/Reoptimizer/BinInterface/construct.cpp:1.6 --- llvm/lib/Reoptimizer/BinInterface/construct.cpp:1.5 Wed Jun 4 04:40:38 2003 +++ llvm/lib/Reoptimizer/BinInterface/construct.cpp Mon Jun 30 16:58:46 2003 @@ -11,9 +11,8 @@ #include "llvm/Reoptimizer/BinInterface/bitmath.h" // binary math routines #include "llvm/Reoptimizer/BinInterface/sparc9.h" // SPARC9 opcode definitions #include "llvm/Reoptimizer/BinInterface/regmask.h" // register mask allocator -#include -#include -#include +#include "Config/stdio.h" +#include "Config/stdlib.h" #include using std::pair; // use STL pair class Index: llvm/lib/Reoptimizer/BinInterface/emit.cpp diff -u llvm/lib/Reoptimizer/BinInterface/emit.cpp:1.5 llvm/lib/Reoptimizer/BinInterface/emit.cpp:1.6 --- llvm/lib/Reoptimizer/BinInterface/emit.cpp:1.5 Wed Jun 4 04:40:43 2003 +++ llvm/lib/Reoptimizer/BinInterface/emit.cpp Mon Jun 30 16:58:46 2003 @@ -10,10 +10,9 @@ #include "llvm/Reoptimizer/BinInterface/bitmath.h" // binary math routines #include "llvm/Reoptimizer/BinInterface/sparc9.h" // SPARC9 opcode definitions #include "llvm/Reoptimizer/BinInterface/regmask.h" // Register mask allocator -#include -#include +#include "Config/stdio.h" +#include "Config/stdlib.h" #include -#include using std::pair; using std::vector; Index: llvm/lib/Reoptimizer/BinInterface/select.cpp diff -u llvm/lib/Reoptimizer/BinInterface/select.cpp:1.6 llvm/lib/Reoptimizer/BinInterface/select.cpp:1.7 --- llvm/lib/Reoptimizer/BinInterface/select.cpp:1.6 Wed Jun 4 04:40:48 2003 +++ llvm/lib/Reoptimizer/BinInterface/select.cpp Mon Jun 30 16:58:46 2003 @@ -10,10 +10,9 @@ #include "llvm/Reoptimizer/BinInterface/bitmath.h" // binary math routines #include "llvm/Reoptimizer/BinInterface/sparc9.h" // SPARC9 opcode definitions #include "llvm/Reoptimizer/BinInterface/regmask.h" // Register mask allocator -#include -#include +#include "Config/stdio.h" +#include "Config/stdlib.h" #include -#include using std::pair; Index: llvm/lib/Reoptimizer/BinInterface/sparcbin.cpp diff -u llvm/lib/Reoptimizer/BinInterface/sparcbin.cpp:1.9 llvm/lib/Reoptimizer/BinInterface/sparcbin.cpp:1.10 --- llvm/lib/Reoptimizer/BinInterface/sparcbin.cpp:1.9 Wed Jun 25 10:46:52 2003 +++ llvm/lib/Reoptimizer/BinInterface/sparcbin.cpp Mon Jun 30 16:58:46 2003 @@ -14,10 +14,9 @@ #include "llvm/Reoptimizer/BinInterface/sparcdis.h" // sparc disassembler #include "llvm/Reoptimizer/BinInterface/bitmath.h" // binary math routines #include "llvm/Reoptimizer/BinInterface/sparc9.h" // SPARC 9 opcode definitions -#include -#include +#include "Config/stdio.h" +#include "Config/stdlib.h" #include -#include #include using std::pair; Index: llvm/lib/Reoptimizer/BinInterface/sparcdis.cpp diff -u llvm/lib/Reoptimizer/BinInterface/sparcdis.cpp:1.12 llvm/lib/Reoptimizer/BinInterface/sparcdis.cpp:1.13 --- llvm/lib/Reoptimizer/BinInterface/sparcdis.cpp:1.12 Thu Jun 5 01:06:03 2003 +++ llvm/lib/Reoptimizer/BinInterface/sparcdis.cpp Mon Jun 30 16:58:46 2003 @@ -19,9 +19,11 @@ #include "llvm/Reoptimizer/BinInterface/bitmath.h" // binary math routines #include "llvm/Reoptimizer/BinInterface/sparc9.h" // SPARC9 opcode definitions -#include -#include -#include +#include "Config/stdio.h" +#include "Config/stdlib.h" + +// Include assert since other LLVM header files haven't picked it up +#include "Config/assert.h" void sparc_printop_rs1(unsigned instr, int labelrs1) { From criswell at cs.uiuc.edu Mon Jun 30 17:00:07 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:00:07 2003 Subject: [llvm-commits] CVS: llvm/lib/Support/PluginLoader.cpp Signals.cpp Timer.cpp Message-ID: <200306302159.QAA15129@tank.cs.uiuc.edu> Changes in directory llvm/lib/Support: PluginLoader.cpp updated: 1.2 -> 1.3 Signals.cpp updated: 1.5 -> 1.6 Timer.cpp updated: 1.20 -> 1.21 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/lib/Support/PluginLoader.cpp diff -u llvm/lib/Support/PluginLoader.cpp:1.2 llvm/lib/Support/PluginLoader.cpp:1.3 --- llvm/lib/Support/PluginLoader.cpp:1.2 Thu Jul 25 01:17:46 2002 +++ llvm/lib/Support/PluginLoader.cpp Mon Jun 30 16:58:48 2003 @@ -11,8 +11,8 @@ //===----------------------------------------------------------------------===// #include "Support/CommandLine.h" -#include -#include +#include "Config/dlfcn.h" +#include "Config/link.h" #include namespace { Index: llvm/lib/Support/Signals.cpp diff -u llvm/lib/Support/Signals.cpp:1.5 llvm/lib/Support/Signals.cpp:1.6 --- llvm/lib/Support/Signals.cpp:1.5 Tue May 27 11:25:04 2003 +++ llvm/lib/Support/Signals.cpp Mon Jun 30 16:58:48 2003 @@ -32,7 +32,7 @@ // SignalHandler - The signal handler that runs... -static void SignalHandler(int Sig) { +static RETSIGTYPE SignalHandler(int Sig) { while (!FilesToRemove.empty()) { std::remove(FilesToRemove.back().c_str()); FilesToRemove.pop_back(); Index: llvm/lib/Support/Timer.cpp diff -u llvm/lib/Support/Timer.cpp:1.20 llvm/lib/Support/Timer.cpp:1.21 --- llvm/lib/Support/Timer.cpp:1.20 Thu Jun 19 13:42:09 2003 +++ llvm/lib/Support/Timer.cpp Mon Jun 30 16:58:48 2003 @@ -4,15 +4,16 @@ // //===----------------------------------------------------------------------===// +#include "Config/malloc.h" + #include "Support/Timer.h" #include "Support/CommandLine.h" -#include -#include -#include -#ifndef __FreeBSD__ -#include -#endif // __FreeBSD__ -#include + +#include "Config/sys/resource.h" +#include "Config/sys/time.h" +#include "Config/unistd.h" +#include "Config/malloc.h" +#include "Config/stdio.h" #include #include #include @@ -21,10 +22,12 @@ std::string LibSupportInfoOutputFilename; namespace { +#ifdef HAVE_MALLINFO cl::opt TrackSpace("track-memory", cl::desc("Enable -time-passes memory " "tracking (this may be slow)"), cl::Hidden); +#endif cl::opt InfoOutputFilename("info-output-file", @@ -76,12 +79,12 @@ } static long getMemUsage() { -#ifndef __FreeBSD__ +#ifdef HAVE_MALLINFO if (TrackSpace) { struct mallinfo MI = mallinfo(); return MI.uordblks/*+MI.hblkhd*/; } -#endif // __FreeBSD__ +#endif return 0; } From criswell at cs.uiuc.edu Mon Jun 30 17:00:10 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:00:10 2003 Subject: [llvm-commits] CVS: llvm/Makefile.config.in aclocal.m4 config.guess config.sub configure configure.ac install-sh ltmain.sh mkinstalldirs Makefile.common Makefile.config Message-ID: <200306302159.QAA15115@tank.cs.uiuc.edu> Changes in directory llvm: Makefile.config.in updated: 1.1 -> 1.2 aclocal.m4 updated: 1.1 -> 1.2 config.guess updated: 1.1 -> 1.2 config.sub updated: 1.1 -> 1.2 configure updated: 1.1 -> 1.2 configure.ac updated: 1.1 -> 1.2 install-sh updated: 1.1 -> 1.2 ltmain.sh updated: 1.1 -> 1.2 mkinstalldirs updated: 1.1 -> 1.2 Makefile.common updated: 1.94 -> 1.95 Makefile.config updated: 1.15 -> 1.16 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/Makefile.config.in diff -u /dev/null llvm/Makefile.config.in:1.2 --- /dev/null Mon Jun 30 16:59:25 2003 +++ llvm/Makefile.config.in Mon Jun 30 16:58:13 2003 @@ -0,0 +1,159 @@ +#===-- Makefile.config - Local configuration for LLVM ------*- makefile -*--==== +# +# This file is included by Makefile.common. It defines paths and other +# values specific to a particular installation of LLVM. +#===-----------------------------------------------------------------------==== + +# +# Target operating system for which LLVM will be compiled. +# +OS=@OS@ + +# Path to the C++ compiler to use. This is an optional setting, which defaults +# to whatever your gmake defaults to. +# +# Under Linux, for some reason the compiler driver wants to search the PATH to +# find the system assembler, which breaks if the LLVM assembler is in our path. +# Hack it to use the assembler in /usr/bin directly. +# +CXX = @CXX@ + +# We have the same problem with the CC binary, which use used by testcases for +# native builds. +# +CC := @CC@ + +# +# Compilation flags for the C and C++ compilers. +# +CPPFLAGS=@DEFS@ +CCFLAGS=@DEFS@ +LDFLAGS=@LDFLAGS@ +LIBS=@LIBS@ + +# +# Libraries needed by tools +# +TOOLLINKOPTS=@LIBS@ + +# +# Path to the archiver program. +# +AR_PATH = @AR@ + +# +# The pathnames of the Flex and Bison programs, respectively. +# +BISON = @YACC@ +FLEX = @LEX@ + +# +# Paths to miscellaneous programs. +# +SED = @SED@ +RM = @RM@ +ECHO = @ECHO@ +MKDIR = @abs_top_srcdir@/mkinstalldirs +DATE = @DATE@ +MV = @MV@ +INSTALL = @INSTALL@ +DOT = @DOT@ +ETAGS = @ETAGS@ + +# +# Determine the target for which LLVM should generate code. +# +LLVMGCCARCH := @target@/3.4-llvm + +# Path to directory where object files should be stored during a build. +# Set OBJ_ROOT to "." if you do not want to use a separate place for +# object files. +# +#OBJ_ROOT = . +OBJ_ROOT := @OBJROOT@ + +# Path to location for LLVM front-end this should only be specified here if you +# want to override the value set in Makefile.$(uname) +# +LLVMGCCDIR := @LLVMGCCDIR@ + +# When this setting is set to true, programs in the llvm/test/Programs hierarchy +# are not recompiled from source code. Instead, the bytecode for the file is +# pulled from the BYTECODE_REPOSITORY directory. This can be useful when disk +# space is limited or when you just don't want to spend time running the C +# frontend. +# +#USE_PRECOMPILED_BYTECODE := 1 + at UPB@ + +# This path specifies the cannonical location of bytecode files for compiled +# versions of the test/Programs/* programs. This is used as the bytecode source +# when USE_PRECOMPILED_BYTECODE is specified or when source code is not +# available for the program (such as SPEC). +# +BYTECODE_REPOSITORY := @BCR@ + +# Path to location for purify, this is only needed if you build with +# ENABLE_PURIFY=1 +# +PURIFY = @PURIFY@ + +# +# SPEC benchmarks: +# Set the USE_SPEC variable to enable the use of the SPEC benchmarks. +# You must provide the SPEC benchmarks on your own. +# + at USE_SPEC@ + +# +# Path to the SPEC benchmarks. If you have the SPEC benchmarks, place the +# path here. +# +#SPEC_ROOT := /home/vadve/shared/benchmarks/speccpu2000/benchspec +SPEC_ROOT := @SPEC_ROOT@ + +# +# Path to the PAPI code. This is used by the reoptimizer only. +# +#PAPIDIR := /home/vadve/shared/papi-2.3.4.1 +PAPIDIR := @PAPIDIR@ + +# These are options that can either be enabled here, or can be enabled on the +# make command line (ie, make ENABLE_PROFILING=1) +# + +# When ENABLE_OPTIMIZED is enabled, Release builds of all of the LLVM code are +# turned on, and Debug builds are turned off. +# +#ENABLE_OPTIMIZED = 1 + at ENABLE_OPTIMIZED@ + +# When ENABLE_PROFILING is enabled, the llvm source base is built with profile +# information to allow gprof to be used to get execution frequencies. +# +#ENABLE_PROFILING = 1 + at ENABLE_PROFILING@ + +# +# This open tells the Makefiles to produce verbose output. +# It essentially prints the commands that make is executing +# +#VERBOSE = 1 + at ENABLE_VERBOSE@ + +# When ENABLE_PURIFY is set to 1, the LLVM tools are linked with purify (which +# must be locally installed) to allow for some automated memory error debugging. +# +#ENABLE_PURIFY = 1 + at ENABLE_PURIFY@ + +# +# Enable JIT for this platform +# + at JIT@ + +# +# Disable LLC diffs for testing. +# + at DISABLE_LLC_DIFFS@ + Index: llvm/aclocal.m4 diff -u /dev/null llvm/aclocal.m4:1.2 --- /dev/null Mon Jun 30 16:59:25 2003 +++ llvm/aclocal.m4 Mon Jun 30 16:58:13 2003 @@ -0,0 +1,3865 @@ +# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- +## Copyright 1996, 1997, 1998, 1999, 2000, 2001 +## Free Software Foundation, Inc. +## 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. + +# serial 46 AC_PROG_LIBTOOL + +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl + +# 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)/libtool' +AC_SUBST(LIBTOOL)dnl + +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +]) + +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.13)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])dnl +dnl + +_LT_AC_PROG_ECHO_BACKSLASH +# 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 + AC_PATH_MAGIC + fi + ;; +esac + +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + +ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE(libtool-lock, + [ --disable-libtool-lock avoid locking (might break parallel builds)]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + 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 + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_SAVE + AC_LANG_C + AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_RESTORE]) + 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 + ;; + +ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw* | *-*-pw32*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + + # recent cygwin and mingw systems supply a stub DllMain which the user + # can override, but on older systems we have to supply one + AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, + [AC_TRY_LINK([], + [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); + DllMain (0, 0, 0);], + [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) + + case $host/$CC in + *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) + # old mingw systems require "-dll" to link a DLL, while more recent ones + # require "-mdll" + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -mdll" + AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, + [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) + CFLAGS="$SAVE_CFLAGS" ;; + *-*-cygwin* | *-*-pw32*) + # cygwin systems need to pass --dll to the linker, and not link + # crt.o which will require a WinMain at 16 definition. + lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; + esac + ;; + ]) +esac + +_LT_AC_LTCONFIG_HACK + +]) + +# AC_LIBTOOL_HEADER_ASSERT +# ------------------------ +AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT], +[AC_CACHE_CHECK([whether $CC supports assert without backlinking], + [lt_cv_func_assert_works], + [case $host in + *-*-solaris*) + if test "$GCC" = yes && test "$with_gnu_ld" != yes; then + case `$CC --version 2>/dev/null` in + [[12]].*) lt_cv_func_assert_works=no ;; + *) lt_cv_func_assert_works=yes ;; + esac + fi + ;; + esac]) + +if test "x$lt_cv_func_assert_works" = xyes; then + AC_CHECK_HEADERS(assert.h) +fi +])# AC_LIBTOOL_HEADER_ASSERT + +# _LT_AC_CHECK_DLFCN +# -------------------- +AC_DEFUN([_LT_AC_CHECK_DLFCN], +[AC_CHECK_HEADERS(dlfcn.h) +])# _LT_AC_CHECK_DLFCN + +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +# --------------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_NM]) +AC_REQUIRE([AC_OBJEXT]) +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl + +# 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_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_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 + lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +irix*) + symcode='[[BCDEGRST]]' + ;; +solaris* | sysv5*) + symcode='[[BDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $host_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. +if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then + symcode='[[ABCDGISTW]]' +fi + +# 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 < $nlist) && 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 egrep ' nm_test_var$' "$nlist" >/dev/null; then + if egrep ' 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_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr void * +#else +# define lt_ptr char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr address; +} +lt_preloaded_symbols[[]] = +{ +EOF + sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$no_builtin_flag" + if AC_TRY_EVAL(ac_link) && test -s conftest; then + pipe_works=yes + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AC_FD_CC + fi + else + echo "cannot find nm_test_var in $nlist" >&AC_FD_CC + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC + fi + else + echo "$progname: failed program was:" >&AC_FD_CC + 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 +]) +global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" +if test -z "$lt_cv_sys_global_symbol_pipe"; then + global_symbol_to_cdecl= + global_symbol_to_c_name_address= +else + global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" + global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" +fi +if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; +then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + +# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR +# --------------------------------- +AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], +[# Find the correct PATH separator. Usually this is `:', but +# DJGPP uses `;' like DOS. +if test "X${PATH_SEPARATOR+set}" != Xset; then + UNAME=${UNAME-`uname 2>/dev/null`} + case X$UNAME in + *-DOS) lt_cv_sys_path_separator=';' ;; + *) lt_cv_sys_path_separator=':' ;; + esac + PATH_SEPARATOR=$lt_cv_sys_path_separator +fi +])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR + +# _LT_AC_PROG_ECHO_BACKSLASH +# -------------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], +[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +echo=${ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null && + echo_test_string="`eval $cmd`" && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(ECHO) +AC_DIVERT_POP +])# _LT_AC_PROG_ECHO_BACKSLASH + +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ------------------------------------------------------------------ +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], +[if test "$cross_compiling" = yes; then : + [$4] +else + AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl + 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 AC_TRY_EVAL(ac_link) && 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) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_unknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_AC_TRY_DLOPEN_SELF + +# AC_LIBTOOL_DLOPEN_SELF +# ------------------- +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], +[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 + ;; + + cygwin* | mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) + ]) + ]) + ]) + ]) + ]) + ;; + 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" + AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl + 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" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + 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 +])# AC_LIBTOOL_DLOPEN_SELF + +AC_DEFUN([_LT_AC_LTCONFIG_HACK], +[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl +# 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' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# 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" +need_locks="$enable_libtool_lock" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# 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 "$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 "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +if test x"$host" != x"$build"; then + ac_tool_prefix=${host_alias}- +else + ac_tool_prefix= +fi + +# Transform linux* to *-*-linux-gnu*, to support old configure scripts. +case $host_os in +linux-gnu*) ;; +linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` +esac + +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 + +# 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 -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 + +# Allow CC to be a program name with arguments. +set dummy $CC +compiler="[$]2" + +## FIXME: this should be a separate macro +## +AC_MSG_CHECKING([for objdir]) +rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + objdir=_libs +fi +rmdir .libs 2>/dev/null +AC_MSG_RESULT($objdir) +## +## END FIXME + + +## FIXME: this should be a separate macro +## +AC_ARG_WITH(pic, +[ --with-pic try to use only PIC/non-PIC objects [default=use both]], +pic_mode="$withval", pic_mode=default) +test -z "$pic_mode" && pic_mode=default + +# We assume here that the value for lt_cv_prog_cc_pic will not be cached +# in isolation, and that seeing it set (from the cache) indicates that +# the associated values are set (in the cache) correctly too. +AC_MSG_CHECKING([for $compiler option to produce PIC]) +AC_CACHE_VAL(lt_cv_prog_cc_pic, +[ lt_cv_prog_cc_pic= + lt_cv_prog_cc_shlib= + lt_cv_prog_cc_wl= + lt_cv_prog_cc_static= + lt_cv_prog_cc_no_builtin= + lt_cv_prog_cc_can_build_shared=$can_build_shared + + if test "$GCC" = yes; then + lt_cv_prog_cc_wl='-Wl,' + lt_cv_prog_cc_static='-static' + + case $host_os in + aix*) + # Below there is a dirty hack to force normal static linking with -ldl + # The problem is because libdl dynamically linked with both libc and + # libC (AIX C++ library), which obviously doesn't included in libraries + # list by gcc. This cause undefined symbols with -static flags. + # This hack allows C programs to be linked with "-static -ldl", but + # not sure about C++ programs. + lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" + ;; + 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_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | irix5* | irix6* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_cv_prog_cc_pic='-fno-common' + ;; + cygwin* | 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_cv_prog_cc_pic='-DDLL_EXPORT' + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_cv_prog_cc_pic=-Kconform_pic + fi + ;; + *) + lt_cv_prog_cc_pic='-fPIC' + ;; + esac + else + # PORTME Check for PIC flags for the system compiler. + case $host_os in + aix3* | aix4* | aix5*) + lt_cv_prog_cc_wl='-Wl,' + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_cv_prog_cc_static='-Bstatic' + else + lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + hpux9* | hpux10* | hpux11*) + # Is there a better lt_cv_prog_cc_static that works with the bundled CC? + lt_cv_prog_cc_wl='-Wl,' + lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" + lt_cv_prog_cc_pic='+Z' + ;; + + irix5* | irix6*) + lt_cv_prog_cc_wl='-Wl,' + lt_cv_prog_cc_static='-non_shared' + # PIC (with -KPIC) is the default. + ;; + + cygwin* | 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_cv_prog_cc_pic='-DDLL_EXPORT' + ;; + + newsos6) + lt_cv_prog_cc_pic='-KPIC' + lt_cv_prog_cc_static='-Bstatic' + ;; + + osf3* | osf4* | osf5*) + # All OSF/1 code is PIC. + lt_cv_prog_cc_wl='-Wl,' + lt_cv_prog_cc_static='-non_shared' + ;; + + sco3.2v5*) + lt_cv_prog_cc_pic='-Kpic' + lt_cv_prog_cc_static='-dn' + lt_cv_prog_cc_shlib='-belf' + ;; + + solaris*) + lt_cv_prog_cc_pic='-KPIC' + lt_cv_prog_cc_static='-Bstatic' + lt_cv_prog_cc_wl='-Wl,' + ;; + + sunos4*) + lt_cv_prog_cc_pic='-PIC' + lt_cv_prog_cc_static='-Bstatic' + lt_cv_prog_cc_wl='-Qoption ld ' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + lt_cv_prog_cc_pic='-KPIC' + lt_cv_prog_cc_static='-Bstatic' + if test "x$host_vendor" = xsni; then + lt_cv_prog_cc_wl='-LD' + else + lt_cv_prog_cc_wl='-Wl,' + fi + ;; + + uts4*) + lt_cv_prog_cc_pic='-pic' + lt_cv_prog_cc_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_cv_prog_cc_pic='-Kconform_pic' + lt_cv_prog_cc_static='-Bstatic' + fi + ;; + + *) + lt_cv_prog_cc_can_build_shared=no + ;; + esac + fi +]) +if test -z "$lt_cv_prog_cc_pic"; then + AC_MSG_RESULT([none]) +else + AC_MSG_RESULT([$lt_cv_prog_cc_pic]) + + # Check to make sure the pic_flag actually works. + AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works]) + AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" + AC_TRY_COMPILE([], [], [dnl + case $host_os in + hpux9* | hpux10* | hpux11*) + # On HP-UX, both CC and GCC only warn that PIC is supported... then + # they create non-PIC objects. So, if there were any warnings, we + # assume that PIC is not supported. + if test -s conftest.err; then + lt_cv_prog_cc_pic_works=no + else + lt_cv_prog_cc_pic_works=yes + fi + ;; + *) + lt_cv_prog_cc_pic_works=yes + ;; + esac + ], [dnl + lt_cv_prog_cc_pic_works=no + ]) + CFLAGS="$save_CFLAGS" + ]) + + if test "X$lt_cv_prog_cc_pic_works" = Xno; then + lt_cv_prog_cc_pic= + lt_cv_prog_cc_can_build_shared=no + else + lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" + fi + + AC_MSG_RESULT([$lt_cv_prog_cc_pic_works]) +fi +## +## END FIXME + +# Check for any special shared library compilation flags. +if test -n "$lt_cv_prog_cc_shlib"; then + AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries]) + if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then : + else + AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure]) + lt_cv_prog_cc_can_build_shared=no + fi +fi + +## FIXME: this should be a separate macro +## +AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works]) +AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl + lt_cv_prog_cc_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" + AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes]) + LDFLAGS="$save_LDFLAGS" +]) + +# Belt *and* braces to stop my trousers falling down: +test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= +AC_MSG_RESULT([$lt_cv_prog_cc_static_works]) + +pic_flag="$lt_cv_prog_cc_pic" +special_shlib_compile_flags="$lt_cv_prog_cc_shlib" +wl="$lt_cv_prog_cc_wl" +link_static_flag="$lt_cv_prog_cc_static" +no_builtin_flag="$lt_cv_prog_cc_no_builtin" +can_build_shared="$lt_cv_prog_cc_can_build_shared" +## +## END FIXME + + +## FIXME: this should be a separate macro +## +# Check to see if options -o and -c are simultaneously supported by compiler +AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext]) +AC_CACHE_VAL([lt_cv_compiler_c_o], [ +$rm -r conftest 2>/dev/null +mkdir conftest +cd conftest +echo "int some_variable = 0;" > conftest.$ac_ext +mkdir out +# According to Tom Tromey, Ian Lance Taylor reported there are C compilers +# that will create temporary files in the current directory regardless of +# the output directory. Thus, making CWD read-only will cause this test +# to fail, enabling locking or at least warning the user not to do parallel +# builds. +chmod -w . +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" +compiler_c_o=no +if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && 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_compiler_c_o=no + else + lt_cv_compiler_c_o=yes + fi +else + # Append any errors to the config.log. + cat out/conftest.err 1>&AC_FD_CC + lt_cv_compiler_c_o=no +fi +CFLAGS="$save_CFLAGS" +chmod u+w . +$rm conftest* out/* +rmdir out +cd .. +rmdir conftest +$rm -r conftest 2>/dev/null +]) +compiler_c_o=$lt_cv_compiler_c_o +AC_MSG_RESULT([$compiler_c_o]) + +if test x"$compiler_c_o" = x"yes"; then + # Check to see if we can write to a .lo + AC_MSG_CHECKING([if $compiler supports -c -o file.lo]) + AC_CACHE_VAL([lt_cv_compiler_o_lo], [ + lt_cv_compiler_o_lo=no + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -c -o conftest.lo" + save_objext="$ac_objext" + ac_objext=lo + AC_TRY_COMPILE([], [int some_variable = 0;], [dnl + # 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_compiler_o_lo=no + else + lt_cv_compiler_o_lo=yes + fi + ]) + ac_objext="$save_objext" + CFLAGS="$save_CFLAGS" + ]) + compiler_o_lo=$lt_cv_compiler_o_lo + AC_MSG_RESULT([$compiler_o_lo]) +else + compiler_o_lo=no +fi +## +## END FIXME + +## FIXME: this should be a separate macro +## +# Check to see if we can do hard links to lock some files if needed +hard_links="nottested" +if test "$compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + 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 + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +## +## END FIXME + +## FIXME: this should be a separate macro +## +if test "$GCC" = yes; then + # Check to see if options -fno-rtti -fno-exceptions are supported by compiler + AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions]) + echo "int some_variable = 0;" > conftest.$ac_ext + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" + compiler_rtti_exceptions=no + AC_TRY_COMPILE([], [int some_variable = 0;], [dnl + # 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 + compiler_rtti_exceptions=no + else + compiler_rtti_exceptions=yes + fi + ]) + CFLAGS="$save_CFLAGS" + AC_MSG_RESULT([$compiler_rtti_exceptions]) + + if test "$compiler_rtti_exceptions" = "yes"; then + no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' + else + no_builtin_flag=' -fno-builtin' + fi +fi +## +## END FIXME + +## FIXME: this should be a separate macro +## +# See if the linker supports building shared libraries. +AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries]) + +allow_undefined_flag= +no_undefined_flag= +need_lib_prefix=unknown +need_version=unknown +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +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_into_libs=no +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no +hardcode_shlibpath_var=unsupported +runpath_var= +link_all_deplibs=unknown +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 egrep regular expression 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, the GNU linker is very broken + # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. + 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 + ;; + + 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 use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | egrep ': 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*) + # 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=yes + + extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ + sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ + test -f $output_objdir/impgen.exe || (cd $output_objdir && \ + if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ + else $CC -o impgen impgen.c ; fi)~ + $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' + + old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' + + # cygwin and mingw dlls have different entry points and sets of symbols + # to exclude. + # FIXME: what about values for MSVC? + dll_entry=__cygwin_dll_entry at 12 + dll_exclude_symbols=DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12~ + case $host_os in + mingw*) + # mingw values + dll_entry=_DllMainCRTStartup at 12 + dll_exclude_symbols=DllMain at 12,DllMainCRTStartup at 12,DllEntryPoint at 12~ + ;; + esac + + # mingw and cygwin differ, and it's simplest to just exclude the union + # of the two symbol sets. + dll_exclude_symbols=DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12,DllMainCRTStartup at 12,DllEntryPoint at 12 + + # recent cygwin and mingw systems supply a stub DllMain which the user + # can override, but on older systems we have to supply one (in ltdll.c) + if test "x$lt_cv_need_dllmain" = "xyes"; then + ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " + ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ + test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' + else + ltdll_obj= + ltdll_cmds= + fi + + # Extract the symbol export list from an `--export-all' def file, + # then regenerate the def file from the symbol export list, so that + # the compiled dll only exports the symbol export list. + # Be careful not to strip the DATA tag left be newer dlltools. + export_symbols_cmds="$ltdll_cmds"' + $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ + sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' + + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is. + # If DATA tags from a recent dlltool are present, honour them! + archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname-def; + else + echo EXPORTS > $output_objdir/$soname-def; + _lt_hint=1; + cat $export_symbols | while read symbol; do + set dummy \$symbol; + case \[$]# in + 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; + *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; + esac; + _lt_hint=`expr 1 + \$_lt_hint`; + done; + fi~ + '"$ltdll_cmds"' + $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ + $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ + $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' + ;; + + 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 -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared -nodefaultlibs $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 | egrep '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 | egrep ': 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 + ;; + + *) + if $LD --help 2>&1 | egrep ': 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' + case $host_os in + cygwin* | mingw* | pw32*) + # dlltool doesn't understand --whole-archive et. al. + whole_archive_flag_spec= + ;; + *) + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + ;; + esac + 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 + 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. + + hardcode_direct=yes + archive_cmds='' + hardcode_libdir_separator=':' + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + 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 + shared_flag='${wl}-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 can do strange things, 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' + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' + 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 ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='${wl}-berok' + # This is a bit strange, but 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 ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $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 + ;; + + 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 + # 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"`' + ;; + + darwin* | rhapsody*) + case "$host_os" in + rhapsody* | darwin1.[[012]]) + allow_undefined_flag='-undefined suppress' + ;; + *) # Darwin 1.3 on + allow_undefined_flag='-flat_namespace -undefined suppress' + ;; + esac + # FIXME: Relying on posixy $() will cause problems for + # cross-compilation, but unfortunately the echo tests do not + # yet detect zsh echo's removal of \ escapes. + archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring' + # We need to add '_' to the symbols in $export_symbols first + #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' + hardcode_direct=yes + hardcode_shlibpath_var=no + whole_archive_flag_spec='-all_load $convenience' + ;; + + 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*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9* | hpux10* | hpux11*) + case $host_os in + hpux9*) 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' ;; + *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; + esac + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_minus_L=yes # Not in the search PATH, but as the default + # location of the library. + export_dynamic_flag_spec='${wl}-E' + ;; + + irix5* | irix6*) + 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' + 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 $linker_flags' + 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 $linker_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 "-exported_symbol " >> $lib.exp; echo "\$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 + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + export_dynamic_flag_spec='${wl}-Bexport' + ;; + + solaris*) + # gcc --version < 3.0 without binutils cannot create self contained + # shared libraries reliably, requiring libgcc.a to resolve some of + # the object symbols generated in some cases. Libraries that use + # assert need libgcc.a to resolve __eprintf, for example. Linking + # a copy of libgcc.a into every shared library to guarantee resolving + # such symbols causes other problems: According to Tim Van Holder + # , C++ libraries end up with a separate + # (to the application) exception stack for one thing. + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + case `$CC --version 2>/dev/null` in + [[12]].*) + cat <&2 + +*** Warning: Releases of GCC earlier than version 3.0 cannot reliably +*** create self contained shared libraries on Solaris systems, without +*** introducing a dependency on libgcc.a. Therefore, libtool is disabling +*** -no-undefined support, which will at least allow you to build shared +*** libraries. However, you may find that when you link such libraries +*** into an application without using GCC, you have to manually add +*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to +*** upgrade to a newer version of GCC. Another option is to rebuild your +*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. + +EOF + no_undefined_flag= + ;; + esac + fi + # $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='-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) + if test "x$host_vendor" = xsno; then + archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + else + 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 + fi + 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' + ;; + + 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 + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + 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 + ;; + + sysv5uw7* | 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 + ;; + + *) + ld_shlibs=no + ;; + esac +fi +AC_MSG_RESULT([$ld_shlibs]) +test "$ld_shlibs" = no && can_build_shared=no +## +## END FIXME + +## FIXME: this should be a separate macro +## +# Check hardcoding attributes. +AC_MSG_CHECKING([how to hardcode library paths into programs]) +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var"; 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 "$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 +AC_MSG_RESULT([$hardcode_action]) +## +## END FIXME + +## FIXME: this should be a separate macro +## +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +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" + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi +## +## END FIXME + +reload_cmds='$LD$reload_flag -o $output$reload_objs' +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +## FIXME: this should be a separate macro +## +# PORTME Fill in your ld.so characteristics +AC_MSG_CHECKING([dynamic linker characteristics]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +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" +sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}.so$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}.so$major' + ;; + +aix4* | aix5*) + version_type=linux + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' + 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}.so$versuffix ${libname}${release}.so$major $libname.so' + 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}.so$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}.so' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi4*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$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" + export_dynamic_flag_spec=-rdynamic + # 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 + need_version=no + need_lib_prefix=no + case $GCC,$host_os in + yes,cygwin*) + library_names_spec='$libname.dll.a' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' + postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog .libs/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + ;; + yes,mingw*) + library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` + ;; + yes,pw32*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' + ;; + *) + library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $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 + # FIXME: Relying on posixy $() will cause problems for + # cross-compilation, but unfortunately the echo tests do not + # yet detect zsh echo's removal of \ escapes. + library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' + soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=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}.so$versuffix ${libname}${release}.so $libname.so' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + *) + 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}.so$versuffix ${libname}${release}.so${major} ${libname}.so' + soname_spec='${libname}${release}.so$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. + dynamic_linker="$host_os dld.sl" + version_type=sunos + need_lib_prefix=no + need_version=no + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' + soname_spec='${libname}${release}.sl$major' + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +irix5* | irix6*) + version_type=irix + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}.so$major' + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' + case $host_os in + irix5*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 ") 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}" + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux-gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$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 + + # 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' + ;; + +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}.so$versuffix ${libname}.so$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' + soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}${release}.so$major $libname.so' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + 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 + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + ;; + +os2*) + libname_spec='$name' + need_lib_prefix=no + library_names_spec='$libname.dll $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_version=no + soname_spec='${libname}${release}.so' + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' + 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}.so$major' + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}.so$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}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=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 + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' + soname_spec='$libname.so.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no +## +## END FIXME + +## FIXME: this should be a separate macro +## +# Report the final consequences. +AC_MSG_CHECKING([if libtool supports shared libraries]) +AC_MSG_RESULT([$can_build_shared]) +## +## END FIXME + +## FIXME: this should be a separate macro +## +AC_MSG_CHECKING([whether to build shared libraries]) +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*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +AC_MSG_RESULT([$enable_shared]) +## +## END FIXME + +## FIXME: this should be a separate macro +## +AC_MSG_CHECKING([whether to build static libraries]) +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +AC_MSG_RESULT([$enable_static]) +## +## END FIXME + +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 + +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 + +AC_LIBTOOL_DLOPEN_SELF + +## FIXME: this should be a separate macro +## +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. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + AC_CACHE_VAL([lt_cv_archive_cmds_need_lc], + [$rm conftest* + echo 'static int dummy;' > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile); then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_cv_prog_cc_wl + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi]) + AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc]) + ;; + esac +fi +need_lc=${lt_cv_archive_cmds_need_lc-yes} +## +## END FIXME + +## FIXME: this should be a separate macro +## +# The second 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 + : +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. + test -f Makefile && make "$ltmain" +fi + +if test -f "$ltmain"; then + trap "$rm \"${ofile}T\"; exit 1" 1 2 15 + $rm -f "${ofile}T" + + echo creating $ofile + + # 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 CC LD LN_S NM SHELL \ + reload_flag reload_cmds wl \ + pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ + thread_safe_flag_spec whole_archive_flag_spec libname_spec \ + library_names_spec soname_spec \ + RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ + old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ + postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ + old_striplib striplib file_magic_cmd export_symbols_cmds \ + deplibs_check_method allow_undefined_flag no_undefined_flag \ + finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ + global_symbol_to_c_name_address \ + hardcode_libdir_flag_spec hardcode_libdir_separator \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do + + case $var in + reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ + extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + finish_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 + + cat <<__EOF__ > "${ofile}T" +#! $SHELL + +# `$echo "$ofile" | 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-2000 Free Software Foundation, Inc. +# 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. + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="sed -e s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi + +# ### BEGIN LIBTOOL CONFIG + +# 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=$need_lc + +# 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 + +# The default C compiler. +CC=$lt_CC + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +# 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=$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 + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_wl + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_pic_flag +pic_mode=$pic_mode + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_compiler_c_o + +# Can we write directly to a .lo ? +compiler_o_lo=$lt_compiler_o_lo + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_link_static_flag + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_no_builtin_flag + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec + +# 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 + +# 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 + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# 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 to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# 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 + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# 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_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_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 + +# 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 + +# 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.so 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 + +# 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 >> "${ofile}T" + +# 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 + + case $host_os in + cygwin* | mingw* | pw32* | os2*) + cat <<'EOF' >> "${ofile}T" + # This is a source program that is used to create dlls on Windows + # Don't remove nor modify the starting and closing comments +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ + # This is a source program that is used to create import libraries + # on Windows for dlls which lack them. Don't remove nor modify the + # starting and closing comments +# /* impgen.c starts here */ +# /* Copyright (C) 1999-2000 Free Software Foundation, Inc. +# +# This file is part of GNU libtool. +# +# 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. +# */ +# +# #include /* for printf() */ +# #include /* for open(), lseek(), read() */ +# #include /* for O_RDONLY, O_BINARY */ +# #include /* for strdup() */ +# +# /* O_BINARY isn't required (or even defined sometimes) under Unix */ +# #ifndef O_BINARY +# #define O_BINARY 0 +# #endif +# +# static unsigned int +# pe_get16 (fd, offset) +# int fd; +# int offset; +# { +# unsigned char b[2]; +# lseek (fd, offset, SEEK_SET); +# read (fd, b, 2); +# return b[0] + (b[1]<<8); +# } +# +# static unsigned int +# pe_get32 (fd, offset) +# int fd; +# int offset; +# { +# unsigned char b[4]; +# lseek (fd, offset, SEEK_SET); +# read (fd, b, 4); +# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); +# } +# +# static unsigned int +# pe_as32 (ptr) +# void *ptr; +# { +# unsigned char *b = ptr; +# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); +# } +# +# int +# main (argc, argv) +# int argc; +# char *argv[]; +# { +# int dll; +# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; +# unsigned long export_rva, export_size, nsections, secptr, expptr; +# unsigned long name_rvas, nexp; +# unsigned char *expdata, *erva; +# char *filename, *dll_name; +# +# filename = argv[1]; +# +# dll = open(filename, O_RDONLY|O_BINARY); +# if (dll < 1) +# return 1; +# +# dll_name = filename; +# +# for (i=0; filename[i]; i++) +# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') +# dll_name = filename + i +1; +# +# pe_header_offset = pe_get32 (dll, 0x3c); +# opthdr_ofs = pe_header_offset + 4 + 20; +# num_entries = pe_get32 (dll, opthdr_ofs + 92); +# +# if (num_entries < 1) /* no exports */ +# return 1; +# +# export_rva = pe_get32 (dll, opthdr_ofs + 96); +# export_size = pe_get32 (dll, opthdr_ofs + 100); +# nsections = pe_get16 (dll, pe_header_offset + 4 +2); +# secptr = (pe_header_offset + 4 + 20 + +# pe_get16 (dll, pe_header_offset + 4 + 16)); +# +# expptr = 0; +# for (i = 0; i < nsections; i++) +# { +# char sname[8]; +# unsigned long secptr1 = secptr + 40 * i; +# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); +# unsigned long vsize = pe_get32 (dll, secptr1 + 16); +# unsigned long fptr = pe_get32 (dll, secptr1 + 20); +# lseek(dll, secptr1, SEEK_SET); +# read(dll, sname, 8); +# if (vaddr <= export_rva && vaddr+vsize > export_rva) +# { +# expptr = fptr + (export_rva - vaddr); +# if (export_rva + export_size > vaddr + vsize) +# export_size = vsize - (export_rva - vaddr); +# break; +# } +# } +# +# expdata = (unsigned char*)malloc(export_size); +# lseek (dll, expptr, SEEK_SET); +# read (dll, expdata, export_size); +# erva = expdata - export_rva; +# +# nexp = pe_as32 (expdata+24); +# name_rvas = pe_as32 (expdata+32); +# +# printf ("EXPORTS\n"); +# for (i = 0; i> "${ofile}T" || (rm -f "${ofile}T"; exit 1) + + mv -f "${ofile}T" "$ofile" || \ + (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") + chmod +x "$ofile" +fi +## +## END FIXME + +])# _LT_AC_LTCONFIG_HACK + +# AC_LIBTOOL_DLOPEN - enable checks for dlopen support +AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) + +# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's +AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) + +# AC_ENABLE_SHARED - implement the --enable-shared flag +# Usage: AC_ENABLE_SHARED[(DEFAULT)] +# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to +# `yes'. +AC_DEFUN([AC_ENABLE_SHARED], +[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE(shared, +changequote(<<, >>)dnl +<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], +changequote([, ])dnl +[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. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac], +enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl +]) + +# AC_DISABLE_SHARED - set the default shared flag to --disable-shared +AC_DEFUN([AC_DISABLE_SHARED], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no)]) + +# AC_ENABLE_STATIC - implement the --enable-static flag +# Usage: AC_ENABLE_STATIC[(DEFAULT)] +# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to +# `yes'. +AC_DEFUN([AC_ENABLE_STATIC], +[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE(static, +changequote(<<, >>)dnl +<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], +changequote([, ])dnl +[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. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac], +enable_static=AC_ENABLE_STATIC_DEFAULT)dnl +]) + +# AC_DISABLE_STATIC - set the default static flag to --disable-static +AC_DEFUN([AC_DISABLE_STATIC], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no)]) + + +# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag +# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] +# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to +# `yes'. +AC_DEFUN([AC_ENABLE_FAST_INSTALL], +[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE(fast-install, +changequote(<<, >>)dnl +<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], +changequote([, ])dnl +[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. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac], +enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl +]) + +# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install +AC_DEFUN([AC_DISABLE_FAST_INSTALL], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no)]) + +# AC_LIBTOOL_PICMODE - implement the --with-pic flag +# Usage: AC_LIBTOOL_PICMODE[(MODE)] +# Where MODE is either `yes' or `no'. If omitted, it defaults to +# `both'. +AC_DEFUN([AC_LIBTOOL_PICMODE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +pic_mode=ifelse($#,1,$1,default)]) + + +# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library +AC_DEFUN([AC_PATH_TOOL_PREFIX], +[AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in + /*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; + ?:/*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. + ;; + *) + ac_save_MAGIC_CMD="$MAGIC_CMD" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="ifelse([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + 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="$ac_save_ifs" + MAGIC_CMD="$ac_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +]) + + +# AC_PATH_MAGIC - find a file program which can recognise a shared library +AC_DEFUN([AC_PATH_MAGIC], +[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl +AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) + else + MAGIC_CMD=: + fi +fi +]) + + +# AC_PROG_LD - find the path to the GNU or non-GNU linker +AC_DEFUN([AC_PROG_LD], +[AC_ARG_WITH(gnu-ld, +[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], +test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by GCC]) + 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. + [[\\/]]* | [[A-Za-z]]:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the path 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 + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + 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. + if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + lt_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$lt_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT($LD) +else + AC_MSG_RESULT(no) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +AC_PROG_LD_GNU +]) + +# AC_PROG_LD_GNU - +AC_DEFUN([AC_PROG_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, +[# I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + lt_cv_prog_gnu_ld=yes +else + lt_cv_prog_gnu_ld=no +fi]) +with_gnu_ld=$lt_cv_prog_gnu_ld +]) + +# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker +# -- PORTME Some linkers may need a different reload flag. +AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], +[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, +[lt_cv_ld_reload_flag='-r']) +reload_flag=$lt_cv_ld_reload_flag +test -n "$reload_flag" && reload_flag=" $reload_flag" +]) + +# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies +# -- PORTME fill in with the dynamic library characteristics +AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], +[AC_CACHE_CHECK([how to recognise dependant libraries], +lt_cv_deplibs_check_method, +[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 egrep 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 + ;; + +bsdi4*) + 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 + ;; + +cygwin* | mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' + lt_cv_file_magic_cmd='/usr/bin/file -L' + case "$host_os" in + rhapsody* | darwin1.[[012]]) + lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` + ;; + *) # Darwin 1.3 on + lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' + ;; + esac + ;; + +freebsd*) + 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 + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20*|hpux11*) + 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_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + +irix5* | irix6*) + case $host_os in + irix5*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" + ;; + *) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" + ;; + esac + lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux-gnu*) + case $host_cpu in + alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* ) + lt_cv_deplibs_check_method=pass_all ;; + *) + # glibc up to 2.1.1 does not perform some relocations on ARM + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; + esac + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$' + 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 + ;; + +openbsd*) + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' + else + lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' + fi + ;; + +osf3* | osf4* | osf5*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' + lt_cv_file_magic_test_file=/shlib/libc.so + lt_cv_deplibs_check_method=pass_all + ;; + +sco3.2v5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + lt_cv_file_magic_test_file=/lib/libc.so + ;; + +sysv5uw[[78]]* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +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 + ;; + esac + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +]) + + +# AC_PROG_NM - find the path to a BSD-compatible name lister +AC_DEFUN([AC_PROG_NM], +[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl +AC_MSG_CHECKING([for BSD-compatible nm]) +AC_CACHE_VAL(lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + 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 + if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then + lt_cv_path_NM="$tmp_nm -B" + break + elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + lt_cv_path_NM="$tmp_nm -p" + break + else + 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 + fi + fi + done + IFS="$ac_save_ifs" + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi]) +NM="$lt_cv_path_NM" +AC_MSG_RESULT([$NM]) +]) + +# AC_CHECK_LIBM - check for math library +AC_DEFUN([AC_CHECK_LIBM], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32*) + # These system don't have libm + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, main, LIBM="-lm") + ;; +esac +]) + +# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for +# the libltdl convenience library and INCLTDL to the include flags for +# the libltdl header and adds --enable-ltdl-convenience to the +# configure arguments. Note that LIBLTDL and INCLTDL are not +# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not +# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed +# with '${top_builddir}/' and INCLTDL will be prefixed with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and +# top_srcdir appropriately in the Makefiles. +AC_DEFUN([AC_LIBLTDL_CONVENIENCE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case $enable_ltdl_convenience in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) +]) + +# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for +# the libltdl installable library and INCLTDL to the include flags for +# the libltdl header and adds --enable-ltdl-install to the configure +# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is +# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed +# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will +# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed +# with '${top_srcdir}/' (note the single quotes!). If your package is +# not flat and you're not using automake, define top_builddir and +# top_srcdir appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN([AC_LIBLTDL_INSTALLABLE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, main, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + INCLTDL= + fi +]) + +# old names +AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) +AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) +AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) + +# This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL]) + +############################################################################# +# Additional Macros +############################################################################# + +# +# Check for C++ namespace support. This is from +# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_namespaces.html +# +AC_DEFUN([AC_CXX_NAMESPACES], +[AC_CACHE_CHECK(whether the compiler implements namespaces, +ac_cv_cxx_namespaces, +[AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], + [using namespace Outer::Inner; return i;], + ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_namespaces" = yes; then + AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) +fi +]) + +# +# Check for hash_map extension. This is from +# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_map.html +# +AC_DEFUN([AC_CXX_HAVE_EXT_HASH_MAP], +[AC_CACHE_CHECK(whether the compiler has ext/hash_map, +ac_cv_cxx_have_ext_hash_map, +[AC_REQUIRE([AC_CXX_NAMESPACES]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif],[hash_map t; return 0;], + ac_cv_cxx_have_ext_hash_map=std, ac_cv_cxx_have_ext_hash_map=no) + AC_TRY_COMPILE([#include +#ifdef HAVE_NAMESPACES +using namespace __gnu_cxx; +#endif],[hash_map t; return 0;], + ac_cv_cxx_have_ext_hash_map=gnu, ac_cv_cxx_have_ext_hash_map=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_have_ext_hash_map" = std; then + AC_DEFINE(HAVE_STD_EXT_HASH_MAP,,[define if the compiler has ext/hash_map]) +fi +if test "$ac_cv_cxx_have_ext_hash_map" = gnu; then + AC_DEFINE(HAVE_GNU_EXT_HASH_MAP,,[define if the compiler has ext/hash_map]) +fi +]) + +# +# Check for hash_set extension. This is modified from +# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html +# +AC_DEFUN([AC_CXX_HAVE_EXT_HASH_SET], +[AC_CACHE_CHECK(whether the compiler has ext/hash_set, +ac_cv_cxx_have_ext_hash_set, +[AC_REQUIRE([AC_CXX_NAMESPACES]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif],[hash_set t; return 0;], + ac_cv_cxx_have_ext_hash_set=std, ac_cv_cxx_have_ext_hash_set=no) + AC_TRY_COMPILE([#include +#ifdef HAVE_NAMESPACES +using namespace __gnu_cxx; +#endif],[hash_set t; return 0;], + ac_cv_cxx_have_ext_hash_set=gnu, ac_cv_cxx_have_ext_hash_set=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_have_ext_hash_set" = std; then + AC_DEFINE(HAVE_STD_EXT_HASH_SET,,[define if the compiler has ext/hash_set in std]) +fi +if test "$ac_cv_cxx_have_ext_hash_set" = gnu; then + AC_DEFINE(HAVE_GNU_EXT_HASH_SET,,[define if the compiler has ext/hash_set in __gnu_cc]) +fi +]) + +# +# Check for standard iterator extension. This is modified from +# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html +# +AC_DEFUN([AC_CXX_HAVE_STD_ITERATOR], +[AC_CACHE_CHECK(whether the compiler has the standard iterator, +ac_cv_cxx_have_std_iterator, +[AC_REQUIRE([AC_CXX_NAMESPACES]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif],[iterator t; return 0;], + ac_cv_cxx_have_std_iterator=yes, ac_cv_cxx_have_std_iterator=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_have_std_iterator" = yes; then + AC_DEFINE(HAVE_STD_ITERATOR,,[define if the compiler has STL iterators]) +fi +]) + +# +# Check for bidirectional iterator extension. This is modified from +# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html +# +AC_DEFUN([AC_CXX_HAVE_BI_ITERATOR], +[AC_CACHE_CHECK(whether the compiler has the bidirectional iterator, +ac_cv_cxx_have_bi_iterator, +[AC_REQUIRE([AC_CXX_NAMESPACES]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif],[bidirectional_iterator t; return 0;], + ac_cv_cxx_have_bi_iterator=yes, ac_cv_cxx_have_bi_iterator=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_have_bi_iterator" = yes; then + AC_DEFINE(HAVE_BI_ITERATOR,,[define if the compiler has bidirectional iterator]) +fi +]) + +# +# Check for standard iterator extension. This is modified from +# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html +# +AC_DEFUN([AC_CXX_HAVE_FWD_ITERATOR], +[AC_CACHE_CHECK(whether the compiler has forward iterators, +ac_cv_cxx_have_fwd_iterator, +[AC_REQUIRE([AC_CXX_NAMESPACES]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif],[forward_iterator t; return 0;], + ac_cv_cxx_have_fwd_iterator=yes, ac_cv_cxx_have_fwd_iterator=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_have_fwd_iterator" = yes; then + AC_DEFINE(HAVE_FWD_ITERATOR,,[define if the compiler has STL iterators]) +fi +]) + +# +# Check for slist extension. This is from +# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_slist.html +# +AC_DEFUN([AC_CXX_HAVE_EXT_SLIST], +[AC_CACHE_CHECK(whether the compiler has ext/slist, +ac_cv_cxx_have_ext_slist, +[AC_REQUIRE([AC_CXX_NAMESPACES]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif],[slist s; return 0;], + ac_cv_cxx_have_ext_slist=std, ac_cv_cxx_have_ext_slist=no) + AC_TRY_COMPILE([#include +#ifdef HAVE_NAMESPACES +using namespace __gnu_cxx; +#endif],[slist s; return 0;], + ac_cv_cxx_have_ext_slist=gnu, ac_cv_cxx_have_ext_slist=no) + + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_have_ext_slist" = std; then + AC_DEFINE(HAVE_EXT_SLIST,std,[define if the compiler has ext/slist]) +fi +if test "$ac_cv_cxx_have_ext_slist" = gnu; then + AC_DEFINE(HAVE_EXT_SLIST,gnu,[define if the compiler has ext/slist]) +fi +]) + +# +# Check for FLEX. This is modified from +# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_namespaces.html +# +AC_DEFUN([AC_PROG_FLEX], +[AC_CACHE_CHECK(, +ac_cv_has_flex, +[AC_PROG_LEX() +]) +if test "$LEX" != "flex"; then + AC_MSG_ERROR([flex not found but required]) +fi +]) + +# +# Check for Bison. This is modified from +# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_namespaces.html +# +AC_DEFUN([AC_PROG_BISON], +[AC_CACHE_CHECK(, +ac_cv_has_bison, +[AC_PROG_YACC() +]) +if test "$YACC" != "bison -y"; then + AC_MSG_ERROR([bison not found but required]) +else + AC_SUBST(YACC,[bison],[location of bison]) +fi +]) + +# +# Check for GNU Make. This is from +# http://www.gnu.org/software/ac-archive/htmldoc/check_gnu_make.html +# +AC_DEFUN( + [CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command, + _cv_gnu_make_command='' ; +dnl Search all the common names for GNU make + 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 + _cv_gnu_make_command=$a ; + break; + fi + done ; + ) ; +dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise + if test "x$_cv_gnu_make_command" != "x" ; then + ifGNUmake='' ; + else + ifGNUmake='#' ; + AC_MSG_RESULT("Not found"); + fi + AC_SUBST(ifGNUmake) +] ) + +# +# Check for the ability to mmap a file. This is modified from +# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_slist.html +# +AC_DEFUN([AC_FUNC_MMAP_FILE], +[AC_CACHE_CHECK(for mmap of files, +ac_cv_func_mmap_file, +[AC_LANG_SAVE + AC_LANG_C + AC_TRY_RUN([ +#ifdef HAVE_SYS_MMAN_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + +#ifdef HAVE_FCNTL_H +#include +#endif + + int fd; + int main () { + fd = creat ("foo",0777); fd = (int) mmap (0, 1, PROT_READ, MAP_SHARED, fd, 0); unlink ("foo"); return (fd != MAP_FAILED);}], + ac_cv_func_mmap_file=yes, ac_cv_func_mmap_file=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_func_mmap_file" = yes; then + AC_DEFINE(HAVE_MMAP_FILE) + AC_SUBST(MMAP_FILE,[yes]) +fi +]) + +# +# Check for anonymous mmap macros. This is modified from +# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_slist.html +# +AC_DEFUN([AC_HEADER_MMAP_ANONYMOUS], +[AC_CACHE_CHECK(for MAP_ANONYMOUS vs. MAP_ANON, +ac_cv_header_mmap_anon, +[AC_LANG_SAVE + AC_LANG_C + AC_TRY_COMPILE([#include + #include + #include ], + [mmap (0, 1, PROT_READ, MAP_ANONYMOUS, -1, 0); return (0);], + ac_cv_header_mmap_anon=yes, ac_cv_header_mmap_anon=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_header_mmap_anon" = yes; then + AC_DEFINE(HAVE_MMAP_ANONYMOUS) +fi +]) + Index: llvm/config.guess diff -u /dev/null llvm/config.guess:1.2 --- /dev/null Mon Jun 30 16:59:25 2003 +++ llvm/config.guess Mon Jun 30 16:58:13 2003 @@ -0,0 +1,1317 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-09-04' + +# This file 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. + +# Written by Per Bothner . +# Please send patches to . +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + + +dummy=dummy-$$ +trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int dummy(){}" > $dummy.c ; + for c in cc gcc c89 ; do + ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; + if test $? = 0 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + rm -f $dummy.c $dummy.o $dummy.rel ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi at noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # Netbsd (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # Determine the machine/vendor (is the vendor relevant). + case "${UNAME_MACHINE}" in + amiga) machine=m68k-unknown ;; + arm32) machine=arm-unknown ;; + atari*) machine=m68k-atari ;; + sun3*) machine=m68k-sun ;; + mac68k) machine=m68k-apple ;; + macppc) machine=powerpc-apple ;; + hp3[0-9][05]) machine=m68k-hp ;; + ibmrt|romp-ibm) machine=romp-ibm ;; + *) machine=${UNAME_MACHINE}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE}" in + i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main +main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + eval $set_cc_for_build + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + case `./$dummy` in + 0-0) + UNAME_MACHINE="alpha" + ;; + 1-0) + UNAME_MACHINE="alphaev5" + ;; + 1-1) + UNAME_MACHINE="alphaev56" + ;; + 1-101) + UNAME_MACHINE="alphapca56" + ;; + 2-303) + UNAME_MACHINE="alphaev6" + ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; + 2-1307) + UNAME_MACHINE="alphaev68" + ;; + esac + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hkmips:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + sparc*:NetBSD:*) + echo `uname -p`-unknown-netbsd${UNAME_RELEASE} + exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy \ + && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + case "${HPUX_REV}" in + 11.[0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + esac ;; + esac + fi ;; + esac + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi + rm -f $dummy.c $dummy + fi ;; + esac + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + hppa*:OpenBSD:*:*) + echo hppa-unknown-openbsd + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*X-MP:*:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3D:*:*:*) + echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i386-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in + big) echo mips-unknown-linux-gnu && exit 0 ;; + little) echo mipsel-unknown-linux-gnu && exit 0 ;; + esac + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + ld_supported_targets=`cd /; ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + cat >$dummy.c < +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __ELF__ +# ifdef __GLIBC__ +# if __GLIBC__ >= 2 + printf ("%s-pc-linux-gnu\n", argv[1]); +# else + printf ("%s-pc-linux-gnulibc1\n", argv[1]); +# endif +# else + printf ("%s-pc-linux-gnulibc1\n", argv[1]); +# endif +#else + printf ("%s-pc-linux-gnuaout\n", argv[1]); +#endif + return 0; +} +EOF + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit 0 ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit 0 ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf at swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + *:VOS:*:*) + # From Paul.Green at stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + echo `uname -p`-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_MACHINE=pc + fi + echo `uname -p`-${UNAME_MACHINE}-nto-qnx + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[KW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 +rm -f $dummy.c $dummy + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: Index: llvm/config.sub diff -u /dev/null llvm/config.sub:1.2 --- /dev/null Mon Jun 30 16:59:25 2003 +++ llvm/config.sub Mon Jun 30 16:58:13 2003 @@ -0,0 +1,1411 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-09-07' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file 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. + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | c4x | clipper \ + | d10v | d30v | dsp16xx \ + | fr30 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | m32r | m68000 | m68k | m88k | mcore \ + | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el | mips64vr4300 \ + | mips64vr4300el | mips64vr5000 | mips64vr5000el \ + | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ + | mipsisa32 \ + | mn10200 | mn10300 \ + | ns16k | ns32k \ + | openrisc \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | s390 | s390x \ + | sh | sh[34] | sh[34]eb | shbe | shle \ + | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ + | stormy16 | strongarm \ + | tahoe | thumb | tic80 | tron \ + | v850 \ + | we32k \ + | x86 | xscale \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alphapca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armv*-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c54x-* \ + | clipper-* | cray2-* | cydra-* \ + | d10v-* | d30v-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | m32r-* \ + | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ + | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \ + | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | s390-* | s390x-* \ + | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \ + | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ + | v850-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [cjt]90) + basic_machine=${basic_machine}-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i686-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sparclite-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=t3e-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + windows32) + basic_machine=i386-pc + os=-windows32-msvcrt + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + mips) + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh3 | sh4 | sh3eb | sh4eb) + basic_machine=sh-unknown + ;; + sparc | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + c4x*) + basic_machine=c4x-none + os=-coff + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto*) + os=-nto-qnx + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: Index: llvm/configure diff -u /dev/null llvm/configure:1.2 --- /dev/null Mon Jun 30 16:59:25 2003 +++ llvm/configure Mon Jun 30 16:58:13 2003 @@ -0,0 +1,12628 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.53 for [LLVM] [1.0]. +# +# Report bugs to . +# +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Find the correct PATH separator. Usually this is `:', but +# DJGPP uses `;' like DOS. +if test "X${PATH_SEPARATOR+set}" != Xset; then + UNAME=${UNAME-`uname 2>/dev/null`} + case X$UNAME in + *-DOS) lt_cv_sys_path_separator=';' ;; + *) lt_cv_sys_path_separator=':' ;; + esac + PATH_SEPARATOR=$lt_cv_sys_path_separator +fi + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +echo=${ECHO-echo} +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null && + echo_test_string="`eval $cmd`" && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + + +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# NLS nuisances. +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +(set +x; test -n "`(LANG=C; export LANG) 2>&1`") && + { $as_unset LANG || test "${LANG+set}" != set; } || + { LANG=C; export LANG; } +(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && + { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || + { LC_ALL=C; export LC_ALL; } +(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && + { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || + { LC_TIME=C; export LC_TIME; } +(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && + { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || + { LC_CTYPE=C; export LC_CTYPE; } +(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && + { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || + { LANGUAGE=C; export LANGUAGE; } +(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && + { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || + { LC_COLLATE=C; export LC_COLLATE; } +(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && + { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || + { LC_NUMERIC=C; export LC_NUMERIC; } +(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && + { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || + { LC_MESSAGES=C; export LC_MESSAGES; } + + +# Name of the executable. +as_me=`(basename "$0") 2>/dev/null || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conftest.sh + echo "exit 0" >>conftest.sh + chmod +x conftest.sh + if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conftest.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } + + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# +ac_default_prefix=/usr/local +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME='[LLVM]' +PACKAGE_TARNAME='--llvm--' +PACKAGE_VERSION='[1.0]' +PACKAGE_STRING='[LLVM] [1.0]' +PACKAGE_BUGREPORT='llvmbugs at cs.uiuc.edu' + +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_unique_file=""Makefile.config.in"" + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +ac_prev= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_option in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures [LLVM] [1.0] to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of [LLVM] [1.0]:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-shared=PKGS build shared libraries default=yes + --enable-static=PKGS build static libraries default=yes + --enable-fast-install=PKGS optimize for fast installation default=yes + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-purify Compile with purify (default is NO) + --enable-verbose Enable verbose compilation messages (default is NO) + --enable-profiling Compile with profiling information (default is NO) + --enable-optimized Compile with optimizations enabled (default is NO) + --enable-spec Compile SPEC benchmarks (default is NO) + --enable-precompiled_bytecode + Use pre-compiled bytecode (default is NO) + --enable-jit Enable Just In Time Compiling (default is NO) + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --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 + --with-spec Location of SPEC benchmarks + --with-llvmgccdir Location of LLVM GCC front-end + --with-bcrepos Location of Bytecode Repository + --with-papi Location of PAPI + --with-objroot Location where object files should be placed + (default is .) + --with-purify Location of purify program + +Some influential environment variables: + CXX C++ compiler command + CXXFLAGS C++ compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CC C compiler command + CFLAGS C compiler flags + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF +[LLVM] configure [1.0] +generated by GNU Autoconf 2.53 + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by [LLVM] $as_me [1.0], which was +generated by GNU Autoconf 2.53. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell meta-characters. +ac_configure_args= +ac_sep= +for ac_arg +do + case $ac_arg in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n ) continue ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + ac_sep=" " ;; + esac + # Get rid of the leading space. +done + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core core.* *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + + + + + + + + + + + +ac_config_headers="$ac_config_headers include/Config/config.h" + + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } +fi +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# 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" +# ./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/* | \ + /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 + + +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 + +# 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}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6 +if test "${ac_cv_target+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_target_alias=$target_alias +test "x$ac_cv_target_alias" = "x" && + ac_cv_target_alias=$ac_cv_host_alias +ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6 +target=$ac_cv_target +target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- + +case $build in + *i*86*) OS=Linux + + DISABLE_LLC_DIFFS=DISABLE_LLC_DIFFS:=1 + + LLVMGCCDIR=/home/vadve/lattner/local/x86/llvm-gcc/ + + ;; + + *sparc*) OS=SunOS + + LLVMGCCDIR=/home/vadve/lattner/local/sparc/llvm-gcc/ + + ;; + + *) OS=Unknown + + ;; +esac + +case $target in + *sparc*solaris*) target=sparcv9-sun-solaris2.8 + + ;; +esac + + +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 +if test -n "$ac_tool_prefix"; then + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + 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_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # 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_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC +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_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CXX" && break +done +test -n "$ac_ct_CXX" || ac_ct_CXX="g++" + + CXX=$ac_ct_CXX +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C++ compiler default output" >&5 +echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null; + ls a.out conftest 2>/dev/null; + ls a.* conftest.* 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;; + a.out ) # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool --akim. + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5 +echo "$as_me: error: C++ compiler cannot create executables" >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5 +echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs. +If you meant to cross compile, use \`--host'." >&5 +echo "$as_me: error: cannot run C++ compiled programs. +If you meant to cross compile, use \`--host'." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&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 +cat conftest.$ac_ext >&5 +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_prog_cxx_g=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +$ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in gcc + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in gcc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&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 +cat conftest.$ac_ext >&5 +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_prog_cc_g=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +$ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # 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 +#line $LINENO "configure" +#include "confdefs.h" +#include + 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=$? + egrep -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 + 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 + cat 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 +#line $LINENO "configure" +#include "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=$? + egrep -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 + 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 + cat conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # 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 +#line $LINENO "configure" +#include "confdefs.h" +#include + 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=$? + egrep -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 + 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 + cat 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 +#line $LINENO "configure" +#include "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=$? + egrep -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 + 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 + cat conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +if test "$GCC" != "yes" +then + { { echo "$as_me:$LINENO: error: gcc required but not found" >&5 +echo "$as_me: error: gcc required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + +if test "$GXX" != "yes" +then + { { echo "$as_me:$LINENO: error: g++ required but not found" >&5 +echo "$as_me: error: g++ required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + + echo "$as_me:$LINENO: checking for GNU make" >&5 +echo $ECHO_N "checking for GNU make... $ECHO_C" >&6 +if test "${_cv_gnu_make_command+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + _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 + _cv_gnu_make_command=$a ; + break; + fi + done ; + +fi +echo "$as_me:$LINENO: result: $_cv_gnu_make_command" >&5 +echo "${ECHO_T}$_cv_gnu_make_command" >&6 ; + if test "x$_cv_gnu_make_command" != "x" ; then + ifGNUmake='' ; + else + ifGNUmake='#' ; + echo "$as_me:$LINENO: result: \"Not found\"" >&5 +echo "${ECHO_T}\"Not found\"" >&6; + fi + + +if test -z "$_cv_gnu_make_command" +then + { { echo "$as_me:$LINENO: error: GNU Make required but not found" >&5 +echo "$as_me: error: GNU Make required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + + +echo "$as_me:$LINENO: checking " >&5 +echo $ECHO_N "checking ... $ECHO_C" >&6 +if test "${ac_cv_has_flex+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + for ac_prog in flex lex +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_LEX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # 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_LEX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +LEX=$ac_cv_prog_LEX +if test -n "$LEX"; then + echo "$as_me:$LINENO: result: $LEX" >&5 +echo "${ECHO_T}$LEX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$LEX" && break +done +test -n "$LEX" || LEX=":" + +if test -z "$LEXLIB" +then + echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5 +echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6 +if test "${ac_cv_lib_fl_yywrap+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "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 yywrap (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +yywrap (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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_fl_yywrap=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_fl_yywrap=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5 +echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6 +if test $ac_cv_lib_fl_yywrap = yes; then + LEXLIB="-lfl" +else + echo "$as_me:$LINENO: checking for yywrap in -ll" >&5 +echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6 +if test "${ac_cv_lib_l_yywrap+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ll $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "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 yywrap (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +yywrap (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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_l_yywrap=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_l_yywrap=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5 +echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6 +if test $ac_cv_lib_l_yywrap = yes; then + LEXLIB="-ll" +fi + +fi + +fi + +if test "x$LEX" != "x:"; then + echo "$as_me:$LINENO: checking lex output file root" >&5 +echo $ECHO_N "checking lex output file root... $ECHO_C" >&6 +if test "${ac_cv_prog_lex_root+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # The minimal lex program is just a single line: %%. But some broken lexes +# (Solaris, I think it was) want two %% lines, so accommodate them. +cat >conftest.l <<_ACEOF +%% +%% +_ACEOF +{ (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5 + (eval $LEX conftest.l) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +else + { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 +echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} + { (exit 1); exit 1; }; } +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_root" >&6 +rm -f conftest.l +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 +echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6 +if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c +ac_save_LIBS=$LIBS +LIBS="$LIBS $LEXLIB" +cat >conftest.$ac_ext <<_ACEOF +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +rm -f conftest.$ac_objext 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='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_lex_yytext_pointer=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_save_LIBS +rm -f "${LEX_OUTPUT_ROOT}.c" + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6 +if test $ac_cv_prog_lex_yytext_pointer = yes; then + +cat >>confdefs.h <<\_ACEOF +#define YYTEXT_POINTER 1 +_ACEOF + +fi + +fi + +fi +echo "$as_me:$LINENO: result: $ac_cv_has_flex" >&5 +echo "${ECHO_T}$ac_cv_has_flex" >&6 +if test "$LEX" != "flex"; then + { { echo "$as_me:$LINENO: error: flex not found but required" >&5 +echo "$as_me: error: flex not found but required" >&2;} + { (exit 1); exit 1; }; } +fi + +echo "$as_me:$LINENO: checking " >&5 +echo $ECHO_N "checking ... $ECHO_C" >&6 +if test "${ac_cv_has_bison+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + for ac_prog in 'bison -y' byacc +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_YACC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # 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_YACC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + echo "$as_me:$LINENO: result: $YACC" >&5 +echo "${ECHO_T}$YACC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + + +fi +echo "$as_me:$LINENO: result: $ac_cv_has_bison" >&5 +echo "${ECHO_T}$ac_cv_has_bison" >&6 +if test "$YACC" != "bison -y"; then + { { echo "$as_me:$LINENO: error: bison not found but required" >&5 +echo "$as_me: error: bison not found but required" >&2;} + { (exit 1); exit 1; }; } +else + YACC=bison + +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. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac +else + enable_shared=yes +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. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$ac_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. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac +else + enable_fast_install=yes +fi; +# Find the correct PATH separator. Usually this is `:', but +# DJGPP uses `;' like DOS. +if test "X${PATH_SEPARATOR+set}" != Xset; then + UNAME=${UNAME-`uname 2>/dev/null`} + case X$UNAME in + *-DOS) lt_cv_sys_path_separator=';' ;; + *) lt_cv_sys_path_separator=':' ;; + esac + PATH_SEPARATOR=$lt_cv_sys_path_separator +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 +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 GCC" >&5 +echo $ECHO_N "checking for ld used by GCC... $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. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path 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 + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + 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. + if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + lt_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$lt_cv_path_LD" +if test -n "$LD"; then + echo "$as_me:$LINENO: result: $LD" >&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. +if $LD -v 2>&1 &5; then + lt_cv_prog_gnu_ld=yes +else + lt_cv_prog_gnu_ld=no +fi +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 + + +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 +test -n "$reload_flag" && reload_flag=" $reload_flag" + +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 + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + 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 + if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then + lt_cv_path_NM="$tmp_nm -B" + break + elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + lt_cv_path_NM="$tmp_nm -p" + break + else + 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 + fi + fi + done + IFS="$ac_save_ifs" + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi + +NM="$lt_cv_path_NM" +echo "$as_me:$LINENO: result: $NM" >&5 +echo "${ECHO_T}$NM" >&6 + +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 + +echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5 +echo $ECHO_N "checking how to recognise dependant 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 egrep 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 + ;; + +bsdi4*) + 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 + ;; + +cygwin* | mingw* | pw32*) + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' + lt_cv_file_magic_cmd='/usr/bin/file -L' + case "$host_os" in + rhapsody* | darwin1.[012]) + lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` + ;; + *) # Darwin 1.3 on + lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' + ;; + esac + ;; + +freebsd*) + 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 + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20*|hpux11*) + 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_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + +irix5* | irix6*) + case $host_os in + irix5*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" + ;; + *) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" + ;; + esac + lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux-gnu*) + case $host_cpu in + alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* ) + lt_cv_deplibs_check_method=pass_all ;; + *) + # glibc up to 2.1.1 does not perform some relocations on ARM + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; + esac + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$' + 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 + ;; + +openbsd*) + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' + else + lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' + fi + ;; + +osf3* | osf4* | osf5*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' + lt_cv_file_magic_test_file=/shlib/libc.so + lt_cv_deplibs_check_method=pass_all + ;; + +sco3.2v5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + lt_cv_file_magic_test_file=/lib/libc.so + ;; + +sysv5uw[78]* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +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 + ;; + esac + ;; +esac + +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 + + + + + + + +# 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" >&5 +echo $ECHO_N "checking command to parse $NM output... $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_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_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 + lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +irix*) + symcode='[BCDEGRST]' + ;; +solaris* | sysv5*) + symcode='[BDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $host_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. +if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then + symcode='[ABCDGISTW]' +fi + +# 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 + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if egrep ' nm_test_var$' "$nlist" >/dev/null; then + if egrep ' 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_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr void * +#else +# define lt_ptr char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr address; +} +lt_preloaded_symbols[] = +{ +EOF + sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$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; then + pipe_works=yes + fi + LIBS="$save_LIBS" + CFLAGS="$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 + +global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" +if test -z "$lt_cv_sys_global_symbol_pipe"; then + global_symbol_to_cdecl= + global_symbol_to_c_name_address= +else + global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" + global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" +fi +if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; +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 + + +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 + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#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=$? + egrep -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 + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_header_stdc=no +fi +rm -f conftest.err 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 +#line $LINENO "configure" +#include "confdefs.h" +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +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 +#line $LINENO "configure" +#include "confdefs.h" +#include + +_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 + +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 + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "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 + +#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 + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +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 + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +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 +#line $LINENO "configure" +#include "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>&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 +cat conftest.$ac_ext >&5 +eval "$as_ac_Header=no" +fi +rm -f 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 + +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 $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 +#line $LINENO "configure" +#include "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>&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 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f 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 +#line $LINENO "configure" +#include "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=$? + egrep -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 + 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 + cat 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 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 preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + 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: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&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 + +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 + + + + + +# 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_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. + ;; + *) + ac_save_MAGIC_CMD="$MAGIC_CMD" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="/usr/bin:$PATH" + for ac_dir in $ac_dummy; do + 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="$ac_save_ifs" + MAGIC_CMD="$ac_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 + +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_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. + ;; + *) + ac_save_MAGIC_CMD="$MAGIC_CMD" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="/usr/bin:$PATH" + for ac_dir in $ac_dummy; do + 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 + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$ac_save_ifs" + MAGIC_CMD="$ac_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 + +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 + +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 + +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 + + 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 + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +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 + +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 + + 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 + + STRIP=$ac_ct_STRIP +else + STRIP="$ac_cv_prog_STRIP" +fi + + +enable_dlopen=no +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 + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 4300 "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 + 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 + rm -rf conftest* + ;; + +*-*-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 + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +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>&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 + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +lt_cv_cc_needs_belf=no +fi +rm -f 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 + ;; + + +esac + +# 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' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# 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" +need_locks="$enable_libtool_lock" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# 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 "$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 "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +if test x"$host" != x"$build"; then + ac_tool_prefix=${host_alias}- +else + ac_tool_prefix= +fi + +# Transform linux* to *-*-linux-gnu*, to support old configure scripts. +case $host_os in +linux-gnu*) ;; +linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` +esac + +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 + +# 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 -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 + +# Allow CC to be a program name with arguments. +set dummy $CC +compiler="$2" + +## FIXME: this should be a separate macro +## +echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6 +rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + objdir=_libs +fi +rmdir .libs 2>/dev/null +echo "$as_me:$LINENO: result: $objdir" >&5 +echo "${ECHO_T}$objdir" >&6 +## +## END FIXME + + +## FIXME: this should be a separate macro +## + +# 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 + +# We assume here that the value for lt_cv_prog_cc_pic will not be cached +# in isolation, and that seeing it set (from the cache) indicates that +# the associated values are set (in the cache) correctly too. +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 +if test "${lt_cv_prog_cc_pic+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_cc_pic= + lt_cv_prog_cc_shlib= + lt_cv_prog_cc_wl= + lt_cv_prog_cc_static= + lt_cv_prog_cc_no_builtin= + lt_cv_prog_cc_can_build_shared=$can_build_shared + + if test "$GCC" = yes; then + lt_cv_prog_cc_wl='-Wl,' + lt_cv_prog_cc_static='-static' + + case $host_os in + aix*) + # Below there is a dirty hack to force normal static linking with -ldl + # The problem is because libdl dynamically linked with both libc and + # libC (AIX C++ library), which obviously doesn't included in libraries + # list by gcc. This cause undefined symbols with -static flags. + # This hack allows C programs to be linked with "-static -ldl", but + # not sure about C++ programs. + lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" + ;; + 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_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | irix5* | irix6* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_cv_prog_cc_pic='-fno-common' + ;; + cygwin* | 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_cv_prog_cc_pic='-DDLL_EXPORT' + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_cv_prog_cc_pic=-Kconform_pic + fi + ;; + *) + lt_cv_prog_cc_pic='-fPIC' + ;; + esac + else + # PORTME Check for PIC flags for the system compiler. + case $host_os in + aix3* | aix4* | aix5*) + lt_cv_prog_cc_wl='-Wl,' + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_cv_prog_cc_static='-Bstatic' + else + lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + hpux9* | hpux10* | hpux11*) + # Is there a better lt_cv_prog_cc_static that works with the bundled CC? + lt_cv_prog_cc_wl='-Wl,' + lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" + lt_cv_prog_cc_pic='+Z' + ;; + + irix5* | irix6*) + lt_cv_prog_cc_wl='-Wl,' + lt_cv_prog_cc_static='-non_shared' + # PIC (with -KPIC) is the default. + ;; + + cygwin* | 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_cv_prog_cc_pic='-DDLL_EXPORT' + ;; + + newsos6) + lt_cv_prog_cc_pic='-KPIC' + lt_cv_prog_cc_static='-Bstatic' + ;; + + osf3* | osf4* | osf5*) + # All OSF/1 code is PIC. + lt_cv_prog_cc_wl='-Wl,' + lt_cv_prog_cc_static='-non_shared' + ;; + + sco3.2v5*) + lt_cv_prog_cc_pic='-Kpic' + lt_cv_prog_cc_static='-dn' + lt_cv_prog_cc_shlib='-belf' + ;; + + solaris*) + lt_cv_prog_cc_pic='-KPIC' + lt_cv_prog_cc_static='-Bstatic' + lt_cv_prog_cc_wl='-Wl,' + ;; + + sunos4*) + lt_cv_prog_cc_pic='-PIC' + lt_cv_prog_cc_static='-Bstatic' + lt_cv_prog_cc_wl='-Qoption ld ' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + lt_cv_prog_cc_pic='-KPIC' + lt_cv_prog_cc_static='-Bstatic' + if test "x$host_vendor" = xsni; then + lt_cv_prog_cc_wl='-LD' + else + lt_cv_prog_cc_wl='-Wl,' + fi + ;; + + uts4*) + lt_cv_prog_cc_pic='-pic' + lt_cv_prog_cc_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_cv_prog_cc_pic='-Kconform_pic' + lt_cv_prog_cc_static='-Bstatic' + fi + ;; + + *) + lt_cv_prog_cc_can_build_shared=no + ;; + esac + fi + +fi + +if test -z "$lt_cv_prog_cc_pic"; then + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 +else + echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic" >&5 +echo "${ECHO_T}$lt_cv_prog_cc_pic" >&6 + + # Check to make sure the pic_flag actually works. + echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_cv_prog_cc_pic works... $ECHO_C" >&6 + if test "${lt_cv_prog_cc_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + case $host_os in + hpux9* | hpux10* | hpux11*) + # On HP-UX, both CC and GCC only warn that PIC is supported... then + # they create non-PIC objects. So, if there were any warnings, we + # assume that PIC is not supported. + if test -s conftest.err; then + lt_cv_prog_cc_pic_works=no + else + lt_cv_prog_cc_pic_works=yes + fi + ;; + *) + lt_cv_prog_cc_pic_works=yes + ;; + esac + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + lt_cv_prog_cc_pic_works=no + +fi +rm -f conftest.$ac_objext conftest.$ac_ext + CFLAGS="$save_CFLAGS" + +fi + + + if test "X$lt_cv_prog_cc_pic_works" = Xno; then + lt_cv_prog_cc_pic= + lt_cv_prog_cc_can_build_shared=no + else + lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" + fi + + echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic_works" >&5 +echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6 +fi +## +## END FIXME + +# Check for any special shared library compilation flags. +if test -n "$lt_cv_prog_cc_shlib"; then + { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&5 +echo "$as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&2;} + if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]" >/dev/null; then : + else + { echo "$as_me:$LINENO: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 +echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} + lt_cv_prog_cc_can_build_shared=no + fi +fi + +## FIXME: this should be a separate macro +## +echo "$as_me:$LINENO: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static works... $ECHO_C" >&6 +if test "${lt_cv_prog_cc_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_cc_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +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>&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_prog_cc_static_works=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi + + +# Belt *and* braces to stop my trousers falling down: +test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= +echo "$as_me:$LINENO: result: $lt_cv_prog_cc_static_works" >&5 +echo "${ECHO_T}$lt_cv_prog_cc_static_works" >&6 + +pic_flag="$lt_cv_prog_cc_pic" +special_shlib_compile_flags="$lt_cv_prog_cc_shlib" +wl="$lt_cv_prog_cc_wl" +link_static_flag="$lt_cv_prog_cc_static" +no_builtin_flag="$lt_cv_prog_cc_no_builtin" +can_build_shared="$lt_cv_prog_cc_can_build_shared" +## +## END FIXME + + +## FIXME: this should be a separate macro +## +# Check to see if options -o and -c are simultaneously supported by compiler +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_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +$rm -r conftest 2>/dev/null +mkdir conftest +cd conftest +echo "int some_variable = 0;" > conftest.$ac_ext +mkdir out +# According to Tom Tromey, Ian Lance Taylor reported there are C compilers +# that will create temporary files in the current directory regardless of +# the output directory. Thus, making CWD read-only will cause this test +# to fail, enabling locking or at least warning the user not to do parallel +# builds. +chmod -w . +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" +compiler_c_o=no +if { (eval echo configure:4850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && 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_compiler_c_o=no + else + lt_cv_compiler_c_o=yes + fi +else + # Append any errors to the config.log. + cat out/conftest.err 1>&5 + lt_cv_compiler_c_o=no +fi +CFLAGS="$save_CFLAGS" +chmod u+w . +$rm conftest* out/* +rmdir out +cd .. +rmdir conftest +$rm -r conftest 2>/dev/null + +fi + +compiler_c_o=$lt_cv_compiler_c_o +echo "$as_me:$LINENO: result: $compiler_c_o" >&5 +echo "${ECHO_T}$compiler_c_o" >&6 + +if test x"$compiler_c_o" = x"yes"; then + # Check to see if we can write to a .lo + echo "$as_me:$LINENO: checking if $compiler supports -c -o file.lo" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.lo... $ECHO_C" >&6 + if test "${lt_cv_compiler_o_lo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + lt_cv_compiler_o_lo=no + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -c -o conftest.lo" + save_objext="$ac_objext" + ac_objext=lo + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int some_variable = 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + # 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_compiler_o_lo=no + else + lt_cv_compiler_o_lo=yes + fi + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext + ac_objext="$save_objext" + CFLAGS="$save_CFLAGS" + +fi + + compiler_o_lo=$lt_cv_compiler_o_lo + echo "$as_me:$LINENO: result: $compiler_o_lo" >&5 +echo "${ECHO_T}$compiler_o_lo" >&6 +else + compiler_o_lo=no +fi +## +## END FIXME + +## FIXME: this should be a separate macro +## +# Check to see if we can do hard links to lock some files if needed +hard_links="nottested" +if test "$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 +## +## END FIXME + +## FIXME: this should be a separate macro +## +if test "$GCC" = yes; then + # Check to see if options -fno-rtti -fno-exceptions are supported by compiler + 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 + echo "int some_variable = 0;" > conftest.$ac_ext + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" + compiler_rtti_exceptions=no + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int some_variable = 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + # 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 + compiler_rtti_exceptions=no + else + compiler_rtti_exceptions=yes + fi + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext + CFLAGS="$save_CFLAGS" + echo "$as_me:$LINENO: result: $compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$compiler_rtti_exceptions" >&6 + + if test "$compiler_rtti_exceptions" = "yes"; then + no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' + else + no_builtin_flag=' -fno-builtin' + fi +fi +## +## END FIXME + +## FIXME: this should be a separate macro +## +# See if the linker supports building shared libraries. +echo "$as_me:$LINENO: checking whether the linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the linker ($LD) supports shared libraries... $ECHO_C" >&6 + +allow_undefined_flag= +no_undefined_flag= +need_lib_prefix=unknown +need_version=unknown +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +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_into_libs=no +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no +hardcode_shlibpath_var=unsupported +runpath_var= +link_all_deplibs=unknown +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 egrep regular expression 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, the GNU linker is very broken + # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. + 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 + ;; + + 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 use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | egrep ': 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*) + # 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=yes + + extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ + sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ + test -f $output_objdir/impgen.exe || (cd $output_objdir && \ + if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ + else $CC -o impgen impgen.c ; fi)~ + $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' + + old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' + + # cygwin and mingw dlls have different entry points and sets of symbols + # to exclude. + # FIXME: what about values for MSVC? + dll_entry=__cygwin_dll_entry at 12 + dll_exclude_symbols=DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12~ + case $host_os in + mingw*) + # mingw values + dll_entry=_DllMainCRTStartup at 12 + dll_exclude_symbols=DllMain at 12,DllMainCRTStartup at 12,DllEntryPoint at 12~ + ;; + esac + + # mingw and cygwin differ, and it's simplest to just exclude the union + # of the two symbol sets. + dll_exclude_symbols=DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12,DllMainCRTStartup at 12,DllEntryPoint at 12 + + # recent cygwin and mingw systems supply a stub DllMain which the user + # can override, but on older systems we have to supply one (in ltdll.c) + if test "x$lt_cv_need_dllmain" = "xyes"; then + ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " + ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ + test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' + else + ltdll_obj= + ltdll_cmds= + fi + + # Extract the symbol export list from an `--export-all' def file, + # then regenerate the def file from the symbol export list, so that + # the compiled dll only exports the symbol export list. + # Be careful not to strip the DATA tag left be newer dlltools. + export_symbols_cmds="$ltdll_cmds"' + $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ + sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' + + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is. + # If DATA tags from a recent dlltool are present, honour them! + archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname-def; + else + echo EXPORTS > $output_objdir/$soname-def; + _lt_hint=1; + cat $export_symbols | while read symbol; do + set dummy \$symbol; + case \$# in + 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; + *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;; + esac; + _lt_hint=`expr 1 + \$_lt_hint`; + done; + fi~ + '"$ltdll_cmds"' + $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ + $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ + $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ + $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' + ;; + + 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 -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared -nodefaultlibs $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 | egrep '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 | egrep ': 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 + ;; + + *) + if $LD --help 2>&1 | egrep ': 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' + case $host_os in + cygwin* | mingw* | pw32*) + # dlltool doesn't understand --whole-archive et. al. + whole_archive_flag_spec= + ;; + *) + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + ;; + esac + 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 + 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. + + hardcode_direct=yes + archive_cmds='' + hardcode_libdir_separator=':' + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + 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 + shared_flag='${wl}-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 can do strange things, 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' + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' + 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 ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='${wl}-berok' + # This is a bit strange, but 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 ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $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 + ;; + + 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 + # 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"`' + ;; + + darwin* | rhapsody*) + case "$host_os" in + rhapsody* | darwin1.[012]) + allow_undefined_flag='-undefined suppress' + ;; + *) # Darwin 1.3 on + allow_undefined_flag='-flat_namespace -undefined suppress' + ;; + esac + # FIXME: Relying on posixy $() will cause problems for + # cross-compilation, but unfortunately the echo tests do not + # yet detect zsh echo's removal of \ escapes. + archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring' + # We need to add '_' to the symbols in $export_symbols first + #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' + hardcode_direct=yes + hardcode_shlibpath_var=no + whole_archive_flag_spec='-all_load $convenience' + ;; + + 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*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9* | hpux10* | hpux11*) + case $host_os in + hpux9*) 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' ;; + *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; + esac + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_minus_L=yes # Not in the search PATH, but as the default + # location of the library. + export_dynamic_flag_spec='${wl}-E' + ;; + + irix5* | irix6*) + 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' + 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 $linker_flags' + 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 $linker_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 "-exported_symbol " >> $lib.exp; echo "\$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 + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + export_dynamic_flag_spec='${wl}-Bexport' + ;; + + solaris*) + # gcc --version < 3.0 without binutils cannot create self contained + # shared libraries reliably, requiring libgcc.a to resolve some of + # the object symbols generated in some cases. Libraries that use + # assert need libgcc.a to resolve __eprintf, for example. Linking + # a copy of libgcc.a into every shared library to guarantee resolving + # such symbols causes other problems: According to Tim Van Holder + # , C++ libraries end up with a separate + # (to the application) exception stack for one thing. + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + case `$CC --version 2>/dev/null` in + [12].*) + cat <&2 + +*** Warning: Releases of GCC earlier than version 3.0 cannot reliably +*** create self contained shared libraries on Solaris systems, without +*** introducing a dependency on libgcc.a. Therefore, libtool is disabling +*** -no-undefined support, which will at least allow you to build shared +*** libraries. However, you may find that when you link such libraries +*** into an application without using GCC, you have to manually add +*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to +*** upgrade to a newer version of GCC. Another option is to rebuild your +*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. + +EOF + no_undefined_flag= + ;; + esac + fi + # $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='-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) + if test "x$host_vendor" = xsno; then + archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + else + 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 + fi + 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' + ;; + + 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 + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + 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 + ;; + + sysv5uw7* | 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 + ;; + + *) + 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 +## +## END FIXME + +## FIXME: this should be a separate macro +## +# Check hardcoding attributes. +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"; 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 "$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 +## +## END FIXME + +## FIXME: this should be a separate macro +## +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 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +## +## END FIXME + +reload_cmds='$LD$reload_flag -o $output$reload_objs' +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +## FIXME: this should be a separate macro +## +# PORTME Fill in your ld.so characteristics +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= +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" +sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}.so$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}.so$major' + ;; + +aix4* | aix5*) + version_type=linux + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' + 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}.so$versuffix ${libname}${release}.so$major $libname.so' + 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}.so$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}.so' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi4*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$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" + export_dynamic_flag_spec=-rdynamic + # 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 + need_version=no + need_lib_prefix=no + case $GCC,$host_os in + yes,cygwin*) + library_names_spec='$libname.dll.a' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' + postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog .libs/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + ;; + yes,mingw*) + library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` + ;; + yes,pw32*) + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll' + ;; + *) + library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $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 + # FIXME: Relying on posixy $() will cause problems for + # cross-compilation, but unfortunately the echo tests do not + # yet detect zsh echo's removal of \ escapes. + library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' + soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=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}.so$versuffix ${libname}${release}.so $libname.so' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + *) + 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}.so$versuffix ${libname}${release}.so${major} ${libname}.so' + soname_spec='${libname}${release}.so$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. + dynamic_linker="$host_os dld.sl" + version_type=sunos + need_lib_prefix=no + need_version=no + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' + soname_spec='${libname}${release}.sl$major' + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +irix5* | irix6*) + version_type=irix + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}.so$major' + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' + case $host_os in + irix5*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 ") 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}" + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux-gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$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 + + # 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' + ;; + +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}.so$versuffix ${libname}.so$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' + soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}${release}.so$major $libname.so' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + 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 + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + ;; + +os2*) + libname_spec='$name' + need_lib_prefix=no + library_names_spec='$libname.dll $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_version=no + soname_spec='${libname}${release}.so' + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' + 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}.so$major' + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$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}.so$versuffix ${libname}.so$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}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=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 + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' + soname_spec='${libname}${release}.so$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' + soname_spec='$libname.so.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +*) + 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 +## +## END FIXME + +## FIXME: this should be a separate macro +## +# Report the final consequences. +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 +## +## END FIXME + +## FIXME: this should be a separate macro +## +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*) + 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 +## +## END FIXME + +## FIXME: this should be a separate macro +## +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 +## +## END FIXME + +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 + +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 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 + ;; + + cygwin* | mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + *) + 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 +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. */ +#include +/* 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 (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* 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 +f = shl_load; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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 +cat conftest.$ac_ext >&5 +ac_cv_func_shl_load=no +fi +rm -f 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 +#line $LINENO "configure" +#include "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 (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +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>&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 +cat conftest.$ac_ext >&5 +ac_cv_lib_dld_shl_load=no +fi +rm -f 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 +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. */ +#include +/* 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 (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* 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 +f = dlopen; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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 +cat conftest.$ac_ext >&5 +ac_cv_func_dlopen=no +fi +rm -f 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 +#line $LINENO "configure" +#include "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 (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +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>&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 +cat conftest.$ac_ext >&5 +ac_cv_lib_dl_dlopen=no +fi +rm -f 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 +#line $LINENO "configure" +#include "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 (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +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>&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 +cat conftest.$ac_ext >&5 +ac_cv_lib_svld_dlopen=no +fi +rm -f 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 +#line $LINENO "configure" +#include "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 (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +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>&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 +cat conftest.$ac_ext >&5 +ac_cv_lib_dld_dld_link=no +fi +rm -f 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 + + +## FIXME: this should be a separate macro +## +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 + if test "${lt_cv_archive_cmds_need_lc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + $rm conftest* + echo 'static int dummy;' > 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 + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_cv_prog_cc_wl + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + 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 + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi +fi + + echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5 +echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6 + ;; + esac +fi +need_lc=${lt_cv_archive_cmds_need_lc-yes} +## +## END FIXME + +## FIXME: this should be a separate macro +## +# The second 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 + : +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. + test -f Makefile && make "$ltmain" +fi + +if test -f "$ltmain"; then + trap "$rm \"${ofile}T\"; exit 1" 1 2 15 + $rm -f "${ofile}T" + + echo creating $ofile + + # 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 CC LD LN_S NM SHELL \ + reload_flag reload_cmds wl \ + pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ + thread_safe_flag_spec whole_archive_flag_spec libname_spec \ + library_names_spec soname_spec \ + RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ + old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ + postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ + old_striplib striplib file_magic_cmd export_symbols_cmds \ + deplibs_check_method allow_undefined_flag no_undefined_flag \ + finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ + global_symbol_to_c_name_address \ + hardcode_libdir_flag_spec hardcode_libdir_separator \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do + + case $var in + reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ + extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + finish_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 + + cat <<__EOF__ > "${ofile}T" +#! $SHELL + +# `$echo "$ofile" | 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-2000 Free Software Foundation, Inc. +# 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. + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="sed -e s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi + +# ### BEGIN LIBTOOL CONFIG + +# 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=$need_lc + +# 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 + +# The default C compiler. +CC=$lt_CC + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +# 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=$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 + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_wl + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_pic_flag +pic_mode=$pic_mode + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_compiler_c_o + +# Can we write directly to a .lo ? +compiler_o_lo=$lt_compiler_o_lo + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_link_static_flag + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_no_builtin_flag + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec + +# 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 + +# 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 + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# 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 to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# 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 + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# 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_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_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 + +# 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 + +# 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.so 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 + +# 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 >> "${ofile}T" + +# 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 + + case $host_os in + cygwin* | mingw* | pw32* | os2*) + cat <<'EOF' >> "${ofile}T" + # This is a source program that is used to create dlls on Windows + # Don't remove nor modify the starting and closing comments +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ + # This is a source program that is used to create import libraries + # on Windows for dlls which lack them. Don't remove nor modify the + # starting and closing comments +# /* impgen.c starts here */ +# /* Copyright (C) 1999-2000 Free Software Foundation, Inc. +# +# This file is part of GNU libtool. +# +# 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. +# */ +# +# #include /* for printf() */ +# #include /* for open(), lseek(), read() */ +# #include /* for O_RDONLY, O_BINARY */ +# #include /* for strdup() */ +# +# /* O_BINARY isn't required (or even defined sometimes) under Unix */ +# #ifndef O_BINARY +# #define O_BINARY 0 +# #endif +# +# static unsigned int +# pe_get16 (fd, offset) +# int fd; +# int offset; +# { +# unsigned char b[2]; +# lseek (fd, offset, SEEK_SET); +# read (fd, b, 2); +# return b[0] + (b[1]<<8); +# } +# +# static unsigned int +# pe_get32 (fd, offset) +# int fd; +# int offset; +# { +# unsigned char b[4]; +# lseek (fd, offset, SEEK_SET); +# read (fd, b, 4); +# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); +# } +# +# static unsigned int +# pe_as32 (ptr) +# void *ptr; +# { +# unsigned char *b = ptr; +# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); +# } +# +# int +# main (argc, argv) +# int argc; +# char *argv[]; +# { +# int dll; +# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; +# unsigned long export_rva, export_size, nsections, secptr, expptr; +# unsigned long name_rvas, nexp; +# unsigned char *expdata, *erva; +# char *filename, *dll_name; +# +# filename = argv[1]; +# +# dll = open(filename, O_RDONLY|O_BINARY); +# if (dll < 1) +# return 1; +# +# dll_name = filename; +# +# for (i=0; filename[i]; i++) +# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') +# dll_name = filename + i +1; +# +# pe_header_offset = pe_get32 (dll, 0x3c); +# opthdr_ofs = pe_header_offset + 4 + 20; +# num_entries = pe_get32 (dll, opthdr_ofs + 92); +# +# if (num_entries < 1) /* no exports */ +# return 1; +# +# export_rva = pe_get32 (dll, opthdr_ofs + 96); +# export_size = pe_get32 (dll, opthdr_ofs + 100); +# nsections = pe_get16 (dll, pe_header_offset + 4 +2); +# secptr = (pe_header_offset + 4 + 20 + +# pe_get16 (dll, pe_header_offset + 4 + 16)); +# +# expptr = 0; +# for (i = 0; i < nsections; i++) +# { +# char sname[8]; +# unsigned long secptr1 = secptr + 40 * i; +# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); +# unsigned long vsize = pe_get32 (dll, secptr1 + 16); +# unsigned long fptr = pe_get32 (dll, secptr1 + 20); +# lseek(dll, secptr1, SEEK_SET); +# read(dll, sname, 8); +# if (vaddr <= export_rva && vaddr+vsize > export_rva) +# { +# expptr = fptr + (export_rva - vaddr); +# if (export_rva + export_size > vaddr + vsize) +# export_size = vsize - (export_rva - vaddr); +# break; +# } +# } +# +# expdata = (unsigned char*)malloc(export_size); +# lseek (dll, expptr, SEEK_SET); +# read (dll, expdata, export_size); +# erva = expdata - export_rva; +# +# nexp = pe_as32 (expdata+24); +# name_rvas = pe_as32 (expdata+32); +# +# printf ("EXPORTS\n"); +# for (i = 0; i> "${ofile}T" || (rm -f "${ofile}T"; exit 1) + + mv -f "${ofile}T" "$ofile" || \ + (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") + chmod +x "$ofile" +fi +## +## END FIXME + + + + + +# 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)/libtool' + +# Prevent multiple expansion + + + +# 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_path_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $AR in + [\\/]* | ?:[\\/]*) + ac_cv_path_AR="$AR" # 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_AR="$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 +AR=$ac_cv_path_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 + +# 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 + + ;; +esac +fi +SED=$ac_cv_path_SED + +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 + +# 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 + + ;; +esac +fi +RM=$ac_cv_path_RM + +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 + +# Extract the first word of "echo", so it can be a program name with args. +set dummy echo; 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_ECHO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ECHO in + [\\/]* | ?:[\\/]*) + ac_cv_path_ECHO="$ECHO" # 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_ECHO="$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 +ECHO=$ac_cv_path_ECHO + +if test -n "$ECHO"; then + echo "$as_me:$LINENO: result: $ECHO" >&5 +echo "${ECHO_T}$ECHO" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +# 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 + + ;; +esac +fi +MKDIR=$ac_cv_path_MKDIR + +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 + +# 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 + + ;; +esac +fi +DATE=$ac_cv_path_DATE + +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 + +# 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 + + ;; +esac +fi +MV=$ac_cv_path_MV + +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 + +# 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 + + ;; +esac +fi +DOT=$ac_cv_path_DOT + +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 + +# 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 + + ;; +esac +fi +ETAGS=$ac_cv_path_ETAGS + +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 + +# Extract the first word of "purify", so it can be a program name with args. +set dummy purify; 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_PURIFY+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PURIFY in + [\\/]* | ?:[\\/]*) + ac_cv_path_PURIFY="$PURIFY" # 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_PURIFY="$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 +PURIFY=$ac_cv_path_PURIFY + +if test -n "$PURIFY"; then + echo "$as_me:$LINENO: result: $PURIFY" >&5 +echo "${ECHO_T}$PURIFY" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + + + + +echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5 +echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6 +if test "${ac_cv_lib_elf_elf_begin+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lelf $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "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 elf_begin (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +elf_begin (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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_elf_elf_begin=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_elf_elf_begin=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5 +echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6 +if test $ac_cv_lib_elf_elf_begin = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBELF 1 +_ACEOF + + LIBS="-lelf $LIBS" + +fi + + +echo "$as_me:$LINENO: checking for library containing dlopen" >&5 +echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6 +if test "${ac_cv_search_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_dlopen=no +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "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 (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +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>&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_dlopen="none required" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_dlopen" = no; then + for ac_lib in dl; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "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 (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +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>&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_dlopen="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f 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_dlopen" >&5 +echo "${ECHO_T}$ac_cv_search_dlopen" >&6 +if test "$ac_cv_search_dlopen" != no; then + test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS" + +else + { { echo "$as_me:$LINENO: error: dlopen() required but not found" >&5 +echo "$as_me: error: dlopen() required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + + +echo "$as_me:$LINENO: checking for library containing mallinfo" >&5 +echo $ECHO_N "checking for library containing mallinfo... $ECHO_C" >&6 +if test "${ac_cv_search_mallinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_mallinfo=no +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "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 mallinfo (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +mallinfo (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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_mallinfo="none required" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_mallinfo" = no; then + for ac_lib in malloc; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "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 mallinfo (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +mallinfo (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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_mallinfo="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f 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_mallinfo" >&5 +echo "${ECHO_T}$ac_cv_search_mallinfo" >&6 +if test "$ac_cv_search_mallinfo" != no; then + test "$ac_cv_search_mallinfo" = "none required" || LIBS="$ac_cv_search_mallinfo $LIBS" + cat >>confdefs.h <<\_ACEOF +#define HAVE_MALLINFO 1 +_ACEOF + +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 + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#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=$? + egrep -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 + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_header_stdc=no +fi +rm -f conftest.err 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 +#line $LINENO "configure" +#include "confdefs.h" +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +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 +#line $LINENO "configure" +#include "confdefs.h" +#include + +_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 + +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 + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "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 + +#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 + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +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 + +fi + +echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 +if test "${ac_cv_header_sys_wait_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_sys_wait_h=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_header_sys_wait_h=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +if test $ac_cv_header_sys_wait_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_WAIT_H 1 +_ACEOF + +fi + + + + + + + + + + +for ac_header in assert.h fcntl.h limits.h sys/time.h unistd.h errno.h signal.h math.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 +#line $LINENO "configure" +#include "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>&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 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f 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 +#line $LINENO "configure" +#include "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=$? + egrep -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 + 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 + cat 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 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 preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + 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: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&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 + +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 malloc.h strings.h sys/mman.h sys/resource.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 +#line $LINENO "configure" +#include "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>&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 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f 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 +#line $LINENO "configure" +#include "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=$? + egrep -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 + 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 + cat 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 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 preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + 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: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&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 + +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 dlfcn.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 + 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 +#line $LINENO "configure" +#include "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>&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 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f 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 +#line $LINENO "configure" +#include "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=$? + egrep -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 + 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 + cat 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 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 preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + 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: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&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 + +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 + + + +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +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 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +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 + (eval $ac_compile) 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_c_const=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_c_const=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +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 + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#ifndef __cplusplus +static $ac_kw int static_foo () {return 0; } +$ac_kw int foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_c_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 +case $ac_cv_c_inline in + inline | yes) ;; + no) +cat >>confdefs.h <<\_ACEOF +#define inline +_ACEOF + ;; + *) cat >>confdefs.h <<_ACEOF +#define inline $ac_cv_c_inline +_ACEOF + ;; +esac + + +echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_c_bigendian=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_c_bigendian=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +# It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianess by grep'ing values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + _ascii (); _ebcdic (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +int +main () +{ + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long l; + char c[sizeof (long)]; + } u; + u.l = 1; + exit (u.c[sizeof (long) - 1] == 1); +} +_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 + ac_cv_c_bigendian=no +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +case $ac_cv_c_bigendian in + yes) + cat >>confdefs.h <<\_ACEOF +#define ENDIAN_BIG 1 +_ACEOF + ;; + no) + cat >>confdefs.h <<\_ACEOF +#define ENDIAN_LITTLE 1 +_ACEOF + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianess +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianess +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac + + +echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +if test "${ac_cv_type_pid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +if ((pid_t *) 0) + return 0; +if (sizeof (pid_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_pid_t=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_pid_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +if test $ac_cv_type_pid_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +if ((size_t *) 0) + return 0; +if (sizeof (size_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_size_t=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_size_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 +if test $ac_cv_type_size_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for int64_t" >&5 +echo $ECHO_N "checking for int64_t... $ECHO_C" >&6 +if test "${ac_cv_type_int64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +if ((int64_t *) 0) + return 0; +if (sizeof (int64_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_int64_t=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_int64_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5 +echo "${ECHO_T}$ac_cv_type_int64_t" >&6 +if test $ac_cv_type_int64_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_INT64_T 1 +_ACEOF + + +else + { { echo "$as_me:$LINENO: error: Type int64_t required but not found" >&5 +echo "$as_me: error: Type int64_t required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + +echo "$as_me:$LINENO: checking for uint64_t" >&5 +echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6 +if test "${ac_cv_type_uint64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +if ((uint64_t *) 0) + return 0; +if (sizeof (uint64_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_uint64_t=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_uint64_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5 +echo "${ECHO_T}$ac_cv_type_uint64_t" >&6 +if test $ac_cv_type_uint64_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_UINT64_T 1 +_ACEOF + + +else + { { echo "$as_me:$LINENO: error: Type uint64_t required but not found" >&5 +echo "$as_me: error: Type uint64_t required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + +echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 +if test "${ac_cv_header_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#include + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_time=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_header_time=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 +if test $ac_cv_header_time = yes; then + +cat >>confdefs.h <<\_ACEOF +#define TIME_WITH_SYS_TIME 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 +if test "${ac_cv_struct_tm+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +struct tm *tp; tp->tm_sec; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_struct_tm=time.h +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_struct_tm=sys/time.h +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6 +if test $ac_cv_struct_tm = sys/time.h; then + +cat >>confdefs.h <<\_ACEOF +#define TM_IN_SYS_TIME 1 +_ACEOF + +fi + + + +echo "$as_me:$LINENO: checking whether the compiler implements namespaces" >&5 +echo $ECHO_N "checking whether the compiler implements namespaces... $ECHO_C" >&6 +if test "${ac_cv_cxx_namespaces+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + + 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 + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +namespace Outer { namespace Inner { int i = 0; }} +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +using namespace Outer::Inner; return i; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_cxx_namespaces=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_cxx_namespaces=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_namespaces" >&5 +echo "${ECHO_T}$ac_cv_cxx_namespaces" >&6 +if test "$ac_cv_cxx_namespaces" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NAMESPACES +_ACEOF + +fi + +echo "$as_me:$LINENO: checking whether the compiler has ext/hash_map" >&5 +echo $ECHO_N "checking whether the compiler has ext/hash_map... $ECHO_C" >&6 +if test "${ac_cv_cxx_have_ext_hash_map+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + + + 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 + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +hash_map t; return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_cxx_have_ext_hash_map=std +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_cxx_have_ext_hash_map=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#ifdef HAVE_NAMESPACES +using namespace __gnu_cxx; +#endif +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +hash_map t; return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_cxx_have_ext_hash_map=gnu +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_cxx_have_ext_hash_map=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_have_ext_hash_map" >&5 +echo "${ECHO_T}$ac_cv_cxx_have_ext_hash_map" >&6 +if test "$ac_cv_cxx_have_ext_hash_map" = std; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STD_EXT_HASH_MAP +_ACEOF + +fi +if test "$ac_cv_cxx_have_ext_hash_map" = gnu; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GNU_EXT_HASH_MAP +_ACEOF + +fi + +echo "$as_me:$LINENO: checking whether the compiler has ext/hash_set" >&5 +echo $ECHO_N "checking whether the compiler has ext/hash_set... $ECHO_C" >&6 +if test "${ac_cv_cxx_have_ext_hash_set+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + + + 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 + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +hash_set t; return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_cxx_have_ext_hash_set=std +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_cxx_have_ext_hash_set=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#ifdef HAVE_NAMESPACES +using namespace __gnu_cxx; +#endif +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +hash_set t; return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_cxx_have_ext_hash_set=gnu +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_cxx_have_ext_hash_set=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_have_ext_hash_set" >&5 +echo "${ECHO_T}$ac_cv_cxx_have_ext_hash_set" >&6 +if test "$ac_cv_cxx_have_ext_hash_set" = std; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STD_EXT_HASH_SET +_ACEOF + +fi +if test "$ac_cv_cxx_have_ext_hash_set" = gnu; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GNU_EXT_HASH_SET +_ACEOF + +fi + +echo "$as_me:$LINENO: checking whether the compiler has ext/slist" >&5 +echo $ECHO_N "checking whether the compiler has ext/slist... $ECHO_C" >&6 +if test "${ac_cv_cxx_have_ext_slist+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + + + 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 + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +slist s; return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_cxx_have_ext_slist=std +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_cxx_have_ext_slist=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#ifdef HAVE_NAMESPACES +using namespace __gnu_cxx; +#endif +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +slist s; return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_cxx_have_ext_slist=gnu +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_cxx_have_ext_slist=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_have_ext_slist" >&5 +echo "${ECHO_T}$ac_cv_cxx_have_ext_slist" >&6 +if test "$ac_cv_cxx_have_ext_slist" = std; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_EXT_SLIST std +_ACEOF + +fi +if test "$ac_cv_cxx_have_ext_slist" = gnu; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_EXT_SLIST gnu +_ACEOF + +fi + +echo "$as_me:$LINENO: checking whether the compiler has the standard iterator" >&5 +echo $ECHO_N "checking whether the compiler has the standard iterator... $ECHO_C" >&6 +if test "${ac_cv_cxx_have_std_iterator+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + + + 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 + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +iterator t; return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_cxx_have_std_iterator=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_cxx_have_std_iterator=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_have_std_iterator" >&5 +echo "${ECHO_T}$ac_cv_cxx_have_std_iterator" >&6 +if test "$ac_cv_cxx_have_std_iterator" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STD_ITERATOR +_ACEOF + +fi + +echo "$as_me:$LINENO: checking whether the compiler has the bidirectional iterator" >&5 +echo $ECHO_N "checking whether the compiler has the bidirectional iterator... $ECHO_C" >&6 +if test "${ac_cv_cxx_have_bi_iterator+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + + + 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 + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +bidirectional_iterator t; return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_cxx_have_bi_iterator=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_cxx_have_bi_iterator=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_have_bi_iterator" >&5 +echo "${ECHO_T}$ac_cv_cxx_have_bi_iterator" >&6 +if test "$ac_cv_cxx_have_bi_iterator" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BI_ITERATOR +_ACEOF + +fi + +echo "$as_me:$LINENO: checking whether the compiler has forward iterators" >&5 +echo $ECHO_N "checking whether the compiler has forward iterators... $ECHO_C" >&6 +if test "${ac_cv_cxx_have_fwd_iterator+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + + + 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 + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +forward_iterator t; return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_cxx_have_fwd_iterator=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_cxx_have_fwd_iterator=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_have_fwd_iterator" >&5 +echo "${ECHO_T}$ac_cv_cxx_have_fwd_iterator" >&6 +if test "$ac_cv_cxx_have_fwd_iterator" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FWD_ITERATOR +_ACEOF + +fi + + +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +echo "$as_me:$LINENO: checking for working alloca.h" >&5 +echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6 +if test "${ac_cv_working_alloca_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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_working_alloca_h=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_working_alloca_h=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 +echo "${ECHO_T}$ac_cv_working_alloca_h" >&6 +if test $ac_cv_working_alloca_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA_H 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for alloca" >&5 +echo $ECHO_N "checking for alloca... $ECHO_C" >&6 +if test "${ac_cv_func_alloca_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# if HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +# endif +#endif + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +char *p = (char *) alloca (1); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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_alloca_works=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_alloca_works=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 +echo "${ECHO_T}$ac_cv_func_alloca_works" >&6 + +if test $ac_cv_func_alloca_works = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA 1 +_ACEOF + +else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. + +ALLOCA=alloca.$ac_objext + +cat >>confdefs.h <<\_ACEOF +#define C_ALLOCA 1 +_ACEOF + + +echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 +echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6 +if test "${ac_cv_os_cray+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#if defined(CRAY) && ! defined(CRAY2) +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "webecray" >/dev/null 2>&1; then + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 +echo "${ECHO_T}$ac_cv_os_cray" >&6 +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; 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 +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* 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 (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* 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 +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f 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 CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + + done +fi + +echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 +echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 +if test "${ac_cv_c_stack_direction+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_c_stack_direction=0 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +int +find_stack_direction () +{ + static char *addr = 0; + auto char dummy; + if (addr == 0) + { + addr = &dummy; + return find_stack_direction (); + } + else + return (&dummy > addr) ? 1 : -1; +} + +int +main () +{ + exit (find_stack_direction () < 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 + ac_cv_c_stack_direction=1 +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_c_stack_direction=-1 +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 +echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 + +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF + + +fi + +if test $ac_cv_c_compiler_gnu = yes; then + echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 +echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 +if test "${ac_cv_prog_gcc_traditional+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_pattern="Autoconf.*'x'" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +Autoconf TIOCGETP +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "$ac_pattern" >/dev/null 2>&1; then + ac_cv_prog_gcc_traditional=yes +else + ac_cv_prog_gcc_traditional=no +fi +rm -f conftest* + + + if test $ac_cv_prog_gcc_traditional = no; then + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +Autoconf TCGETA +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "$ac_pattern" >/dev/null 2>&1; then + ac_cv_prog_gcc_traditional=yes +fi +rm -f conftest* + + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 +echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +fi + +echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 +if test "${ac_cv_func_memcmp_working+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_memcmp_working=no +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + /* Some versions of memcmp are not 8-bit clean. */ + char c0 = 0x40, c1 = 0x80, c2 = 0x81; + if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) + exit (1); + + /* The Next x86 OpenStep bug shows up only when comparing 16 bytes + or more and with at least one buffer not starting on a 4-byte boundary. + William Lewis provided this test program. */ + { + char foo[21]; + char bar[21]; + int i; + for (i = 0; i < 4; i++) + { + char *a = foo + i; + char *b = bar + i; + strcpy (a, "--------01111111"); + strcpy (b, "--------10000000"); + if (memcmp (a, b, 16) >= 0) + exit (1); + } + exit (0); + } + + ; + return 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 + ac_cv_func_memcmp_working=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_func_memcmp_working=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 +test $ac_cv_func_memcmp_working = no && LIBOBJS="$LIBOBJS memcmp.$ac_objext" + + + +for ac_header in stdlib.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 + # 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 +#line $LINENO "configure" +#include "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>&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 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f 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 +#line $LINENO "configure" +#include "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=$? + egrep -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 + 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 + cat 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 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 preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + 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: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&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 + +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_func in getpagesize +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 +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* 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 (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* 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 +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f 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 + +fi +done + +echo "$as_me:$LINENO: checking for working mmap" >&5 +echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_fixed_mapped=no +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + +#include +#include + +#if !STDC_HEADERS && !HAVE_STDLIB_H +char *malloc (); +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#if !HAVE_GETPAGESIZE +/* Assume that all systems that can run configure have sys/param.h. */ +# if !HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# if HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +int +main () +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + exit (1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + exit (1); + if (write (fd, data, pagesize) != pagesize) + exit (1); + close (fd); + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + exit (1); + data2 = (char *) malloc (2 * pagesize); + if (!data2) + exit (1); + data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + exit (1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit (1); + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + exit (1); + if (read (fd, data3, pagesize) != pagesize) + exit (1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + exit (1); + close (fd); + 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 + ac_cv_func_mmap_fixed_mapped=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 +echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MMAP 1 +_ACEOF + +fi +rm -f conftest.mmap + +echo "$as_me:$LINENO: checking for mmap of files" >&5 +echo $ECHO_N "checking for mmap of files... $ECHO_C" >&6 +if test "${ac_cv_func_mmap_file+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 + + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef HAVE_SYS_MMAN_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + +#ifdef HAVE_FCNTL_H +#include +#endif + + int fd; + int main () { + fd = creat ("foo",0777); fd = (int) mmap (0, 1, PROT_READ, MAP_SHARED, fd, 0); unlink ("foo"); return (fd != MAP_FAILED);} +_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 + ac_cv_func_mmap_file=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_func_mmap_file=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +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 + + +fi +echo "$as_me:$LINENO: result: $ac_cv_func_mmap_file" >&5 +echo "${ECHO_T}$ac_cv_func_mmap_file" >&6 +if test "$ac_cv_func_mmap_file" = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_MMAP_FILE 1 +_ACEOF + + MMAP_FILE=yes + +fi + +if test ${ac_cv_func_mmap_file} = "no" +then + { { echo "$as_me:$LINENO: error: mmap() of files required but not found" >&5 +echo "$as_me: error: mmap() of files required but not found" >&2;} + { (exit 1); exit 1; }; } +fi +echo "$as_me:$LINENO: checking for MAP_ANONYMOUS vs. MAP_ANON" >&5 +echo $ECHO_N "checking for MAP_ANONYMOUS vs. MAP_ANON... $ECHO_C" >&6 +if test "${ac_cv_header_mmap_anon+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 + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include + #include + #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +mmap (0, 1, PROT_READ, MAP_ANONYMOUS, -1, 0); return (0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_mmap_anon=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_header_mmap_anon=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +echo "$as_me:$LINENO: result: $ac_cv_header_mmap_anon" >&5 +echo "${ECHO_T}$ac_cv_header_mmap_anon" >&6 +if test "$ac_cv_header_mmap_anon" = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_MMAP_ANONYMOUS 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 +if test "${ac_cv_type_signal+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#ifdef signal +# undef signal +#endif +#ifdef __cplusplus +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); +#endif + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int i; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_signal=void +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_signal=int +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6 + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + + + + + + + + + + +for ac_func in getcwd gettimeofday strcspn strdup strerror strspn strstr strtod strtol +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 +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* 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 (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* 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 +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f 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 + +fi +done + + + +echo "$as_me:$LINENO: checking for mmap" >&5 +echo $ECHO_N "checking for mmap... $ECHO_C" >&6 +if test "${ac_cv_func_mmap+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char mmap (); below. */ +#include +/* 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 mmap (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* 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_mmap) || defined (__stub___mmap) +choke me +#else +f = mmap; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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_mmap=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_mmap=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 +echo "${ECHO_T}$ac_cv_func_mmap" >&6 +if test $ac_cv_func_mmap = yes; then + : +else + { { echo "$as_me:$LINENO: error: Function mmap() required but not found" >&5 +echo "$as_me: error: Function mmap() required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + +echo "$as_me:$LINENO: checking for mprotect" >&5 +echo $ECHO_N "checking for mprotect... $ECHO_C" >&6 +if test "${ac_cv_func_mprotect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char mprotect (); below. */ +#include +/* 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 mprotect (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* 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_mprotect) || defined (__stub___mprotect) +choke me +#else +f = mprotect; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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_mprotect=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_mprotect=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_mprotect" >&5 +echo "${ECHO_T}$ac_cv_func_mprotect" >&6 +if test $ac_cv_func_mprotect = yes; then + : +else + { { echo "$as_me:$LINENO: error: Function mprotect() required but not found" >&5 +echo "$as_me: error: Function mprotect() required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + + +# Check whether --enable-purify or --disable-purify was given. +if test "${enable_purify+set}" = set; then + enableval="$enable_purify" + ENABLE_PURIFY=ENABLE_PURIFY=1 + +else + ENABLE_PURIFY= + +fi; +# Check whether --enable-verbose or --disable-verbose was given. +if test "${enable_verbose+set}" = set; then + enableval="$enable_verbose" + ENABLE_VERBOSE=VERBOSE=1 + +else + ENABLE_VERBOSE= + +fi; +# Check whether --enable-profiling or --disable-profiling was given. +if test "${enable_profiling+set}" = set; then + enableval="$enable_profiling" + ENABLE_PROFILING=ENABLE_PROFILING=1 + +else + ENABLE_PROFILING= + +fi; +# Check whether --enable-optimized or --disable-optimized was given. +if test "${enable_optimized+set}" = set; then + enableval="$enable_optimized" + ENABLE_OPTIMIZED=ENABLE_OPTIMIZED=1 + +else + ENABLE_OPTIMIZED= + +fi; +# Check whether --enable-spec or --disable-spec was given. +if test "${enable_spec+set}" = set; then + enableval="$enable_spec" + USE_SPEC=USE_SPEC=1 + +else + USE_SPEC= + +fi; +# Check whether --enable-precompiled_bytecode or --disable-precompiled_bytecode was given. +if test "${enable_precompiled_bytecode+set}" = set; then + enableval="$enable_precompiled_bytecode" + UPB=USE_PRECOMPILED_BYTECODE=1 + +else + UPB= + +fi; +case $build in + *i*86*) # Check whether --enable-jit or --disable-jit was given. +if test "${enable_jit+set}" = set; then + enableval="$enable_jit" + JIT=TARGET_HAS_JIT=1 + +else + JIT= + +fi; + ;; + *) + ;; +esac + + +# Check whether --with-spec or --without-spec was given. +if test "${with_spec+set}" = set; then + withval="$with_spec" + SPEC_ROOT=$withval + +else + SPEC_ROOT=/home/vadve/shared/benchmarks/speccpu2000/benchspec + +fi; + +# Check whether --with-llvmgccdir or --without-llvmgccdir was given. +if test "${with_llvmgccdir+set}" = set; then + withval="$with_llvmgccdir" + LLVMGCCDIR=$withval + +fi; + +# Check whether --with-bcrepos or --without-bcrepos was given. +if test "${with_bcrepos+set}" = set; then + withval="$with_bcrepos" + BCR=$withval + +else + BCR=/home/vadve/lattner/LLVMPrograms + +fi; + +# Check whether --with-papi or --without-papi was given. +if test "${with_papi+set}" = set; then + withval="$with_papi" + PAPIDIR=$withval + +else + PAPIDIR=/home/vadve/shared/papi-2.3.4.1 + +fi; + +# Check whether --with-objroot or --without-objroot was given. +if test "${with_objroot+set}" = set; then + withval="$with_objroot" + OBJROOT=$withval + +else + OBJROOT=. + +fi; + +# Check whether --with-purify or --without-purify was given. +if test "${with_purify+set}" = set; then + withval="$with_purify" + PURIFY=$withval + +fi; + +ac_config_files="$ac_config_files Makefile.config" +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overriden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if cmp -s $cache_file confcache; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + +DEFS=-DHAVE_CONFIG_H + + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# NLS nuisances. +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +(set +x; test -n "`(LANG=C; export LANG) 2>&1`") && + { $as_unset LANG || test "${LANG+set}" != set; } || + { LANG=C; export LANG; } +(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && + { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || + { LC_ALL=C; export LC_ALL; } +(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && + { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || + { LC_TIME=C; export LC_TIME; } +(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && + { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || + { LC_CTYPE=C; export LC_CTYPE; } +(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && + { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || + { LANGUAGE=C; export LANGUAGE; } +(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && + { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || + { LC_COLLATE=C; export LC_COLLATE; } +(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && + { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || + { LC_NUMERIC=C; export LC_NUMERIC; } +(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && + { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || + { LC_MESSAGES=C; export LC_MESSAGES; } + + +# Name of the executable. +as_me=`(basename "$0") 2>/dev/null || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conftest.sh + echo "exit 0" >>conftest.sh + chmod +x conftest.sh + if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conftest.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by [LLVM] $as_me [1.0], which was +generated by GNU Autoconf 2.53. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +[LLVM] config.status [1.0] +configured by $0, generated by GNU Autoconf 2.53, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + shift + set dummy "$ac_option" "$ac_optarg" ${1+"$@"} + shift + ;; + -*);; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_need_defaults=false;; + esac + + case $1 in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" + exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + shift + CONFIG_FILES="$CONFIG_FILES $1" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + shift + CONFIG_HEADERS="$CONFIG_HEADERS $1" + ac_need_defaults=false;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +_ACEOF + + + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile.config" ) CONFIG_FILES="$CONFIG_FILES Makefile.config" ;; + "include/Config/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/Config/config.h" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +fi + +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. +: ${TMPDIR=/tmp} +{ + tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=$TMPDIR/cs$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in $TMPDIR" >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s, at SHELL@,$SHELL,;t t +s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t +s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t +s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s, at exec_prefix@,$exec_prefix,;t t +s, at prefix@,$prefix,;t t +s, at program_transform_name@,$program_transform_name,;t t +s, at bindir@,$bindir,;t t +s, at sbindir@,$sbindir,;t t +s, at libexecdir@,$libexecdir,;t t +s, at datadir@,$datadir,;t t +s, at sysconfdir@,$sysconfdir,;t t +s, at sharedstatedir@,$sharedstatedir,;t t +s, at localstatedir@,$localstatedir,;t t +s, at libdir@,$libdir,;t t +s, at includedir@,$includedir,;t t +s, at oldincludedir@,$oldincludedir,;t t +s, at infodir@,$infodir,;t t +s, at mandir@,$mandir,;t t +s, at build_alias@,$build_alias,;t t +s, at host_alias@,$host_alias,;t t +s, at target_alias@,$target_alias,;t t +s, at DEFS@,$DEFS,;t t +s, at ECHO_C@,$ECHO_C,;t t +s, at ECHO_N@,$ECHO_N,;t t +s, at ECHO_T@,$ECHO_T,;t t +s, at LIBS@,$LIBS,;t t +s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s, at INSTALL_DATA@,$INSTALL_DATA,;t t +s, at build@,$build,;t t +s, at build_cpu@,$build_cpu,;t t +s, at build_vendor@,$build_vendor,;t t +s, at build_os@,$build_os,;t t +s, at host@,$host,;t t +s, at host_cpu@,$host_cpu,;t t +s, at host_vendor@,$host_vendor,;t t +s, at host_os@,$host_os,;t t +s, at target@,$target,;t t +s, at target_cpu@,$target_cpu,;t t +s, at target_vendor@,$target_vendor,;t t +s, at target_os@,$target_os,;t t +s, at OS@,$OS,;t t +s, at DISABLE_LLC_DIFFS@,$DISABLE_LLC_DIFFS,;t t +s, at LLVMGCCDIR@,$LLVMGCCDIR,;t t +s, at CXX@,$CXX,;t t +s, at CXXFLAGS@,$CXXFLAGS,;t t +s, at LDFLAGS@,$LDFLAGS,;t t +s, at CPPFLAGS@,$CPPFLAGS,;t t +s, at ac_ct_CXX@,$ac_ct_CXX,;t t +s, at EXEEXT@,$EXEEXT,;t t +s, at OBJEXT@,$OBJEXT,;t t +s, at CC@,$CC,;t t +s, at CFLAGS@,$CFLAGS,;t t +s, at ac_ct_CC@,$ac_ct_CC,;t t +s, at CPP@,$CPP,;t t +s, at ifGNUmake@,$ifGNUmake,;t t +s, at LEX@,$LEX,;t t +s, at LEXLIB@,$LEXLIB,;t t +s, at LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t +s, at YACC@,$YACC,;t t +s, at LN_S@,$LN_S,;t t +s, at ECHO@,$ECHO,;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 LIBTOOL@,$LIBTOOL,;t t +s, at AR@,$AR,;t t +s, at SED@,$SED,;t t +s, at RM@,$RM,;t t +s, at MKDIR@,$MKDIR,;t t +s, at DATE@,$DATE,;t t +s, at MV@,$MV,;t t +s, at DOT@,$DOT,;t t +s, at ETAGS@,$ETAGS,;t t +s, at PURIFY@,$PURIFY,;t t +s, at ALLOCA@,$ALLOCA,;t t +s, at LIBOBJS@,$LIBOBJS,;t t +s, at MMAP_FILE@,$MMAP_FILE,;t t +s, at ENABLE_PURIFY@,$ENABLE_PURIFY,;t t +s, at ENABLE_VERBOSE@,$ENABLE_VERBOSE,;t t +s, at ENABLE_PROFILING@,$ENABLE_PROFILING,;t t +s, at ENABLE_OPTIMIZED@,$ENABLE_OPTIMIZED,;t t +s, at USE_SPEC@,$USE_SPEC,;t t +s, at UPB@,$UPB,;t t +s, at JIT@,$JIT,;t t +s, at SPEC_ROOT@,$SPEC_ROOT,;t t +s, at BCR@,$BCR,;t t +s, at PAPIDIR@,$PAPIDIR,;t t +s, at OBJROOT@,$OBJROOT,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { case "$ac_dir" in + [\\/]* | ?:[\\/]* ) as_incr_dir=;; + *) as_incr_dir=.;; +esac +as_dummy="$ac_dir" +for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do + case $as_mkdir_dir in + # Skip DOS drivespec + ?:) as_incr_dir=$as_mkdir_dir ;; + *) + as_incr_dir=$as_incr_dir/$as_mkdir_dir + test -d "$as_incr_dir" || + mkdir "$as_incr_dir" || + { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; } + ;; + esac +done; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s, at configure_input@,$configure_input,;t t +s, at srcdir@,$ac_srcdir,;t t +s, at abs_srcdir@,$ac_abs_srcdir,;t t +s, at top_srcdir@,$ac_top_srcdir,;t t +s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s, at builddir@,$ac_builddir,;t t +s, at abs_builddir@,$ac_abs_builddir,;t t +s, at top_builddir@,$ac_top_builddir,;t t +s, at abs_top_builddir@,$ac_abs_top_builddir,;t t +s, at INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # egrep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if cmp -s $ac_file $tmp/config.h 2>/dev/null; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { case "$ac_dir" in + [\\/]* | ?:[\\/]* ) as_incr_dir=;; + *) as_incr_dir=.;; +esac +as_dummy="$ac_dir" +for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do + case $as_mkdir_dir in + # Skip DOS drivespec + ?:) as_incr_dir=$as_mkdir_dir ;; + *) + as_incr_dir=$as_incr_dir/$as_mkdir_dir + test -d "$as_incr_dir" || + mkdir "$as_incr_dir" || + { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; } + ;; + esac +done; } + + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + exec 5>/dev/null + $SHELL $CONFIG_STATUS || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + Index: llvm/configure.ac diff -u /dev/null llvm/configure.ac:1.2 --- /dev/null Mon Jun 30 16:59:26 2003 +++ llvm/configure.ac Mon Jun 30 16:58:14 2003 @@ -0,0 +1,236 @@ +dnl Autoconf requirements +dnl AC_INIT(package, version, bug-report-address) +dnl information on the package +dnl checks for programs +dnl checks for libraries +dnl checks for header files +dnl checks for types +dnl checks for structures +dnl checks for compiler characteristics +dnl checks for library functions +dnl checks for system services +dnl AC_CONFIG_FILES([file...]) +dnl AC_OUTPUT + +dnl ************************************************************************** +dnl * Initialize +dnl ************************************************************************** +AC_INIT([[[LLVM]]],[[[1.0]]],[llvmbugs at cs.uiuc.edu]) + +dnl * Configure a header file +AC_CONFIG_HEADERS(include/Config/config.h) + +dnl ************************************************************************** +dnl * Determine which system we are building on +dnl ************************************************************************** + +dnl Check the install program (needs to be done before canonical stuff) +AC_PROG_INSTALL + +dnl Check which host for which we're compiling. This will tell us which LLVM +dnl compiler will be used for compiling SSA into object code. +AC_CANONICAL_TARGET + +dnl +dnl Now, for some of our own magic: +dnl We will use the build machine information to set some variables. +dnl +case $build in + *i*86*) AC_SUBST(OS,[Linux]) + AC_SUBST(DISABLE_LLC_DIFFS,[[DISABLE_LLC_DIFFS:=1]]) + AC_SUBST(LLVMGCCDIR,[/home/vadve/lattner/local/x86/llvm-gcc/]) + ;; + + *sparc*) AC_SUBST(OS,[SunOS]) + AC_SUBST(LLVMGCCDIR,[/home/vadve/lattner/local/sparc/llvm-gcc/]) + ;; + + *) AC_SUBST(OS,[Unknown]) + ;; +esac + +dnl +dnl If we are on a Solaris machine, pretend that it is V9, since that is all +dnl that we support at the moment, and autoconf will only tell us we're a +dnl sparc. +dnl +case $target in + *sparc*solaris*) AC_SUBST(target,[[sparcv9-sun-solaris2.8]]) + ;; +esac + +dnl ************************************************************************** +dnl * Check for programs. +dnl ************************************************************************** + +dnl Check for compilation tools +AC_PROG_CXX +AC_PROG_CC(gcc) +AC_PROG_CPP + +dnl Ensure that compilation tools are GCC; we use GCC specific extensions +if test "$GCC" != "yes" +then + AC_MSG_ERROR([gcc required but not found]) +fi + +if test "$GXX" != "yes" +then + AC_MSG_ERROR([g++ required but not found]) +fi + +dnl Check for GNU Make. We use its extensions to, so don't build without it +CHECK_GNU_MAKE +if test -z "$_cv_gnu_make_command" +then + AC_MSG_ERROR([GNU Make required but not found]) +fi + +dnl Check for compiler-compiler tools (reminds me of Little Caesar's Pizza) +AC_PROG_FLEX +AC_PROG_BISON + +dnl Check for libtool +AC_PROG_LIBTOOL + +dnl Check for our special programs +AC_PATH_PROG(AR,[ar]) +AC_PATH_PROG(SED,[sed]) +AC_PATH_PROG(RM,[rm]) +AC_PATH_PROG(ECHO,[echo]) +AC_PATH_PROG(MKDIR,[mkdir]) +AC_PATH_PROG(DATE,[date]) +AC_PATH_PROG(MV,[mv]) +AC_PATH_PROG(DOT,[dot]) +AC_PATH_PROG(ETAGS,[etags]) +AC_PATH_PROG(PURIFY,[purify]) + +dnl Verify that the source directory is valid +AC_CONFIG_SRCDIR(["Makefile.config.in"]) + +dnl ************************************************************************** +dnl * Check for libraries. +dnl ************************************************************************** + +dnl libelf is for sparc only; we can ignore it if we don't have it +AC_CHECK_LIB(elf, elf_begin) + +dnl dlopen() is required. If we don't find it, quit. +AC_SEARCH_LIBS(dlopen,dl,,AC_MSG_ERROR([dlopen() required but not found])) + +dnl mallinfo is optional; the code can compile (minus features) without it +AC_SEARCH_LIBS(mallinfo,malloc,AC_DEFINE([HAVE_MALLINFO],[1])) + +dnl +dnl The math libraries are used by the test code, but not by the actual LLVM +dnl code. +dnl +dnl AC_CHECK_LIB(m, cos) + +dnl ************************************************************************** +dnl * Checks for header files. +dnl * Chances are, if the standard C or POSIX type header files are missing, +dnl * then LLVM just isn't going to compile. However, it is possible that +dnl * the necessary functions/macros will be included from other +dnl * (non-standard and non-obvious) header files. +dnl * +dnl * So, we'll be gracious, give it a chance, and try to go on without +dnl * them. +dnl ************************************************************************** +AC_HEADER_STDC +AC_HEADER_SYS_WAIT + +dnl Check for ANSI C/POSIX header files +AC_CHECK_HEADERS(assert.h fcntl.h limits.h sys/time.h unistd.h errno.h signal.h math.h) + +dnl Check for system specific header files +AC_CHECK_HEADERS(malloc.h strings.h sys/mman.h sys/resource.h) + +dnl Check for header files associated with dlopen and friends +AC_CHECK_HEADERS(dlfcn.h link.h) + +dnl ************************************************************************** +dnl * Checks for typedefs, structures, and compiler characteristics. +dnl ************************************************************************** + +dnl Check for const and inline keywords +AC_C_CONST +AC_C_INLINE + +dnl Check for machine endian-ness +AC_C_BIGENDIAN(AC_DEFINE([ENDIAN_BIG]),AC_DEFINE(ENDIAN_LITTLE)) + +dnl Check for types +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_CHECK_TYPES([int64_t],,AC_MSG_ERROR([Type int64_t required but not found])) +AC_CHECK_TYPES([uint64_t],,AC_MSG_ERROR([Type uint64_t required but not found])) +AC_HEADER_TIME +AC_STRUCT_TM + +dnl Check for C++ extensions +AC_CXX_HAVE_EXT_HASH_MAP +AC_CXX_HAVE_EXT_HASH_SET +AC_CXX_HAVE_EXT_SLIST +AC_CXX_HAVE_STD_ITERATOR +AC_CXX_HAVE_BI_ITERATOR +AC_CXX_HAVE_FWD_ITERATOR + +dnl ************************************************************************** +dnl * Checks for library functions. +dnl ************************************************************************** +AC_FUNC_ALLOCA +AC_PROG_GCC_TRADITIONAL +AC_FUNC_MEMCMP +AC_FUNC_MMAP +AC_FUNC_MMAP_FILE +if test ${ac_cv_func_mmap_file} = "no" +then + AC_MSG_ERROR([mmap() of files required but not found]) +fi +AC_HEADER_MMAP_ANONYMOUS +AC_TYPE_SIGNAL +AC_CHECK_FUNCS(getcwd gettimeofday strcspn strdup strerror strspn strstr strtod strtol) + +dnl +dnl Need to check mmap for MAP_PRIVATE, MAP_ANONYMOUS, MAP_ANON, MAP_FIXED +dnl MAP_FIXED is only needed for Sparc +dnl MAP_ANON is used for Sparc and BSD +dnl Everyone should have MAP_PRIVATE +dnl + +dnl Check for certain functions (even if we've already found them) so that we +dnl can quit with an error if they are unavailable. +dnl +dnl As the code is made more portable (i.e. less reliant on these functions, +dnl these checks should go away. +AC_CHECK_FUNC(mmap,,AC_MSG_ERROR([Function mmap() required but not found])) +AC_CHECK_FUNC(mprotect,,AC_MSG_ERROR([Function mprotect() required but not found])) + +dnl ************************************************************************** +dnl * Enable various compile-time options +dnl ************************************************************************** +AC_ARG_ENABLE(purify,AC_HELP_STRING([--enable-purify],[Compile with purify (default is NO)]), AC_SUBST(ENABLE_PURIFY,[[ENABLE_PURIFY=1]]), AC_SUBST(ENABLE_PURIFY,[[]])) +AC_ARG_ENABLE(verbose,AC_HELP_STRING([--enable-verbose],[Enable verbose compilation messages (default is NO)]), AC_SUBST(ENABLE_VERBOSE,[[VERBOSE=1]]), AC_SUBST(ENABLE_VERBOSE,[[]])) +AC_ARG_ENABLE(profiling,AC_HELP_STRING([--enable-profiling],[Compile with profiling information (default is NO)]), AC_SUBST(ENABLE_PROFILING,[[ENABLE_PROFILING=1]]), AC_SUBST(ENABLE_PROFILING,[[]])) +AC_ARG_ENABLE(optimized,AC_HELP_STRING([--enable-optimized],[Compile with optimizations enabled (default is NO)]), AC_SUBST(ENABLE_OPTIMIZED,[[ENABLE_OPTIMIZED=1]]), AC_SUBST(ENABLE_OPTIMIZED,[[]])) +AC_ARG_ENABLE(spec,AC_HELP_STRING([--enable-spec],[Compile SPEC benchmarks (default is NO)]), AC_SUBST(USE_SPEC,[[USE_SPEC=1]]), AC_SUBST(USE_SPEC,[[]])) +AC_ARG_ENABLE(precompiled_bytecode,AC_HELP_STRING([--enable-precompiled_bytecode],[Use pre-compiled bytecode (default is NO)]), AC_SUBST(UPB,[[USE_PRECOMPILED_BYTECODE=1]]), AC_SUBST(UPB,[[]])) +case $build in + *i*86*) AC_ARG_ENABLE(jit,AC_HELP_STRING([--enable-jit],[Enable Just In Time Compiling (default is NO)]), AC_SUBST(JIT,[[TARGET_HAS_JIT=1]]), AC_SUBST(JIT,[[]])) + ;; + *) + ;; +esac + +dnl ************************************************************************** +dnl * Set the location of various third-party software packages +dnl ************************************************************************** +AC_ARG_WITH(spec,AC_HELP_STRING([--with-spec],[Location of SPEC benchmarks]),AC_SUBST(SPEC_ROOT,[$withval]),AC_SUBST(SPEC_ROOT,[/home/vadve/shared/benchmarks/speccpu2000/benchspec])) +AC_ARG_WITH(llvmgccdir,AC_HELP_STRING([--with-llvmgccdir],[Location of LLVM GCC front-end]),AC_SUBST(LLVMGCCDIR,[$withval])) +AC_ARG_WITH(bcrepos,AC_HELP_STRING([--with-bcrepos],[Location of Bytecode Repository]),AC_SUBST(BCR,[$withval]),AC_SUBST(BCR,[/home/vadve/lattner/LLVMPrograms])) +AC_ARG_WITH(papi,AC_HELP_STRING([--with-papi],[Location of PAPI]),AC_SUBST(PAPIDIR,[$withval]),AC_SUBST(PAPIDIR,[/home/vadve/shared/papi-2.3.4.1])) +AC_ARG_WITH(objroot,AC_HELP_STRING([--with-objroot],[Location where object files should be placed (default is .)]),AC_SUBST(OBJROOT,[$withval]),AC_SUBST(OBJROOT,[.])) +AC_ARG_WITH(purify,AC_HELP_STRING([--with-purify],[Location of purify program]),AC_SUBST(PURIFY,[$withval])) + +AC_OUTPUT(Makefile.config) Index: llvm/install-sh diff -u /dev/null llvm/install-sh:1.2 --- /dev/null Mon Jun 30 16:59:26 2003 +++ llvm/install-sh Mon Jun 30 16:58:14 2003 @@ -0,0 +1,251 @@ +#!/bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + : +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + chmodcmd="" + else + instcmd=$mkdirprog + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + : + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + : + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + : + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' + ' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + : + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + : + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 Index: llvm/ltmain.sh diff -u /dev/null llvm/ltmain.sh:1.2 --- /dev/null Mon Jun 30 16:59:26 2003 +++ llvm/ltmain.sh Mon Jun 30 16:58:14 2003 @@ -0,0 +1,4993 @@ +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun configure. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# 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. + +# Check that we have a working $echo. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <&2 + echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" + +# Parse our command line options once, thoroughly. +while test $# -gt 0 +do + arg="$1" + shift + + case $arg in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + execute_dlfiles) + execute_dlfiles="$execute_dlfiles $arg" + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case $arg in + --help) + show_help=yes + ;; + + --version) + echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" + exit 0 + ;; + + --config) + sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 + exit 0 + ;; + + --debug) + echo "$progname: enabling shell trace mode" + set -x + ;; + + --dry-run | -n) + run=: + ;; + + --features) + echo "host: $host" + if test "$build_libtool_libs" = yes; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + exit 0 + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --quiet | --silent) + show=: + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 +fi + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + case $nonopt in + *cc | *++ | gcc* | *-gcc*) + mode=link + for arg + do + case $arg in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx | *strace | *truss) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi + fi + ;; + esac + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case $mode in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + prev= + lastarg= + srcfile="$nonopt" + suppress_output= + + user_target=no + for arg + do + case $prev in + "") ;; + xcompiler) + # Aesthetically quote the previous argument. + prev= + lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + + case $arg in + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + + # Add the previous argument to base_compile. + if test -z "$base_compile"; then + base_compile="$lastarg" + else + base_compile="$base_compile $lastarg" + fi + continue + ;; + esac + + # Accept any command-line options. + case $arg in + -o) + if test "$user_target" != "no"; then + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 + exit 1 + fi + user_target=next + ;; + + -static) + build_old_libs=yes + continue + ;; + + -only-static) + build_libtool_libs=no + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + lastarg="$lastarg $arg" + done + IFS="$save_ifs" + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + + # Add the arguments to base_compile. + if test -z "$base_compile"; then + base_compile="$lastarg" + else + base_compile="$base_compile $lastarg" + fi + continue + ;; + esac + + case $user_target in + next) + # The next one is the -o target name + user_target=yes + continue + ;; + yes) + # We got the output file + user_target=set + libobj="$arg" + continue + ;; + esac + + # Accept the current argument as the source file. + lastarg="$srcfile" + srcfile="$arg" + + # Aesthetically quote the previous argument. + + # Backslashify any backslashes, double quotes, and dollar signs. + # These are the only characters that are still specially + # interpreted inside of double-quoted scrings. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + case $lastarg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + lastarg="\"$lastarg\"" + ;; + esac + + # Add the previous argument to base_compile. + if test -z "$base_compile"; then + base_compile="$lastarg" + else + base_compile="$base_compile $lastarg" + fi + done + + case $user_target in + set) + ;; + no) + # Get the name of the library object. + libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + ;; + *) + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit 1 + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + xform='[cCFSfmso]' + case $libobj in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.f90) xform=f90 ;; + *.for) xform=for ;; + esac + + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + + case $libobj in + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *) + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 + exit 1 + ;; + esac + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $libobj" + else + removelist="$libobj" + fi + + $run $rm $removelist + trap "$run $rm $removelist; exit 1" 1 2 15 + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + removelist="$removelist $output_obj $lockfile" + trap "$run $rm $removelist; exit 1" 1 2 15 + else + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $run ln "$0" "$lockfile" 2>/dev/null; do + $show "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + echo "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit 1 + fi + echo $srcfile > "$lockfile" + fi + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test "$pic_mode" != no; then + # All platforms use -DPIC, to notify preprocessed assembler code. + command="$base_compile $srcfile $pic_flag -DPIC" + else + # Don't build PIC code + command="$base_compile $srcfile" + fi + if test "$build_old_libs" = yes; then + lo_libobj="$libobj" + dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$libobj"; then + dir="$objdir" + else + dir="$dir/$objdir" + fi + libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` + + if test -d "$dir"; then + $show "$rm $libobj" + $run $rm $libobj + else + $show "$mkdir $dir" + $run $mkdir $dir + status=$? + if test $status -ne 0 && test ! -d $dir; then + exit $status + fi + fi + fi + if test "$compiler_o_lo" = yes; then + output_obj="$libobj" + command="$command -o $output_obj" + elif test "$compiler_c_o" = yes; then + output_obj="$obj" + command="$command -o $output_obj" + fi + + $run $rm "$output_obj" + $show "$command" + if $run eval "$command"; then : + else + test -n "$output_obj" && $run $rm $removelist + exit 1 + fi + + if test "$need_locks" = warn && + test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then + echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit 1 + fi + + # Just move the object if needed, then go on to compile the next one + if test x"$output_obj" != x"$libobj"; then + $show "$mv $output_obj $libobj" + if $run $mv $output_obj $libobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # If we have no pic_flag, then copy the object into place and finish. + if (test -z "$pic_flag" || test "$pic_mode" != default) && + test "$build_old_libs" = yes; then + # Rename the .lo from within objdir to obj + if test -f $obj; then + $show $rm $obj + $run $rm $obj + fi + + $show "$mv $libobj $obj" + if $run $mv $libobj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"` + libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` + # Now arrange that obj and lo_libobj become the same file + $show "(cd $xdir && $LN_S $baseobj $libobj)" + if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + $run $rm "$lockfile" + fi + exit 0 + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Allow error messages only from the first compilation. + suppress_output=' >/dev/null 2>&1' + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + if test "$pic_mode" != yes; then + # Don't build PIC code + command="$base_compile $srcfile" + else + # All platforms use -DPIC, to notify preprocessed assembler code. + command="$base_compile $srcfile $pic_flag -DPIC" + fi + if test "$compiler_c_o" = yes; then + command="$command -o $obj" + output_obj="$obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + command="$command$suppress_output" + $run $rm "$output_obj" + $show "$command" + if $run eval "$command"; then : + else + $run $rm $removelist + exit 1 + fi + + if test "$need_locks" = warn && + test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then + echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit 1 + fi + + # Just move the object if needed + if test x"$output_obj" != x"$obj"; then + $show "$mv $output_obj $obj" + if $run $mv $output_obj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Create an invalid libtool object if no PIC, so that we do not + # accidentally link it into a program. + if test "$build_libtool_libs" != yes; then + $show "echo timestamp > $libobj" + $run eval "echo timestamp > \$libobj" || exit $? + else + # Move the .lo from within objdir + $show "$mv $libobj $lo_libobj" + if $run $mv $libobj $lo_libobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + fi + + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + $run $rm "$lockfile" + fi + + exit 0 + ;; + + # libtool link mode + link | relink) + modename="$modename: link" + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invokation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args="$nonopt" + compile_command="$nonopt" + finalize_command="$nonopt" + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + + avoid_version=no + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -all-static | -static) + if test "X$arg" = "X-all-static"; then + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + else + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + fi + build_libtool_libs=no + build_old_libs=yes + prefer_static_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test $# -gt 0; do + arg="$1" + shift + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test + ;; + *) qarg=$arg ;; + esac + libtool_args="$libtool_args $qarg" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$finalize_command @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + if test ! -f "$arg"; then + $echo "$modename: symbol file \`$arg' does not exist" + exit 1 + fi + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit 1 + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + compile_command="$compile_command $wl$qarg" + finalize_command="$finalize_command $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n $prev + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: more than one -exported-symbols argument is not allowed" + exit 1 + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix*) + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + ;; + esac + continue + ;; + + -L*) + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + exit 1 + fi + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-pw32* | *-*-beos*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-mingw* | *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + # The PATH hackery in wrapper scripts is required on Windows + # in order for the loader to find any dlls it needs. + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -o) prev=output ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit 1 + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -static) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Wl,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $wl$flag" + linker_flags="$linker_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + + *.lo | *.$objext) + # A library or standard object. + if test "$prev" = dlfiles; then + # This file was specified with -dlopen. + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $arg" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` + prev= + else + case $arg in + *.lo) libobjs="$libobjs $arg" ;; + *) objs="$objs $arg" ;; + esac + fi + ;; + + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= + else + deplibs="$deplibs $arg" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done # argument parsing loop + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + + # calculate the name of the file, without its directory + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + # Create the object directory. + if test ! -d "$output_objdir"; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + status=$? + if test "$status" -ne 0 && test ! -d "$output_objdir"; then + exit $status + fi + fi + + # Determine the type of output + case $output in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + libs="$libs $deplib" + done + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + case $linkmode in + lib) + passes="conv link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 + exit 1 + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + for pass in $passes; do + if test "$linkmode" = prog; then + # Determine which files to process + case $pass in + dlopen) + libs="$dlfiles" + save_deplibs="$deplibs" # Collect dlpreopened libraries + deplibs= + ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + for deplib in $libs; do + lib= + found=no + case $deplib in + -l*) + if test "$linkmode" = oldlib && test "$linkmode" = obj; then + $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2 + continue + fi + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` + for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do + # Search the libtool library + lib="$searchdir/lib${name}.la" + if test -f "$lib"; then + found=yes + break + fi + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + ;; # -l + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + ;; + *) + $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2 + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + if test "$deplibs_check_method" != pass_all; then + echo + echo "*** Warning: This library needs some functionality provided by $deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + else + echo + echo "*** Warning: Linking the shared library $output against the" + echo "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + if test "$found" = yes || test -f "$lib"; then : + else + $echo "$modename: cannot find the library \`$lib'" 1>&2 + exit 1 + fi + + # Check to see that this really is a libtool archive. + if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit 1 + fi + + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + # If the library was installed with an old release of libtool, + # it will not redefine variable installed. + installed=yes + + # Read the .la file + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" = oldlib && test "$linkmode" = obj; }; then + # Add dl[pre]opened files of deplib + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit 1 + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + tmp_libs="$tmp_libs $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + $echo "$modename: \`$lib' is not a convenience library" 1>&2 + exit 1 + fi + continue + fi # $pass = conv + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit 1 + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 + exit 1 + fi + if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. + dlprefiles="$dlprefiles $lib" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + abs_ladir="$ladir" + fi + ;; + esac + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + $echo "$modename: warning: library \`$lib' was moved." 1>&2 + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi # $installed = yes + name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 + exit 1 + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" + fi + continue + fi + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + link_static=no # Whether the deplib will be linked statically + if test -n "$library_names" && + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + # Link against this shared library + + if test "$linkmode,$pass" = "prog,link" || + { test "$linkmode" = lib && test "$hardcode_into_libs" = yes; }; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + if test "$linkmode" = prog; then + # We need to hardcode the library path + if test -n "$shlibpath_var"; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath " in + *" $dir "*) ;; + *" $absdir "*) ;; + *) temp_rpath="$temp_rpath $dir" ;; + esac + fi + fi + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + realname="$2" + shift; shift + libname=`eval \\$echo \"$libname_spec\"` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin*) + major=`expr $current - $age` + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + soname=`echo $soroot | sed -e 's/^.*\///'` + newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a" + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + $show "extracting exported symbol list from \`$soname'" + save_ifs="$IFS"; IFS='~' + eval cmds=\"$extract_expsyms_cmds\" + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + $show "generating import library for \`$soname'" + save_ifs="$IFS"; IFS='~' + eval cmds=\"$old_archive_from_expsyms_cmds\" + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + $echo "$modename: configuration error: unsupported hardcode properties" + exit 1 + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && \ + test "$hardcode_minus_L" != yes && \ + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + + # Try to link the static library + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + echo + echo "*** Warning: This library needs some functionality provided by $lib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + echo "*** Therefore, libtool will create a static module, that should work " + echo "*** as long as the dlopening application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + convenience="$convenience $dir/$old_library" + old_convenience="$old_convenience $dir/$old_library" + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + case $deplib in + -L*) path="$deplib" ;; + *.la) + dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$deplib" && dir="." + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + fi + ;; + esac + if grep "^installed=no" $deplib > /dev/null; then + path="-L$absdir/$objdir" + else + eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit 1 + fi + if test "$absdir" != "$libdir"; then + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 + fi + path="-L$absdir" + fi + ;; + *) continue ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$deplibs $path" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + test "$pass" != scan && dependency_libs="$newdependency_libs" + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + *) + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + if test "$pass" = "conv" && + { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then + libs="$deplibs" # reset libs + deplibs= + fi + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 + fi + + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 + fi + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval libname=\"$libname_spec\" + ;; + *) + if test "$module" = no; then + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + eval libname=\"$libname_spec\" + else + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 + exit 1 + else + echo + echo "*** Warning: Linking the shared library $output against the non-libtool" + echo "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + if test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 + fi + + set dummy $rpath + if test "$#" -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + libext=al + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + fi + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + IFS="$save_ifs" + + if test -n "$8"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + current="$2" + revision="$3" + age="$4" + + # Check that each of the things are valid numbers. + case $current in + [0-9]*) ;; + *) + $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + case $revision in + [0-9]*) ;; + *) + $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + case $age in + [0-9]*) ;; + *) + $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + if test "$age" -gt "$current"; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + minor_current=`expr $current + 1` + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current"; + ;; + + irix) + major=`expr $current - $age + 1` + verstring="sgi$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + iface=`expr $revision - $loop` + loop=`expr $loop - 1` + verstring="sgi$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + major=`expr $current - $age` + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + major=`expr $current - $age` + versuffix="-$major" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + verstring="0.0" + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring="" + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + fi + + if test "$mode" != relink; then + # Remove our outputs. + $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" + $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + for path in $notinst_path; do + lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'` + deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'` + dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'` + done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs -framework System" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd*) + # Do not include libc due to us having libc/libc_r. + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behaviour. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $rm conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null \ + | grep " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | sed 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ + | sed 10q \ + | egrep "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + echo "*** Warning: This library needs some functionality provided by $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + for a_deplib in $deplibs; do + name="`expr $a_deplib : '-l\(.*\)'`" + # If $name is empty we are operating on a -L argument. + if test -n "$name" && test "$name" != "0"; then + libname=`eval \\$echo \"$libname_spec\"` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + if eval echo \"$potent_lib\" 2>/dev/null \ + | sed 10q \ + | egrep "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + echo "*** Warning: This library needs some functionality provided by $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ + -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | + grep . >/dev/null; then + echo + if test "X$deplibs_check_method" = "Xnone"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." + else + echo "*** Warning: inter-library dependencies are not known to be supported." + fi + echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" + echo "*** dependencies of module $libname. Therefore, libtool will create" + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval library_names=\"$library_names_spec\" + set dummy $library_names + realname="$2" + shift; shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + test -z "$dlname" && dlname=$soname + + lib="$output_objdir/$realname" + for link + do + linknames="$linknames $link" + done + + # Ensure that we have .o objects for linkers which dislike .lo + # (e.g. aix) in case we are running --disable-static + for obj in $libobjs; do + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` + if test ! -f $xdir/$oldobj; then + $show "(cd $xdir && ${LN_S} $baseobj $oldobj)" + $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $? + fi + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + eval cmds=\"$export_symbols_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + if test -n "$export_symbols_regex"; then + $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" + $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + $show "$mv \"${export_symbols}T\" \"$export_symbols\"" + $run eval '$mv "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' + fi + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${outputname}x" + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "mkdir $gentop" + $run mkdir "$gentop" + status=$? + if test "$status" -ne 0 && test ! -d "$gentop"; then + exit $status + fi + generated="$generated $gentop" + + for xlib in $convenience; do + # Extract the objects. + case $xlib in + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; + *) xabs=`pwd`"/$xlib" ;; + esac + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` + xdir="$gentop/$xlib" + + $show "${rm}r $xdir" + $run ${rm}r "$xdir" + $show "mkdir $xdir" + $run mkdir "$xdir" + status=$? + if test "$status" -ne 0 && test ! -d "$xdir"; then + exit $status + fi + $show "(cd $xdir && $AR x $xabs)" + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? + + libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` + done + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval cmds=\"$archive_expsym_cmds\" + else + eval cmds=\"$archive_cmds\" + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? + exit 0 + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 + fi + + case $output in + *.lo) + if test -n "$objs$old_deplibs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit 1 + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e "$lo2o"` + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $run $rm $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${obj}x" + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "mkdir $gentop" + $run mkdir "$gentop" + status=$? + if test "$status" -ne 0 && test ! -d "$gentop"; then + exit $status + fi + generated="$generated $gentop" + + for xlib in $convenience; do + # Extract the objects. + case $xlib in + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; + *) xabs=`pwd`"/$xlib" ;; + esac + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` + xdir="$gentop/$xlib" + + $show "${rm}r $xdir" + $run ${rm}r "$xdir" + $show "mkdir $xdir" + $run mkdir "$xdir" + status=$? + if test "$status" -ne 0 && test ! -d "$xdir"; then + exit $status + fi + $show "(cd $xdir && $AR x $xabs)" + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? + + reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` + done + fi + fi + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + eval cmds=\"$reload_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit 0 + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + $show "echo timestamp > $libobj" + $run eval "echo timestamp > $libobj" || exit $? + exit 0 + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + eval cmds=\"$reload_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + else + # Just create a symlink. + $show $rm $libobj + $run $rm $libobj + xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$libobj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` + oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` + $show "(cd $xdir && $LN_S $oldobj $baseobj)" + $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $? + fi + + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit 0 + ;; + + prog) + case $host in + *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;; + esac + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 + fi + + if test "$preload" = yes; then + if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && + test "$dlopen_self_static" = unknown; then + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." + fi + fi + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + dlsyms= + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${outputname}S.c" + else + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + fi + fi + + if test -n "$dlsyms"; then + case $dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${outputname}.nm" + + $show "$rm $nlist ${nlist}S ${nlist}T" + $run $rm "$nlist" "${nlist}S" "${nlist}T" + + # Parse the name list into a source file. + $show "creating $output_objdir/$dlsyms" + + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* Prevent the only kind of declaration conflicts we can make. */ +#define lt_preloaded_symbols some_other_symbol + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + $show "generating symbol list for \`$output'" + + test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for arg in $progfiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + if test -n "$export_symbols_regex"; then + $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$output.exp" + $run $rm $export_symbols + $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + else + $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' + $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + fi + fi + + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + name=`echo "$arg" | sed -e 's%^.*/%%'` + $run eval 'echo ": $name " >> "$nlist"' + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -z "$run"; then + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $mv "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then + : + else + grep -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' + else + echo '/* NONE */' >> "$output_objdir/$dlsyms" + fi + + $echo >> "$output_objdir/$dlsyms" "\ + +#undef lt_preloaded_symbols + +#if defined (__STDC__) && __STDC__ +# define lt_ptr void * +#else +# define lt_ptr char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr address; +} +lt_preloaded_symbols[] = +{\ +" + + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" + + $echo >> "$output_objdir/$dlsyms" "\ + {0, (lt_ptr) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + fi + + pic_flag_for_symtable= + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DPIC";; + esac + esac + + # Now compile the dynamic symbol file. + $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + + # Clean up the generated files. + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" + + # Transform the symbol file into the correct name. + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit 1 + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi + + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + $show "$link_command" + $run eval "$link_command" + status=$? + + # Delete the generated files. + if test -n "$dlsyms"; then + $show "$rm $output_objdir/${outputname}S.${objext}" + $run $rm "$output_objdir/${outputname}S.${objext}" + fi + + exit $status + fi + + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $run $rm $output + # Link the executable and exit + $show "$link_command" + $run eval "$link_command" || exit $? + exit 0 + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 + $echo "$modename: \`$output' will be relinked during installation" 1>&2 + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + + $show "$link_command" + $run eval "$link_command" || exit $? + + # Now create the wrapper script. + $show "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + fi + + # Quote $echo for shipping. + if test "X$echo" = "X$SHELL $0 --fallback-echo"; then + case $0 in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; + *) qecho="$SHELL `pwd`/$0 --fallback-echo";; + esac + qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if our run command is non-null. + if test -z "$run"; then + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) output=`echo $output|sed 's,.exe$,,'` ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) exeext=.exe ;; + *) exeext= ;; + esac + $rm $output + trap "$rm $output; exit 1" 1 2 15 + + $echo > $output "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variable: + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$echo are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + echo=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$echo works! + : + else + # Restart under the correct shell, and then maybe \$echo will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $echo >> $output "\ + + # Find the directory that this script lives in. + thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` + done + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + echo >> $output "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $mkdir \"\$progdir\" + else + $rm \"\$progdir/\$file\" + fi" + + echo >> $output "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $echo \"\$relink_command_output\" >&2 + $rm \"\$progdir/\$file\" + exit 1 + fi + fi + + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $rm \"\$progdir/\$program\"; + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $rm \"\$progdir/\$file\" + fi" + else + echo >> $output "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + echo >> $output "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $echo >> $output "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $echo >> $output "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $echo >> $output "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # win32 systems need to use the prog path for dll + # lookup to work + *-*-cygwin* | *-*-pw32*) + $echo >> $output "\ + exec \$progdir/\$program \${1+\"\$@\"} +" + ;; + + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2*) + $echo >> $output "\ + exec \$progdir\\\\\$program \${1+\"\$@\"} +" + ;; + + *) + $echo >> $output "\ + # Export the path to the program. + PATH=\"\$progdir:\$PATH\" + export PATH + + exec \$program \${1+\"\$@\"} +" + ;; + esac + $echo >> $output "\ + \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" + exit 1 + fi + else + # The program doesn't exist. + \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 + \$echo \"This script is just a wrapper for \$program.\" 1>&2 + echo \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" + chmod +x $output + fi + exit 0 + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "mkdir $gentop" + $run mkdir "$gentop" + status=$? + if test "$status" -ne 0 && test ! -d "$gentop"; then + exit $status + fi + generated="$generated $gentop" + + # Add in members from convenience archives. + for xlib in $addlibs; do + # Extract the objects. + case $xlib in + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; + *) xabs=`pwd`"/$xlib" ;; + esac + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` + xdir="$gentop/$xlib" + + $show "${rm}r $xdir" + $run ${rm}r "$xdir" + $show "mkdir $xdir" + $run mkdir "$xdir" + status=$? + if test "$status" -ne 0 && test ! -d "$xdir"; then + exit $status + fi + $show "(cd $xdir && $AR x $xabs)" + $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? + + oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` + done + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + eval cmds=\"$old_archive_from_new_cmds\" + else + # Ensure that we have .o objects in place in case we decided + # not to build a shared library, and have fallen back to building + # static libs even though --disable-static was passed! + for oldobj in $oldobjs; do + if test ! -f $oldobj; then + xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$oldobj"; then + xdir="." + else + xdir="$xdir" + fi + baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` + obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` + $show "(cd $xdir && ${LN_S} $obj $baseobj)" + $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $? + fi + done + + eval cmds=\"$old_archive_cmds\" + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated + fi + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + $show "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args)" + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + + # Only create the output if not a dry run. + if test -z "$run"; then + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit 1 + fi + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + for lib in $dlfiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit 1 + fi + newdlfiles="$newdlfiles $libdir/$name" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit 1 + fi + newdlprefiles="$newdlprefiles $libdir/$name" + done + dlprefiles="$newdlprefiles" + fi + $rm $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $echo > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $echo >> $output "\ +relink_command=\"$relink_command\"" + fi + done + fi + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? + ;; + esac + exit 0 + ;; + + # libtool install mode + install) + modename="$modename: install" + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then + # Aesthetically quote it. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg="$nonopt" + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest="$arg" + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) prev="-f" ;; + -g) prev="-g" ;; + -m) prev="-m" ;; + -o) prev="-o" ;; + -s) + stripme=" -s" + continue + ;; + -*) ;; + + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest="$arg" + continue + fi + ;; + esac + + # Aesthetically quote the argument. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit 1 + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test "$#" -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + library_names= + old_library= + relink_command= + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" + + if test -n "$relink_command"; then + $echo "$modename: warning: relinking \`$file'" 1>&2 + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + continue + fi + fi + + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$srcname $destdir/$realname" + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$striplib $destdir/$realname" + $run eval "$striplib $destdir/$realname" || exit $? + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + for linkname + do + if test "$linkname" != "$realname"; then + $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + eval cmds=\"$postinstall_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + instname="$dir/$name"i + $show "$install_prog $instname $destdir/$name" + $run eval "$install_prog $instname $destdir/$name" || exit $? + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + esac + + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` + + $show "$install_prog $staticobj $staticdest" + $run eval "$install_prog \$staticobj \$staticdest" || exit $? + fi + exit 0 + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Do a test to see if this is really a libtool program. + if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + notinst_deplibs= + relink_command= + + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Check the variables that should have been set. + if test -z "$notinst_deplibs"; then + $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 + exit 1 + fi + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + relink_command= + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir="/tmp" + test -n "$TMPDIR" && tmpdir="$TMPDIR" + tmpdir=`mktemp -d $tmpdir/libtool-XXXXXX 2> /dev/null` + if test $? = 0 ; then : + else + tmpdir="$tmpdir/libtool-$$" + fi + if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : + else + $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 + continue + fi + file=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + ${rm}r "$tmpdir" + continue + fi + file="$outputname" + else + $echo "$modename: warning: cannot relink \`$file'" 1>&2 + fi + else + # Install the binary that we compiled earlier. + file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyways + case $install_prog,$host in + /usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + destfile=`echo $destfile | sed -e 's,.exe$,,'` + ;; + esac + ;; + esac + $show "$install_prog$stripme $file $destfile" + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? + test -n "$outputname" && ${rm}r "$tmpdir" + ;; + esac + done + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + if test -n "$stripme" && test -n "$striplib"; then + $show "$old_striplib $oldlib" + $run eval "$old_striplib $oldlib" || exit $? + fi + + # Do each command in the postinstall commands. + eval cmds=\"$old_postinstall_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $0 --finish$current_libdirs' + else + exit 0 + fi + ;; + + # libtool finish mode + finish) + modename="$modename: finish" + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + eval cmds=\"$finish_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || admincmds="$admincmds + $cmd" + done + IFS="$save_ifs" + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + test "$show" = : && exit 0 + + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + echo " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + echo " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + echo " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + echo + echo "See any operating system documentation about shared libraries for" + echo "more information, such as the ld(1) and ld.so(8) manual pages." + echo "----------------------------------------------------------------------" + exit 0 + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit 1 + fi + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test ! -f "$file"; then + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Read the libtool library. + dlname= + library_names= + + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit 1 + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved enviroment variables + if test "${save_LC_ALL+set}" = set; then + LC_ALL="$save_LC_ALL"; export LC_ALL + fi + if test "${save_LANG+set}" = set; then + LANG="$save_LANG"; export LANG + fi + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" + fi + $echo "$cmd$args" + exit 0 + fi + ;; + + # libtool clean and uninstall mode + clean | uninstall) + modename="$modename: $mode" + rm="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) rm="$rm $arg"; rmforce=yes ;; + -*) rm="$rm $arg" ;; + *) files="$files $arg" ;; + esac + done + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + rmdirs= + + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$file"; then + dir=. + objdir="$objdir" + else + objdir="$dir/$objdir" + fi + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + test "$mode" = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test "$mode" = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if (test -L "$file") >/dev/null 2>&1 \ + || (test -h "$file") >/dev/null 2>&1 \ + || test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + . $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $objdir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + + if test "$mode" = uninstall; then + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + eval cmds=\"$postuninstall_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + eval cmds=\"$old_postuninstall_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + # FIXME: should reinstall the best remaining shared library. + fi + fi + ;; + + *.lo) + if test "$build_old_libs" = yes; then + oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` + rmfiles="$rmfiles $dir/$oldobj" + fi + ;; + + *) + # Do a test to see if this is a libtool program. + if test "$mode" = clean && + (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$file + + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + fi + ;; + esac + $show "$rm $rmfiles" + $run $rm $rmfiles || exit_status=1 + done + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + $show "rmdir $dir" + $run rmdir $dir >/dev/null 2>&1 + fi + done + + exit $exit_status + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit 1 + ;; + esac + + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit 1 + fi +fi # test -z "$show_help" + +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit 1 +fi + +# We need to display help for each of the modes. +case $mode in +"") $echo \ +"Usage: $modename [OPTION]... [MODE-ARG]... + +Provide generalized library-building support services. + + --config show all configuration variables + --debug enable verbose shell tracing +-n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --version print version information + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for +a more detailed description of MODE." + exit 0 + ;; + +clean) + $echo \ +"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + +compile) + $echo \ +"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -static always build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + +execute) + $echo \ +"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + +finish) + $echo \ +"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + +install) + $echo \ +"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + +link) + $echo \ +"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -static do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + +uninstall) + $echo \ +"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + +*) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; +esac + +echo +$echo "Try \`$modename --help' for more information about other modes." + +exit 0 + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: Index: llvm/mkinstalldirs diff -u /dev/null llvm/mkinstalldirs:1.2 --- /dev/null Mon Jun 30 16:59:26 2003 +++ llvm/mkinstalldirs Mon Jun 30 16:58:14 2003 @@ -0,0 +1,101 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +# $Id: mkinstalldirs,v 1.2 2003/06/30 21:58:14 criswell Exp $ + +errstatus=0 +dirmode="" + +usage="\ +Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." + +# process command line arguments +while test $# -gt 0 ; do + case "${1}" in + -h | --help | --h* ) # -h for help + echo "${usage}" 1>&2; exit 0 ;; + -m ) # -m PERM arg + shift + test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } + dirmode="${1}" + shift ;; + -- ) shift; break ;; # stop option processing + -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option + * ) break ;; # first non-opt arg + esac +done + +for file +do + if test -d "$file"; then + shift + else + break + fi +done + +case $# in +0) exit 0 ;; +esac + +case $dirmode in +'') + if mkdir -p -- . 2>/dev/null; then + echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + fi ;; +*) + if mkdir -m "$dirmode" -p -- . 2>/dev/null; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + fi ;; +esac + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + + lasterr="" + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# Local Variables: +# mode: shell-script +# sh-indentation: 3 +# End: +# mkinstalldirs ends here Index: llvm/Makefile.common diff -u llvm/Makefile.common:1.94 llvm/Makefile.common:1.95 --- llvm/Makefile.common:1.94 Fri Jun 27 11:58:44 2003 +++ llvm/Makefile.common Mon Jun 30 16:58:13 2003 @@ -30,14 +30,24 @@ # are in, if they are not in the current directory. This should include a # trailing / character. # -# 6. PROJ_COMPILE - If set to 1, then this makefile can also be used to -# compile other projects using llvm. Note if this option is set then the -# following *must* hold -# PROJLEVEL should be set to the top of the source directory for the -# project files -# LEVEL should be set to the top of LLVM source tree -# LLVM_LIB_DIR should be set to the top of the LLVM build tree +# 6. LLVM_SRC_ROOT - If specified, points to the top of the LLVM source tree. # +# 7. LLVM_OBJ_ROOT - If specified, points to the top directory where LLVM +# object files are placed. +# +# 8. BUILD_SRC_DIR - The directory which contains the current set of Makefiles +# and usually the source code too (unless SourceDir is set). +# +# 9. BUILD_SRC_ROOT - The root directory of the source code being compiled. +# +# 10. BUILD_OBJ_DIR - The directory where object code should be placed. +# +# 11. BUILD_OBJ_ROOT - The root directory for where object code should be +# placed. +# +# For building, +# LLVM, LLVM_SRC_ROOT = BUILD_SRC_ROOT, and +# LLVM_OBJ_ROOT = BUILD_OBJ_ROOT. #===-----------------------------------------------------------------------==== # @@ -76,14 +86,20 @@ endif # +# Determine the path of the source tree relative from $HOME (the mythical +# home directory). +# +HOME_OBJ_ROOT := $(OBJ_ROOT)/$(patsubst $(HOME)%,%,$(BUILD_SRC_ROOT)) + +# # Set the object build directory. Its location depends upon the source path # and where object files should go. # ifndef BUILD_OBJ_DIR ifeq ($(OBJ_ROOT),.) -BUILD_OBJ_DIR = $(shell pwd) +BUILD_OBJ_DIR = $(BUILD_SRC_DIR) else -BUILD_OBJ_DIR := $(OBJ_ROOT)$(patsubst $(shell dirname $(BUILD_SRC_ROOT))%,%,$(shell cd $(BUILD_SRC_DIR); pwd)) +BUILD_OBJ_DIR := $(HOME_OBJ_ROOT)$(patsubst $(BUILD_SRC_ROOT)%,%,$(BUILD_SRC_DIR)) endif endif @@ -92,9 +108,9 @@ # ifndef BUILD_OBJ_ROOT ifeq ($(OBJ_ROOT),.) -BUILD_OBJ_ROOT = $(shell cd $(LEVEL); pwd) +BUILD_OBJ_ROOT = $(BUILD_SRC_ROOT) else -BUILD_OBJ_ROOT := $(OBJ_ROOT)$(patsubst $(shell dirname $(BUILD_SRC_ROOT))%,%,$(shell cd $(BUILD_SRC_ROOT); pwd)) +BUILD_OBJ_ROOT := $(HOME_OBJ_ROOT) endif endif @@ -113,16 +129,15 @@ LLVM_OBJ_ROOT = $(BUILD_OBJ_ROOT) endif -# Figure out how to do platform specific stuff on this platform. This is really -# gross and should be autoconfiscated (automake actually), but should hopefully -# work on Linux and solaris (SunOS). -# -UNAME := $(shell uname) -include $(LLVM_SRC_ROOT)/Makefile.$(UNAME) +########################################################################### +# Default Targets: +# The following targets are the standard top level targets for +# building. +########################################################################### ifdef SHARED_LIBRARY # if SHARED_LIBRARY is specified, the default is to build the dynamic lib -dynamic :: +all:: dynamic endif # Default Rule: Make sure it's also a :: rule @@ -134,6 +149,22 @@ # Default rule for test. It ensures everything has a test rule test:: +# Print out the directories used for building +prdirs:: + echo "Home Offset : " $(HOME_OBJ_ROOT); + echo "Build Source Root: " $(BUILD_SRC_ROOT); + echo "Build Source Dir : " $(BUILD_SRC_DIR); + echo "Build Object Root: " $(BUILD_OBJ_ROOT); + echo "Build Object Dir : " $(BUILD_OBJ_DIR); + echo "LLVM Source Root: " $(LLVM_SRC_ROOT); + echo "LLVM Object Root: " $(LLVM_OBJ_ROOT); + +########################################################################### +# Miscellaneous paths and commands: +# This section defines various configuration macros, such as where +# to find burg, tblgen, and libtool. +########################################################################### + #-------------------------------------------------------------------- # Variables derived from configuration options... #-------------------------------------------------------------------- @@ -157,8 +188,21 @@ endif endif +# +# Enable this for profiling support with 'gprof' +# This automatically enables optimized builds. +# +ifdef ENABLE_PROFILING + PROFILE = -pg +endif + +# +# Suffixes for library compilation rules +# +.SUFFIXES: .so + ########################################################################### -# Library Locations +# Library Locations: # These variables describe various library locations: # # DEST* = Location of where libraries that are built will be placed. @@ -208,36 +252,45 @@ PROJTOOLPROFILE := $(BUILD_OBJ_ROOT)/tools/Profile PROJTOOLCURRENT := $(BUILD_OBJ_ROOT)/tools/$(CONFIGURATION) +# +# Libtool is found in the current directory. +# +ifdef VERBOSE +LIBTOOL=$(LLVM_SRC_ROOT)/libtool +else +LIBTOOL=$(LLVM_SRC_ROOT)/libtool --silent +endif + +# # Verbosity levels +# ifndef VERBOSE VERB := @ endif -#--------------------------------------------------------- -# Compilation options... -#--------------------------------------------------------- - ########################################################################### -# Special tools used while building the LLVM tree. Burg is built as part of the -# utils directory. +# Miscellaneous paths and commands (part deux): +# This section defines various configuration macros, such as where +# to find burg, tblgen, and libtool. ########################################################################### + +#-------------------------------------------------------------------------- +# Special tools used while building the LLVM tree. Burg is built as part +# of the utils directory. +#-------------------------------------------------------------------------- BURG := $(LLVMTOOLCURRENT)/burg RunBurg := $(BURG) $(BURG_OPTS) TBLGEN := $(LLVMTOOLCURRENT)/tblgen -# Enable this for profiling support with 'gprof' -# This automatically enables optimized builds. -ifdef ENABLE_PROFILING - PROFILE = -pg -endif ########################################################################### # Compile Time Flags ########################################################################### # -# Include both the project headers and the LLVM headers for compilation +# Include both the project headers and the LLVM headers for compilation and +# dependency computation. # CPPFLAGS += -I$(BUILD_SRC_ROOT)/include -I$(LLVM_SRC_ROOT)/include @@ -254,47 +307,71 @@ CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused -I$(LEVEL)/include CompileOptimizeOpts := -O3 -DNDEBUG -finline-functions -fshort-enums +# +# Compile commands with libtool. +# +Compile := $(LIBTOOL) --mode=compile $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(CompileCommonOpts) +CompileC := $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CCFLAGS) $(CompileCommonOpts) + +# +# Add the LLVM specific "-only-static" option so that we only compile .o files +# once when not building a shared library. +# +# For shared libraries, we will end up building twice, but that doesn't happen +# very often, so we'll let it go. +# +ifndef SHARED_LIBRARY +Compile := $(Compile) -only-static +CompileC := $(CompileC) -only-static +endif + # Compile a cpp file, don't link... -Compile := $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(CompileCommonOpts) CompileG := $(Compile) -g -D_DEBUG CompileO := $(Compile) $(CompileOptimizeOpts) -felide-constructors -fomit-frame-pointer CompileP := $(Compile) $(CompileOptimizeOpts) -felide-constructors $(PROFILE) # Compile a c file, don't link... -CompileC := $(CC) -c $(CPPFLAGS) $(CCFLAGS) $(CompileCommonOpts) CompileCG := $(CompileC) -g -D_DEBUG CompileCO := $(CompileC) $(CompileOptimizeOpts) -fomit-frame-pointer CompileCP := $(CompileC) $(CompileOptimizeOpts) $(PROFILE) +########################################################################### +# Link Time Options +########################################################################### +# # Link final executable - +# (Note that we always link with the C++ compiler). +# ifdef ENABLE_PURIFY # To enable purify, build with 'gmake ENABLE_PURIFY=1' -Link := $(PURIFY) $(CXX) -static +Link := $(PURIFY) $(LIBTOOL) --mode=link $(CXX) -static else -Link := $(CXX) +Link := $(LIBTOOL) --mode=link $(CXX) endif -ifdef PROJ_COMPILE -# include both projlib source and llvmlib source +# link both projlib and llvmlib libraries LinkG := $(Link) -g -L$(PROJLIBDEBUGSOURCE) -L$(LLVMLIBDEBUGSOURCE) $(STRIP) LinkO := $(Link) -O3 -L$(PROJLIBRELEASESOURCE) -L$(LLVMLIBRELEASESOURCE) LinkP := $(Link) -O3 -L$(PROJLIBPROFILESOURCE) -L$(LLVMLIBPROFILESOURCE) $(PROFILE) -else -LinkG := $(Link) -g -L$(LLVMLIBDEBUGSOURCE) $(STRIP) -LinkO := $(Link) -O3 -L$(LLVMLIBRELEASESOURCE) -LinkP := $(Link) -O3 -L$(LLVMLIBPROFILESOURCE) $(PROFILE) -endif - - # Create one .o file from a bunch of .o files... -Relink = ${LD} -r +Relink = ${LIBTOOL} --mode=link $(CXX) # MakeSO - Create a .so file from a .o files... -MakeSO := $(CXX) $(MakeSharedObjectOption) -MakeSOO := $(MakeSO) -O3 -MakeSOP := $(MakeSOO) $(PROFILE) +#MakeSO := $(LIBTOOL) --mode=link $(CXX) $(MakeSharedObjectOption) +#MakeSOO := $(MakeSO) -O3 +#MakeSOP := $(MakeSOO) $(PROFILE) + +# +# Configure where the item being compiled should go. +# +ifdef SHARED_LIBRARY +Link := $(Link) -rpath $(DESTLIBCURRENT) +endif + +ifdef TOOLNAME +Link := $(Link) -rpath $(DESTTOOLCURRENT) +endif # Create dependancy file from CPP file, send to stdout. Depend := $(CXX) -MM -I$(LEVEL)/include $(CPPFLAGS) @@ -313,11 +390,10 @@ Source := $(ExtraSource) $(wildcard *.cpp *.c *.y *.l) endif -Objs := $(sort $(patsubst Debug/%.o, %.o, $(addsuffix .o,$(notdir $(basename $(Source)))))) -ObjectsO := $(addprefix $(BUILD_OBJ_DIR)/Release/,$(Objs)) -ObjectsP := $(addprefix $(BUILD_OBJ_DIR)/Profile/,$(Objs)) -ObjectsG := $(addprefix $(BUILD_OBJ_DIR)/Debug/,$(Objs)) - +LObjs := $(sort $(patsubst Debug/%.lo, %.lo, $(addsuffix .lo,$(notdir $(basename $(Source)))))) +LObjectsO := $(addprefix $(BUILD_OBJ_DIR)/Release/,$(LObjs)) +LObjectsP := $(addprefix $(BUILD_OBJ_DIR)/Profile/,$(LObjs)) +LObjectsG := $(addprefix $(BUILD_OBJ_DIR)/Debug/,$(LObjs)) #--------------------------------------------------------- # Handle the DIRS and PARALLEL_DIRS options @@ -341,6 +417,7 @@ $(VERB) cd $(@D); $(MAKE) $(subst $(@D)/.make,,$@) endif +# Handle directories that may or may not exist ifdef OPTIONAL_DIRS all install clean test :: $(VERB) for dir in ${OPTIONAL_DIRS}; do \ @@ -351,6 +428,9 @@ done endif +########################################################################### +# Library Build Rules: +# #--------------------------------------------------------- # Handle the LIBRARYNAME option - used when building libs... #--------------------------------------------------------- @@ -367,6 +447,7 @@ # it's built as a .o file, then all of the constituent .o files in it will be # linked into tools (for example gccas) even if they only use one of the parts # of it. For this reason, sometimes it's useful to use libraries as .a files. +########################################################################### ifdef LIBRARYNAME @@ -383,6 +464,11 @@ LIBNAME_OBJP := $(DESTLIBPROFILE)/$(LIBRARYNAME).o LIBNAME_OBJG := $(DESTLIBDEBUG)/$(LIBRARYNAME).o +#-------------------------------------------------------------------- +# Library Targets +# Modify the top level targets to build the desired libraries. +#-------------------------------------------------------------------- + # dynamic target builds a shared object version of the library... dynamic:: $(DESTLIBCURRENT)/lib$(LIBRARYNAME).so @@ -396,44 +482,60 @@ all:: $(DESTLIBCURRENT)/lib$(LIBRARYNAME).a endif -$(LIBNAME_O): $(ObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir - @echo ======= Linking $(LIBRARYNAME) release library ======= - $(VERB) $(MakeSOO) -o $@ $(ObjectsO) $(LibSubDirs) $(LibLinkOpts) - -$(LIBNAME_P): $(ObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir - @echo ======= Linking $(LIBRARYNAME) profile library ======= - $(VERB) $(MakeSOP) -o $@ $(ObjectsP) $(LibSubDirs) $(LibLinkOpts) - -$(LIBNAME_G): $(ObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir - @echo ======= Linking $(LIBRARYNAME) debug library ======= - $(VERB) $(MakeSO) -g -o $@ $(ObjectsG) $(LibSubDirs) $(LibLinkOpts) - -$(LIBNAME_AO): $(ObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir - @echo ======= Linking $(LIBRARYNAME) release library ======= - @rm -f $@ - $(VERB) $(AR) $@ $(ObjectsO) $(LibSubDirs) - -$(LIBNAME_AP): $(ObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir - @echo ======= Linking $(LIBRARYNAME) profile library ======= - @rm -f $@ - $(VERB) $(AR) $@ $(ObjectsP) $(LibSubDirs) - -$(LIBNAME_AG): $(ObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir - @echo ======= Linking $(LIBRARYNAME) debug library ======= - @rm -f $@ - $(VERB) $(AR) $@ $(ObjectsG) $(LibSubDirs) +#-------------------------------------------------------------------- +# Rules for building libraries +#-------------------------------------------------------------------- + +# +# Rules for building dynamically linked libraries. +# +$(LIBNAME_O): $(LObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir + @echo ======= Linking $(LIBRARYNAME) dynamic release library ======= + $(VERB) $(Link) -o $*.la $(LObjectsO) $(LibSubDirs) $(LibLinkOpts); + $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $*.la $(DESTLIBCURRENT); + +$(LIBNAME_P): $(LObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir + @echo ======= Linking $(LIBRARYNAME) dynamic profile library ======= + $(VERB) $(Link) -o $*.la $(LObjectsP) $(LibSubDirs) $(LibLinkOpts); + $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $*.la $(DESTLIBCURRENT); + +$(LIBNAME_G): $(LObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir + @echo ======= Linking $(LIBRARYNAME) dynamic debug library ======= + $(VERB) $(Link) -o $*.la $(LObjectsG) $(LibSubDirs) $(LibLinkOpts); + $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $*.la $(DESTLIBCURRENT); + +# +# Rules for building static archive libraries. +# +$(LIBNAME_AO): $(LObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir + @echo ======= Linking $(LIBRARYNAME) archive release library ======= + @$(RM) -f $@ + $(VERB) $(Link) -03 -o $@ $(LObjectsO) $(LibSubDirs) -static + +$(LIBNAME_AP): $(LObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir + @echo ======= Linking $(LIBRARYNAME) archive profile library ======= + @$(RM) -f $@ + $(VERB) $(Link) -03 $(PROFILE) -o $@ $(LObjectsP) $(LibSubDirs) -static -$(LIBNAME_OBJO): $(ObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir +$(LIBNAME_AG): $(LObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir + @echo ======= Linking $(LIBRARYNAME) archive debug library ======= + @$(RM) -f $@ + $(VERB) $(Link) -g $(STRIP) -o $@ $(LObjectsG) $(LibSubDirs) -static + +# +# Rules for building .o libraries. +# +$(LIBNAME_OBJO): $(LObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir @echo "Linking $@" - $(VERB) $(Relink) -o $@ $(ObjectsO) $(LibSubDirs) + $(VERB) $(Relink) -o $@ $(LObjectsO) $(LibSubDirs) -$(LIBNAME_OBJP): $(ObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir +$(LIBNAME_OBJP): $(LObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir @echo "Linking $@" - $(VERB) $(Relink) -o $@ $(ObjectsP) $(LibSubDirs) + $(VERB) $(Relink) -o $@ $(LObjectsP) $(LibSubDirs) -$(LIBNAME_OBJG): $(ObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir +$(LIBNAME_OBJG): $(LObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir @echo "Linking $@" - $(VERB) $(Relink) -o $@ $(ObjectsG) $(LibSubDirs) + $(VERB) $(Relink) -o $@ $(LObjectsG) $(LibSubDirs) endif @@ -441,11 +543,16 @@ # Create a TAGS database for emacs #------------------------------------------------------------------------ +ifdef ETAGS ifeq ($(LEVEL), .) tags: - etags -l c++ `find include lib tools -name '*.cpp' -o -name '*.h'` + $(ETAGS) -l c++ `find include lib tools -name '*.cpp' -o -name '*.h'` all:: tags endif +else +tags: + ${ECHO} "Cannot build $@: The program etags is not installed" +endif #------------------------------------------------------------------------ # Handle the TOOLNAME option - used when building tool executables... @@ -487,8 +594,14 @@ USED_LIB_PATHS_G := $(addprefix $(DESTLIBDEBUG)/, $(STATICUSEDLIBS)) USED_LIB_PATHS_O := $(addprefix $(DESTLIBRELEASE)/, $(STATICUSEDLIBS)) USED_LIB_PATHS_P := $(addprefix $(DESTLIBPROFILE)/, $(STATICUSEDLIBS)) -LINK_OPTS := $(TOOLLINKOPTS) $(PLATFORMLINKOPTS) +#LINK_OPTS := $(TOOLLINKOPTS) $(PLATFORMLINKOPTS) +# +# Libtool link options: +# Ensure that all binaries have their symbols exported so that they can +# by dlsym'ed. +# +LINK_OPTS := -export-dynamic $(TOOLLINKOPTS) @@ -502,19 +615,19 @@ all:: $(TOOLEXENAMES) clean:: - $(VERB) rm -f $(TOOLEXENAMES) + $(VERB) $(RM) -f $(TOOLEXENAMES) -$(TOOLEXENAME_G): $(ObjectsG) $(USED_LIB_PATHS_G) $(DESTTOOLDEBUG)/.dir +$(TOOLEXENAME_G): $(LObjectsG) $(USED_LIB_PATHS_G) $(DESTTOOLDEBUG)/.dir @echo ======= Linking $(TOOLNAME) debug executable $(STRIP_WARN_MSG)======= - $(VERB) $(LinkG) -o $@ $(ObjectsG) $(LIB_OPTS_G) $(LINK_OPTS) + $(VERB) $(LinkG) -o $@ $(LObjectsG) $(LIB_OPTS_G) $(LINK_OPTS) $(LIBS) -$(TOOLEXENAME_O): $(ObjectsO) $(USED_LIB_PATHS_O) $(DESTTOOLRELEASE)/.dir +$(TOOLEXENAME_O): $(LObjectsO) $(USED_LIB_PATHS_O) $(DESTTOOLRELEASE)/.dir @echo ======= Linking $(TOOLNAME) release executable ======= - $(VERB) $(LinkO) -o $@ $(ObjectsO) $(LIB_OPTS_O) $(LINK_OPTS) + $(VERB) $(LinkO) -o $@ $(LObjectsO) $(LIB_OPTS_O) $(LINK_OPTS) $(LIBS) -$(TOOLEXENAME_P): $(ObjectsP) $(USED_LIB_PATHS_P) $(DESTTOOLPROFILE)/.dir +$(TOOLEXENAME_P): $(LObjectsP) $(USED_LIB_PATHS_P) $(DESTTOOLPROFILE)/.dir @echo ======= Linking $(TOOLNAME) profile executable ======= - $(VERB) $(LinkP) -o $@ $(ObjectsP) $(LIB_OPTS_P) $(LINK_OPTS) + $(VERB) $(LinkP) -o $@ $(LObjectsP) $(LIB_OPTS_P) $(LINK_OPTS) $(LIBS) endif @@ -525,26 +638,74 @@ .PRECIOUS: $(BUILD_OBJ_DIR)/Debug/.dir $(BUILD_OBJ_DIR)/Release/.dir # Create .o files in the ObjectFiles directory from the .cpp and .c files... -$(BUILD_OBJ_DIR)/Release/%.o: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Release/.dir +#$(BUILD_OBJ_DIR)/Release/%.o: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Release/.dir + #@echo "Compiling $<" + #$(VERB) $(CompileO) $< -o $@ + +#$(BUILD_OBJ_DIR)/Release/%.o: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Release/.dir + #$(VERB) $(CompileCO) $< -o $@ + +#$(BUILD_OBJ_DIR)/Profile/%.o: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Profile/.dir + #@echo "Compiling $<" + #$(VERB) $(CompileP) $< -o $@ + +#$(BUILD_OBJ_DIR)/Profile/%.o: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Profile/.dir + #@echo "Compiling $<" + #$(VERB) $(CompileCP) $< -o $@ + +#$(BUILD_OBJ_DIR)/Debug/%.o: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Debug/.dir + #@echo "Compiling $<" + #$(VERB) $(CompileG) $< -o $@ + +#$(BUILD_OBJ_DIR)/Debug/%.o: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Debug/.dir + #$(VERB) $(CompileCG) $< -o $@ + +# Create .lo files in the ObjectFiles directory from the .cpp and .c files... +$(BUILD_OBJ_DIR)/Release/%.lo: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Release/.dir @echo "Compiling $<" $(VERB) $(CompileO) $< -o $@ -$(BUILD_OBJ_DIR)/Release/%.o: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Release/.dir +$(BUILD_OBJ_DIR)/Release/%.lo: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Release/.dir + @echo "Compiling $<" $(VERB) $(CompileCO) $< -o $@ -$(BUILD_OBJ_DIR)/Profile/%.o: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Profile/.dir +$(BUILD_OBJ_DIR)/Profile/%.lo: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Profile/.dir @echo "Compiling $<" $(VERB) $(CompileP) $< -o $@ -$(BUILD_OBJ_DIR)/Profile/%.o: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Profile/.dir +$(BUILD_OBJ_DIR)/Profile/%.lo: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Profile/.dir @echo "Compiling $<" $(VERB) $(CompileCP) $< -o $@ -$(BUILD_OBJ_DIR)/Debug/%.o: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Debug/.dir +$(BUILD_OBJ_DIR)/Debug/%.lo: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Debug/.dir @echo "Compiling $<" $(VERB) $(CompileG) $< -o $@ -$(BUILD_OBJ_DIR)/Debug/%.o: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Debug/.dir +$(BUILD_OBJ_DIR)/Debug/%.lo: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Debug/.dir + @echo "Compiling $<" + $(VERB) $(CompileCG) $< -o $@ + +# Create .lo files in the ObjectFiles directory from the .cpp and .c files... +$(BUILD_OBJ_DIR)/Release/%.lo: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Release/.dir + @echo "Compiling $<" + $(VERB) $(CompileO) $< -o $@ + +$(BUILD_OBJ_DIR)/Release/%.lo: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Release/.dir + $(VERB) $(CompileCO) $< -o $@ + +$(BUILD_OBJ_DIR)/Profile/%.lo: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Profile/.dir + @echo "Compiling $<" + $(VERB) $(CompileP) $< -o $@ + +$(BUILD_OBJ_DIR)/Profile/%.lo: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Profile/.dir + @echo "Compiling $<" + $(VERB) $(CompileCP) $< -o $@ + +$(BUILD_OBJ_DIR)/Debug/%.lo: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Debug/.dir + @echo "Compiling $<" + $(VERB) $(CompileG) $< -o $@ + +$(BUILD_OBJ_DIR)/Debug/%.lo: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Debug/.dir $(VERB) $(CompileCG) $< -o $@ # @@ -565,10 +726,10 @@ # FIXME. (f.e. char Buffer[10000]; ) # %.cpp: %.l - $(FLEX) -t $< | sed '/^find_rule/d' | \ - sed 's/void yyunput/inline void yyunput/' | \ - sed 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \ - sed 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' > $@ + $(FLEX) -t $< | $(SED) '/^find_rule/d' | \ + $(SED) 's/void yyunput/inline void yyunput/' | \ + $(SED) 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \ + $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' > $@ # Rule for building the bison parsers... %.c: %.y # Cancel built-in rules for yacc @@ -576,23 +737,40 @@ %.cpp %.h : %.y @echo Bison\'ing $<... $(VERB) $(BISON) -v -d -p $(<:%Parser.y=%) $*.y - $(VERB) mv -f $*.tab.c $*.cpp - $(VERB) mv -f $*.tab.h $*.h + $(VERB) ${MV} -f $*.tab.c $*.cpp + $(VERB) ${MV} -f $*.tab.h $*.h # To create the directories... %/.dir: - $(VERB) mkdir -p $* - @date > $@ + $(VERB) ${MKDIR} $* > /dev/null + @$(DATE) > $@ # To create postscript files from dot files... +ifdef DOT +%.ps: %.dot + ${DOT} -Tps < $< > $@ +else %.ps: %.dot - dot -Tps < $< > $@ + ${ECHO} "Cannot build $@: The program dot is not installed" +endif # 'make clean' nukes the tree clean:: - $(VERB) rm -rf $(BUILD_OBJ_DIR)/Debug $(BUILD_OBJ_DIR)/Release $(BUILD_OBJ_DIR)/Profile $(BUILD_OBJ_DIR)/Depend - $(VERB) rm -f core core.[0-9][0-9]* *.o *.d *.so *~ *.flc - $(VERB) rm -f $(LEX_OUTPUT) $(YACC_OUTPUT) + $(VERB) $(RM) -rf $(BUILD_OBJ_DIR)/Debug $(BUILD_OBJ_DIR)/Release $(BUILD_OBJ_DIR)/Profile $(BUILD_OBJ_DIR)/Depend + $(VERB) $(RM) -f core core.[0-9][0-9]* *.o *.d *.so *~ *.flc + $(VERB) $(RM) -f $(LEX_OUTPUT) $(YACC_OUTPUT) + +distclean:: clean + $(VERB) (cd $(LLVM_SRC_ROOT); $(RM) -rf $(LEVEL)/Makefile.config \ + $(LEVEL)/include/Config/config.h \ + $(LEVEL)/autom4te.cache \ + $(LEVEL)/config.log) + +########################################################################### +# C/C++ Dependencies +# Define variables and rules that generate header file dependencies +# from C/C++ source files. +########################################################################### # If dependencies were generated for the file that included this file, # include the dependancies now... @@ -600,16 +778,29 @@ SourceBaseNames := $(basename $(notdir $(filter-out Debug/%, $(Source)))) SourceDepend := $(SourceBaseNames:%=$(BUILD_OBJ_DIR)/Depend/%.d) +# +# Depend target: +# This allows a user to manually ask for an update in the dependencies +# +depend: $(SourceDepend) + + # Create dependencies for the *.cpp files... #$(SourceDepend): \x $(BUILD_OBJ_DIR)/Depend/%.d: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Depend/.dir - $(VERB) $(Depend) $< | sed 's|$*\.o *|$(BUILD_OBJ_DIR)/Release/& $(BUILD_OBJ_DIR)/Profile/& $(BUILD_OBJ_DIR)/Debug/& $(BUILD_OBJ_DIR)/Depend/$(@F)|g' > $@ + $(VERB) $(Depend) $< | $(SED) 's|\.o|\.lo|' | $(SED) 's|$*\.lo *|$(BUILD_OBJ_DIR)/Release/& $(BUILD_OBJ_DIR)/Profile/& $(BUILD_OBJ_DIR)/Debug/& $(BUILD_OBJ_DIR)/Depend/$(@F)|g' > $@ # Create dependencies for the *.c files... #$(SourceDepend): \x $(BUILD_OBJ_DIR)/Depend/%.d: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Depend/.dir - $(VERB) $(DependC) $< | sed 's|$*\.o *|Release/& Profile/& Debug/& Depend/$(@F)|g' > $@ + $(VERB) $(DependC) -o $@ $< | $(SED) 's|\.o|\.lo|' | $(SED) 's|$*\.lo *|$(BUILD_OBJ_DIR)/Release/& $(BUILD_OBJ_DIR)/Profile/& $(BUILD_OBJ_DIR)/Debug/& $(BUILD_OBJ_DIR)/Depend/$(@F)|g' > $@ +# +# Include dependencies generated from C/C++ source files, but not if we +# are cleaning (this example taken from the GNU Make Manual). +# +ifneq ($(MAKECMDGOALS),clean) ifneq ($(SourceDepend),) -include $(SourceDepend) +endif endif Index: llvm/Makefile.config diff -u llvm/Makefile.config:1.15 llvm/Makefile.config:1.16 --- llvm/Makefile.config:1.15 Wed Jun 11 08:55:26 2003 +++ llvm/Makefile.config Mon Jun 30 16:58:13 2003 @@ -4,6 +4,11 @@ # values specific to a particular installation of LLVM. #===-----------------------------------------------------------------------==== +# +# Target operating system for which LLVM will be compiled. +# +OS=Linux + # Path to the C++ compiler to use. This is an optional setting, which defaults # to whatever your gmake defaults to. # @@ -11,22 +16,30 @@ # find the system assembler, which breaks if the LLVM assembler is in our path. # Hack it to use the assembler in /usr/bin directly. # -CXX = PATH=/usr/bin /usr/dcs/software/evaluation/bin/g++ +CXX = /home/vadve/criswell/local/Linux/bin/g++ # We have the same problem with the CC binary, which use used by testcases for # native builds. # -CC := PATH=/usr/bin /usr/dcs/software/evaluation/bin/gcc +CC := /home/vadve/criswell/local/Linux/bin/gcc + +# +# Compilation flags for the C and C++ compilers. +# +CPPFLAGS=-DHAVE_CONFIG_H +CCFLAGS=-DHAVE_CONFIG_H +LDFLAGS= +LIBS=-ldl # -# Path to the linker. +# Libraries needed by tools # -LD = ld +TOOLLINKOPTS=-ldl # # Path to the archiver program. # -AR_PATH = ar +AR_PATH = /usr/bin/ar # # The pathnames of the Flex and Bison programs, respectively. @@ -35,17 +48,34 @@ FLEX = flex # -# Path OBJ_ROOT to the directory where object files should be stored during a -# build. Set to "." if you do not want to use a separate place for object -# files. +# Paths to miscellaneous programs. +# +SED = /bin/sed +RM = /bin/rm +ECHO = /bin/echo +MKDIR = /home/vadve/criswell/box/mainline/llvm/mkinstalldirs +DATE = /bin/date +MV = /bin/mv +INSTALL = /usr/dcs/software/supported/bin/ginstall -c +DOT = /home/vadve/lattner/local/x86/bin/dot +ETAGS = /usr/dcs/software/supported/bin/etags + +# +# Determine the target for which LLVM should generate code. +# +LLVMGCCARCH := i686-pc-linux-gnu/3.4-llvm + +# Path to directory where object files should be stored during a build. +# Set OBJ_ROOT to "." if you do not want to use a separate place for +# object files. # #OBJ_ROOT = . -OBJ_ROOT := /localhome/$(USER) +OBJ_ROOT := /localhome/criswell # Path to location for LLVM front-end this should only be specified here if you # want to override the value set in Makefile.$(uname) # -#LLVMGCCDIR := /home/vadve/lattner/local/x86/llvm-gcc/ +LLVMGCCDIR := /home/vadve/lattner/local/x86/llvm-gcc/ # When this setting is set to true, programs in the llvm/test/Programs hierarchy # are not recompiled from source code. Instead, the bytecode for the file is @@ -55,6 +85,7 @@ # #USE_PRECOMPILED_BYTECODE := 1 + # This path specifies the cannonical location of bytecode files for compiled # versions of the test/Programs/* programs. This is used as the bytecode source # when USE_PRECOMPILED_BYTECODE is specified or when source code is not @@ -65,24 +96,26 @@ # Path to location for purify, this is only needed if you build with # ENABLE_PURIFY=1 # -PURIFY = /usr/dcs/applications/purify/bin/purify +PURIFY = # # SPEC benchmarks: -# Set this variable to enable the use of the SPEC benchmarks. You must -# provide the SPEC benchmarks on your own. +# Set the USE_SPEC variable to enable the use of the SPEC benchmarks. +# You must provide the SPEC benchmarks on your own. # -USE_SPEC := 1 + # # Path to the SPEC benchmarks. If you have the SPEC benchmarks, place the # path here. # +#SPEC_ROOT := /home/vadve/shared/benchmarks/speccpu2000/benchspec SPEC_ROOT := /home/vadve/shared/benchmarks/speccpu2000/benchspec # # Path to the PAPI code. This is used by the reoptimizer only. # +#PAPIDIR := /home/vadve/shared/papi-2.3.4.1 PAPIDIR := /home/vadve/shared/papi-2.3.4.1 # These are options that can either be enabled here, or can be enabled on the @@ -94,19 +127,33 @@ # #ENABLE_OPTIMIZED = 1 + # When ENABLE_PROFILING is enabled, the llvm source base is built with profile # information to allow gprof to be used to get execution frequencies. # #ENABLE_PROFILING = 1 + # # This open tells the Makefiles to produce verbose output. # It essentially prints the commands that make is executing # #VERBOSE = 1 -# When ENABLE_PURIFY is enabled, the LLVM tools are linked with purify (which + +# When ENABLE_PURIFY is set to 1, the LLVM tools are linked with purify (which # must be locally installed) to allow for some automated memory error debugging. # -#ENABLE_PURIFY = 1 +#ENABLE_PURIFY = 1 + + +# +# Enable JIT for this platform +# + + +# +# Disable LLC diffs for testing. +# +DISABLE_LLC_DIFFS:=1 From criswell at cs.uiuc.edu Mon Jun 30 17:01:15 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:01:15 2003 Subject: [llvm-commits] CVS: llvm/include/Config/alloca.h assert.h config.h.in dlfcn.h errno.h fcntl.h limits.h link.h malloc.h memory.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h Message-ID: <200306302159.QAA15163@tank.cs.uiuc.edu> Changes in directory llvm/include/Config: alloca.h updated: 1.1 -> 1.2 assert.h updated: 1.1 -> 1.2 config.h.in updated: 1.1 -> 1.2 dlfcn.h updated: 1.1 -> 1.2 errno.h updated: 1.1 -> 1.2 fcntl.h updated: 1.1 -> 1.2 limits.h updated: 1.1 -> 1.2 link.h updated: 1.1 -> 1.2 malloc.h updated: 1.1 -> 1.2 memory.h updated: 1.1 -> 1.2 stdint.h updated: 1.1 -> 1.2 stdio.h updated: 1.1 -> 1.2 stdlib.h updated: 1.1 -> 1.2 string.h updated: 1.1 -> 1.2 strings.h updated: 1.1 -> 1.2 time.h updated: 1.1 -> 1.2 unistd.h updated: 1.1 -> 1.2 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/include/Config/alloca.h diff -u /dev/null llvm/include/Config/alloca.h:1.2 --- /dev/null Mon Jun 30 16:59:28 2003 +++ llvm/include/Config/alloca.h Mon Jun 30 16:58:17 2003 @@ -0,0 +1,46 @@ +/* + * Header file: alloc.h + * + * Description: + * This header file includes the infamous alloc.h header file if the + * autoconf system has found it. It hides all of the autoconf details + * from the rest of the application source code. + */ + +#ifndef _CONFIG_ALLOC_H +#define _CONFIG_ALLOC_H + +#include "Config/config.h" + +/* + * This is a modified version of that suggested by the Autoconf manual. + * 1) The #pragma is indented so that pre-ANSI C compilers ignore it. + * 2) If alloca.h cannot be found, then try stdlib.h. Some platforms + * (notably FreeBSD) defined alloca() there. + */ +#ifndef __GNUC__ +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + # pragma alloca +# else +# ifndef alloca + char * alloca (); +# endif +# endif +# endif +#else +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef HAVE_STDLIB_H +# include +# else +# error "The function alloca() is required but not found!" +# endif +# endif +#endif + +#endif + Index: llvm/include/Config/assert.h diff -u /dev/null llvm/include/Config/assert.h:1.2 --- /dev/null Mon Jun 30 16:59:28 2003 +++ llvm/include/Config/assert.h Mon Jun 30 16:58:17 2003 @@ -0,0 +1,23 @@ +/* + * Header file: assert.h + * + * Description: + * This header file includes the assert.h header file if the + * autoconf system has found it. + */ + +#ifndef _CONFIG_ASSERT_H +#define _CONFIG_ASSERT_H + +#include "Config/config.h" + +/* + * This is the suggested use by the Autoconf manual. + * 1) The #pragma is indented so that pre-ANSI C compilers ignore it. + */ +#ifdef HAVE_ASSERT_H +#include +#endif + +#endif + Index: llvm/include/Config/config.h.in diff -u /dev/null llvm/include/Config/config.h.in:1.2 --- /dev/null Mon Jun 30 16:59:28 2003 +++ llvm/include/Config/config.h.in Mon Jun 30 16:58:17 2003 @@ -0,0 +1,210 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +#undef CRAY_STACKSEG_END + +/* Define to 1 if using `alloca.c'. */ +#undef C_ALLOCA + +/* Define to 1 if you have `alloca', as a function or macro. */ +#undef HAVE_ALLOCA + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +#undef HAVE_ALLOCA_H + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +#undef HAVE_DOPRNT + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `getcwd' function. */ +#undef HAVE_GETCWD + +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define to 1 if you have the `gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `dl' library (-ldl). */ +#undef HAVE_LIBDL + +/* Define to 1 if you have the `elf' library (-lelf). */ +#undef HAVE_LIBELF + +/* Define to 1 if you have the `m' library (-lm). */ +#undef HAVE_LIBM + +/* Define to 1 if you have the `papi' library (-lpapi). */ +#undef HAVE_LIBPAPI + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MALLOC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strcspn' function. */ +#undef HAVE_STRCSPN + +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* Define to 1 if you have the `strerror' function. */ +#undef HAVE_STRERROR + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strspn' function. */ +#undef HAVE_STRSPN + +/* Define to 1 if you have the `strstr' function. */ +#undef HAVE_STRSTR + +/* Define to 1 if you have the `strtod' function. */ +#undef HAVE_STRTOD + +/* Define to 1 if you have the `strtol' function. */ +#undef HAVE_STRTOL + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `vprintf' function. */ +#undef HAVE_VPRINTF + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE + +/* Define to 1 if the `setvbuf' function takes the buffering type as its + second argument and the buffer pointer as the third, as on System V before + release 3. */ +#undef SETVBUF_REVERSED + +/* 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. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +#undef STACK_DIRECTION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define to 1 if your declares `struct tm'. */ +#undef TM_IN_SYS_TIME + +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +#undef YYTEXT_POINTER + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define as `__inline' if that's what the C compiler calls it, or to nothing + if it is not supported. */ +#undef inline + +/* Define to `int' if does not define. */ +#undef pid_t + +/* Define to `unsigned' if does not define. */ +#undef size_t + +/* Define to mark the machine as having little endian */ +#ifndef ENDIAN_LITTLE +#undef ENDIAN_LITTLE +#endif + +/* Define to mark the machine as having big endian */ +#ifndef ENDIAN_BIG +#undef ENDIAN_BIG +#endif + +/* Define to indicate how to include hash_map */ +#undef HAVE_STD_EXT_HASH_MAP +#undef HAVE_GNU_EXT_HASH_MAP + +/* Define to incdicate how to include has_set */ +#undef HAVE_STD_EXT_HASH_SET +#undef HAVE_GNU_EXT_HASH_SET + +/* Indicates whether we have STL iterators */ +#undef HAVE_STD_ITERATOR + +/* Indicates which slist we should use */ +#undef HAVE_EXT_SLIST + +/* Indicates whether we have the MALLINFO functionality */ +#undef HAVE_MALLINFO + +/* Indicates if we have MAP_ANONYMOUS */ +#undef HAVE_MMAP_ANONYMOUS + +/* Indicates whether we have MMAP header file */ +#undef HAVE_SYS_MMAN_H + +/* Indicates that we have assert.h */ +#undef HAVE_ASSERT_H + +/* Macros for various header files */ +#undef HAVE_SIGNAL_H +#undef HAVE_ERRNO_H +#undef HAVE_SYS_RESOURCE_H +#undef HAVE_MATH_H +#undef HAVE_DLFCN_H +#undef HAVE_LINK_H Index: llvm/include/Config/dlfcn.h diff -u /dev/null llvm/include/Config/dlfcn.h:1.2 --- /dev/null Mon Jun 30 16:59:29 2003 +++ llvm/include/Config/dlfcn.h Mon Jun 30 16:58:17 2003 @@ -0,0 +1,27 @@ +/* + * Header file: dlfcn.h + * + * Description: + * This header file is the autoconf replacement for dlfcn.h (if it lives + * on the system). + */ + +#ifndef _CONFIG_DLFCN_H +#define _CONFIG_DLFCN_H + +#include "Config/config.h" + +/* + * According to the man pages on dlopen(), we sometimes need link.h. So, + * go grab it just in case. + */ +#ifdef HAVE_DLFCN_H +#include + +#ifdef HAVE_LINK_H +#include +#endif + +#endif + +#endif Index: llvm/include/Config/errno.h diff -u /dev/null llvm/include/Config/errno.h:1.2 --- /dev/null Mon Jun 30 16:59:29 2003 +++ llvm/include/Config/errno.h Mon Jun 30 16:58:17 2003 @@ -0,0 +1,18 @@ +/* + * Header file: errno.h + * + * Description: + * This header file is the autoconf replacement for errno.h (if it lives + * on the system). + */ + +#ifndef _CONFIG_ERRNO_H +#define _CONFIG_ERRNO_H + +#include "Config/config.h" + +#ifdef HAVE_ERRNO_H +#include +#endif + +#endif Index: llvm/include/Config/fcntl.h diff -u /dev/null llvm/include/Config/fcntl.h:1.2 --- /dev/null Mon Jun 30 16:59:29 2003 +++ llvm/include/Config/fcntl.h Mon Jun 30 16:58:17 2003 @@ -0,0 +1,18 @@ +/* + * Header file: fcntl.h + * + * Description: + * This header file is the autoconf replacement for fcntl.h (if it lives + * on the system). + */ + +#ifndef _CONFIG_FCNTL_H +#define _CONFIG_FCNTL_H + +#include "Config/config.h" + +#ifdef HAVE_FCNTL_H +#include +#endif + +#endif Index: llvm/include/Config/limits.h diff -u /dev/null llvm/include/Config/limits.h:1.2 --- /dev/null Mon Jun 30 16:59:29 2003 +++ llvm/include/Config/limits.h Mon Jun 30 16:58:17 2003 @@ -0,0 +1,18 @@ +/* + * Header file: limits.h + * + * Description: + * This header file is the autoconf replacement for limits.h (if it lives + * on the system). + */ + +#ifndef _CONFIG_LIMITS_H +#define _CONFIG_LIMITS_H + +#include "Config/config.h" + +#ifdef HAVE_LIMITS_H +#include +#endif + +#endif Index: llvm/include/Config/link.h diff -u /dev/null llvm/include/Config/link.h:1.2 --- /dev/null Mon Jun 30 16:59:29 2003 +++ llvm/include/Config/link.h Mon Jun 30 16:58:17 2003 @@ -0,0 +1,18 @@ +/* + * Header file: link.h + * + * Description: + * This header file is the autoconf replacement for link.h (if it lives + * on the system). + */ + +#ifndef _CONFIG_LINK_H +#define _CONFIG_LINK_H + +#include "Config/config.h" + +#ifdef HAVE_LINK_H +#include +#endif + +#endif Index: llvm/include/Config/malloc.h diff -u /dev/null llvm/include/Config/malloc.h:1.2 --- /dev/null Mon Jun 30 16:59:29 2003 +++ llvm/include/Config/malloc.h Mon Jun 30 16:58:17 2003 @@ -0,0 +1,20 @@ +/* + * Header file: malloc.h + * + * Description: + * This header file includes the infamous malloc.h header file if the + * autoconf system has found it. It hides all of the autoconf details + * from the rest of the application source code. + */ + +#ifndef _SUPPORT_MALLOC_H +#define _SUPPORT_MALLOC_H + +#include "Config/config.h" + +#ifdef HAVE_MALLOC_H +#include +#endif + +#endif + Index: llvm/include/Config/memory.h diff -u /dev/null llvm/include/Config/memory.h:1.2 --- /dev/null Mon Jun 30 16:59:29 2003 +++ llvm/include/Config/memory.h Mon Jun 30 16:58:17 2003 @@ -0,0 +1,18 @@ +/* + * Header file: memory.h + * + * Description: + * This header file is the autoconf replacement for memory.h (if it lives + * on the system). + */ + +#ifndef _CONFIG_MEMORY_H +#define _CONFIG_MEMORY_H + +#include "Config/config.h" + +#ifdef HAVE_MEMORY_H +#include +#endif + +#endif Index: llvm/include/Config/stdint.h diff -u /dev/null llvm/include/Config/stdint.h:1.2 --- /dev/null Mon Jun 30 16:59:29 2003 +++ llvm/include/Config/stdint.h Mon Jun 30 16:58:17 2003 @@ -0,0 +1,18 @@ +/* + * Header file: stdint.h + * + * Description: + * This header file is the autoconf replacement for stdint.h (if it lives + * on the system). + */ + +#ifndef _CONFIG_STDINT_H +#define _CONFIG_STDINT_H + +#include "Config/config.h" + +#ifdef HAVE_STDINT_H +#include +#endif + +#endif Index: llvm/include/Config/stdio.h diff -u /dev/null llvm/include/Config/stdio.h:1.2 --- /dev/null Mon Jun 30 16:59:29 2003 +++ llvm/include/Config/stdio.h Mon Jun 30 16:58:18 2003 @@ -0,0 +1,22 @@ +/* + * Header file: stdio.h + * + * Description: + * This header file is the autoconf replacement for stdio.h (if it lives + * on the system). + */ + +#ifndef _CONFIG_STDIO_H +#define _CONFIG_STDIO_H + +#include "Config/config.h" + +/* + * Assume that stdio.h exists if autoconf find the ANSI C header files. + * I'd think stdlib.h would be here to, but I guess not. + */ +#ifdef STDC_HEADERS +#include +#endif + +#endif Index: llvm/include/Config/stdlib.h diff -u /dev/null llvm/include/Config/stdlib.h:1.2 --- /dev/null Mon Jun 30 16:59:29 2003 +++ llvm/include/Config/stdlib.h Mon Jun 30 16:58:18 2003 @@ -0,0 +1,18 @@ +/* + * Header file: stdlib.h + * + * Description: + * This header file is the autoconf replacement for stdlib.h (if it lives + * on the system). + */ + +#ifndef _CONFIG_STDLIB_H +#define _CONFIG_STDLIB_H + +#include "Config/config.h" + +#ifdef HAVE_STDLIB_H +#include +#endif + +#endif Index: llvm/include/Config/string.h diff -u /dev/null llvm/include/Config/string.h:1.2 --- /dev/null Mon Jun 30 16:59:29 2003 +++ llvm/include/Config/string.h Mon Jun 30 16:58:18 2003 @@ -0,0 +1,18 @@ +/* + * Header file: string.h + * + * Description: + * This header file is the autoconf replacement for string.h (if it lives + * on the system). + */ + +#ifndef _CONFIG_STRING_H +#define _CONFIG_STRING_H + +#include "Config/config.h" + +#ifdef HAVE_STRING_H +#include +#endif + +#endif Index: llvm/include/Config/strings.h diff -u /dev/null llvm/include/Config/strings.h:1.2 --- /dev/null Mon Jun 30 16:59:30 2003 +++ llvm/include/Config/strings.h Mon Jun 30 16:58:18 2003 @@ -0,0 +1,18 @@ +/* + * Header file: strings.h + * + * Description: + * This header file is the autoconf replacement for strings.h (if it lives + * on the system). + */ + +#ifndef _CONFIG_STRINGS_H +#define _CONFIG_STRINGS_H + +#include "Config/config.h" + +#ifdef HAVE_STRINGS_H +#include +#endif + +#endif Index: llvm/include/Config/time.h diff -u /dev/null llvm/include/Config/time.h:1.2 --- /dev/null Mon Jun 30 16:59:30 2003 +++ llvm/include/Config/time.h Mon Jun 30 16:58:18 2003 @@ -0,0 +1,28 @@ +/* + * Header file: time.h + * + * Description: + * This header file is the autoconf replacement for time.h (if it lives + * on the system). + * + * The added benefit of this header file is that it removes the + * "time with sys/time" problem. + * + * According to the autoconf manual, some systems have a sys/time.h that + * includes time.h, but time.h is not written to handle multiple + * inclusion. This means that a program including sys/time.h cannot + * also include time.h. + * + * This header file fixes that problem. + */ + +#ifndef _CONFIG_TIME_H +#define _CONFIG_TIME_H + +#include "Config/config.h" + +#ifdef HAVE_TIME_H +#include +#endif + +#endif Index: llvm/include/Config/unistd.h diff -u /dev/null llvm/include/Config/unistd.h:1.2 --- /dev/null Mon Jun 30 16:59:30 2003 +++ llvm/include/Config/unistd.h Mon Jun 30 16:58:18 2003 @@ -0,0 +1,18 @@ +/* + * Header file: unistd.h + * + * Description: + * This header file is the autoconf replacement for unistd.h (if it lives + * on the system). + */ + +#ifndef _CONFIG_UNISTD_H +#define _CONFIG_UNISTD_H + +#include "Config/config.h" + +#ifdef HAVE_UNISTD_H +#include +#endif + +#endif From criswell at cs.uiuc.edu Mon Jun 30 17:01:26 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:01:26 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/Makefile SparcInstrInfo.cpp SparcInternals.h SparcOptInfo.cpp Message-ID: <200306302159.QAA15175@tank.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: Makefile updated: 1.23 -> 1.24 SparcInstrInfo.cpp updated: 1.47 -> 1.48 SparcInternals.h updated: 1.90 -> 1.91 SparcOptInfo.cpp updated: 1.8 -> 1.9 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/lib/Target/Sparc/Makefile diff -u llvm/lib/Target/Sparc/Makefile:1.23 llvm/lib/Target/Sparc/Makefile:1.24 --- llvm/lib/Target/Sparc/Makefile:1.23 Wed Jun 11 08:49:11 2003 +++ llvm/lib/Target/Sparc/Makefile Mon Jun 30 16:58:49 2003 @@ -14,20 +14,29 @@ Debug/Sparc.burm.cpp: Debug/Sparc.burm Debug/.dir $(RunBurg) $< -o $@ -$(BUILD_OBJ_DIR)/Debug/Sparc.burm.o: Debug/Sparc.burm.cpp +$(BUILD_OBJ_DIR)/Debug/Sparc.burm.lo: Debug/Sparc.burm.cpp $(CompileG) $< -o $@ -$(BUILD_OBJ_DIR)/Release/Sparc.burm.o: Debug/Sparc.burm.cpp +$(BUILD_OBJ_DIR)/Release/Sparc.burm.lo: Debug/Sparc.burm.cpp $(CompileO) $< -o $@ -$(BUILD_OBJ_DIR)/Profile/Sparc.burm.o: Debug/Sparc.burm.cpp +$(BUILD_OBJ_DIR)/Profile/Sparc.burm.lo: Debug/Sparc.burm.cpp $(CompileP) $< -o $@ +#$(BUILD_OBJ_DIR)/Debug/Sparc.burm.o: Debug/Sparc.burm.cpp +# $(CompileG) $< -o $@ + +#$(BUILD_OBJ_DIR)/Release/Sparc.burm.o: Debug/Sparc.burm.cpp +# $(CompileO) $< -o $@ + +#$(BUILD_OBJ_DIR)/Profile/Sparc.burm.o: Debug/Sparc.burm.cpp +# $(CompileP) $< -o $@ + Debug/Sparc.burg.in1 : Sparc.burg.in Debug/.dir - $(CXX) -E -I$(LEVEL)/include $(DEBUG_FLAG) -x c++ $< | sed '/^# /d' | sed 's/Ydefine/#define/' > $@ + $(CXX) -E -I$(LEVEL)/include $(DEBUG_FLAG) -x c++ $< | ${SED} '/^# /d' | ${SED} 's/Ydefine/#define/' > $@ Debug/Sparc.burm : Debug/Sparc.burg.in1 - $(CXX) -E -I$(LEVEL)/include $(DEBUG_FLAG) -x c++ $< | sed '/^# /d' | sed 's/Xinclude/#include/g' | sed 's/Xdefine/#define/g' > $@ + $(CXX) -E -I$(LEVEL)/include $(DEBUG_FLAG) -x c++ $< | ${SED} '/^# /d' | ${SED} 's/Xinclude/#include/g' | ${SED} 's/Xdefine/#define/g' > $@ $(BUILD_OBJ_DIR)/Depend/Sparc.burm.d: $(BUILD_OBJ_DIR)/Depend/.dir touch $@ @@ -35,8 +44,8 @@ SparcV9CodeEmitter.cpp: SparcV9CodeEmitter.inc SparcV9CodeEmitter.inc: SparcV9.td SparcV9_F2.td SparcV9_F3.td SparcV9_F4.td SparcV9_Reg.td $(TBLGEN) - @echo "TableGen-erating $@" + @${ECHO} "TableGen-erating $@" cpp -P SparcV9.td | $(TBLGEN) -gen-emitter -o $@ clean:: - rm -f SparcV9CodeEmitter.inc + ${RM} -f SparcV9CodeEmitter.inc Index: llvm/lib/Target/Sparc/SparcInstrInfo.cpp diff -u llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.47 llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.48 --- llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.47 Fri Jun 6 04:52:23 2003 +++ llvm/lib/Target/Sparc/SparcInstrInfo.cpp Mon Jun 30 16:58:49 2003 @@ -13,7 +13,7 @@ #include "llvm/Function.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" -#include +#include "Config/stdlib.h" static const uint32_t MAXLO = (1 << 10) - 1; // set bits set by %lo(*) static const uint32_t MAXSIMM = (1 << 12) - 1; // set bits in simm13 field of OR Index: llvm/lib/Target/Sparc/SparcInternals.h diff -u llvm/lib/Target/Sparc/SparcInternals.h:1.90 llvm/lib/Target/Sparc/SparcInternals.h:1.91 --- llvm/lib/Target/Sparc/SparcInternals.h:1.90 Mon Jun 16 10:31:09 2003 +++ llvm/lib/Target/Sparc/SparcInternals.h Mon Jun 30 16:58:49 2003 @@ -17,7 +17,7 @@ #include "llvm/Target/TargetOptInfo.h" #include "llvm/Type.h" #include "SparcRegClassInfo.h" -#include +#include "Config/sys/types.h" class LiveRange; class UltraSparc; Index: llvm/lib/Target/Sparc/SparcOptInfo.cpp diff -u llvm/lib/Target/Sparc/SparcOptInfo.cpp:1.8 llvm/lib/Target/Sparc/SparcOptInfo.cpp:1.9 --- llvm/lib/Target/Sparc/SparcOptInfo.cpp:1.8 Tue May 27 17:39:29 2003 +++ llvm/lib/Target/Sparc/SparcOptInfo.cpp Mon Jun 30 16:58:49 2003 @@ -7,7 +7,7 @@ #include "SparcInternals.h" #include "llvm/Target/TargetRegInfo.h" #include "llvm/CodeGen/MachineInstr.h" -#include +#include "Config/stdlib.h" //---------------------------------------------------------------------------- // Function: IsUselessCopy From criswell at cs.uiuc.edu Mon Jun 30 17:01:35 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:01:35 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86CodeEmitter.cpp Message-ID: <200306302159.QAA15183@tank.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86CodeEmitter.cpp updated: 1.29 -> 1.30 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/lib/Target/X86/X86CodeEmitter.cpp diff -u llvm/lib/Target/X86/X86CodeEmitter.cpp:1.29 llvm/lib/Target/X86/X86CodeEmitter.cpp:1.30 --- llvm/lib/Target/X86/X86CodeEmitter.cpp:1.29 Mon Jun 16 16:54:00 2003 +++ llvm/lib/Target/X86/X86CodeEmitter.cpp Mon Jun 30 16:58:51 2003 @@ -13,7 +13,7 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/Value.h" #include "Support/Statistic.h" -#include "Support/Alloca.h" +#include "Config/alloca.h" namespace { Statistic<> From criswell at cs.uiuc.edu Mon Jun 30 17:01:44 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:01:44 2003 Subject: [llvm-commits] CVS: llvm/include/Config/sys/mman.h resource.h stat.h time.h types.h wait.h Message-ID: <200306302159.QAA15197@tank.cs.uiuc.edu> Changes in directory llvm/include/Config/sys: mman.h updated: 1.1 -> 1.2 resource.h updated: 1.1 -> 1.2 stat.h updated: 1.1 -> 1.2 time.h updated: 1.1 -> 1.2 types.h updated: 1.1 -> 1.2 wait.h updated: 1.1 -> 1.2 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/include/Config/sys/mman.h diff -u /dev/null llvm/include/Config/sys/mman.h:1.2 --- /dev/null Mon Jun 30 16:59:31 2003 +++ llvm/include/Config/sys/mman.h Mon Jun 30 16:58:20 2003 @@ -0,0 +1,24 @@ +/* + * Header file: mman.h + * + * Description: + * This header file includes the headers needed for the mmap() system/ + * function call. It also defines some macros so that all of our calls + * to mmap() can act (more or less) the same, regardless of platform. + */ + +#ifndef _CONFIG_MMAN_H +#define _CONFIG_MMAN_H + +#include "Config/config.h" + +#ifdef HAVE_SYS_MMAN_H +#include +#endif + +#ifndef HAVE_MMAP_ANONYMOUS +#define MAP_ANONYMOUS MAP_ANON +#endif + +#endif + Index: llvm/include/Config/sys/resource.h diff -u /dev/null llvm/include/Config/sys/resource.h:1.2 --- /dev/null Mon Jun 30 16:59:31 2003 +++ llvm/include/Config/sys/resource.h Mon Jun 30 16:58:20 2003 @@ -0,0 +1,33 @@ +/* + * Header file: resource.h + * + * Description: + * This header file is the autoconf replacement for sys/resource.h (if it + * lives on the system). + */ + +#ifndef _CONFIG_SYS_RESOURCE_H +#define _CONFIG_SYS_RESOURCE_H + +#include "Config/config.h" + +#ifdef HAVE_SYS_RESOURCE_H + +/* + * In LLVM, we use sys/resource.h to use getrusage() and maybe some other + * stuff. Some man pages say that you also need sys/time.h and unistd.h. + * So, to be paranoid, we will try to include all three if possible. + */ +#ifdef HAVE_SYS_TIME_H +#include +#endif + +#include + +#ifdef HAVE_UNISTD_H +#include +#endif + +#endif + +#endif Index: llvm/include/Config/sys/stat.h diff -u /dev/null llvm/include/Config/sys/stat.h:1.2 --- /dev/null Mon Jun 30 16:59:31 2003 +++ llvm/include/Config/sys/stat.h Mon Jun 30 16:58:21 2003 @@ -0,0 +1,19 @@ +/* + * Header file: stat.h + * + * Description: + * This header file includes the headers needed for the stat() system + * call. + */ + +#ifndef _CONFIG_SYS_STAT_H +#define _CONFIG_SYS_STAT_H + +#include "Config/config.h" + +#ifdef HAVE_SYS_STAT_H +#include +#endif + +#endif + Index: llvm/include/Config/sys/time.h diff -u /dev/null llvm/include/Config/sys/time.h:1.2 --- /dev/null Mon Jun 30 16:59:32 2003 +++ llvm/include/Config/sys/time.h Mon Jun 30 16:58:21 2003 @@ -0,0 +1,18 @@ +/* + * Header file: time.h + * + * Description: + * This header file is the autoconf replacement for sys/time.h (if it + * lives on the system). + */ + +#ifndef _CONFIG_SYS_TIME_H +#define _CONFIG_SYS_TIME_H + +#include "Config/config.h" + +#ifdef HAVE_SYS_TIME_H +#include +#endif + +#endif Index: llvm/include/Config/sys/types.h diff -u /dev/null llvm/include/Config/sys/types.h:1.2 --- /dev/null Mon Jun 30 16:59:32 2003 +++ llvm/include/Config/sys/types.h Mon Jun 30 16:58:21 2003 @@ -0,0 +1,19 @@ +/* + * Header file: types.h + * + * Description: + * This header file is the autoconf substitute for sys/types.h. It + * includes it for us if it exists on this system. + */ + +#ifndef _CONFIG_SYS_TYPES_H +#define _CONFIG_SYS_TYPES_H + +#include "Config/config.h" + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + +#endif + Index: llvm/include/Config/sys/wait.h diff -u /dev/null llvm/include/Config/sys/wait.h:1.2 --- /dev/null Mon Jun 30 16:59:32 2003 +++ llvm/include/Config/sys/wait.h Mon Jun 30 16:58:21 2003 @@ -0,0 +1,19 @@ +/* + * Header file: wait.h + * + * Description: + * This header file includes the headers needed for the wait() system + * call. + */ + +#ifndef _CONFIG_SYS_WAIT_H +#define _CONFIG_SYS_WAIT_H + +#include "Config/config.h" + +#ifdef HAVE_SYS_WAIT_H +#include +#endif + +#endif + From criswell at cs.uiuc.edu Mon Jun 30 17:01:54 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:01:54 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp ProfilePaths.cpp Message-ID: <200306302159.QAA15205@tank.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Instrumentation/ProfilePaths: EdgeCode.cpp updated: 1.21 -> 1.22 ProfilePaths.cpp updated: 1.28 -> 1.29 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp:1.21 llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp:1.22 --- llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp:1.21 Thu Jun 5 01:02:27 2003 +++ llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp Mon Jun 30 16:58:52 2003 @@ -16,7 +16,7 @@ #include "llvm/iOperators.h" #include "llvm/iPHINode.h" #include "llvm/Module.h" -#include +#include "Config/stdio.h" #define INSERT_LOAD_COUNT #define INSERT_STORE Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.28 llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.29 --- llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.28 Thu Jun 5 01:02:46 2003 +++ llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp Mon Jun 30 16:58:52 2003 @@ -34,7 +34,7 @@ #include "llvm/Module.h" #include "Graph.h" #include -#include +#include "Config/stdio.h" using std::vector; struct ProfilePaths : public FunctionPass { From criswell at cs.uiuc.edu Mon Jun 30 17:02:05 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:02:05 2003 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Pass.cpp Message-ID: <200306302159.QAA15211@tank.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Pass.cpp updated: 1.42 -> 1.43 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/lib/VMCore/Pass.cpp diff -u llvm/lib/VMCore/Pass.cpp:1.42 llvm/lib/VMCore/Pass.cpp:1.43 --- llvm/lib/VMCore/Pass.cpp:1.42 Thu Jun 19 13:41:54 2003 +++ llvm/lib/VMCore/Pass.cpp Mon Jun 30 16:58:54 2003 @@ -11,10 +11,10 @@ #include "llvm/Module.h" #include "Support/STLExtras.h" #include "Support/TypeInfo.h" -#include -#include -#include -#include +#include "Config/stdio.h" +#include "Config/sys/resource.h" +#include "Config/sys/time.h" +#include "Config/unistd.h" #include // IncludeFile - Stub function used to help linking out. From criswell at cs.uiuc.edu Mon Jun 30 17:02:15 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:02:15 2003 Subject: [llvm-commits] CVS: llvm/include/Support/Alloca.h Annotation.h BitSetVector.h Casting.h CommandLine.h DataTypes.h Signals.h TarjanSCCIterator.h Timer.h Tree.h hash_map hash_set ilist iterator slist Message-ID: <200306302159.QAA15245@tank.cs.uiuc.edu> Changes in directory llvm/include/Support: Alloca.h updated: 1.2 -> 1.3 Annotation.h updated: 1.8 -> 1.9 BitSetVector.h updated: 1.7 -> 1.8 Casting.h updated: 1.5 -> 1.6 CommandLine.h updated: 1.15 -> 1.16 DataTypes.h updated: 1.11 -> 1.12 Signals.h updated: 1.2 -> 1.3 TarjanSCCIterator.h updated: 1.7 -> 1.8 Timer.h updated: 1.7 -> 1.8 Tree.h updated: 1.5 -> 1.6 hash_map updated: 1.7 -> 1.8 hash_set updated: 1.7 -> 1.8 ilist updated: 1.7 -> 1.8 iterator updated: 1.3 -> 1.4 slist updated: 1.3 -> 1.4 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/include/Support/Alloca.h diff -u llvm/include/Support/Alloca.h:1.2 llvm/include/Support/Alloca.h:1.3 --- llvm/include/Support/Alloca.h:1.2 Mon Jun 16 19:35:55 2003 +++ llvm/include/Support/Alloca.h Mon Jun 30 16:58:23 2003 @@ -9,22 +9,6 @@ #ifndef SUPPORT_ALLOCA_H #define SUPPORT_ALLOCA_H -// TODO: Determine HAVE_ALLOCA_H based on autoconf results. -// The following method is too brittle. -#if defined(HAVE_ALLOCA_H) -#undef HAVE_ALLOCA_H -#endif - -#if defined(__linux__) -#define HAVE_ALLOCA_H 1 -#elif defined(__sparc__) -#define HAVE_ALLOCA_H 1 -#elif defined(__FreeBSD__) -// not defined here -#endif - -#if HAVE_ALLOCA_H -#include -#endif +#include "Config/alloca.h" #endif /* SUPPORT_ALLOCA_H */ Index: llvm/include/Support/Annotation.h diff -u llvm/include/Support/Annotation.h:1.8 llvm/include/Support/Annotation.h:1.9 --- llvm/include/Support/Annotation.h:1.8 Wed Jun 11 09:01:21 2003 +++ llvm/include/Support/Annotation.h Mon Jun 30 16:58:23 2003 @@ -16,7 +16,7 @@ #define SUPPORT_ANNOTATION_H #include -#include + class AnnotationID; class Annotation; class Annotable; Index: llvm/include/Support/BitSetVector.h diff -u llvm/include/Support/BitSetVector.h:1.7 llvm/include/Support/BitSetVector.h:1.8 --- llvm/include/Support/BitSetVector.h:1.7 Sat Jun 21 22:09:10 2003 +++ llvm/include/Support/BitSetVector.h Mon Jun 30 16:58:23 2003 @@ -24,7 +24,6 @@ #include #include #include -#include class BitSetVector { enum { BITSET_WORDSIZE = sizeof(long)*8 }; Index: llvm/include/Support/Casting.h diff -u llvm/include/Support/Casting.h:1.5 llvm/include/Support/Casting.h:1.6 --- llvm/include/Support/Casting.h:1.5 Thu May 29 10:07:48 2003 +++ llvm/include/Support/Casting.h Mon Jun 30 16:58:23 2003 @@ -8,8 +8,6 @@ #ifndef SUPPORT_CASTING_H #define SUPPORT_CASTING_H -#include - //===----------------------------------------------------------------------===// // isa Support Templates //===----------------------------------------------------------------------===// Index: llvm/include/Support/CommandLine.h diff -u llvm/include/Support/CommandLine.h:1.15 llvm/include/Support/CommandLine.h:1.16 --- llvm/include/Support/CommandLine.h:1.15 Sat Jun 28 10:47:18 2003 +++ llvm/include/Support/CommandLine.h Mon Jun 30 16:58:23 2003 @@ -18,7 +18,6 @@ #include #include #include "boost/type_traits/object_traits.hpp" -#include /// cl Namespace - This namespace contains all of the command line option /// processing machinery. It is intentionally a short name to make qualified Index: llvm/include/Support/DataTypes.h diff -u llvm/include/Support/DataTypes.h:1.11 llvm/include/Support/DataTypes.h:1.12 --- llvm/include/Support/DataTypes.h:1.11 Mon Jun 16 19:35:55 2003 +++ llvm/include/Support/DataTypes.h Mon Jun 30 16:58:23 2003 @@ -13,65 +13,19 @@ // //===----------------------------------------------------------------------===// -// TODO: This file sucks. Not only does it not work, but this stuff should be -// autoconfiscated anyways. Major FIXME - #ifndef SUPPORT_DATATYPES_H #define SUPPORT_DATATYPES_H -#define __STDC_LIMIT_MACROS 1 -#include - -#ifdef __linux__ -# include -# if BYTE_ORDER == LITTLE_ENDIAN -# undef BIG_ENDIAN -# else -# undef LITTLE_ENDIAN -# endif -#endif - -#ifdef __FreeBSD__ -# include -# if _BYTE_ORDER == _LITTLE_ENDIAN -# ifndef LITTLE_ENDIAN -# define LITTLE_ENDIAN 1 -# endif -# ifdef BIG_ENDIAN -# undef BIG_ENDIAN -# endif -# else -# ifndef BIG_ENDIAN -# define BIG_ENDIAN 1 -# endif -# ifdef LITTLE_ENDIAN -# undef LITTLE_ENDIAN -# endif -# endif -#endif +#include "Config/config.h" -#ifdef __sparc__ -# include -# ifdef _LITTLE_ENDIAN -# define LITTLE_ENDIAN 1 -# else -# define BIG_ENDIAN 1 -# endif -#endif +#define __STDC_LIMIT_MACROS 1 -// -// Convert the information from the header files into our own local -// endian macros. We do this because various strange systems define both -// BIG_ENDIAN and LITTLE_ENDIAN, and we don't want to conflict with them. -// -// Don't worry; once we introduce autoconf, this will look a lot nicer. -// -#ifdef LITTLE_ENDIAN -#define ENDIAN_LITTLE +#ifdef HAVE_INTTYPES_H +#include #endif -#ifdef BIG_ENDIAN -#define ENDIAN_BIG +#ifdef HAVE_SYS_TYPES_H +#include #endif #if (defined(ENDIAN_LITTLE) && defined(ENDIAN_BIG)) Index: llvm/include/Support/Signals.h diff -u llvm/include/Support/Signals.h:1.2 llvm/include/Support/Signals.h:1.3 --- llvm/include/Support/Signals.h:1.2 Wed Dec 11 21:43:30 2002 +++ llvm/include/Support/Signals.h Mon Jun 30 16:58:23 2003 @@ -10,6 +10,11 @@ #include +// +// This will include the signal handler return type. +// +#include "Config/config.h" + // RemoveFileOnSignal - This function registers signal handlers to ensure that // if a signal gets delivered that the named file is removed. // Index: llvm/include/Support/TarjanSCCIterator.h diff -u llvm/include/Support/TarjanSCCIterator.h:1.7 llvm/include/Support/TarjanSCCIterator.h:1.8 --- llvm/include/Support/TarjanSCCIterator.h:1.7 Sat Jun 21 22:08:05 2003 +++ llvm/include/Support/TarjanSCCIterator.h Mon Jun 30 16:58:23 2003 @@ -21,7 +21,6 @@ #include #include #include -#include //-------------------------------------------------------------------------- // class SCC : A simple representation of an SCC in a generic Graph. Index: llvm/include/Support/Timer.h diff -u llvm/include/Support/Timer.h:1.7 llvm/include/Support/Timer.h:1.8 --- llvm/include/Support/Timer.h:1.7 Sat Jun 21 22:08:05 2003 +++ llvm/include/Support/Timer.h Mon Jun 30 16:58:23 2003 @@ -28,7 +28,6 @@ #include #include #include -#include class TimerGroup; Index: llvm/include/Support/Tree.h diff -u llvm/include/Support/Tree.h:1.5 llvm/include/Support/Tree.h:1.6 --- llvm/include/Support/Tree.h:1.5 Sat Jun 21 22:08:05 2003 +++ llvm/include/Support/Tree.h Mon Jun 30 16:58:23 2003 @@ -9,7 +9,6 @@ #define SUPPORT_TREE_H #include -#include template class Tree { Index: llvm/include/Support/hash_map diff -u llvm/include/Support/hash_map:1.7 llvm/include/Support/hash_map:1.8 --- llvm/include/Support/hash_map:1.7 Mon Jun 16 19:35:55 2003 +++ llvm/include/Support/hash_map Mon Jun 30 16:58:24 2003 @@ -17,23 +17,25 @@ // 3.0.4 std ext/hash_map // 3.1 __gnu_cxx ext/hash_map // -#if __GNUC__ == 3 -#include -#ifndef HASH_NAMESPACE -#if __GNUC_MINOR__ == 0 -#define HASH_NAMESPACE std -#else +#include "Config/config.h" + +#ifdef HAVE_GNU_EXT_HASH_MAP + +#include #define HASH_NAMESPACE __gnu_cxx -#endif -#endif #else -#include -#ifndef HASH_NAMESPACE +#ifdef HAVE_STD_EXT_HASH_MAP +#include #define HASH_NAMESPACE std + +#else +#include +#define HASH_NAMESPACE #endif + #endif using HASH_NAMESPACE::hash_map; Index: llvm/include/Support/hash_set diff -u llvm/include/Support/hash_set:1.7 llvm/include/Support/hash_set:1.8 --- llvm/include/Support/hash_set:1.7 Mon Jun 16 19:35:55 2003 +++ llvm/include/Support/hash_set Mon Jun 30 16:58:24 2003 @@ -17,23 +17,25 @@ // 3.0.4 std ext/hash_set // 3.1 __gnu_cxx ext/hash_set // -#if __GNUC__==3 -#include -#ifndef HASH_NAMESPACE -#if __GNUC_MINOR__ == 0 -#define HASH_NAMESPACE std -#else +#include "Config/config.h" + +#ifdef HAVE_GNU_EXT_HASH_SET + +#include #define HASH_NAMESPACE __gnu_cxx -#endif -#endif #else -#include -#ifndef HASH_NAMESPACE +#ifdef HAVE_STD_EXT_HASH_SET +#include #define HASH_NAMESPACE std + +#else +#include +#define HASH_NAMESPACE #endif + #endif using HASH_NAMESPACE::hash_set; Index: llvm/include/Support/ilist diff -u llvm/include/Support/ilist:1.7 llvm/include/Support/ilist:1.8 --- llvm/include/Support/ilist:1.7 Mon Jun 16 19:35:55 2003 +++ llvm/include/Support/ilist Mon Jun 30 16:58:24 2003 @@ -31,7 +31,6 @@ #ifndef SUPPORT_ILIST #define SUPPORT_ILIST -#include #include #include Index: llvm/include/Support/iterator diff -u llvm/include/Support/iterator:1.3 llvm/include/Support/iterator:1.4 --- llvm/include/Support/iterator:1.3 Mon Jun 16 19:35:55 2003 +++ llvm/include/Support/iterator Mon Jun 30 16:58:24 2003 @@ -19,9 +19,11 @@ #ifndef SUPPORT_ITERATOR #define SUPPORT_ITERATOR +#include "Config/config.h" + #include -#if __GNUC__ == 3 +#ifdef HAVE_STD_ITERATOR // Define stupid wrappers around std::iterator... template @@ -35,6 +37,7 @@ }; #else + // Just use bidirectional_iterator directly. using std::bidirectional_iterator; using std::forward_iterator; Index: llvm/include/Support/slist diff -u llvm/include/Support/slist:1.3 llvm/include/Support/slist:1.4 --- llvm/include/Support/slist:1.3 Mon Jun 16 19:35:55 2003 +++ llvm/include/Support/slist Mon Jun 30 16:58:24 2003 @@ -10,6 +10,8 @@ #ifndef SUPPORT_SLIST #define SUPPORT_SLIST +#include "Config/config.h" + // Compiler Support Matrix // // Version Namespace Header File @@ -17,18 +19,19 @@ // 3.0.4 std ext/slist // 3.1 __gnu_cxx ext/slist // -#if __GNUC__ == 3 + +#ifdef HAVE_EXT_SLIST #include +#else +#include +#endif -#if __GNUC_MINOR__ == 0 +#if HAVE_EXT_SLIST == std using std::slist; -#else -using __gnu_cxx::slist; #endif -#else -// GCC 2.x -#include +#if HAVE_EXT_SLIST == gnu +using __gnu_cxx::slist; #endif #endif From criswell at cs.uiuc.edu Mon Jun 30 17:02:24 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:02:24 2003 Subject: [llvm-commits] CVS: llvm/samples/README sample.tar Message-ID: <200306302159.QAA15253@tank.cs.uiuc.edu> Changes in directory llvm/samples: README updated: 1.1 -> 1.2 sample.tar updated: 1.1 -> 1.2 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/samples/README diff -u /dev/null llvm/samples/README:1.2 --- /dev/null Mon Jun 30 16:59:36 2003 +++ llvm/samples/README Mon Jun 30 16:58:55 2003 @@ -0,0 +1,7 @@ +This directory contains a sample project that uses the LLVM build system, +header files, and libraries. + +To use it, simply extract the sample directory anywhere outside of the LLVM +source tree, modify its Makefile.config and Makefile.common files to point to +where you installed LLVM, and begin coding. + Index: llvm/samples/sample.tar From criswell at cs.uiuc.edu Mon Jun 30 17:02:34 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:02:34 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/AbstractTypeUser.h GlobalVariable.h Instruction.h Pass.h Message-ID: <200306302159.QAA15265@tank.cs.uiuc.edu> Changes in directory llvm/include/llvm: AbstractTypeUser.h updated: 1.7 -> 1.8 GlobalVariable.h updated: 1.21 -> 1.22 Instruction.h updated: 1.41 -> 1.42 Pass.h updated: 1.34 -> 1.35 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/include/llvm/AbstractTypeUser.h diff -u llvm/include/llvm/AbstractTypeUser.h:1.7 llvm/include/llvm/AbstractTypeUser.h:1.8 --- llvm/include/llvm/AbstractTypeUser.h:1.7 Wed Jun 18 14:22:33 2003 +++ llvm/include/llvm/AbstractTypeUser.h Mon Jun 30 16:58:26 2003 @@ -21,7 +21,16 @@ #ifndef LLVM_ABSTRACT_TYPE_USER_H #define LLVM_ABSTRACT_TYPE_USER_H -#include +// +// This is the "master" include for assert.h +// Whether this file needs it or not, it must always include assert.h for the +// files which include llvm/AbstractTypeUser.h +// +// In this way, most every LLVM source file will have access to the assert() +// macro without having to #include directly. +// +#include "Config/assert.h" + class Type; class DerivedType; Index: llvm/include/llvm/GlobalVariable.h diff -u llvm/include/llvm/GlobalVariable.h:1.21 llvm/include/llvm/GlobalVariable.h:1.22 --- llvm/include/llvm/GlobalVariable.h:1.21 Sat Jun 21 22:07:32 2003 +++ llvm/include/llvm/GlobalVariable.h Mon Jun 30 16:58:26 2003 @@ -14,6 +14,7 @@ #define LLVM_GLOBAL_VARIABLE_H #include "llvm/GlobalValue.h" + class Module; class Constant; class PointerType; Index: llvm/include/llvm/Instruction.h diff -u llvm/include/llvm/Instruction.h:1.41 llvm/include/llvm/Instruction.h:1.42 --- llvm/include/llvm/Instruction.h:1.41 Sat Jun 21 22:07:32 2003 +++ llvm/include/llvm/Instruction.h Mon Jun 30 16:58:26 2003 @@ -9,6 +9,7 @@ #define LLVM_INSTRUCTION_H #include "llvm/User.h" + template struct ilist_traits; template class SymbolTableListTraits; Index: llvm/include/llvm/Pass.h diff -u llvm/include/llvm/Pass.h:1.34 llvm/include/llvm/Pass.h:1.35 --- llvm/include/llvm/Pass.h:1.34 Sat Jun 21 22:07:32 2003 +++ llvm/include/llvm/Pass.h Mon Jun 30 16:58:26 2003 @@ -22,7 +22,6 @@ #ifndef LLVM_PASS_H #define LLVM_PASS_H -#include #include #include #include From criswell at cs.uiuc.edu Mon Jun 30 17:02:43 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:02:43 2003 Subject: [llvm-commits] CVS: llvm/tools/bugpoint/SystemUtils.cpp Message-ID: <200306302159.QAA15271@tank.cs.uiuc.edu> Changes in directory llvm/tools/bugpoint: SystemUtils.cpp updated: 1.6 -> 1.7 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/tools/bugpoint/SystemUtils.cpp diff -u llvm/tools/bugpoint/SystemUtils.cpp:1.6 llvm/tools/bugpoint/SystemUtils.cpp:1.7 --- llvm/tools/bugpoint/SystemUtils.cpp:1.6 Mon Jun 16 17:28:50 2003 +++ llvm/tools/bugpoint/SystemUtils.cpp Mon Jun 30 16:58:58 2003 @@ -10,12 +10,12 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include "Config/sys/types.h" +#include "Config/sys/stat.h" +#include "Config/fcntl.h" +#include "Config/sys/wait.h" +#include "Config/unistd.h" +#include "Config/errno.h" /// removeFile - Delete the specified file /// From criswell at cs.uiuc.edu Mon Jun 30 17:02:53 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:02:53 2003 Subject: [llvm-commits] CVS: llvm/tools/lli/ExecutionEngine.cpp Makefile Message-ID: <200306302159.QAA15279@tank.cs.uiuc.edu> Changes in directory llvm/tools/lli: ExecutionEngine.cpp updated: 1.12 -> 1.13 Makefile updated: 1.31 -> 1.32 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/tools/lli/ExecutionEngine.cpp diff -u llvm/tools/lli/ExecutionEngine.cpp:1.12 llvm/tools/lli/ExecutionEngine.cpp:1.13 --- llvm/tools/lli/ExecutionEngine.cpp:1.12 Wed May 14 12:53:49 2003 +++ llvm/tools/lli/ExecutionEngine.cpp Mon Jun 30 16:59:00 2003 @@ -12,7 +12,7 @@ #include "llvm/Module.h" #include "llvm/Target/TargetData.h" #include "Support/Statistic.h" -#include +#include "Config/dlfcn.h" Statistic<> NumInitBytes("lli", "Number of bytes of global vars initialized"); Index: llvm/tools/lli/Makefile diff -u llvm/tools/lli/Makefile:1.31 llvm/tools/lli/Makefile:1.32 --- llvm/tools/lli/Makefile:1.31 Tue Jun 17 15:09:18 2003 +++ llvm/tools/lli/Makefile Mon Jun 30 16:59:00 2003 @@ -3,7 +3,7 @@ PARALLEL_DIRS = Interpreter JIT # Get the config name... -include $(LEVEL)/Makefile.$(shell uname) +include $(LEVEL)/Makefile.config # Generic JIT libraries JITLIBS = lli-jit codegen From criswell at cs.uiuc.edu Mon Jun 30 17:03:03 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:03:03 2003 Subject: [llvm-commits] CVS: llvm/tools/lli/Interpreter/ExternalFunctions.cpp Message-ID: <200306302159.QAA15289@tank.cs.uiuc.edu> Changes in directory llvm/tools/lli/Interpreter: ExternalFunctions.cpp updated: 1.54 -> 1.55 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/tools/lli/Interpreter/ExternalFunctions.cpp diff -u llvm/tools/lli/Interpreter/ExternalFunctions.cpp:1.54 llvm/tools/lli/Interpreter/ExternalFunctions.cpp:1.55 --- llvm/tools/lli/Interpreter/ExternalFunctions.cpp:1.54 Mon Jun 23 14:41:55 2003 +++ llvm/tools/lli/Interpreter/ExternalFunctions.cpp Mon Jun 30 16:59:01 2003 @@ -17,10 +17,10 @@ #include "llvm/SymbolTable.h" #include "llvm/Target/TargetData.h" #include -#include -#include +#include "Config/dlfcn.h" +#include "Config/link.h" #include -#include +#include "Config/stdio.h" using std::vector; typedef GenericValue (*ExFunc)(FunctionType *, const vector &); From criswell at cs.uiuc.edu Mon Jun 30 17:03:13 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:03:13 2003 Subject: [llvm-commits] CVS: llvm/tools/lli/JIT/Emitter.cpp Intercept.cpp Message-ID: <200306302159.QAA15298@tank.cs.uiuc.edu> Changes in directory llvm/tools/lli/JIT: Emitter.cpp updated: 1.16 -> 1.17 Intercept.cpp updated: 1.4 -> 1.5 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/tools/lli/JIT/Emitter.cpp diff -u llvm/tools/lli/JIT/Emitter.cpp:1.16 llvm/tools/lli/JIT/Emitter.cpp:1.17 --- llvm/tools/lli/JIT/Emitter.cpp:1.16 Mon Jun 30 13:06:20 2003 +++ llvm/tools/lli/JIT/Emitter.cpp Mon Jun 30 16:59:03 2003 @@ -6,6 +6,7 @@ //===----------------------------------------------------------------------===// #include "VM.h" +#include "Config/sys/mman.h" #include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineConstantPool.h" @@ -82,7 +83,7 @@ static unsigned long Counter = 0; pa = mmap((void*)(0x140000000UL+Counter), pageSize*NumPages, PROT_READ|PROT_WRITE|PROT_EXEC, - MAP_PRIVATE|MAP_ANON|MAP_FIXED, -1, 0); /* fd = -1 */ + MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED, -1, 0); /* fd = -1 */ Counter += pageSize*NumPages; #else std::cerr << "This architecture is not supported by the JIT\n"; Index: llvm/tools/lli/JIT/Intercept.cpp diff -u llvm/tools/lli/JIT/Intercept.cpp:1.4 llvm/tools/lli/JIT/Intercept.cpp:1.5 --- llvm/tools/lli/JIT/Intercept.cpp:1.4 Tue Jun 3 20:57:22 2003 +++ llvm/tools/lli/JIT/Intercept.cpp Mon Jun 30 16:59:03 2003 @@ -9,7 +9,7 @@ //===----------------------------------------------------------------------===// #include "VM.h" -#include // dlsym access +#include "Config/dlfcn.h" // dlsym access #include // AtExitList - List of functions registered with the at_exit function From criswell at cs.uiuc.edu Mon Jun 30 17:03:23 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:03:23 2003 Subject: [llvm-commits] CVS: llvm/utils/Burg/Makefile Message-ID: <200306302159.QAA15304@tank.cs.uiuc.edu> Changes in directory llvm/utils/Burg: Makefile updated: 1.15 -> 1.16 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/utils/Burg/Makefile diff -u llvm/utils/Burg/Makefile:1.15 llvm/utils/Burg/Makefile:1.16 --- llvm/utils/Burg/Makefile:1.15 Fri Jun 27 12:03:20 2003 +++ llvm/utils/Burg/Makefile Mon Jun 30 16:59:04 2003 @@ -25,4 +25,4 @@ $(TOOLEXENAME_G) -I sample.gr -o tmp && cmp tmp sample.c $(TOOLEXENAME_G) -I -O0 tmp && cmp tmp sample.c $(TOOLEXENAME_G) -I -= tmp && cmp tmp sample.c - rm -f tmp sample.c + $(RM) -f tmp sample.c From criswell at cs.uiuc.edu Mon Jun 30 17:03:33 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:03:33 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/MachineFunction.cpp Message-ID: <200306302159.QAA15067@tank.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: MachineFunction.cpp updated: 1.39 -> 1.40 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/lib/CodeGen/MachineFunction.cpp diff -u llvm/lib/CodeGen/MachineFunction.cpp:1.39 llvm/lib/CodeGen/MachineFunction.cpp:1.40 --- llvm/lib/CodeGen/MachineFunction.cpp:1.39 Wed Apr 23 11:36:09 2003 +++ llvm/lib/CodeGen/MachineFunction.cpp Mon Jun 30 16:58:43 2003 @@ -19,7 +19,7 @@ #include "llvm/Function.h" #include "llvm/iOther.h" #include "llvm/Pass.h" -#include +#include "Config/limits.h" const int INVALID_FRAME_OFFSET = INT_MAX; // std::numeric_limits::max(); From criswell at cs.uiuc.edu Mon Jun 30 17:03:42 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:03:42 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp Message-ID: <200306302159.QAA15061@tank.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Writer: Writer.cpp updated: 1.34 -> 1.35 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/lib/Bytecode/Writer/Writer.cpp diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.34 llvm/lib/Bytecode/Writer/Writer.cpp:1.35 --- llvm/lib/Bytecode/Writer/Writer.cpp:1.34 Thu May 22 13:35:38 2003 +++ llvm/lib/Bytecode/Writer/Writer.cpp Mon Jun 30 16:58:41 2003 @@ -26,7 +26,7 @@ #include "llvm/DerivedTypes.h" #include "Support/STLExtras.h" #include "Support/Statistic.h" -#include +#include "Config/string.h" #include static RegisterPass X("emitbytecode", "Bytecode Writer"); From criswell at cs.uiuc.edu Mon Jun 30 17:03:53 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:03:53 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReadArchive.cpp Reader.cpp Message-ID: <200306302159.QAA15055@tank.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: ReadArchive.cpp updated: 1.3 -> 1.4 Reader.cpp updated: 1.56 -> 1.57 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/lib/Bytecode/Reader/ReadArchive.cpp diff -u llvm/lib/Bytecode/Reader/ReadArchive.cpp:1.3 llvm/lib/Bytecode/Reader/ReadArchive.cpp:1.4 --- llvm/lib/Bytecode/Reader/ReadArchive.cpp:1.3 Tue Apr 22 21:59:05 2003 +++ llvm/lib/Bytecode/Reader/ReadArchive.cpp Mon Jun 30 16:58:40 2003 @@ -11,9 +11,9 @@ #include "llvm/Bytecode/Reader.h" #include "llvm/Module.h" -#include -#include -#include +#include "Config/sys/stat.h" +#include "Config/sys/mman.h" +#include "Config/fcntl.h" namespace { struct ar_hdr { Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.56 llvm/lib/Bytecode/Reader/Reader.cpp:1.57 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.56 Thu May 22 13:26:48 2003 +++ llvm/lib/Bytecode/Reader/Reader.cpp Mon Jun 30 16:58:40 2003 @@ -11,17 +11,17 @@ //===----------------------------------------------------------------------===// #include "ReaderInternals.h" +#include "Config/sys/mman.h" #include "llvm/Bytecode/Reader.h" #include "llvm/Bytecode/Format.h" #include "llvm/Module.h" #include "llvm/Constants.h" #include "llvm/iPHINode.h" #include "llvm/iOther.h" -#include -#include -#include -#include -#include +#include "Config/sys/types.h" +#include "Config/sys/stat.h" +#include "Config/fcntl.h" +#include "Config/unistd.h" #include bool BytecodeParser::getTypeSlot(const Type *Ty, unsigned &Slot) { From criswell at cs.uiuc.edu Mon Jun 30 17:04:03 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:04:03 2003 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/Lexer.l Makefile Message-ID: <200306302159.QAA15047@tank.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: Lexer.l updated: 1.35 -> 1.36 Makefile updated: 1.2 -> 1.3 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/lib/AsmParser/Lexer.l diff -u llvm/lib/AsmParser/Lexer.l:1.35 llvm/lib/AsmParser/Lexer.l:1.36 --- llvm/lib/AsmParser/Lexer.l:1.35 Sat Jun 28 15:01:34 2003 +++ llvm/lib/AsmParser/Lexer.l Mon Jun 30 16:58:38 2003 @@ -23,7 +23,7 @@ #include #include "llvmAsmParser.h" #include -#include +#include "Config/stdlib.h" #define RET_TOK(type, Enum, sym) \ llvmAsmlval.type = Instruction::Enum; return sym Index: llvm/lib/AsmParser/Makefile diff -u llvm/lib/AsmParser/Makefile:1.2 llvm/lib/AsmParser/Makefile:1.3 --- llvm/lib/AsmParser/Makefile:1.2 Mon Apr 8 15:17:06 2002 +++ llvm/lib/AsmParser/Makefile Mon Jun 30 16:58:38 2003 @@ -5,3 +5,9 @@ include $(LEVEL)/Makefile.common +# +# Make the source code file for the lexer depend upon the header file generated +# by the Bison parser. This prevents the generation of dependencies from +# being performed until after the header file has been created. +# +Lexer.cpp: llvmAsmParser.h From criswell at cs.uiuc.edu Mon Jun 30 17:04:13 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:04:13 2003 Subject: [llvm-commits] CVS: llvm/www/docs/GettingStarted.html Message-ID: <200306302159.QAA15039@tank.cs.uiuc.edu> Changes in directory llvm/www/docs: GettingStarted.html updated: 1.14 -> 1.15 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/www/docs/GettingStarted.html diff -u llvm/www/docs/GettingStarted.html:1.14 llvm/www/docs/GettingStarted.html:1.15 --- llvm/www/docs/GettingStarted.html:1.14 Thu Jun 12 14:34:44 2003 +++ llvm/www/docs/GettingStarted.html Mon Jun 30 16:59:07 2003 @@ -19,6 +19,11 @@
  • Overview
  • Getting started with LLVM
      +
    1. Requirements +
        +
      1. Hardware +
      2. Software +
    2. Getting started quickly (a summary)
    3. Checkout LLVM from CVS
    4. Terminology and Notation @@ -66,6 +71,82 @@ + +

      Requirements

      + + + +

      Hardware

      + + LLVM is known to work on the following platforms: +
        +
      • Linux on x86 +
          +
        • Approximately 700 MB of Free Disk Space +
            +
          • Source code: 30 MB +
          • Object code: 670 MB +
          +
        +
      • Solaris on Sparc +
          +
        • Approximately 1.03 GB of Free Disk Space +
            +
          • Source code: 30 MB +
          • Object code: 1000 MB +
          +
        +
      + + LLVM may compile on other platforms. While the LLVM utilities should work, + they will only generate Sparc or x86 machine code. + + +

      Software

      + +

      + Compiling LLVM requires that you have several different software packages + installed: + +

        +
      • GCC +

        + The GNU Compiler Collection must be installed with C and C++ language + support. GCC 3.x is supported, although some effort has been made to + support GCC 2.96. +

        + +

        + Note that we currently do not support any other C++ compiler. +

        + +
      • GNU Make +

        + The LLVM build system relies upon GNU Make extensions. Therefore, you + will need GNU Make (sometimes known as gmake) to build LLVM. +

        + +
      • Flex and Bison +

        + The LLVM source code is built using flex and bison. You will not be + able to configure and compile LLVM without them. +

        +
      + +

      + There are some additional tools that you may want to have when working with + LLVM: +

      + +
        +
      • GNU Autoconf and GNU M4 +

        + If you want to make changes to the autoconf scripts which configure LLVM + for compilation, you will need GNU autoconf, and consequently, GNU M4. + LLVM was built with autoconf 2.53, so that release and any later + release should work. +

        +

      Getting Started Quickly (A Summary)

      @@ -77,9 +158,17 @@
    5. cd where-you-want-llvm-to-live
    6. cvs -d CVSROOTDIR checkout llvm
    7. cd llvm -
    8. Edit Makefile.config to set local paths. This includes - setting the install location of the C frontend and the various paths - to the C and C++ compilers used to build LLVM itself. +
    9. Run configure to configure the Makefiles and header files. + Useful options include: +
        +
      • --with-objroot=directory +
        + Specifiy where object files should be placed during the build. + +
      • --with-llvmgccdir=directory +
        + Specifiy where the LLVM C frontend has been installed. +
    10. Set your LLVM_LIB_SEARCH_PATH environment variable.
    11. gmake -k |& tee gnumake.out    # this is csh or tcsh syntax @@ -97,8 +186,8 @@

      Throughout this manual, the following names are used to denote paths specific to the local system and working environment. These are not - environment variables you need to set, but just strings used in the rest - of this document below.. In any of the examples below, simply replace + environment variables you need to set but just strings used in the rest + of this document below. In any of the examples below, simply replace each of these names with the appropriate pathname on your local system. All these paths are absolute:

        @@ -109,7 +198,7 @@

        Before checking out the source code, you will need to know the path to - the CVS repository containing LLVM source code (we'll call this + the CVS repository containing the LLVM source code (we'll call this CVSROOTDIR below). Ask the person responsible for your local LLVM installation to give you this path. @@ -128,30 +217,52 @@

        Local Configuration Options

        -

        The file llvm/Makefile.config - defines the following path variables - which are specific to a particular installation of LLVM. - These need to be modified only once after checking out a copy - of LLVM (if the default values do not already match your system): +

        Once checked out from the CVS repository, options and pathnames specific + to an installation of LLVM can be set via the configure script. + This script sets variables in llvm/Makefile.config and + llvm/include/Config/config.h. + +

        + The following environment variables are used by configure to + configure Makefile.config: +

          -

        • CXX = Path to C++ compiler to use. -

        • OBJ_ROOT = Path to the llvm directory where - object files should be placed. - (See the Section on - The location for LLVM object files - for more information.) -

        • LLVMGCCDIR = Path to the location of the LLVM front-end - binaries and associated libraries. -

        • PURIFY = Path to the purify program. +

        • CXX = Pathname of the C++ compiler to use. +

        • CC = Pathname of the C compiler to use.
        - In addition to settings in this file, you must set a + The following options can be used to set or enable LLVM specific options: + +
          +

        • --with-objroot=LLVM_OBJ_ROOT = + Path to the directory where + object files, libraries, and executables should be placed. + (See the Section on + The location for LLVM object files + for more information.) +

        • --with-llvmgccdir=LLVMGCCDIR = + Path to the location of the LLVM front-end + binaries and associated libraries. +

        • --enable-optimized = + Enables optimized compilation (debugging symbols are removed and GCC + optimization flags are enabled). +

        • --enable-profiling = + Enables profiling compilation (compiler flags needed to add profiling + data are enabled). +

        • --enable-verbose = + Enables verbose messages during the compile. +

        • --enable-jit = + Compile the Just In Time (JIT) functionality. This is not available + on all platforms. +
        + + In addition to running configure, you must set the LLVM_LIB_SEARCH_PATH environment variable in your startup scripts. This environment variable is used to locate "system" libraries like "-lc" and "-lm" when linking. This variable should be set to the absolute path for the bytecode-libs subdirectory of the C front-end - install. For example, one might use + install. For example, one might set LLVM_LIB_SEARCH_PATH to /home/vadve/lattner/local/x86/llvm-gcc/bytecode-libs for the X86 version of the C front-end on our research machines.

        @@ -166,9 +277,11 @@ object files on a different filesystem either to keep them from being backed up or to speed up local builds. -

        If you do not wish to use a different location for object files (i.e. - you are building into the source tree directly), just set this variable to - ".".

        +

        If you wish to place output files into a separate directory, use the + --with-objroot=directory option of configure to + set the top level directory of where the object files will go. Otherwise, + leave this option unspecified, and configure will place files + within the LLVM source tree.

        Setting up your environment

        @@ -190,7 +303,7 @@ The llvmgcc alias is useful because the C compiler is not included in the CVS tree you just checked out. - +

        The other LLVM tools are part of the LLVM source base and built when compiling LLVM. They will be built into the OBJ_ROOT/tools/Debug directory.

        @@ -201,14 +314,15 @@

        Every directory in the LLVM source tree includes a Makefile to build it and any subdirectories that it contains. These makefiles require - that you use GNU Make (aka gmake) instead of make to + that you use GNU Make (sometimes called gmake) instead of + make to build them, but can otherwise be used freely. To build the entire LLVM system, just enter the top level llvm directory and type gmake. A few minutes later you will hopefully have a freshly compiled toolchain waiting for you in OBJ_ROOT/llvm/tools/Debug. If you want to look at the - libraries that were compiled, look in - OBJ_ROOT/llvm/lib/Debug.

        + libraries that + were compiled, look in OBJ_ROOT/llvm/lib/Debug.

        If you get an error about a /localhome directory, follow the instructions in the section about Setting Up Your @@ -242,7 +356,9 @@ If you are building with the "OBJ_ROOT=." option enabled in the - Makefile.config file, most source directories will contain two + Makefile.config file (i.e. you did not specify + --with-objroot when you ran configure), most source + directories will contain two directories, Depend and Debug. The Depend directory contains automatically generated dependance files which are used during compilation to make sure that source files get rebuilt if a header @@ -250,7 +366,7 @@ files, library files, and executables that are used for building a debug enabled build. The Release directory is created to hold the same files when the ENABLE_OPTIMIZED=1 flag is passed to gmake, - causing an optimized built to be performed.

        + causing an optimized build to be performed.

        @@ -258,7 +374,7 @@ This directory contains public header files exported from the LLVM - library. The two main subdirectories of this directory are:

        + library. The three main subdirectories of this directory are:

        1. llvm/include/llvm - This directory contains all of the LLVM @@ -268,16 +384,23 @@
        2. llvm/include/Support - This directory contains generic support libraries that are independant of LLVM, but are used by LLVM. - For example, header files for some C++ STL utilities and a Command Line - option processing library are located here. + For example, some C++ STL utilities and a Command Line option processing + library. + +
        3. llvm/include/Config - This directory contains header files + configured by the configure script. They wrap "standard" UNIX + and C header files. Source code can include these header files which + automatically take care of the conditional #includes that the configure + script generates.

        llvm/lib

        - This directory contains most source files of LLVM system. In LLVM, almost - all code exists in libraries, making it very easy to share code among the + This directory contains most of the source files of the LLVM system. In + LLVM almost all + code exists in libraries, making it very easy to share code among the different tools.

        @@ -365,7 +488,7 @@
        gccas
        This tool is invoked by the llvmgcc frontend as the "assembler" part of the compiler. This tool actually assembles LLVM assembly to LLVM bytecode, - performs a variety of optimizations, + performs a variety of optimizations, and outputs LLVM bytecode. Thus when you invoke llvmgcc -c x.c -o x.o, you are causing gccas to be run, which writes the x.o file (which is an LLVM bytecode file that can be From criswell at cs.uiuc.edu Mon Jun 30 17:04:23 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:04:23 2003 Subject: [llvm-commits] CVS: llvm/lib/Makefile Message-ID: <200306302159.QAA15030@tank.cs.uiuc.edu> Changes in directory llvm/lib: Makefile updated: 1.11 -> 1.12 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/lib/Makefile diff -u llvm/lib/Makefile:1.11 llvm/lib/Makefile:1.12 --- llvm/lib/Makefile:1.11 Tue Sep 17 22:25:55 2002 +++ llvm/lib/Makefile Mon Jun 30 16:58:36 2003 @@ -1,6 +1,8 @@ LEVEL = .. -PARALLEL_DIRS = VMCore Analysis Transforms AsmParser Bytecode Support CodeGen Target CWriter Reoptimizer +PARALLEL_DIRS = VMCore Analysis Transforms AsmParser Bytecode Support CodeGen Target CWriter + +OPTIONAL_DIRS = Reoptimizer include $(LEVEL)/Makefile.common From criswell at cs.uiuc.edu Mon Jun 30 17:04:34 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:04:34 2003 Subject: [llvm-commits] CVS: llvm/utils/TableGen/Makefile Message-ID: <200306302159.QAA15024@tank.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: Makefile updated: 1.4 -> 1.5 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/utils/TableGen/Makefile diff -u llvm/utils/TableGen/Makefile:1.4 llvm/utils/TableGen/Makefile:1.5 --- llvm/utils/TableGen/Makefile:1.4 Tue Dec 3 00:00:11 2002 +++ llvm/utils/TableGen/Makefile Mon Jun 30 16:59:05 2003 @@ -6,6 +6,13 @@ include $(LEVEL)/Makefile.common +# +# Make the source file depend on the header file. In this way, dependencies +# (which depend on the source file) won't get generated until bison is done +# generating the C source and header files for the parser. +# +FileLexer.cpp: FileParser.h + clean:: -rm -f FileParser.cpp FileParser.h FileLexer.cpp CommandLine.cpp -rm -f FileParser.output From criswell at cs.uiuc.edu Mon Jun 30 17:04:44 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:04:44 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetCacheInfo.h TargetInstrInfo.h TargetRegInfo.h Message-ID: <200306302159.QAA15016@tank.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetCacheInfo.h updated: 1.9 -> 1.10 TargetInstrInfo.h updated: 1.46 -> 1.47 TargetRegInfo.h updated: 1.38 -> 1.39 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/include/llvm/Target/TargetCacheInfo.h diff -u llvm/include/llvm/Target/TargetCacheInfo.h:1.9 llvm/include/llvm/Target/TargetCacheInfo.h:1.10 --- llvm/include/llvm/Target/TargetCacheInfo.h:1.9 Wed Jun 11 09:01:36 2003 +++ llvm/include/llvm/Target/TargetCacheInfo.h Mon Jun 30 16:58:35 2003 @@ -8,7 +8,6 @@ #define LLVM_TARGET_TARGETCACHEINFO_H #include "Support/DataTypes.h" -#include class TargetMachine; Index: llvm/include/llvm/Target/TargetInstrInfo.h diff -u llvm/include/llvm/Target/TargetInstrInfo.h:1.46 llvm/include/llvm/Target/TargetInstrInfo.h:1.47 --- llvm/include/llvm/Target/TargetInstrInfo.h:1.46 Thu Jun 26 19:00:48 2003 +++ llvm/include/llvm/Target/TargetInstrInfo.h Mon Jun 30 16:58:35 2003 @@ -9,7 +9,6 @@ #include "Support/DataTypes.h" #include -#include class MachineInstr; class TargetMachine; Index: llvm/include/llvm/Target/TargetRegInfo.h diff -u llvm/include/llvm/Target/TargetRegInfo.h:1.38 llvm/include/llvm/Target/TargetRegInfo.h:1.39 --- llvm/include/llvm/Target/TargetRegInfo.h:1.38 Wed Jun 11 09:01:36 2003 +++ llvm/include/llvm/Target/TargetRegInfo.h Mon Jun 30 16:58:35 2003 @@ -10,7 +10,6 @@ #include "Support/hash_map" #include -#include class TargetMachine; class IGNode; From criswell at cs.uiuc.edu Mon Jun 30 17:04:54 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:04:54 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Reoptimizer/BinInterface/regmask.h sparcbin.h Message-ID: <200306302159.QAA15004@tank.cs.uiuc.edu> Changes in directory llvm/include/llvm/Reoptimizer/BinInterface: regmask.h updated: 1.2 -> 1.3 sparcbin.h updated: 1.3 -> 1.4 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/include/llvm/Reoptimizer/BinInterface/regmask.h diff -u llvm/include/llvm/Reoptimizer/BinInterface/regmask.h:1.2 llvm/include/llvm/Reoptimizer/BinInterface/regmask.h:1.3 --- llvm/include/llvm/Reoptimizer/BinInterface/regmask.h:1.2 Wed Jun 11 09:01:34 2003 +++ llvm/include/llvm/Reoptimizer/BinInterface/regmask.h Mon Jun 30 16:58:33 2003 @@ -11,7 +11,6 @@ #include "bitmath.h" #include #include -#include #define VREG_ISMEM(x) (x >= 32) #define VREG_ISREG(x) (x < 32) Index: llvm/include/llvm/Reoptimizer/BinInterface/sparcbin.h diff -u llvm/include/llvm/Reoptimizer/BinInterface/sparcbin.h:1.3 llvm/include/llvm/Reoptimizer/BinInterface/sparcbin.h:1.4 --- llvm/include/llvm/Reoptimizer/BinInterface/sparcbin.h:1.3 Wed Jun 11 09:01:34 2003 +++ llvm/include/llvm/Reoptimizer/BinInterface/sparcbin.h Mon Jun 30 16:58:33 2003 @@ -18,7 +18,6 @@ #include "sparcpriv.h" #include #include -#include using std::vector; From criswell at cs.uiuc.edu Mon Jun 30 17:05:05 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:05:05 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Reoptimizer/TraceCache.h VirtualMem.h Message-ID: <200306302159.QAA14994@tank.cs.uiuc.edu> Changes in directory llvm/include/llvm/Reoptimizer: TraceCache.h updated: 1.10 -> 1.11 VirtualMem.h updated: 1.7 -> 1.8 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/include/llvm/Reoptimizer/TraceCache.h diff -u llvm/include/llvm/Reoptimizer/TraceCache.h:1.10 llvm/include/llvm/Reoptimizer/TraceCache.h:1.11 --- llvm/include/llvm/Reoptimizer/TraceCache.h:1.10 Wed Jun 11 09:01:32 2003 +++ llvm/include/llvm/Reoptimizer/TraceCache.h Mon Jun 30 16:58:31 2003 @@ -11,7 +11,6 @@ #include #include #include -#include class VirtualMem; class MemoryManager; Index: llvm/include/llvm/Reoptimizer/VirtualMem.h diff -u llvm/include/llvm/Reoptimizer/VirtualMem.h:1.7 llvm/include/llvm/Reoptimizer/VirtualMem.h:1.8 --- llvm/include/llvm/Reoptimizer/VirtualMem.h:1.7 Sat May 31 21:31:24 2003 +++ llvm/include/llvm/Reoptimizer/VirtualMem.h Mon Jun 30 16:58:32 2003 @@ -8,10 +8,10 @@ #define LLVM_REOPTIMIZER_TRACECACHE_VIRTUALMEMORY_H #include "Support/DataTypes.h" -#include -#include -#include -#include +#include "Config/fcntl.h" +#include "Config/unistd.h" + +#include "Config/stdio.h" #include #include From criswell at cs.uiuc.edu Mon Jun 30 17:05:15 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:05:15 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/InstrSelection.h MachineFrameInfo.h SSARegMap.h Message-ID: <200306302159.QAA14984@tank.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: InstrSelection.h updated: 1.24 -> 1.25 MachineFrameInfo.h updated: 1.5 -> 1.6 SSARegMap.h updated: 1.5 -> 1.6 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/include/llvm/CodeGen/InstrSelection.h diff -u llvm/include/llvm/CodeGen/InstrSelection.h:1.24 llvm/include/llvm/CodeGen/InstrSelection.h:1.25 --- llvm/include/llvm/CodeGen/InstrSelection.h:1.24 Sat Jun 21 22:06:13 2003 +++ llvm/include/llvm/CodeGen/InstrSelection.h Mon Jun 30 16:58:30 2003 @@ -8,6 +8,7 @@ #define LLVM_CODEGEN_INSTR_SELECTION_H #include "llvm/Instruction.h" + class Function; class InstrForest; class MachineInstr; Index: llvm/include/llvm/CodeGen/MachineFrameInfo.h diff -u llvm/include/llvm/CodeGen/MachineFrameInfo.h:1.5 llvm/include/llvm/CodeGen/MachineFrameInfo.h:1.6 --- llvm/include/llvm/CodeGen/MachineFrameInfo.h:1.5 Wed Jun 11 09:01:30 2003 +++ llvm/include/llvm/CodeGen/MachineFrameInfo.h Mon Jun 30 16:58:30 2003 @@ -35,7 +35,6 @@ class TargetRegisterClass; class MachineFunction; #include -#include class MachineFrameInfo { Index: llvm/include/llvm/CodeGen/SSARegMap.h diff -u llvm/include/llvm/CodeGen/SSARegMap.h:1.5 llvm/include/llvm/CodeGen/SSARegMap.h:1.6 --- llvm/include/llvm/CodeGen/SSARegMap.h:1.5 Sat Jun 21 22:06:13 2003 +++ llvm/include/llvm/CodeGen/SSARegMap.h Mon Jun 30 16:58:30 2003 @@ -11,6 +11,7 @@ #define LLVM_CODEGEN_SSAREGMAP_H #include "llvm/Target/MRegisterInfo.h" + class TargetRegisterClass; class SSARegMap { From criswell at cs.uiuc.edu Mon Jun 30 17:05:26 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:05:26 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DependenceGraph.h Dominators.h Message-ID: <200306302159.QAA14969@tank.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DependenceGraph.h updated: 1.5 -> 1.6 Dominators.h updated: 1.34 -> 1.35 --- Log message: Merged in autoconf branch. This provides configuration via the autoconf system. --- Diffs of the changes: Index: llvm/include/llvm/Analysis/DependenceGraph.h diff -u llvm/include/llvm/Analysis/DependenceGraph.h:1.5 llvm/include/llvm/Analysis/DependenceGraph.h:1.6 --- llvm/include/llvm/Analysis/DependenceGraph.h:1.5 Sat Jun 21 22:05:45 2003 +++ llvm/include/llvm/Analysis/DependenceGraph.h Mon Jun 30 16:58:28 2003 @@ -21,7 +21,6 @@ #include #include #include -#include class Instruction; class Function; Index: llvm/include/llvm/Analysis/Dominators.h diff -u llvm/include/llvm/Analysis/Dominators.h:1.34 llvm/include/llvm/Analysis/Dominators.h:1.35 --- llvm/include/llvm/Analysis/Dominators.h:1.34 Sat Jun 21 22:05:45 2003 +++ llvm/include/llvm/Analysis/Dominators.h Mon Jun 30 16:58:28 2003 @@ -20,6 +20,7 @@ #include "llvm/Pass.h" #include + class Instruction; template struct GraphTraits; From criswell at choi.cs.uiuc.edu Mon Jun 30 17:06:03 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:06:03 2003 Subject: [llvm-commits] CVS: llvm/Makefile.Linux Makefile.FreeBSD Makefile.SunOS Makefile.config Message-ID: <200306302202.h5UM25h21505@choi.cs.uiuc.edu> Changes in directory llvm: Makefile.Linux (r1.11) removed Makefile.FreeBSD (r1.2) removed Makefile.SunOS (r1.10) removed Makefile.config (r1.16) removed --- Log message: Removed these files as they are replaced by autoconf. --- Diffs of the changes: From lattner at cs.uiuc.edu Mon Jun 30 17:06:13 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 30 17:06:13 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Assembler/2003-06-30-RecursiveTypeProblem.ll Message-ID: <200306302203.RAA22293@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Assembler: 2003-06-30-RecursiveTypeProblem.ll added (r1.1) --- Log message: This causes an assert in the assembler. :( --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Mon Jun 30 17:13:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:13:01 2003 Subject: [llvm-commits] CVS: llvm/projects/sample/Makefile Makefile.common Makefile.config Message-ID: <200306302212.h5UMCq509013@choi.cs.uiuc.edu> Changes in directory llvm/projects/sample: Makefile updated: 1.1 -> 1.2 Makefile.common updated: 1.1 -> 1.2 Makefile.config updated: 1.1 -> 1.2 --- Log message: Adding in sample project tree. --- Diffs of the changes: Index: llvm/projects/sample/Makefile diff -u /dev/null llvm/projects/sample/Makefile:1.2 --- /dev/null Mon Jun 30 17:12:52 2003 +++ llvm/projects/sample/Makefile Mon Jun 30 17:12:41 2003 @@ -0,0 +1,19 @@ +# +# This is a sample Makefile for a project that uses LLVM. +# + +# +# Indicates our relative path to the top of the project's root directory. +# +LEVEL = . + +# +# Directories that needs to be built. +# +DIRS = lib tools + +# +# Include the Master Makefile that knows how to build all. +# +include $(LEVEL)/Makefile.common + Index: llvm/projects/sample/Makefile.common diff -u /dev/null llvm/projects/sample/Makefile.common:1.2 --- /dev/null Mon Jun 30 17:12:52 2003 +++ llvm/projects/sample/Makefile.common Mon Jun 30 17:12:41 2003 @@ -0,0 +1,16 @@ +# +# Set this variable to the top of the LLVM source tree. +# +LLVM_SRC_ROOT = $(LEVEL)/../.. + +# +# Set this variable to the top level directory where LLVM was built +# (this is *not* the same as OBJ_ROOT as defined in LLVM's Makefile.config). +# +#LLVM_OBJ_ROOT = $(LEVEL)/../.. + +# +# Include LLVM's Master Makefile. +# +include $(LLVM_SRC_ROOT)/Makefile.common + Index: llvm/projects/sample/Makefile.config diff -u /dev/null llvm/projects/sample/Makefile.config:1.2 --- /dev/null Mon Jun 30 17:12:52 2003 +++ llvm/projects/sample/Makefile.config Mon Jun 30 17:12:41 2003 @@ -0,0 +1,16 @@ +# +# Set this variable to the top of the LLVM source tree. +# +LLVM_SRC_ROOT = $(LEVEL)/../.. + +# +# Set this variable to the top level directory where LLVM was built +# (i.e. where all of the object files are located). +# +#LLVM_OBJ_ROOT = $(LEVEL)/../.. + +# +# Include LLVM's Makefile Makefile. +# +include $(LLVM_SRC_ROOT)/Makefile.config + From criswell at choi.cs.uiuc.edu Mon Jun 30 17:13:12 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:13:12 2003 Subject: [llvm-commits] CVS: llvm/projects/Makefile Message-ID: <200306302212.h5UMCUt08359@choi.cs.uiuc.edu> Changes in directory llvm/projects: Makefile updated: 1.1 -> 1.2 --- Log message: Adding in projects subtree. --- Diffs of the changes: Index: llvm/projects/Makefile diff -u /dev/null llvm/projects/Makefile:1.2 --- /dev/null Mon Jun 30 17:12:30 2003 +++ llvm/projects/Makefile Mon Jun 30 17:12:19 2003 @@ -0,0 +1,6 @@ +LEVEL=.. + +DIRS= +OPTIONAL_DIRS:=$(shell ls | grep -v CVS) + +include $(LEVEL)/Makefile.common From criswell at choi.cs.uiuc.edu Mon Jun 30 17:14:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:14:01 2003 Subject: [llvm-commits] CVS: llvm/projects/sample/tools/sample/main.c Makefile Message-ID: <200306302213.h5UMDwi12207@choi.cs.uiuc.edu> Changes in directory llvm/projects/sample/tools/sample: main.c updated: 1.1 -> 1.2 Makefile updated: 1.1 -> 1.2 --- Log message: Adding in sample project tree. --- Diffs of the changes: Index: llvm/projects/sample/tools/sample/main.c diff -u /dev/null llvm/projects/sample/tools/sample/main.c:1.2 --- /dev/null Mon Jun 30 17:13:58 2003 +++ llvm/projects/sample/tools/sample/main.c Mon Jun 30 17:13:48 2003 @@ -0,0 +1,14 @@ +#include +#include + +#include + +#include "sample.h" + +int +main (int argc, char ** argv) +{ + printf ("%d\n", compute_sample (5)); + exit (0); +} + Index: llvm/projects/sample/tools/sample/Makefile diff -u /dev/null llvm/projects/sample/tools/sample/Makefile:1.2 --- /dev/null Mon Jun 30 17:13:58 2003 +++ llvm/projects/sample/tools/sample/Makefile Mon Jun 30 17:13:48 2003 @@ -0,0 +1,20 @@ +# +# Indicate where we are relative to the top of the source tree. +# +LEVEL=../.. + +# +# Give the name of the tool. +# +TOOLNAME=sample + +# +# List libraries that we'll need +# +USEDLIBS=sample + +# +# Include Makefile.common so we know what to do. +# +include $(LEVEL)/Makefile.common + From criswell at choi.cs.uiuc.edu Mon Jun 30 17:14:11 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:14:11 2003 Subject: [llvm-commits] CVS: llvm/projects/sample/tools/Makefile Message-ID: <200306302213.h5UMDuJ12197@choi.cs.uiuc.edu> Changes in directory llvm/projects/sample/tools: Makefile updated: 1.1 -> 1.2 --- Log message: Adding in sample project tree. --- Diffs of the changes: Index: llvm/projects/sample/tools/Makefile diff -u /dev/null llvm/projects/sample/tools/Makefile:1.2 --- /dev/null Mon Jun 30 17:13:56 2003 +++ llvm/projects/sample/tools/Makefile Mon Jun 30 17:13:46 2003 @@ -0,0 +1,11 @@ +# +# Relative path to the top of the source tree. +# +LEVEL=.. + +# +# List all of the subdirectories that we will compile. +# +DIRS=sample + +include $(LEVEL)/Makefile.common From criswell at choi.cs.uiuc.edu Mon Jun 30 17:14:21 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:14:21 2003 Subject: [llvm-commits] CVS: llvm/projects/sample/lib/sample/Makefile sample.c Message-ID: <200306302213.h5UMDGK10045@choi.cs.uiuc.edu> Changes in directory llvm/projects/sample/lib/sample: Makefile updated: 1.1 -> 1.2 sample.c updated: 1.1 -> 1.2 --- Log message: Adding in sample project tree. --- Diffs of the changes: Index: llvm/projects/sample/lib/sample/Makefile diff -u /dev/null llvm/projects/sample/lib/sample/Makefile:1.2 --- /dev/null Mon Jun 30 17:13:15 2003 +++ llvm/projects/sample/lib/sample/Makefile Mon Jun 30 17:13:05 2003 @@ -0,0 +1,16 @@ +# +# Indicate where we are relative to the top of the source tree. +# +LEVEL=../.. + +# +# Give the name of a library. This will build a dynamic version. +# +SHARED_LIBRARY=1 +LIBRARYNAME=sample + +# +# Include Makefile.common so we know what to do. +# +include $(LEVEL)/Makefile.common + Index: llvm/projects/sample/lib/sample/sample.c diff -u /dev/null llvm/projects/sample/lib/sample/sample.c:1.2 --- /dev/null Mon Jun 30 17:13:15 2003 +++ llvm/projects/sample/lib/sample/sample.c Mon Jun 30 17:13:05 2003 @@ -0,0 +1,24 @@ +/* + * File: sample.c + * + * Description: + * This is a sample source file for a library. It helps to demonstrate + * how to setup a project that uses the LLVM build system, header files, + * and libraries. + */ + +#include +#include + +// LLVM Header File +#include "Support/DataTypes.h" + +// Header file global to this project +#include "sample.h" + +int +compute_sample (int a) +{ + return a; +} + From criswell at choi.cs.uiuc.edu Mon Jun 30 17:14:32 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:14:32 2003 Subject: [llvm-commits] CVS: llvm/projects/sample/lib/Makefile Message-ID: <200306302213.h5UMDD609960@choi.cs.uiuc.edu> Changes in directory llvm/projects/sample/lib: Makefile updated: 1.1 -> 1.2 --- Log message: Adding in sample project tree. --- Diffs of the changes: Index: llvm/projects/sample/lib/Makefile diff -u /dev/null llvm/projects/sample/lib/Makefile:1.2 --- /dev/null Mon Jun 30 17:13:13 2003 +++ llvm/projects/sample/lib/Makefile Mon Jun 30 17:13:03 2003 @@ -0,0 +1,11 @@ +# +# Relative path to the top of the source tree. +# +LEVEL=.. + +# +# List all of the subdirectories that we will compile. +# +DIRS=sample + +include $(LEVEL)/Makefile.common From criswell at choi.cs.uiuc.edu Mon Jun 30 17:14:43 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:14:43 2003 Subject: [llvm-commits] CVS: llvm/projects/sample/include/sample.h Message-ID: <200306302213.h5UMDXK11055@choi.cs.uiuc.edu> Changes in directory llvm/projects/sample/include: sample.h updated: 1.1 -> 1.2 --- Log message: Adding in sample project tree. --- Diffs of the changes: Index: llvm/projects/sample/include/sample.h diff -u /dev/null llvm/projects/sample/include/sample.h:1.2 --- /dev/null Mon Jun 30 17:13:33 2003 +++ llvm/projects/sample/include/sample.h Mon Jun 30 17:13:23 2003 @@ -0,0 +1,8 @@ +/* + * File: sample.h + * + * This is a sample header file that is global to the entire project. + * It is located here so that everyone will find it. + */ +extern int compute_sample (int a); + From criswell at choi.cs.uiuc.edu Mon Jun 30 17:17:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:17:01 2003 Subject: [llvm-commits] CVS: llvm/configure.ac configure Message-ID: <200306302216.h5UMGnS14090@choi.cs.uiuc.edu> Changes in directory llvm: configure.ac updated: 1.2 -> 1.3 configure updated: 1.2 -> 1.3 --- Log message: Removed the --enable-verbose option. --- Diffs of the changes: Index: llvm/configure.ac diff -u llvm/configure.ac:1.2 llvm/configure.ac:1.3 --- llvm/configure.ac:1.2 Mon Jun 30 16:58:14 2003 +++ llvm/configure.ac Mon Jun 30 17:16:39 2003 @@ -211,7 +211,6 @@ dnl * Enable various compile-time options dnl ************************************************************************** AC_ARG_ENABLE(purify,AC_HELP_STRING([--enable-purify],[Compile with purify (default is NO)]), AC_SUBST(ENABLE_PURIFY,[[ENABLE_PURIFY=1]]), AC_SUBST(ENABLE_PURIFY,[[]])) -AC_ARG_ENABLE(verbose,AC_HELP_STRING([--enable-verbose],[Enable verbose compilation messages (default is NO)]), AC_SUBST(ENABLE_VERBOSE,[[VERBOSE=1]]), AC_SUBST(ENABLE_VERBOSE,[[]])) AC_ARG_ENABLE(profiling,AC_HELP_STRING([--enable-profiling],[Compile with profiling information (default is NO)]), AC_SUBST(ENABLE_PROFILING,[[ENABLE_PROFILING=1]]), AC_SUBST(ENABLE_PROFILING,[[]])) AC_ARG_ENABLE(optimized,AC_HELP_STRING([--enable-optimized],[Compile with optimizations enabled (default is NO)]), AC_SUBST(ENABLE_OPTIMIZED,[[ENABLE_OPTIMIZED=1]]), AC_SUBST(ENABLE_OPTIMIZED,[[]])) AC_ARG_ENABLE(spec,AC_HELP_STRING([--enable-spec],[Compile SPEC benchmarks (default is NO)]), AC_SUBST(USE_SPEC,[[USE_SPEC=1]]), AC_SUBST(USE_SPEC,[[]])) Index: llvm/configure diff -u llvm/configure:1.2 llvm/configure:1.3 --- llvm/configure:1.2 Mon Jun 30 16:58:13 2003 +++ llvm/configure Mon Jun 30 17:16:39 2003 @@ -1003,7 +1003,6 @@ --enable-fast-install=PKGS optimize for fast installation default=yes --disable-libtool-lock avoid locking (might break parallel builds) --enable-purify Compile with purify (default is NO) - --enable-verbose Enable verbose compilation messages (default is NO) --enable-profiling Compile with profiling information (default is NO) --enable-optimized Compile with optimizations enabled (default is NO) --enable-spec Compile SPEC benchmarks (default is NO) @@ -4297,7 +4296,7 @@ case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4300 "configure"' > conftest.$ac_ext + echo '#line 4299 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4847,7 +4846,7 @@ save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:4850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:4849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && 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 @@ -6678,7 +6677,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/www/docs: GettingStarted.html updated: 1.15 -> 1.16 --- Log message: Removed the --enable-profiling and --enable-verbose options. --- Diffs of the changes: Index: llvm/www/docs/GettingStarted.html diff -u llvm/www/docs/GettingStarted.html:1.15 llvm/www/docs/GettingStarted.html:1.16 --- llvm/www/docs/GettingStarted.html:1.15 Mon Jun 30 16:59:07 2003 +++ llvm/www/docs/GettingStarted.html Mon Jun 30 17:17:28 2003 @@ -247,11 +247,6 @@

      • --enable-optimized = Enables optimized compilation (debugging symbols are removed and GCC optimization flags are enabled). -

      • --enable-profiling = - Enables profiling compilation (compiler flags needed to add profiling - data are enabled). -

      • --enable-verbose = - Enables verbose messages during the compile.

      • --enable-jit = Compile the Just In Time (JIT) functionality. This is not available on all platforms. From criswell at cs.uiuc.edu Mon Jun 30 17:21:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:21:01 2003 Subject: [llvm-commits] CVS: llvm/www/docs/GettingStarted.html Message-ID: <200306302220.RAA15790@tank.cs.uiuc.edu> Changes in directory llvm/www/docs: GettingStarted.html updated: 1.16 -> 1.17 --- Log message: Added John Criswell to the contributors list. --- Diffs of the changes: Index: llvm/www/docs/GettingStarted.html diff -u llvm/www/docs/GettingStarted.html:1.16 llvm/www/docs/GettingStarted.html:1.17 --- llvm/www/docs/GettingStarted.html:1.16 Mon Jun 30 17:17:28 2003 +++ llvm/www/docs/GettingStarted.html Mon Jun 30 17:20:46 2003 @@ -7,7 +7,8 @@

        Getting Started with the LLVM System
        By: Guochun Shi, - Chris Lattner and + Chris Lattner, + John Criswell, and Vikram Adve

        From criswell at choi.cs.uiuc.edu Mon Jun 30 17:35:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Mon Jun 30 17:35:01 2003 Subject: [llvm-commits] CVS: llvm/Makefile.config.in Message-ID: <200306302234.h5UMY3i19207@choi.cs.uiuc.edu> Changes in directory llvm: Makefile.config.in updated: 1.2 -> 1.3 --- Log message: Removed the LIBS environment variable as it interferes with the tests and is currently unused. --- Diffs of the changes: Index: llvm/Makefile.config.in diff -u llvm/Makefile.config.in:1.2 llvm/Makefile.config.in:1.3 --- llvm/Makefile.config.in:1.2 Mon Jun 30 16:58:13 2003 +++ llvm/Makefile.config.in Mon Jun 30 17:33:53 2003 @@ -29,7 +29,11 @@ CPPFLAGS=@DEFS@ CCFLAGS=@DEFS@ LDFLAGS=@LDFLAGS@ -LIBS=@LIBS@ + +# +# Removed since it prevents the tests from working properly. +# +#LIBS=@LIBS@ # # Libraries needed by tools From lattner at cs.uiuc.edu Mon Jun 30 17:42:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 30 17:42:01 2003 Subject: [llvm-commits] CVS: llvm/Makefile.config.in Message-ID: <200306302241.RAA27651@apoc.cs.uiuc.edu> Changes in directory llvm: Makefile.config.in updated: 1.3 -> 1.4 --- Log message: Fix verbose support bug --- Diffs of the changes: Index: llvm/Makefile.config.in diff -u llvm/Makefile.config.in:1.3 llvm/Makefile.config.in:1.4 --- llvm/Makefile.config.in:1.3 Mon Jun 30 17:33:53 2003 +++ llvm/Makefile.config.in Mon Jun 30 17:41:22 2003 @@ -143,7 +143,6 @@ # It essentially prints the commands that make is executing # #VERBOSE = 1 - at ENABLE_VERBOSE@ # When ENABLE_PURIFY is set to 1, the LLVM tools are linked with purify (which # must be locally installed) to allow for some automated memory error debugging. From lattner at cs.uiuc.edu Mon Jun 30 17:44:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 30 17:44:01 2003 Subject: [llvm-commits] CVS: CVSROOT/commit-diffs.pl Message-ID: <200306302243.RAA27675@apoc.cs.uiuc.edu> Changes in directory CVSROOT: commit-diffs.pl updated: 1.37 -> 1.38 --- Log message: Hopefully fix newrev stuff --- Diffs of the changes: Index: CVSROOT/commit-diffs.pl diff -u CVSROOT/commit-diffs.pl:1.37 CVSROOT/commit-diffs.pl:1.38 --- CVSROOT/commit-diffs.pl:1.37 Mon Jun 30 14:04:22 2003 +++ CVSROOT/commit-diffs.pl Mon Jun 30 17:43:06 2003 @@ -109,7 +109,7 @@ $subject .= "$m->{'filename'} "; if ($m->{'type'} eq 'add') { $msg .= "$m->{'filename'} added (r$m->{'newrev'})\n"; - $diffs .= `cvs -Qf rdiff -r0 -r$newrev $changedir/$m->{'filename'} 2> /dev/null` . "\n\n"; + $diffs .= `cvs -Qf rdiff -r0 -r$m->{'newrev'} $changedir/$m->{'filename'} 2> /dev/null` . "\n\n"; } elsif ($m->{'type'} eq 'rm') { $msg .= "$m->{'filename'} (r$m->{'oldrev'}) removed\n"; } else { From criswell at choi.cs.uiuc.edu Tue Jul 1 09:53:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Tue Jul 1 09:53:01 2003 Subject: [llvm-commits] CVS: llvm/Makefile.common Message-ID: <200307011452.h61EqdL27793@choi.cs.uiuc.edu> Changes in directory llvm: Makefile.common updated: 1.95 -> 1.96 --- Log message: Renamed all of the LObj* variables (which represent libtool objects) to Obj*. One of the test Makefiles uses the same variable names for something else, and this was probably interfering with it. --- Diffs of the changes: Index: llvm/Makefile.common diff -u llvm/Makefile.common:1.95 llvm/Makefile.common:1.96 --- llvm/Makefile.common:1.95 Mon Jun 30 16:58:13 2003 +++ llvm/Makefile.common Tue Jul 1 09:52:28 2003 @@ -390,10 +390,10 @@ Source := $(ExtraSource) $(wildcard *.cpp *.c *.y *.l) endif -LObjs := $(sort $(patsubst Debug/%.lo, %.lo, $(addsuffix .lo,$(notdir $(basename $(Source)))))) -LObjectsO := $(addprefix $(BUILD_OBJ_DIR)/Release/,$(LObjs)) -LObjectsP := $(addprefix $(BUILD_OBJ_DIR)/Profile/,$(LObjs)) -LObjectsG := $(addprefix $(BUILD_OBJ_DIR)/Debug/,$(LObjs)) +Objs := $(sort $(patsubst Debug/%.lo, %.lo, $(addsuffix .lo,$(notdir $(basename $(Source)))))) +ObjectsO := $(addprefix $(BUILD_OBJ_DIR)/Release/,$(Objs)) +ObjectsP := $(addprefix $(BUILD_OBJ_DIR)/Profile/,$(Objs)) +ObjectsG := $(addprefix $(BUILD_OBJ_DIR)/Debug/,$(Objs)) #--------------------------------------------------------- # Handle the DIRS and PARALLEL_DIRS options @@ -489,53 +489,53 @@ # # Rules for building dynamically linked libraries. # -$(LIBNAME_O): $(LObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir +$(LIBNAME_O): $(ObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir @echo ======= Linking $(LIBRARYNAME) dynamic release library ======= - $(VERB) $(Link) -o $*.la $(LObjectsO) $(LibSubDirs) $(LibLinkOpts); + $(VERB) $(Link) -o $*.la $(ObjectsO) $(LibSubDirs) $(LibLinkOpts); $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $*.la $(DESTLIBCURRENT); -$(LIBNAME_P): $(LObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir +$(LIBNAME_P): $(ObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir @echo ======= Linking $(LIBRARYNAME) dynamic profile library ======= - $(VERB) $(Link) -o $*.la $(LObjectsP) $(LibSubDirs) $(LibLinkOpts); + $(VERB) $(Link) -o $*.la $(ObjectsP) $(LibSubDirs) $(LibLinkOpts); $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $*.la $(DESTLIBCURRENT); -$(LIBNAME_G): $(LObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir +$(LIBNAME_G): $(ObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir @echo ======= Linking $(LIBRARYNAME) dynamic debug library ======= - $(VERB) $(Link) -o $*.la $(LObjectsG) $(LibSubDirs) $(LibLinkOpts); + $(VERB) $(Link) -o $*.la $(ObjectsG) $(LibSubDirs) $(LibLinkOpts); $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $*.la $(DESTLIBCURRENT); # # Rules for building static archive libraries. # -$(LIBNAME_AO): $(LObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir +$(LIBNAME_AO): $(ObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir @echo ======= Linking $(LIBRARYNAME) archive release library ======= @$(RM) -f $@ - $(VERB) $(Link) -03 -o $@ $(LObjectsO) $(LibSubDirs) -static + $(VERB) $(Link) -03 -o $@ $(ObjectsO) $(LibSubDirs) -static -$(LIBNAME_AP): $(LObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir +$(LIBNAME_AP): $(ObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir @echo ======= Linking $(LIBRARYNAME) archive profile library ======= @$(RM) -f $@ - $(VERB) $(Link) -03 $(PROFILE) -o $@ $(LObjectsP) $(LibSubDirs) -static + $(VERB) $(Link) -03 $(PROFILE) -o $@ $(ObjectsP) $(LibSubDirs) -static -$(LIBNAME_AG): $(LObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir +$(LIBNAME_AG): $(ObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir @echo ======= Linking $(LIBRARYNAME) archive debug library ======= @$(RM) -f $@ - $(VERB) $(Link) -g $(STRIP) -o $@ $(LObjectsG) $(LibSubDirs) -static + $(VERB) $(Link) -g $(STRIP) -o $@ $(ObjectsG) $(LibSubDirs) -static # # Rules for building .o libraries. # -$(LIBNAME_OBJO): $(LObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir +$(LIBNAME_OBJO): $(ObjectsO) $(LibSubDirs) $(DESTLIBRELEASE)/.dir @echo "Linking $@" - $(VERB) $(Relink) -o $@ $(LObjectsO) $(LibSubDirs) + $(VERB) $(Relink) -o $@ $(ObjectsO) $(LibSubDirs) -$(LIBNAME_OBJP): $(LObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir +$(LIBNAME_OBJP): $(ObjectsP) $(LibSubDirs) $(DESTLIBPROFILE)/.dir @echo "Linking $@" - $(VERB) $(Relink) -o $@ $(LObjectsP) $(LibSubDirs) + $(VERB) $(Relink) -o $@ $(ObjectsP) $(LibSubDirs) -$(LIBNAME_OBJG): $(LObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir +$(LIBNAME_OBJG): $(ObjectsG) $(LibSubDirs) $(DESTLIBDEBUG)/.dir @echo "Linking $@" - $(VERB) $(Relink) -o $@ $(LObjectsG) $(LibSubDirs) + $(VERB) $(Relink) -o $@ $(ObjectsG) $(LibSubDirs) endif @@ -617,17 +617,17 @@ clean:: $(VERB) $(RM) -f $(TOOLEXENAMES) -$(TOOLEXENAME_G): $(LObjectsG) $(USED_LIB_PATHS_G) $(DESTTOOLDEBUG)/.dir +$(TOOLEXENAME_G): $(ObjectsG) $(USED_LIB_PATHS_G) $(DESTTOOLDEBUG)/.dir @echo ======= Linking $(TOOLNAME) debug executable $(STRIP_WARN_MSG)======= - $(VERB) $(LinkG) -o $@ $(LObjectsG) $(LIB_OPTS_G) $(LINK_OPTS) $(LIBS) + $(VERB) $(LinkG) -o $@ $(ObjectsG) $(LIB_OPTS_G) $(LINK_OPTS) $(LIBS) -$(TOOLEXENAME_O): $(LObjectsO) $(USED_LIB_PATHS_O) $(DESTTOOLRELEASE)/.dir +$(TOOLEXENAME_O): $(ObjectsO) $(USED_LIB_PATHS_O) $(DESTTOOLRELEASE)/.dir @echo ======= Linking $(TOOLNAME) release executable ======= - $(VERB) $(LinkO) -o $@ $(LObjectsO) $(LIB_OPTS_O) $(LINK_OPTS) $(LIBS) + $(VERB) $(LinkO) -o $@ $(ObjectsO) $(LIB_OPTS_O) $(LINK_OPTS) $(LIBS) -$(TOOLEXENAME_P): $(LObjectsP) $(USED_LIB_PATHS_P) $(DESTTOOLPROFILE)/.dir +$(TOOLEXENAME_P): $(ObjectsP) $(USED_LIB_PATHS_P) $(DESTTOOLPROFILE)/.dir @echo ======= Linking $(TOOLNAME) profile executable ======= - $(VERB) $(LinkP) -o $@ $(LObjectsP) $(LIB_OPTS_P) $(LINK_OPTS) $(LIBS) + $(VERB) $(LinkP) -o $@ $(ObjectsP) $(LIB_OPTS_P) $(LINK_OPTS) $(LIBS) endif From criswell at choi.cs.uiuc.edu Tue Jul 1 10:04:02 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Tue Jul 1 10:04:02 2003 Subject: [llvm-commits] CVS: llvm/Makefile.config.in Message-ID: <200307011503.h61F39730599@choi.cs.uiuc.edu> Changes in directory llvm: Makefile.config.in updated: 1.4 -> 1.5 --- Log message: The Makefile now adds autoconf information to the compiler and linker flag variables instead of overwriting those variables. This makes it more flexible and keeps some of the test Makefiles from breaking. --- Diffs of the changes: Index: llvm/Makefile.config.in diff -u llvm/Makefile.config.in:1.4 llvm/Makefile.config.in:1.5 --- llvm/Makefile.config.in:1.4 Mon Jun 30 17:41:22 2003 +++ llvm/Makefile.config.in Tue Jul 1 10:02:59 2003 @@ -26,14 +26,14 @@ # # Compilation flags for the C and C++ compilers. # -CPPFLAGS=@DEFS@ -CCFLAGS=@DEFS@ -LDFLAGS=@LDFLAGS@ +CPPFLAGS+=@DEFS@ +CCFLAGS+=@DEFS@ +LDFLAGS+=@LDFLAGS@ # # Removed since it prevents the tests from working properly. # -#LIBS=@LIBS@ +#LIBS+=@LIBS@ # # Libraries needed by tools From lattner at cs.uiuc.edu Tue Jul 1 11:03:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 11:03:02 2003 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl Message-ID: <200307011602.LAA09480@apoc.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.14 -> 1.15 --- Log message: Update to configure the tree before building it. --- Diffs of the changes: Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.14 llvm/utils/NightlyTest.pl:1.15 --- llvm/utils/NightlyTest.pl:1.14 Thu Jun 26 15:11:07 2003 +++ llvm/utils/NightlyTest.pl Tue Jul 1 11:02:00 2003 @@ -153,17 +153,12 @@ # Build the entire tree, saving build messages to the build log # if (!$NOCHECKOUT) { - # Change the Makefile.config to build into the local directory... - rename "Makefile.config", "Makefile.config.orig"; - system "sed '/^OBJ_ROOT/d' < Makefile.config.orig > Makefile.config"; - system "echo >> Makefile.config"; - system "echo 'OBJ_ROOT := .' >> Makefile.config"; - + system "(time -p ./configure) > $Prefix-Build-Log.txt 2>&1"; # Change the Makefile.config to not strip executables... system "echo 'KEEP_SYMBOLS := 1' >> Makefile.config"; # Build the entire tree, capturing the output into $Prefix-Build-Log.txt - system "(time -p gmake $MAKEOPTS) > $Prefix-Build-Log.txt 2>&1"; + system "(time -p gmake $MAKEOPTS) >> $Prefix-Build-Log.txt 2>&1"; } From lattner at cs.uiuc.edu Tue Jul 1 11:05:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 11:05:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Message-ID: <200307011604.LAA09596@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: BottomUpClosure.cpp updated: 1.57 -> 1.58 --- Log message: Minor cleanups --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.57 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.58 --- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.57 Mon Jun 30 00:27:53 2003 +++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Tue Jul 1 11:04:18 2003 @@ -7,10 +7,10 @@ // //===----------------------------------------------------------------------===// -#include "DSCallSiteIterator.h" #include "llvm/Analysis/DataStructure.h" #include "llvm/Module.h" #include "Support/Statistic.h" +#include "DSCallSiteIterator.h" namespace { Statistic<> MaxSCC("budatastructure", "Maximum SCC Size in Call Graph"); @@ -35,7 +35,7 @@ // Calculate the graphs for any functions that are unreachable from main... for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) - if (!I->isExternal() && DSInfo.find(I) == DSInfo.end()) { + if (!I->isExternal() && !DSInfo.count(I)) { #ifndef NDEBUG if (MainFunc) std::cerr << "*** Function unreachable from main: " @@ -233,6 +233,7 @@ // Resolve the current call... Function *Callee = *I; const DSCallSite &CS = I.getCallSite(); + ActualCallees.insert(std::make_pair(&CS.getCallInst(), Callee)); if (Callee->isExternal()) { // Ignore this case, simple varargs functions we cannot stub out! @@ -251,8 +252,8 @@ DEBUG(std::cerr << " Inlining graph for " << Callee->getName() << "[" << GI.getGraphSize() << "+" - << GI.getAuxFunctionCalls().size() << "] into [" - << Graph.getGraphSize() << "+" + << GI.getAuxFunctionCalls().size() << "] into '" + << Graph.getFunctionNames() << "' [" << Graph.getGraphSize() << "+" << Graph.getAuxFunctionCalls().size() << "]\n"); // Handle self recursion by resolving the arguments and return value From lattner at cs.uiuc.edu Tue Jul 1 11:28:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 11:28:01 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DataStructure.h Message-ID: <200307011627.LAA10022@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DataStructure.h updated: 1.66 -> 1.67 --- Log message: Add new methods to BUDS for keeping track of a precise call graph --- Diffs of the changes: Index: llvm/include/llvm/Analysis/DataStructure.h diff -u llvm/include/llvm/Analysis/DataStructure.h:1.66 llvm/include/llvm/Analysis/DataStructure.h:1.67 --- llvm/include/llvm/Analysis/DataStructure.h:1.66 Mon Jun 30 00:10:09 2003 +++ llvm/include/llvm/Analysis/DataStructure.h Tue Jul 1 11:27:15 2003 @@ -12,6 +12,7 @@ #include "Support/hash_set" class Type; +class CallInst; class DSGraph; class DSNode; class DSCallSite; @@ -75,6 +76,7 @@ // DSInfo, one graph for each function hash_map DSInfo; DSGraph *GlobalsGraph; + hash_multimap ActualCallees; public: ~BUDataStructures() { releaseMemory(); } @@ -104,19 +106,15 @@ AU.setPreservesAll(); AU.addRequired(); } + + typedef hash_multimap ActualCalleesTy; + const ActualCalleesTy &getActualCallees() const { + return ActualCallees; + } + private: void calculateGraph(DSGraph &G); - // inlineNonSCCGraphs - This method is almost like the other two calculate - // graph methods. This one is used to inline function graphs (from functions - // outside of the SCC) into functions in the SCC. It is not supposed to touch - // functions IN the SCC at all. - // - DSGraph &inlineNonSCCGraphs(Function &F, - hash_set &SCCFunctions); - - DSGraph &calculateSCCGraph(Function &F, - hash_set &InlinedSCCFunctions); void calculateReachableGraphs(Function *F); @@ -135,7 +133,6 @@ class TDDataStructures : public Pass { // DSInfo, one graph for each function hash_map DSInfo; - hash_set GraphDone; DSGraph *GlobalsGraph; public: ~TDDataStructures() { releaseMyMemory(); } @@ -169,8 +166,12 @@ } private: - void calculateGraph(Function &F); + void calculateGraphFrom(Function &F); + void inlineGraphIntoCallees(DSGraph &G); DSGraph &getOrCreateDSGraph(Function &F); + void ComputePostOrder(Function &F, hash_set &Visited, + std::vector &PostOrder, + const BUDataStructures::ActualCalleesTy &ActualCallees); }; #endif From lattner at cs.uiuc.edu Tue Jul 1 11:29:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 11:29:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Analysis/DSGraph/2003-06-30-TopDownResolve.ll Message-ID: <200307011628.LAA10080@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Analysis/DSGraph: 2003-06-30-TopDownResolve.ll updated: 1.1 -> 1.2 --- Log message: Make testcase a bit more interesting --- Diffs of the changes: Index: llvm/test/Regression/Analysis/DSGraph/2003-06-30-TopDownResolve.ll diff -u llvm/test/Regression/Analysis/DSGraph/2003-06-30-TopDownResolve.ll:1.1 llvm/test/Regression/Analysis/DSGraph/2003-06-30-TopDownResolve.ll:1.2 --- llvm/test/Regression/Analysis/DSGraph/2003-06-30-TopDownResolve.ll:1.1 Mon Jun 30 10:17:39 2003 +++ llvm/test/Regression/Analysis/DSGraph/2003-06-30-TopDownResolve.ll Tue Jul 1 11:28:32 2003 @@ -8,6 +8,7 @@ store int 0, int* %X ret void } +internal void %leaf2(int* %X) { ret void } internal void %intermediate(void(int*)* %Fn, int* %Ptr) { call void %Fn(int* %Ptr) @@ -16,5 +17,8 @@ int %main() { call void %intermediate(void(int*)* %leaf, int* %G) + call void %intermediate(void(int*)* %leaf2, int* %G) + call void %intermediate(void(int*)* %leaf, int* %G) + call void %intermediate(void(int*)* %leaf2, int* %G) ret int 0 } From lattner at cs.uiuc.edu Tue Jul 1 11:29:12 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 11:29:12 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h Message-ID: <200307011628.LAA10072@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DSCallSiteIterator.h updated: 1.1 -> 1.2 --- Log message: Do not treat global variables as functions! (and assert failing) --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h diff -u llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h:1.1 llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h:1.2 --- llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h:1.1 Mon Jun 30 00:27:53 2003 +++ llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h Tue Jul 1 11:27:53 2003 @@ -39,9 +39,11 @@ DSNode *CalleeNode = (*FCs)[CallSite].getCalleeNode(); if (CallSiteEntry || isCompleteNode(CalleeNode)) { const std::vector &Callees = CalleeNode->getGlobals(); - - if (CallSiteEntry < Callees.size()) - return; + while (CallSiteEntry < Callees.size()) { + if (isa(Callees[CallSiteEntry])) + return; + ++CallSiteEntry; + } } } CallSiteEntry = 0; From lattner at cs.uiuc.edu Tue Jul 1 11:29:23 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 11:29:23 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp TopDownClosure.cpp Message-ID: <200307011628.LAA10060@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.110 -> 1.111 TopDownClosure.cpp updated: 1.46 -> 1.47 --- Log message: Rework TD pass to work with the precise call graph constructed by the BU phase --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.110 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.111 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.110 Mon Jun 30 00:57:30 2003 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Tue Jul 1 11:28:11 2003 @@ -977,6 +977,7 @@ } static void removeIdenticalCalls(std::vector &Calls) { + // Remove trivially identical function calls unsigned NumFns = Calls.size(); std::sort(Calls.begin(), Calls.end()); // Sort by callee as primary key! @@ -1022,6 +1023,7 @@ LastCalleeContainsExternalFunction = LastCalleeFunc->isExternal(); } +#if 0 if (LastCalleeContainsExternalFunction || // This should be more than enough context sensitivity! // FIXME: Evaluate how many times this is tripped! @@ -1035,6 +1037,7 @@ else if (CS.getNumPtrArgs() > OCS.getNumPtrArgs()) OCS = CS; } +#endif } else { if (CS.isDirectCall()) { LastCalleeFunc = CS.getCalleeFunc(); Index: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp diff -u llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.46 llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.47 --- llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.46 Sun Jun 29 23:53:39 2003 +++ llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Tue Jul 1 11:28:11 2003 @@ -8,10 +8,10 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/DataStructure.h" -#include "llvm/Analysis/DSGraph.h" #include "llvm/Module.h" #include "llvm/DerivedTypes.h" #include "Support/Statistic.h" +#include "DSCallSiteIterator.h" namespace { RegisterAnalysis // Register the pass @@ -27,14 +27,13 @@ // Calculate top-down from main... if (Function *F = M.getMainFunction()) - calculateGraph(*F); + calculateGraphFrom(*F); // Next calculate the graphs for each function unreachable function... for (Module::reverse_iterator I = M.rbegin(), E = M.rend(); I != E; ++I) - if (!I->isExternal()) - calculateGraph(*I); + if (!I->isExternal() && !DSInfo.count(&*I)) + calculateGraphFrom(*I); - GraphDone.clear(); // Free temporary memory... return false; } @@ -82,130 +81,165 @@ return F.hasInternalLinkage(); } +void TDDataStructures::ComputePostOrder(Function &F,hash_set &Visited, + std::vector &PostOrder, + const BUDataStructures::ActualCalleesTy &ActualCallees) { + if (F.isExternal()) return; + DSGraph &G = getOrCreateDSGraph(F); + if (Visited.count(&G)) return; + Visited.insert(&G); + + // Recursively traverse all of the callee graphs. + const std::vector &FunctionCalls = G.getFunctionCalls(); + + for (unsigned i = 0, e = FunctionCalls.size(); i != e; ++i) { + std::pair + IP = ActualCallees.equal_range(&FunctionCalls[i].getCallInst()); + + for (BUDataStructures::ActualCalleesTy::const_iterator I = IP.first; + I != IP.second; ++I) + ComputePostOrder(*I->second, Visited, PostOrder, ActualCallees); + } -void TDDataStructures::calculateGraph(Function &F) { - // Make sure this graph has not already been calculated, and that we don't get - // into an infinite loop with mutually recursive functions. - // - if (GraphDone.count(&F)) return; - GraphDone.insert(&F); + PostOrder.push_back(&G); +} - // Get the current functions graph... - DSGraph &Graph = getOrCreateDSGraph(F); + +void TDDataStructures::calculateGraphFrom(Function &F) { + // We want to traverse the call graph in reverse post-order. To do this, we + // calculate a post-order traversal, then reverse it. + hash_set VisitedGraph; + std::vector PostOrder; + ComputePostOrder(F, VisitedGraph, PostOrder, + getAnalysis().getActualCallees()); + VisitedGraph.clear(); // Release memory! + + // Visit each of the graphs in reverse post-order now! + while (!PostOrder.empty()) { + inlineGraphIntoCallees(*PostOrder.back()); + PostOrder.pop_back(); + } +} + + +void TDDataStructures::inlineGraphIntoCallees(DSGraph &Graph) { // Recompute the Incomplete markers and eliminate unreachable nodes. Graph.maskIncompleteMarkers(); - unsigned Flags = FunctionHasCompleteArguments(F) ? + unsigned Flags = true /* FIXME!! FunctionHasCompleteArguments(F)*/ ? DSGraph::IgnoreFormalArgs : DSGraph::MarkFormalArgs; Graph.markIncompleteNodes(Flags | DSGraph::IgnoreGlobals); Graph.removeDeadNodes(DSGraph::RemoveUnreachableGlobals); - const std::vector &CallSites = Graph.getFunctionCalls(); - if (CallSites.empty()) { - DEBUG(std::cerr << " [TD] No callees for: " << F.getName() << "\n"); - } else { - // Loop over all of the call sites, building a multi-map from Callees to - // DSCallSite*'s. With this map we can then loop over each callee, cloning - // this graph once into it, then resolving arguments. - // - std::multimap CalleeSites; - for (unsigned i = 0, e = CallSites.size(); i != e; ++i) { - const DSCallSite &CS = CallSites[i]; - if (CS.isDirectCall()) { - if (!CS.getCalleeFunc()->isExternal()) // If it's not external - CalleeSites.insert(std::make_pair(CS.getCalleeFunc(), &CS));// Keep it - } else { - const std::vector &Callees = - CS.getCalleeNode()->getGlobals(); - - // Loop over all of the functions that this call may invoke... - for (unsigned c = 0, e = Callees.size(); c != e; ++c) - if (Function *F = dyn_cast(Callees[c]))// If this is a fn... - if (!F->isExternal()) // If it's not extern - CalleeSites.insert(std::make_pair(F, &CS)); // Keep track of it! - } + DSCallSiteIterator CalleeI = DSCallSiteIterator::begin_std(Graph); + DSCallSiteIterator CalleeE = DSCallSiteIterator::end_std(Graph); + + if (CalleeI == CalleeE) { + DEBUG(std::cerr << " [TD] No callees for: " << Graph.getFunctionNames() + << "\n"); + return; + } + + // Loop over all of the call sites, building a multi-map from Callees to + // DSCallSite*'s. With this map we can then loop over each callee, cloning + // this graph once into it, then resolving arguments. + // + std::multimap, const DSCallSite*> CalleeSites; + for (; CalleeI != CalleeE; ++CalleeI) + if (!(*CalleeI)->isExternal()) { + // We should have already created the graph here... + if (!DSInfo.count(*CalleeI)) + std::cerr << "WARNING: TD pass, did not know about callee: '" + << (*CalleeI)->getName() << "'\n"; + + DSGraph &IG = getOrCreateDSGraph(**CalleeI); + if (&IG != &Graph) + CalleeSites.insert(std::make_pair(std::make_pair(&IG, *CalleeI), + &CalleeI.getCallSite())); } - // Now that we have information about all of the callees, propagate the - // current graph into the callees. + // Now that we have information about all of the callees, propagate the + // current graph into the callees. + // + DEBUG(std::cerr << " [TD] Inlining '" << Graph.getFunctionNames() <<"' into " + << CalleeSites.size() << " callees.\n"); + + // Loop over all the callees... + for (std::multimap, + const DSCallSite*>::iterator I = CalleeSites.begin(), + E = CalleeSites.end(); I != E; ) { + DSGraph &CG = *I->first.first; + + DEBUG(std::cerr << " [TD] Inlining graph into callee graph '" + << CG.getFunctionNames() << "'\n"); + + // Clone our current graph into the callee... + DSGraph::ScalarMapTy OldValMap; + DSGraph::NodeMapTy OldNodeMap; + DSGraph::ReturnNodesTy ReturnNodes; + CG.cloneInto(Graph, OldValMap, ReturnNodes, OldNodeMap, + DSGraph::StripModRefBits | + DSGraph::KeepAllocaBit | DSGraph::DontCloneCallNodes | + DSGraph::DontCloneAuxCallNodes); + OldValMap.clear(); // We don't care about the ValMap + ReturnNodes.clear(); // We don't care about return values either + + // Loop over all of the invocation sites of the callee, resolving + // arguments to our graph. This loop may iterate multiple times if the + // current function calls this callee multiple times with different + // signatures. // - DEBUG(std::cerr << " [TD] Inlining '" << F.getName() << "' into " - << CalleeSites.size() << " callees.\n"); + for (; I != E && I->first.first == &CG; ++I) { + Function &Callee = *I->first.second; + DEBUG(std::cerr << "\t [TD] Merging args for callee '" + << Callee.getName() << "'\n"); - // Loop over all the callees... - for (std::multimap::iterator - I = CalleeSites.begin(), E = CalleeSites.end(); I != E; ) - if (I->first == &F) { // Bottom-up pass takes care of self loops! - ++I; - } else { - // For each callee... - Function &Callee = *I->first; - DSGraph &CG = getOrCreateDSGraph(Callee); // Get the callee's graph... - - DEBUG(std::cerr << "\t [TD] Inlining into callee '" << Callee.getName() - << "'\n"); - - // Clone our current graph into the callee... - DSGraph::ScalarMapTy OldValMap; - DSGraph::NodeMapTy OldNodeMap; - DSGraph::ReturnNodesTy ReturnNodes; - CG.cloneInto(Graph, OldValMap, ReturnNodes, OldNodeMap, - DSGraph::StripModRefBits | - DSGraph::KeepAllocaBit | DSGraph::DontCloneCallNodes | - DSGraph::DontCloneAuxCallNodes); - OldValMap.clear(); // We don't care about the ValMap - ReturnNodes.clear(); // We don't care about return values either - - // Loop over all of the invocation sites of the callee, resolving - // arguments to our graph. This loop may iterate multiple times if the - // current function calls this callee multiple times with different - // signatures. - // - for (; I != E && I->first == &Callee; ++I) { - // Map call site into callee graph - DSCallSite NewCS(*I->second, OldNodeMap); + // Map call site into callee graph + DSCallSite NewCS(*I->second, OldNodeMap); - // Resolve the return values... - NewCS.getRetVal().mergeWith(CG.getReturnNodeFor(Callee)); + // Resolve the return values... + NewCS.getRetVal().mergeWith(CG.getReturnNodeFor(Callee)); - // Resolve all of the arguments... - Function::aiterator AI = Callee.abegin(); - for (unsigned i = 0, e = NewCS.getNumPtrArgs(); - i != e && AI != Callee.aend(); ++i, ++AI) { - // Advance the argument iterator to the first pointer argument... - while (AI != Callee.aend() && !DS::isPointerType(AI->getType())) - ++AI; - if (AI == Callee.aend()) break; - - // Add the link from the argument scalar to the provided value - DSNodeHandle &NH = CG.getNodeForValue(AI); - assert(NH.getNode() && "Pointer argument without scalarmap entry?"); - NH.mergeWith(NewCS.getPtrArg(i)); - } - } - - // Done with the nodemap... - OldNodeMap.clear(); - - // Recompute the Incomplete markers and eliminate unreachable nodes. - CG.removeTriviallyDeadNodes(); - CG.maskIncompleteMarkers(); - CG.markIncompleteNodes(DSGraph::MarkFormalArgs |DSGraph::IgnoreGlobals); - CG.removeDeadNodes(DSGraph::RemoveUnreachableGlobals); + // Resolve all of the arguments... + Function::aiterator AI = Callee.abegin(); + for (unsigned i = 0, e = NewCS.getNumPtrArgs(); + i != e && AI != Callee.aend(); ++i, ++AI) { + // Advance the argument iterator to the first pointer argument... + while (AI != Callee.aend() && !DS::isPointerType(AI->getType())) + ++AI; + if (AI == Callee.aend()) break; + + // Add the link from the argument scalar to the provided value + DSNodeHandle &NH = CG.getNodeForValue(AI); + assert(NH.getNode() && "Pointer argument without scalarmap entry?"); + NH.mergeWith(NewCS.getPtrArg(i)); } + } - DEBUG(std::cerr << " [TD] Done inlining into callees for: " << F.getName() - << " [" << Graph.getGraphSize() << "+" - << Graph.getFunctionCalls().size() << "]\n"); - - // Loop over all the callees... making sure they are all resolved now... - Function *LastFunc = 0; - for (std::multimap::iterator - I = CalleeSites.begin(), E = CalleeSites.end(); I != E; ++I) - if (I->first != LastFunc) { // Only visit each callee once... - LastFunc = I->first; - calculateGraph(*I->first); - } + // Done with the nodemap... + OldNodeMap.clear(); + + // Recompute the Incomplete markers and eliminate unreachable nodes. + CG.removeTriviallyDeadNodes(); + //CG.maskIncompleteMarkers(); + //CG.markIncompleteNodes(DSGraph::MarkFormalArgs | DSGraph::IgnoreGlobals); + //CG.removeDeadNodes(DSGraph::RemoveUnreachableGlobals); } + + DEBUG(std::cerr << " [TD] Done inlining into callees for: " + << Graph.getFunctionNames() << " [" << Graph.getGraphSize() << "+" + << Graph.getFunctionCalls().size() << "]\n"); + +#if 0 + // Loop over all the callees... making sure they are all resolved now... + Function *LastFunc = 0; + for (std::multimap::iterator + I = CalleeSites.begin(), E = CalleeSites.end(); I != E; ++I) + if (I->first != LastFunc) { // Only visit each callee once... + LastFunc = I->first; + calculateGraph(*I->first); + } +#endif } From lattner at cs.uiuc.edu Tue Jul 1 11:29:34 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 11:29:34 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Printer.cpp Message-ID: <200307011628.LAA10047@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: Printer.cpp updated: 1.55 -> 1.56 --- Log message: Dont' print scalar nodes for ConstantPointerRefs --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/Printer.cpp diff -u llvm/lib/Analysis/DataStructure/Printer.cpp:1.55 llvm/lib/Analysis/DataStructure/Printer.cpp:1.56 --- llvm/lib/Analysis/DataStructure/Printer.cpp:1.55 Mon Jun 30 00:57:39 2003 +++ llvm/lib/Analysis/DataStructure/Printer.cpp Tue Jul 1 11:27:32 2003 @@ -8,6 +8,7 @@ #include "llvm/Analysis/DSGraph.h" #include "llvm/Analysis/DSGraphTraits.h" #include "llvm/Module.h" +#include "llvm/Constants.h" #include "llvm/Assembly/Writer.h" #include "Support/CommandLine.h" #include "Support/GraphWriter.h" @@ -99,7 +100,7 @@ // Add scalar nodes to the graph... const DSGraph::ScalarMapTy &VM = G->getScalarMap(); for (DSGraph::ScalarMapTy::const_iterator I = VM.begin(); I != VM.end();++I) - if (!isa(I->first)) { + if (!isa(I->first) && !isa(I->first)) { std::stringstream OS; WriteAsOperand(OS, I->first, false, true, CurMod); GW.emitSimpleNode(I->first, "", OS.str()); From lattner at cs.uiuc.edu Tue Jul 1 11:30:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 11:30:02 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Analysis/DSGraph/2003-07-01-FieldCollapse.ll Message-ID: <200307011629.LAA10085@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Analysis/DSGraph: 2003-07-01-FieldCollapse.ll added (r1.1) --- Log message: New testcase --- Diffs of the changes: Index: llvm/test/Regression/Analysis/DSGraph/2003-07-01-FieldCollapse.ll diff -c /dev/null llvm/test/Regression/Analysis/DSGraph/2003-07-01-FieldCollapse.ll:1.1 *** /dev/null Tue Jul 1 11:29:00 2003 --- llvm/test/Regression/Analysis/DSGraph/2003-07-01-FieldCollapse.ll Tue Jul 1 11:28:20 2003 *************** *** 0 **** --- 1,11 ---- + ; RUN: analyze %s -datastructure-gc -dsgc-abort-if-any-collapsed + + %X = internal global { int, short, short } { int 1, short 2, short 3 } + + implementation + + + void %test() { + store short 5, short* getelementptr ({ int, short, short }* %X, long 0, ubyte 1) + ret void + } From lattner at cs.uiuc.edu Tue Jul 1 12:12:04 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 12:12:04 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DSSupport.h Message-ID: <200307011711.MAA11748@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DSSupport.h updated: 1.17 -> 1.18 --- Log message: Fix major problem that was causing all kinds of nasty foldings --- Diffs of the changes: Index: llvm/include/llvm/Analysis/DSSupport.h diff -u llvm/include/llvm/Analysis/DSSupport.h:1.17 llvm/include/llvm/Analysis/DSSupport.h:1.18 --- llvm/include/llvm/Analysis/DSSupport.h:1.17 Sat Jun 21 22:05:45 2003 +++ llvm/include/llvm/Analysis/DSSupport.h Tue Jul 1 12:10:50 2003 @@ -60,6 +60,7 @@ } ~DSNodeHandle() { setNode((DSNode*)0); } DSNodeHandle &operator=(const DSNodeHandle &H) { + if (&H != this) return *this; // Don't set offset to 0 if self assigning. Offset = 0; setNode(H.getNode()); Offset = H.Offset; return *this; } From lattner at cs.uiuc.edu Tue Jul 1 12:16:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 12:16:03 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DSSupport.h Message-ID: <200307011715.MAA12709@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DSSupport.h updated: 1.18 -> 1.19 --- Log message: Ok, I'm a moron. Fixed now --- Diffs of the changes: Index: llvm/include/llvm/Analysis/DSSupport.h diff -u llvm/include/llvm/Analysis/DSSupport.h:1.18 llvm/include/llvm/Analysis/DSSupport.h:1.19 --- llvm/include/llvm/Analysis/DSSupport.h:1.18 Tue Jul 1 12:10:50 2003 +++ llvm/include/llvm/Analysis/DSSupport.h Tue Jul 1 12:15:11 2003 @@ -60,7 +60,7 @@ } ~DSNodeHandle() { setNode((DSNode*)0); } DSNodeHandle &operator=(const DSNodeHandle &H) { - if (&H != this) return *this; // Don't set offset to 0 if self assigning. + if (&H == this) return *this; // Don't set offset to 0 if self assigning. Offset = 0; setNode(H.getNode()); Offset = H.Offset; return *this; } From brukman at cs.uiuc.edu Tue Jul 1 12:26:01 2003 From: brukman at cs.uiuc.edu (Michael Brukman) Date: Tue Jul 1 12:26:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/SingleSource/Shootout/ary3.c Message-ID: <200307011725.MAA02340@trinity.cs.uiuc.edu> Changes in directory llvm/test/Programs/SingleSource/Shootout: ary3.c updated: 1.1 -> 1.2 --- Log message: Made the source look more pleasing to the eye. --- Diffs of the changes: Index: llvm/test/Programs/SingleSource/Shootout/ary3.c diff -u llvm/test/Programs/SingleSource/Shootout/ary3.c:1.1 llvm/test/Programs/SingleSource/Shootout/ary3.c:1.2 --- llvm/test/Programs/SingleSource/Shootout/ary3.c:1.1 Fri Dec 14 10:57:12 2001 +++ llvm/test/Programs/SingleSource/Shootout/ary3.c Tue Jul 1 12:24:53 2003 @@ -1,5 +1,5 @@ /* -*- mode: c -*- - * $Id: ary3.c,v 1.1 2001/12/14 16:57:12 lattner Exp $ + * $Id: ary3.c,v 1.2 2003/07/01 17:24:53 brukman Exp $ * http://www.bagley.org/~doug/shootout/ * * this program is modified from: @@ -14,28 +14,27 @@ #include #include -int -main(int argc, char *argv[]) { - int n = ((argc == 2) ? atoi(argv[1]) : 1); - int i, k, *x, *y; - - x = (int *) calloc(n, sizeof(int)); - y = (int *) calloc(n, sizeof(int)); - - for (i = 0; i < n; i++) { - x[i] = i + 1; - } - for (k=0; k<1000; k++) { - for (i = n-1; i >= 0; i--) { - y[i] += x[i]; - } +int main(int argc, char *argv[]) { + int n = ((argc == 2) ? atoi(argv[1]) : 1); + int i, k, *x, *y; + + x = (int *) calloc(n, sizeof(int)); + y = (int *) calloc(n, sizeof(int)); + + for (i = 0; i < n; i++) { + x[i] = i + 1; + } + + for (k=0; k<1000; k++) { + for (i = n-1; i >= 0; i--) { + y[i] += x[i]; } + } - printf("%d %d\n", y[0], y[n-1]); + printf("%d %d\n", y[0], y[n-1]); - free(x); - free(y); - - return(0); + free(x); + free(y); + + return(0); } - From lattner at cs.uiuc.edu Tue Jul 1 12:45:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 12:45:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/LLVMSource/ Message-ID: <200307011744.MAA14687@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/LLVMSource: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/test/Programs/LLVMSource added to the repository --- Diffs of the changes: From lattner at cs.uiuc.edu Tue Jul 1 12:51:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 12:51:03 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/LLC/2002-02-12-setuw-setsw.llx Message-ID: <200307011750.MAA14721@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/LLC: 2002-02-12-setuw-setsw.llx (r1.1) removed --- Log message: Move to test/programs/LLvmsource --- Diffs of the changes: From lattner at cs.uiuc.edu Tue Jul 1 12:58:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 12:58:02 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/LLVMSource/2002-02-12-setuw-setsw.ll Message-ID: <200307011757.MAA15239@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/LLVMSource: 2002-02-12-setuw-setsw.ll added (r1.1) --- Log message: Moved test --- Diffs of the changes: Index: llvm/test/Programs/LLVMSource/2002-02-12-setuw-setsw.ll diff -c /dev/null llvm/test/Programs/LLVMSource/2002-02-12-setuw-setsw.ll:1.1 *** /dev/null Tue Jul 1 12:57:20 2003 --- llvm/test/Programs/LLVMSource/2002-02-12-setuw-setsw.ll Tue Jul 1 12:57:10 2003 *************** *** 0 **** --- 1,15 ---- + ; The sparc back-end is generating set-unsigned (setuw) for -2, when it + ; should be using setsw. + + implementation + + int %main(int %argc, sbyte * * %argv) { + %T1 = cast int 2 to uint + %tmp = add uint %T1, 4294967294 ; == -2 + %cond = seteq uint %tmp, 0 + br bool %cond, label %Ok, label %Fail + Ok: + ret int 0 + Fail: + ret int 1 + } From lattner at cs.uiuc.edu Tue Jul 1 13:05:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 13:05:02 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/RunSafely.sh Message-ID: <200307011804.NAA16077@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: RunSafely.sh updated: 1.6 -> 1.7 --- Log message: If the program exits with code 0, make a file --- Diffs of the changes: Index: llvm/test/Programs/RunSafely.sh diff -u llvm/test/Programs/RunSafely.sh:1.6 llvm/test/Programs/RunSafely.sh:1.7 --- llvm/test/Programs/RunSafely.sh:1.6 Wed Jun 18 10:41:02 2003 +++ llvm/test/Programs/RunSafely.sh Tue Jul 1 13:04:43 2003 @@ -26,6 +26,11 @@ rm -f core core.* ulimit -c unlimited (time -p $PROGRAM $* 2> $OUTFILE > $OUTFILE < $INFILE) 2> $OUTFILE.time +if test $? -eq 0 +then + touch $OUTFILE.exitok +fi + if ls | egrep "^core" > /dev/null then corefile=`ls core* | head -1` From lattner at cs.uiuc.edu Tue Jul 1 13:13:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 13:13:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/Makefile Message-ID: <200307011812.NAA17397@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: Makefile updated: 1.15 -> 1.16 --- Log message: Rules to run LLVMprograms --- Diffs of the changes: Index: llvm/test/Programs/Makefile diff -u llvm/test/Programs/Makefile:1.15 llvm/test/Programs/Makefile:1.16 --- llvm/test/Programs/Makefile:1.15 Fri Jun 20 18:30:54 2003 +++ llvm/test/Programs/Makefile Tue Jul 1 13:12:20 2003 @@ -6,7 +6,7 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. -PARALLEL_DIRS = SingleSource MultiSource External +PARALLEL_DIRS = LLVMSource SingleSource MultiSource External include ${LEVEL}/test/Makefile.tests From lattner at cs.uiuc.edu Tue Jul 1 13:13:13 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 13:13:13 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/Makefile.programs Message-ID: <200307011812.NAA17389@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: Makefile.programs updated: 1.61 -> 1.62 --- Log message: Rules to run LLVMPROGRAMS --- Diffs of the changes: Index: llvm/test/Programs/Makefile.programs diff -u llvm/test/Programs/Makefile.programs:1.61 llvm/test/Programs/Makefile.programs:1.62 --- llvm/test/Programs/Makefile.programs:1.61 Thu Jun 26 00:28:23 2003 +++ llvm/test/Programs/Makefile.programs Tue Jul 1 13:12:10 2003 @@ -124,6 +124,10 @@ all:: $(GCCOUTPUT) endif +ifdef DISABLE_FOR_LLVM_PROGRAMS +DISABLE_DIFFS := 1 +endif + ifndef DISABLE_LLC ifeq ($(DOTRACING), yes) all:: $(LLCTRACECODEGEN) @@ -172,6 +176,7 @@ Output/%.linked.bc: Output/%.linked.rll $(LGCCAS) $(LGCCAS) $(STATS) $< -o $@ +ifndef DISABLE_FOR_LLVM_PROGRAMS # Rule to produce final program bytecode file from linked, optimized, bytecode. # Link the program to the libraries it uses, then perform postlink # optimization... @@ -181,6 +186,7 @@ $(PROGRAMS_TO_TEST:%=Output/%.llvm): \ Output/%.llvm: Output/%.linked.bc $(LGCCLDPROG) $(LGCCLD) $(STATS) $< -lgcc -lc $(LIBS) crtend.o -o Output/$*.llvm +endif # Rule to get the tracing version of the llvm.bc file for tracing: ifeq ($(DOTRACING), yes) @@ -277,6 +283,9 @@ $(PROGRAMS_TO_TEST:%=Output/%.out-jit): \ Output/%.out-jit: Output/%.llvm.bc $(LLI) -$(RUNSAFELY) $(STDIN_FILENAME) $@ $(LLI) $(JIT_OPTS) $< $(RUN_OPTIONS) +ifdef PROGRAM_REQUIRED_TO_EXIT_OK + @if test \! -f $@.exitok; then echo "TEST: $* FAILED!"; rm -f $@; fi +endif $(PROGRAMS_TO_TEST:%=Output/%.out-llc): \ Output/%.out-llc: Output/%.llc From lattner at cs.uiuc.edu Tue Jul 1 13:13:26 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 13:13:26 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/LLVMSource/Makefile Message-ID: <200307011812.NAA17373@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/LLVMSource: Makefile added (r1.1) --- Log message: Rules for running .ll programs --- Diffs of the changes: Index: llvm/test/Programs/LLVMSource/Makefile diff -c /dev/null llvm/test/Programs/LLVMSource/Makefile:1.1 *** /dev/null Tue Jul 1 13:12:06 2003 --- llvm/test/Programs/LLVMSource/Makefile Tue Jul 1 13:11:55 2003 *************** *** 0 **** --- 1,27 ---- + # test/Programs/LLVMSource/Makefile + # + # This directory contains regression tests for LLVM backends written in LLVM + # assembly language. + # + LEVEL = ../../.. + DISABLE_FOR_LLVM_PROGRAMS := 1 + PROGRAM_REQUIRED_TO_EXIT_OK := 1 + PROGRAMS_TO_TEST := $(basename $(wildcard *.ll)) + include $(LEVEL)/test/Programs/Makefile.programs + + LLVM_SOURCE_BYTECODES := $(PROGRAMS_TO_TEST:%=Output/%.llvm.bc) + + $(LLVM_SOURCE_BYTECODES): \ + Output/%.llvm.bc: %.ll $(LAS) Output/.dir + $(LAS) $< -f -o $@ + + all:: $(CBEOUTPUT) + + ifdef TARGET_HAS_JIT + all:: $(JITOUTPUT) + endif + + ifndef DISABLE_LLC_DIFFS + all:: $(LLCOUTPUT) + endif + From lattner at cs.uiuc.edu Tue Jul 1 13:53:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 13:53:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/GlobalDCE/2003-07-01-SelfReference.ll Message-ID: <200307011852.NAA18545@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/GlobalDCE: 2003-07-01-SelfReference.ll added (r1.1) --- Log message: new testcase --- Diffs of the changes: Index: llvm/test/Regression/Transforms/GlobalDCE/2003-07-01-SelfReference.ll diff -c /dev/null llvm/test/Regression/Transforms/GlobalDCE/2003-07-01-SelfReference.ll:1.1 *** /dev/null Tue Jul 1 13:52:11 2003 --- llvm/test/Regression/Transforms/GlobalDCE/2003-07-01-SelfReference.ll Tue Jul 1 13:52:01 2003 *************** *** 0 **** --- 1,11 ---- + ; distilled from 255.vortex + ; RUN: as < %s | opt -globaldce | dis | not grep testfunc + + implementation + + declare bool()* %getfunc() + internal bool %testfunc() { + %F = call bool()*()* %getfunc() + %c = seteq bool()* %F, %testfunc + ret bool %c + } From criswell at choi.cs.uiuc.edu Tue Jul 1 15:32:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Tue Jul 1 15:32:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LICM/2003-05-02-LoadHoist.ll Message-ID: <200307012031.h61KVuk28701@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LICM: 2003-05-02-LoadHoist.ll updated: 1.1 -> 1.2 --- Log message: Updated the name of the LLVM disassembler so that the test does not fail. --- Diffs of the changes: Index: llvm/test/Regression/Transforms/LICM/2003-05-02-LoadHoist.ll diff -u llvm/test/Regression/Transforms/LICM/2003-05-02-LoadHoist.ll:1.1 llvm/test/Regression/Transforms/LICM/2003-05-02-LoadHoist.ll:1.2 --- llvm/test/Regression/Transforms/LICM/2003-05-02-LoadHoist.ll:1.1 Fri May 2 22:39:35 2003 +++ llvm/test/Regression/Transforms/LICM/2003-05-02-LoadHoist.ll Tue Jul 1 15:31:45 2003 @@ -3,7 +3,7 @@ ; loaded from. Basically if the load gets hoisted, the subtract gets turned ; into a constant zero. ; -; RUN: as < %s | opt -licm -load-vn -gcse -instcombine | llvm-dis | grep load +; RUN: as < %s | opt -licm -load-vn -gcse -instcombine | dis | grep load %X = global int 7 declare void %foo() From lattner at cs.uiuc.edu Tue Jul 1 16:04:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 16:04:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Other/2003-02-19-LoopInfoNestingBug.ll Message-ID: <200307012103.QAA24554@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Other: 2003-02-19-LoopInfoNestingBug.ll updated: 1.1 -> 1.2 --- Log message: Fix testcase failing because of change of output --- Diffs of the changes: Index: llvm/test/Regression/Other/2003-02-19-LoopInfoNestingBug.ll diff -u llvm/test/Regression/Other/2003-02-19-LoopInfoNestingBug.ll:1.1 llvm/test/Regression/Other/2003-02-19-LoopInfoNestingBug.ll:1.2 --- llvm/test/Regression/Other/2003-02-19-LoopInfoNestingBug.ll:1.1 Wed Feb 19 18:09:26 2003 +++ llvm/test/Regression/Other/2003-02-19-LoopInfoNestingBug.ll Tue Jul 1 16:03:30 2003 @@ -2,7 +2,7 @@ ; figure out that loop "Inner" should be nested inside of leep "LoopHeader", ; and instead nests it just inside loop "Top" ; -; RUN: analyze -loops %s | grep ' Loop Containing: label %Inner' +; RUN: analyze -loops %s | grep ' Loop Containing:[ ]*%Inner' ; implementation From lattner at cs.uiuc.edu Tue Jul 1 16:10:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 16:10:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/Expressions.cpp Message-ID: <200307012109.QAA24972@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: Expressions.cpp updated: 1.32 -> 1.33 --- Log message: Fix bug: Regression/Other/2002-03-11-ExprAssertion.ll --- Diffs of the changes: Index: llvm/lib/Analysis/Expressions.cpp diff -u llvm/lib/Analysis/Expressions.cpp:1.32 llvm/lib/Analysis/Expressions.cpp:1.33 --- llvm/lib/Analysis/Expressions.cpp:1.32 Wed Jun 25 12:09:03 2003 +++ llvm/lib/Analysis/Expressions.cpp Tue Jul 1 16:08:52 2003 @@ -317,7 +317,9 @@ if (isa(DestTy)) DestTy = Type::ULongTy; // Pointer types are represented as ulong - if (!Src.getExprType(0)->isLosslesslyConvertibleTo(DestTy)) { + const Type *SrcValTy = Src.getExprType(0); + if (!SrcValTy) return I; + if (!SrcValTy->isLosslesslyConvertibleTo(DestTy)) { if (Src.ExprTy != ExprType::Constant) return I; // Converting cast, and not a constant value... } From lattner at cs.uiuc.edu Tue Jul 1 16:13:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 16:13:01 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DSSupport.h Message-ID: <200307012112.QAA25156@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DSSupport.h updated: 1.19 -> 1.20 --- Log message: Add new operator= impl --- Diffs of the changes: Index: llvm/include/llvm/Analysis/DSSupport.h diff -u llvm/include/llvm/Analysis/DSSupport.h:1.19 llvm/include/llvm/Analysis/DSSupport.h:1.20 --- llvm/include/llvm/Analysis/DSSupport.h:1.19 Tue Jul 1 12:15:11 2003 +++ llvm/include/llvm/Analysis/DSSupport.h Tue Jul 1 16:11:59 2003 @@ -194,6 +194,15 @@ InitNH(CallArgs[i], FromCall.CallArgs[i], NodeMap); } + const DSCallSite &operator=(const DSCallSite &RHS) { + Inst = RHS.Inst; + CalleeF = RHS.CalleeF; + CalleeN = RHS.CalleeN; + RetVal = RHS.RetVal; + CallArgs = RHS.CallArgs; + return *this; + } + /// isDirectCall - Return true if this call site is a direct call of the /// function specified by getCalleeFunc. If not, it is an indirect call to /// the node specified by getCalleeNode. From lattner at cs.uiuc.edu Tue Jul 1 16:13:13 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 16:13:13 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DataStructure.h Message-ID: <200307012112.QAA25151@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DataStructure.h updated: 1.67 -> 1.68 --- Log message: TD pass keeps track of which functions have complete arguments --- Diffs of the changes: Index: llvm/include/llvm/Analysis/DataStructure.h diff -u llvm/include/llvm/Analysis/DataStructure.h:1.67 llvm/include/llvm/Analysis/DataStructure.h:1.68 --- llvm/include/llvm/Analysis/DataStructure.h:1.67 Tue Jul 1 11:27:15 2003 +++ llvm/include/llvm/Analysis/DataStructure.h Tue Jul 1 16:12:10 2003 @@ -133,6 +133,7 @@ class TDDataStructures : public Pass { // DSInfo, one graph for each function hash_map DSInfo; + hash_set ArgsRemainIncomplete; DSGraph *GlobalsGraph; public: ~TDDataStructures() { releaseMyMemory(); } From criswell at cs.uiuc.edu Tue Jul 1 16:57:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue Jul 1 16:57:01 2003 Subject: [llvm-commits] CVS: llvm/www/docs/GettingStarted.html Message-ID: <200307012156.QAA22655@tank.cs.uiuc.edu> Changes in directory llvm/www/docs: GettingStarted.html updated: 1.17 -> 1.18 --- Log message: Fixed a broken hyperlink. Moved commas outside of hyperlinks in the contributors list. --- Diffs of the changes: Index: llvm/www/docs/GettingStarted.html diff -u llvm/www/docs/GettingStarted.html:1.17 llvm/www/docs/GettingStarted.html:1.18 --- llvm/www/docs/GettingStarted.html:1.17 Mon Jun 30 17:20:46 2003 +++ llvm/www/docs/GettingStarted.html Tue Jul 1 16:55:57 2003 @@ -7,8 +7,8 @@

        Getting Started with the LLVM System
        By: Guochun Shi, - Chris Lattner, - John Criswell, and + Chris Lattner, + John Criswell, and Vikram Adve

        @@ -61,7 +61,7 @@ want to get started as quickly as possible.

        The later sections of this guide describe the general layout of the the LLVM source-tree, a general layout of the the LLVM source-tree, a simple example using the LLVM tool chain, and links to find more information about LLVM or to get help via e-mail. From criswell at choi.cs.uiuc.edu Tue Jul 1 17:08:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Tue Jul 1 17:08:01 2003 Subject: [llvm-commits] CVS: llvm/Makefile.config.in configure.ac configure Message-ID: <200307012207.h61M7oc08656@choi.cs.uiuc.edu> Changes in directory llvm: Makefile.config.in updated: 1.5 -> 1.6 configure.ac updated: 1.3 -> 1.4 configure updated: 1.3 -> 1.4 --- Log message: Added the ARCH variable so that some of the Makefiles can perform actions based upon the target hardware architecture (as opposed to always checking the OS). --- Diffs of the changes: Index: llvm/Makefile.config.in diff -u llvm/Makefile.config.in:1.5 llvm/Makefile.config.in:1.6 --- llvm/Makefile.config.in:1.5 Tue Jul 1 10:02:59 2003 +++ llvm/Makefile.config.in Tue Jul 1 17:07:39 2003 @@ -9,6 +9,11 @@ # OS=@OS@ +# +# Target hardware architecture +# +ARCH=@ARCH@ + # Path to the C++ compiler to use. This is an optional setting, which defaults # to whatever your gmake defaults to. # Index: llvm/configure.ac diff -u llvm/configure.ac:1.3 llvm/configure.ac:1.4 --- llvm/configure.ac:1.3 Mon Jun 30 17:16:39 2003 +++ llvm/configure.ac Tue Jul 1 17:07:39 2003 @@ -50,12 +50,24 @@ esac dnl -dnl If we are on a Solaris machine, pretend that it is V9, since that is all -dnl that we support at the moment, and autoconf will only tell us we're a -dnl sparc. +dnl If we are targetting a Sparc machine running Solaris, pretend that it is +dnl V9, since that is all that we support at the moment, and autoconf will only +dnl tell us we're a sparc. dnl case $target in *sparc*solaris*) AC_SUBST(target,[[sparcv9-sun-solaris2.8]]) + ;; +esac + +dnl +dnl Determine what our target architecture is and configure accordingly. +dnl This will allow Makefiles to make a distinction between the hardware and +dnl the OS. +dnl +case $target in + *i*86*) AC_SUBST(ARCH,[x86]) + ;; + *sparc*solaris*) AC_SUBST(ARCH,[Sparc]) ;; esac Index: llvm/configure diff -u llvm/configure:1.3 llvm/configure:1.4 --- llvm/configure:1.3 Mon Jun 30 17:16:39 2003 +++ llvm/configure Tue Jul 1 17:07:39 2003 @@ -1610,6 +1610,15 @@ ;; esac +case $target in + *i*86*) ARCH=x86 + + ;; + *sparc*solaris*) ARCH=Sparc + + ;; +esac + ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' @@ -4296,7 +4305,7 @@ case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4299 "configure"' > conftest.$ac_ext + echo '#line 4308 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4846,7 +4855,7 @@ save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:4849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:4858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && 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 @@ -6677,7 +6686,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/lib/Target/Sparc: SparcInstrSelection.cpp updated: 1.103 -> 1.104 SparcRegInfo.cpp updated: 1.99 -> 1.100 --- Log message: Bug/case fixes: (1) select: Ok to convert a pointer to a float or double. (2) regalloc: Some MachineInstr* for caller-saving code before a call were being inserted before and after the call! (3) Don't insert the caller-saving instructions in the MachineCodeForInstruction for the Call instruction. *All* instructions generated by register allocation need to be recorded in those maps, but it needs to be done uniformly. --- Diffs of the changes: Index: llvm/lib/Target/Sparc/SparcInstrSelection.cpp diff -u llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.103 llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.104 --- llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.103 Sun Jun 22 21:13:57 2003 +++ llvm/lib/Target/Sparc/SparcInstrSelection.cpp Tue Jul 1 20:13:57 2003 @@ -477,14 +477,15 @@ opType == Type::ShortTy || opType == Type::UShortTy || opType == Type::IntTy || opType == Type::UIntTy) opCode = (vopCode == ToFloatTy? V9::FITOS : V9::FITOD); - else if (opType == Type::LongTy || opType == Type::ULongTy) + else if (opType == Type::LongTy || opType == Type::ULongTy || + isa(opType)) opCode = (vopCode == ToFloatTy? V9::FXTOS : V9::FXTOD); else if (opType == Type::FloatTy) opCode = (vopCode == ToFloatTy? V9::INVALID_OPCODE : V9::FSTOD); else if (opType == Type::DoubleTy) opCode = (vopCode == ToFloatTy? V9::FDTOS : V9::INVALID_OPCODE); else - assert(0 && "Cannot convert this type to DOUBLE on SPARC"); + assert(0 && "Trying to convert a non-scalar type to DOUBLE?"); return opCode; } Index: llvm/lib/Target/Sparc/SparcRegInfo.cpp diff -u llvm/lib/Target/Sparc/SparcRegInfo.cpp:1.99 llvm/lib/Target/Sparc/SparcRegInfo.cpp:1.100 --- llvm/lib/Target/Sparc/SparcRegInfo.cpp:1.99 Mon Jun 16 07:03:00 2003 +++ llvm/lib/Target/Sparc/SparcRegInfo.cpp Tue Jul 1 20:13:57 2003 @@ -942,14 +942,23 @@ for(unsigned i=0; i < ReorderedVec.size(); i++) CallAI->InstrnsBefore.push_back( ReorderedVec[i] ); - //Insert machine instructions before and after call into the - //call instructions map --- Anand - const CallInst *callInst = argDesc->getCallInst(); - MachineCodeForInstruction &mvec = MachineCodeForInstruction::get(callInst); - mvec.insert(mvec.begin(), CallAI->InstrnsBefore.begin(), - CallAI->InstrnsBefore.end()); - mvec.insert(mvec.end(), CallAI->InstrnsAfter.begin(), - CallAI->InstrnsAfter.end()); +#ifndef NDEBUG + // Temporary sanity checking code to detect whether the same machine + // instruction is ever inserted twice before/after a call. + // I suspect this is happening but am not sure. --Vikram, 7/1/03. + // + std::set instrsSeen; + for (int i = 0, N = CallAI->InstrnsBefore.size(); i < N; ++i) { + assert(instrsSeen.find(CallAI->InstrnsBefore[i]) == instrsSeen.end() && + "Duplicate machine instruction in InstrnsBefore!"); + instrsSeen.insert(CallAI->InstrnsBefore[i]); + } + for (int i = 0, N = CallAI->InstrnsAfter.size(); i < N; ++i) { + assert(instrsSeen.find(CallAI->InstrnsAfter[i]) == instrsSeen.end() && + "Duplicate machine instruction in InstrnsBefore/After!"); + instrsSeen.insert(CallAI->InstrnsAfter[i]); + } +#endif } //--------------------------------------------------------------------------- @@ -1361,10 +1370,10 @@ int StackOff = PRA.MF.getInfo()->pushTempValue(getSpilledRegSize(RegType)); - std::vector AdIBef, AdIAft; - //---- Insert code for pushing the reg on stack ---------- + std::vector AdIBef, AdIAft; + // We may need a scratch register to copy the saved value // to/from memory. This may itself have to insert code to // free up a scratch register. Any such code should go before @@ -1395,6 +1404,9 @@ //---- Insert code for popping the reg from the stack ---------- + AdIBef.clear(); + AdIAft.clear(); + // We may need a scratch register to copy the saved value // from memory. This may itself have to insert code to // free up a scratch register. Any such code should go From vadve at cs.uiuc.edu Tue Jul 1 20:17:01 2003 From: vadve at cs.uiuc.edu (Vikram Adve) Date: Tue Jul 1 20:17:01 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/InstrSched/SchedGraph.cpp Message-ID: <200307020116.UAA20799@psmith.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/InstrSched: SchedGraph.cpp updated: 1.45 -> 1.46 --- Log message: A def. operand of a machine instruction may be an ordinary Value*, not just an Instruction*, at least in one unfortunate case: the first operand to the va_arg instruction. Modify ValueToDefVecMap to map from Value*, not Instruction*. --- Diffs of the changes: Index: llvm/lib/CodeGen/InstrSched/SchedGraph.cpp diff -u llvm/lib/CodeGen/InstrSched/SchedGraph.cpp:1.45 llvm/lib/CodeGen/InstrSched/SchedGraph.cpp:1.46 --- llvm/lib/CodeGen/InstrSched/SchedGraph.cpp:1.45 Sat May 31 02:37:05 2003 +++ llvm/lib/CodeGen/InstrSched/SchedGraph.cpp Tue Jul 1 20:16:01 2003 @@ -34,9 +34,9 @@ typedef hash_map::const_iterator const_iterator; }; -struct ValueToDefVecMap: public hash_map { - typedef hash_map:: iterator iterator; - typedef hash_map::const_iterator const_iterator; +struct ValueToDefVecMap: public hash_map { + typedef hash_map:: iterator iterator; + typedef hash_map::const_iterator const_iterator; }; // @@ -636,8 +636,7 @@ { case MachineOperand::MO_VirtualRegister: case MachineOperand::MO_CCRegister: - if (const Instruction* srcI = - dyn_cast_or_null(MI.getOperand(i).getVRegValue())) + if (const Value* srcI = MI.getOperand(i).getVRegValue()) { ValueToDefVecMap::const_iterator I = valueToDefVecMap.find(srcI); if (I != valueToDefVecMap.end()) @@ -667,8 +666,7 @@ // for (unsigned i=0, N=MI.getNumImplicitRefs(); i < N; ++i) if (MI.getImplicitOp(i).opIsUse() || MI.getImplicitOp(i).opIsDefAndUse()) - if (const Instruction *srcI = - dyn_cast_or_null(MI.getImplicitRef(i))) + if (const Value* srcI = MI.getImplicitRef(i)) { ValueToDefVecMap::const_iterator I = valueToDefVecMap.find(srcI); if (I != valueToDefVecMap.end()) @@ -738,9 +736,9 @@ assert((mop.getType() == MachineOperand::MO_VirtualRegister || mop.getType() == MachineOperand::MO_CCRegister) && "Do not expect any other kind of operand to be defined!"); + assert(mop.getVRegValue() != NULL && "Null value being defined?"); - const Instruction* defInstr = cast(mop.getVRegValue()); - valueToDefVecMap[defInstr].push_back(std::make_pair(node, i)); + valueToDefVecMap[mop.getVRegValue()].push_back(std::make_pair(node, i)); } // @@ -759,10 +757,11 @@ continue; // nothing more to do } - if (mop.opIsDefOnly() || mop.opIsDefAndUse()) - if (const Instruction* defInstr = - dyn_cast_or_null(minstr.getImplicitRef(i))) - valueToDefVecMap[defInstr].push_back(std::make_pair(node, -i)); + if (mop.opIsDefOnly() || mop.opIsDefAndUse()) { + assert(minstr.getImplicitRef(i) != NULL && "Null value being defined?"); + valueToDefVecMap[minstr.getImplicitRef(i)].push_back(std::make_pair(node, + -i)); + } } } From vadve at cs.uiuc.edu Tue Jul 1 20:24:01 2003 From: vadve at cs.uiuc.edu (Vikram Adve) Date: Tue Jul 1 20:24:01 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/PreOpts/PreSelection.cpp Message-ID: <200307020123.UAA20816@psmith.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/PreOpts: PreSelection.cpp updated: 1.13 -> 1.14 --- Log message: (1) Major bug fix: DecomposeArrayRef() replaces its argument instr. and deletes it, but we were merrily trying to fix the operands of that instruction anyway! Instead, fix the replacement instruction. (2) An Improvement: Check for and extract global values in all operands, not just in known pointer operands. For example, they can occur in call arguments, and probably other unforeseeable places as well. This also eliminates the special-case handling of Load and Store. --- Diffs of the changes: Index: llvm/lib/CodeGen/PreOpts/PreSelection.cpp diff -u llvm/lib/CodeGen/PreOpts/PreSelection.cpp:1.13 llvm/lib/CodeGen/PreOpts/PreSelection.cpp:1.14 --- llvm/lib/CodeGen/PreOpts/PreSelection.cpp:1.13 Thu Jun 5 16:12:56 2003 +++ llvm/lib/CodeGen/PreOpts/PreSelection.cpp Tue Jul 1 20:23:15 2003 @@ -144,10 +144,8 @@ // These methods do the actual work of specializing code void visitInstruction(Instruction &I); // common work for every instr. void visitGetElementPtrInst(GetElementPtrInst &I); - void visitLoadInst(LoadInst &I); void visitCastInst(CastInst &I); void visitCallInst(CallInst &I); - void visitStoreInst(StoreInst &I); // Helper functions for visiting operands of every instruction // @@ -243,9 +241,11 @@ PreSelection::visitOneOperand(Instruction &I, Value* Op, unsigned opNum, Instruction& insertBefore) { + assert(&insertBefore != NULL && "Must have instruction to insert before."); + if (GetElementPtrInst* gep = getGlobalAddr(Op, insertBefore)) { I.setOperand(opNum, gep); // replace global operand - return; + return; // nothing more to do for this op. } Constant* CV = dyn_cast(Op); @@ -322,52 +322,33 @@ void PreSelection::visitGetElementPtrInst(GetElementPtrInst &I) { - // Check for a global and put its address into a register before this instr - if (GetElementPtrInst* gep = getGlobalAddr(I.getPointerOperand(), I)) - I.setOperand(I.getPointerOperandIndex(), gep); // replace pointer operand + Instruction* curI = &I; // Decompose multidimensional array references - DecomposeArrayRef(&I); - - // Perform other transformations common to all instructions - visitInstruction(I); -} - - -// Load instructions: check if pointer is a global -void -PreSelection::visitLoadInst(LoadInst &I) -{ - // Check for a global and put its address into a register before this instr - if (GetElementPtrInst* gep = getGlobalAddr(I.getPointerOperand(), I)) - I.setOperand(I.getPointerOperandIndex(), gep); // replace pointer operand - - // Perform other transformations common to all instructions - visitInstruction(I); -} - - -// Store instructions: check if pointer is a global -void -PreSelection::visitStoreInst(StoreInst &I) -{ - // Check for a global and put its address into a register before this instr - if (GetElementPtrInst* gep = getGlobalAddr(I.getPointerOperand(), I)) - I.setOperand(I.getPointerOperandIndex(), gep); // replace pointer operand + if (I.getNumIndices() >= 2) { + // DecomposeArrayRef() replaces I and deletes it, if successful, + // so remember predecessor in order to find the replacement instruction. + // Also remember the basic block in case there is no predecessor. + Instruction* prevI = I.getPrev(); + BasicBlock* bb = I.getParent(); + if (DecomposeArrayRef(&I)) + // first instr. replacing I + curI = cast(prevI? prevI->getNext() : &bb->front()); + } // Perform other transformations common to all instructions - visitInstruction(I); + visitInstruction(*curI); } // Cast instructions: -// -- check if argument is a global // -- make multi-step casts explicit: // -- float/double to uint32_t: // If target does not have a float-to-unsigned instruction, we // need to convert to uint64_t and then to uint32_t, or we may // overflow the signed int representation for legal uint32_t // values. Expand this without checking target. +// -- other common transformations on operands // void PreSelection::visitCastInst(CastInst &I) @@ -375,16 +356,12 @@ CastInst* castI = NULL; // Check for a global and put its address into a register before this instr - if (GetElementPtrInst* gep = getGlobalAddr(I.getOperand(0), I)) - { - I.setOperand(0, gep); // replace pointer operand - } - else if (I.getType() == Type::UIntTy && - I.getOperand(0)->getType()->isFloatingPoint()) - { // insert a cast-fp-to-long before I, and then replace the operand of I - castI = new CastInst(I.getOperand(0), Type::LongTy, "fp2Long2Uint", &I); - I.setOperand(0, castI); // replace fp operand with long - } + if (I.getType() == Type::UIntTy && + I.getOperand(0)->getType()->isFloatingPoint()) { + // insert a cast-fp-to-long before I, and then replace the operand of I + castI = new CastInst(I.getOperand(0), Type::LongTy, "fp2Long2Uint", &I); + I.setOperand(0, castI); // replace fp operand with long + } // Perform other transformations common to all instructions visitInstruction(I); From vadve at cs.uiuc.edu Tue Jul 1 20:25:00 2003 From: vadve at cs.uiuc.edu (Vikram Adve) Date: Tue Jul 1 20:25:00 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp Message-ID: <200307020124.UAA20831@psmith.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/RegAlloc: PhyRegAlloc.cpp updated: 1.96 -> 1.97 --- Log message: Minor beautification: fold a couple of lines of code. --- Diffs of the changes: Index: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp diff -u llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.96 llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.97 --- llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.96 Sat May 31 02:32:01 2003 +++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp Tue Jul 1 20:24:00 2003 @@ -200,11 +200,10 @@ if (DEBUG_RA >= RA_DEBUG_Interference) cerr << "\n For call inst: " << *MInst; - ValueSet::const_iterator LIt = LVSetAft->begin(); - // for each live var in live variable set after machine inst // - for ( ; LIt != LVSetAft->end(); ++LIt) { + for (ValueSet::const_iterator LIt = LVSetAft->begin(), LEnd = LVSetAft->end(); + LIt != LEnd; ++LIt) { // get the live range corresponding to live var // From vadve at cs.uiuc.edu Tue Jul 1 20:26:01 2003 From: vadve at cs.uiuc.edu (Vikram Adve) Date: Tue Jul 1 20:26:01 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineInstr.h Message-ID: <200307020125.UAA20855@psmith.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineInstr.h updated: 1.104 -> 1.105 --- Log message: Leak fix: delete old objects before reallocation in an assignment operator! --- Diffs of the changes: Index: llvm/include/llvm/CodeGen/MachineInstr.h diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.104 llvm/include/llvm/CodeGen/MachineInstr.h:1.105 --- llvm/include/llvm/CodeGen/MachineInstr.h:1.104 Sat Jun 21 22:06:13 2003 +++ llvm/include/llvm/CodeGen/MachineInstr.h Tue Jul 1 20:25:44 2003 @@ -190,6 +190,8 @@ } const MachineOperand &operator=(const MachineOperand &MO) { + if (isExternalSymbol()) // if old operand had a symbol name, + delete SymbolName; // release old memory immedVal = MO.immedVal; flags = MO.flags; opType = MO.opType; From lattner at cs.uiuc.edu Tue Jul 1 23:35:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 23:35:01 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DSNode.h Message-ID: <200307020434.XAA18916@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DSNode.h updated: 1.28 -> 1.29 --- Log message: Disable the parent graph code when not compiled in DEBUG mode --- Diffs of the changes: Index: llvm/include/llvm/Analysis/DSNode.h diff -u llvm/include/llvm/Analysis/DSNode.h:1.28 llvm/include/llvm/Analysis/DSNode.h:1.29 --- llvm/include/llvm/Analysis/DSNode.h:1.28 Sat Jun 28 16:56:42 2003 +++ llvm/include/llvm/Analysis/DSNode.h Tue Jul 1 23:33:55 2003 @@ -9,6 +9,10 @@ #include "llvm/Analysis/DSSupport.h" +#ifndef NDEBUG +#define INCLUDE_PARENT_GRAPH 1 +#endif + template class DSNodeIterator; // Data structure graph traversal iterator @@ -37,9 +41,11 @@ /// unsigned Size; +#ifdef INCLUDE_PARENT_GRAPH /// ParentGraph - The graph this node is currently embedded into. /// DSGraph *ParentGraph; +#endif /// Ty - Keep track of the current outer most type of this object, in addition /// to whether or not it has been indexed like an array or not. If the @@ -124,9 +130,10 @@ /// return the number of nodes forwarding over the node! unsigned getNumReferrers() const { return NumReferrers; } +#ifdef INCLUDE_PARENT_GRAPH DSGraph *getParentGraph() const { return ParentGraph; } void setParentGraph(DSGraph *G) { ParentGraph = G; } - +#endif /// getForwardNode - This method returns the node that this node is forwarded /// to, if any. From lattner at cs.uiuc.edu Tue Jul 1 23:38:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 23:38:02 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DSGraph.h Message-ID: <200307020437.XAA19262@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DSGraph.h updated: 1.54 -> 1.55 --- Log message: Add new methods --- Diffs of the changes: Index: llvm/include/llvm/Analysis/DSGraph.h diff -u llvm/include/llvm/Analysis/DSGraph.h:1.54 llvm/include/llvm/Analysis/DSGraph.h:1.55 --- llvm/include/llvm/Analysis/DSGraph.h:1.54 Mon Jun 30 00:57:18 2003 +++ llvm/include/llvm/Analysis/DSGraph.h Tue Jul 1 23:37:00 2003 @@ -136,6 +136,12 @@ return I->second; } + const DSNodeHandle &getReturnNodeFor(Function &F) const { + ReturnNodesTy::const_iterator I = ReturnNodes.find(&F); + assert(I != ReturnNodes.end() && "F not in this DSGraph!"); + return I->second; + } + /// getGraphSize - Return the number of nodes in this graph. /// unsigned getGraphSize() const { @@ -217,6 +223,12 @@ /// void mergeInGraph(const DSCallSite &CS, Function &F, const DSGraph &Graph, unsigned CloneFlags); + + + /// getCallSiteForArguments - Get the arguments and return value bindings for + /// the specified function in the current graph. + /// + DSCallSite getCallSiteForArguments(Function &F) const; // Methods for checking to make sure graphs are well formed... void AssertNodeInGraph(const DSNode *N) const { From lattner at cs.uiuc.edu Tue Jul 1 23:39:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 23:39:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200307020438.XAA20108@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.111 -> 1.112 --- Log message: Add support for ParentGraph only when building in debug mode Minor cleanups, reenable folding of call nodes to external functions --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.111 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.112 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.111 Tue Jul 1 11:28:11 2003 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Tue Jul 1 23:38:49 2003 @@ -9,6 +9,7 @@ #include "llvm/iOther.h" #include "llvm/DerivedTypes.h" #include "llvm/Target/TargetData.h" +#include "llvm/Assembly/Writer.h" #include "Support/STLExtras.h" #include "Support/Statistic.h" #include "Support/Timer.h" @@ -50,7 +51,11 @@ //===----------------------------------------------------------------------===// DSNode::DSNode(const Type *T, DSGraph *G) - : NumReferrers(0), Size(0), ParentGraph(G), Ty(Type::VoidTy), NodeType(0) { + : NumReferrers(0), Size(0), +#ifdef INCLUDE_PARENT_GRAPH + ParentGraph(G), +#endif + Ty(Type::VoidTy), NodeType(0) { // Add the type entry if it is specified... if (T) mergeTypeInfo(T, 0); G->getNodes().push_back(this); @@ -58,8 +63,11 @@ // DSNode copy constructor... do not copy over the referrers list! DSNode::DSNode(const DSNode &N, DSGraph *G) - : NumReferrers(0), Size(N.Size), ParentGraph(G), Ty(N.Ty), - Links(N.Links), Globals(N.Globals), NodeType(N.NodeType) { + : NumReferrers(0), Size(N.Size), +#ifdef INCLUDE_PARENT_GRAPH + ParentGraph(G), +#endif + Ty(N.Ty), Links(N.Links), Globals(N.Globals), NodeType(N.NodeType) { G->getNodes().push_back(this); } @@ -112,7 +120,13 @@ ++NumFolds; // Create the node we are going to forward to... - DSNode *DestNode = new DSNode(0, ParentGraph); + DSNode *DestNode = new DSNode(0, +#ifdef INCLUDE_PARENT_GRAPH + ParentGraph +#else + 0 +#endif + ); DestNode->NodeType = NodeType|DSNode::Array; DestNode->Ty = Type::VoidTy; DestNode->Size = 1; @@ -474,9 +488,16 @@ return false; } - DEBUG(std::cerr << "MergeTypeInfo Folding OrigTy: " << Ty - << "\n due to:" << NewTy << " @ " << Offset << "!\n" - << "SubType: " << SubType << "\n\n"); + Module *M = 0; +#ifdef INCLUDE_PARENT_GRAPH + if (getParentGraph()->getReturnNodes().size()) + M = getParentGraph()->getReturnNodes().begin()->first->getParent(); +#endif + DEBUG(std::cerr << "MergeTypeInfo Folding OrigTy: "; + WriteTypeSymbolic(std::cerr, Ty, M) << "\n due to:"; + WriteTypeSymbolic(std::cerr, NewTy, M) << " @ " << Offset << "!\n" + << "SubType: "; + WriteTypeSymbolic(std::cerr, SubType, M) << "\n\n"); if (FoldIfIncompatible) foldNodeCompletely(); return true; @@ -859,6 +880,9 @@ // structure graph. Strip locals and don't copy the list of callers ReturnNodesTy OldRetNodes; cloneInto(Graph, OldValMap, OldRetNodes, OldNodeMap, CloneFlags); + + // We need to map the arguments for the function to the cloned nodes old + // argument values. Do this now. RetVal = OldRetNodes[&F]; ScalarMap = &OldValMap; } else { @@ -891,6 +915,20 @@ } } +/// getCallSiteForArguments - Get the arguments and return value bindings for +/// the specified function in the current graph. +/// +DSCallSite DSGraph::getCallSiteForArguments(Function &F) const { + std::vector Args; + + for (Function::aiterator I = F.abegin(), E = F.aend(); I != E; ++I) + if (isPointerType(I->getType())) + Args.push_back(getScalarMap().find(I)->second); + + return DSCallSite(*(CallInst*)0, getReturnNodeFor(F), &F, Args); +} + + // markIncompleteNodes - Mark the specified node as having contents that are not // known with the current analysis we have performed. Because a node makes all @@ -1023,7 +1061,7 @@ LastCalleeContainsExternalFunction = LastCalleeFunc->isExternal(); } -#if 0 +#if 1 if (LastCalleeContainsExternalFunction || // This should be more than enough context sensitivity! // FIXME: Evaluate how many times this is tripped! @@ -1281,7 +1319,9 @@ if (!(Flags & DSGraph::RemoveUnreachableGlobals) && // Not in TD pass Visited.count(N)) { // Visited but not alive? GlobalsGraph->Nodes.push_back(N); // Move node to globals graph +#ifdef INCLUDE_PARENT_GRAPH N->setParentGraph(GlobalsGraph); +#endif } else { // Otherwise, delete the node assert((!N->isGlobalNode() || (Flags & DSGraph::RemoveUnreachableGlobals)) From lattner at cs.uiuc.edu Tue Jul 1 23:39:13 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 23:39:13 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h Message-ID: <200307020438.XAA19706@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DSCallSiteIterator.h updated: 1.2 -> 1.3 --- Log message: Add some functions to the blacklist --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h diff -u llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h:1.2 llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h:1.3 --- llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h:1.2 Tue Jul 1 11:27:53 2003 +++ llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h Tue Jul 1 23:38:00 2003 @@ -55,7 +55,8 @@ return F->getName() == "printf" || F->getName() == "sscanf" || F->getName() == "fprintf" || F->getName() == "open" || F->getName() == "sprintf" || F->getName() == "fputs" || - F->getName() == "fscanf"; + F->getName() == "fscanf" || F->getName() == "bzero" || + F->getName() == "memset"; } // isCompleteNode - Return true if we know all of the targets of this node, From lattner at cs.uiuc.edu Tue Jul 1 23:39:25 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 23:39:25 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Local.cpp Message-ID: <200307020438.XAA19691@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: Local.cpp updated: 1.57 -> 1.58 --- Log message: Make local pass print out its progress --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/Local.cpp diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.57 llvm/lib/Analysis/DataStructure/Local.cpp:1.58 --- llvm/lib/Analysis/DataStructure/Local.cpp:1.57 Sun Jun 29 23:53:27 2003 +++ llvm/lib/Analysis/DataStructure/Local.cpp Tue Jul 1 23:37:26 2003 @@ -142,6 +142,9 @@ // graph. DSGraph::DSGraph(Function &F, DSGraph *GG) : GlobalsGraph(GG) { PrintAuxCalls = false; + + DEBUG(std::cerr << " [Loc] Calculating graph for: " << F.getName() << "\n"); + // Use the graph builder to construct the local version of the graph GraphBuilder B(F, *this, Nodes, ReturnNodes[&F], ScalarMap, FunctionCalls); #ifndef NDEBUG From lattner at cs.uiuc.edu Tue Jul 1 23:39:37 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 23:39:37 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Message-ID: <200307020438.XAA20097@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: BottomUpClosure.cpp updated: 1.58 -> 1.59 --- Log message: Make the BU closure keep track of which actual calls happen Minor cleanups --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.58 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.59 --- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.58 Tue Jul 1 11:04:18 2003 +++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Tue Jul 1 23:37:48 2003 @@ -173,6 +173,9 @@ } } + // Clean up the graph before we start inlining a bunch again... + SCCGraph->removeTriviallyDeadNodes(); + // Now that we have one big happy family, resolve all of the call sites in // the graph... calculateGraph(*SCCGraph); @@ -232,8 +235,7 @@ // Resolve the current call... Function *Callee = *I; - const DSCallSite &CS = I.getCallSite(); - ActualCallees.insert(std::make_pair(&CS.getCallInst(), Callee)); + DSCallSite CS = I.getCallSite(); if (Callee->isExternal()) { // Ignore this case, simple varargs functions we cannot stub out! @@ -246,6 +248,8 @@ Graph.mergeInGraph(CS, *Callee, Graph, 0); } else { + ActualCallees.insert(std::make_pair(&CS.getCallInst(), Callee)); + // Get the data structure graph for the called function. // DSGraph &GI = getDSGraph(*Callee); // Graph to inline From lattner at cs.uiuc.edu Tue Jul 1 23:40:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 23:40:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Message-ID: <200307020439.XAA20371@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: TopDownClosure.cpp updated: 1.47 -> 1.48 --- Log message: Complete rewrite of td pass --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp diff -u llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.47 llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.48 --- llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.47 Tue Jul 1 11:28:11 2003 +++ llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Tue Jul 1 23:39:44 2003 @@ -16,6 +16,18 @@ namespace { RegisterAnalysis // Register the pass Y("tddatastructure", "Top-down Data Structure Analysis"); + + Statistic<> NumTDInlines("tddatastructures", "Number of graphs inlined"); +} + +/// FunctionHasCompleteArguments - This function returns true if it is safe not +/// to mark arguments to the function complete. +/// +/// FIXME: Need to check if all callers have been found, or rather if a +/// funcpointer escapes! +/// +static bool FunctionHasCompleteArguments(Function &F) { + return F.hasInternalLinkage(); } // run - Calculate the top down data structure graphs for each function in the @@ -25,15 +37,22 @@ BUDataStructures &BU = getAnalysis(); GlobalsGraph = new DSGraph(BU.getGlobalsGraph()); + // Figure out which functions must not mark their arguments complete because + // they are accessible outside this compilation unit. + for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) + if (!FunctionHasCompleteArguments(*I)) + ArgsRemainIncomplete.insert(I); + // Calculate top-down from main... if (Function *F = M.getMainFunction()) calculateGraphFrom(*F); // Next calculate the graphs for each function unreachable function... - for (Module::reverse_iterator I = M.rbegin(), E = M.rend(); I != E; ++I) - if (!I->isExternal() && !DSInfo.count(&*I)) + for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) + if (!I->isExternal() && !DSInfo.count(I)) calculateGraphFrom(*I); + ArgsRemainIncomplete.clear(); return false; } @@ -71,16 +90,6 @@ } -/// FunctionHasCompleteArguments - This function returns true if it is safe not -/// to mark arguments to the function complete. -/// -/// FIXME: Need to check if all callers have been found, or rather if a -/// funcpointer escapes! -/// -static bool FunctionHasCompleteArguments(Function &F) { - return F.hasInternalLinkage(); -} - void TDDataStructures::ComputePostOrder(Function &F,hash_set &Visited, std::vector &PostOrder, const BUDataStructures::ActualCalleesTy &ActualCallees) { @@ -95,7 +104,7 @@ for (unsigned i = 0, e = FunctionCalls.size(); i != e; ++i) { std::pair - IP = ActualCallees.equal_range(&FunctionCalls[i].getCallInst()); + IP = ActualCallees.equal_range(&FunctionCalls[i].getCallInst()); for (BUDataStructures::ActualCalleesTy::const_iterator I = IP.first; I != IP.second; ++I) @@ -127,119 +136,108 @@ void TDDataStructures::inlineGraphIntoCallees(DSGraph &Graph) { // Recompute the Incomplete markers and eliminate unreachable nodes. Graph.maskIncompleteMarkers(); - unsigned Flags = true /* FIXME!! FunctionHasCompleteArguments(F)*/ ? - DSGraph::IgnoreFormalArgs : DSGraph::MarkFormalArgs; + + // If any of the functions has incomplete incoming arguments, don't mark any + // of them as complete. + bool HasIncompleteArgs = false; + const DSGraph::ReturnNodesTy &GraphReturnNodes = Graph.getReturnNodes(); + for (DSGraph::ReturnNodesTy::const_iterator I = GraphReturnNodes.begin(), + E = GraphReturnNodes.end(); I != E; ++I) + if (ArgsRemainIncomplete.count(I->first)) { + HasIncompleteArgs = true; + break; + } + + unsigned Flags + = HasIncompleteArgs ? DSGraph::MarkFormalArgs : DSGraph::IgnoreFormalArgs; Graph.markIncompleteNodes(Flags | DSGraph::IgnoreGlobals); Graph.removeDeadNodes(DSGraph::RemoveUnreachableGlobals); - DSCallSiteIterator CalleeI = DSCallSiteIterator::begin_std(Graph); - DSCallSiteIterator CalleeE = DSCallSiteIterator::end_std(Graph); - - if (CalleeI == CalleeE) { + const std::vector &FunctionCalls = Graph.getFunctionCalls(); + if (FunctionCalls.empty()) { DEBUG(std::cerr << " [TD] No callees for: " << Graph.getFunctionNames() << "\n"); return; } - // Loop over all of the call sites, building a multi-map from Callees to - // DSCallSite*'s. With this map we can then loop over each callee, cloning - // this graph once into it, then resolving arguments. - // - std::multimap, const DSCallSite*> CalleeSites; - for (; CalleeI != CalleeE; ++CalleeI) - if (!(*CalleeI)->isExternal()) { - // We should have already created the graph here... - if (!DSInfo.count(*CalleeI)) - std::cerr << "WARNING: TD pass, did not know about callee: '" - << (*CalleeI)->getName() << "'\n"; - - DSGraph &IG = getOrCreateDSGraph(**CalleeI); - if (&IG != &Graph) - CalleeSites.insert(std::make_pair(std::make_pair(&IG, *CalleeI), - &CalleeI.getCallSite())); - } - // Now that we have information about all of the callees, propagate the // current graph into the callees. // DEBUG(std::cerr << " [TD] Inlining '" << Graph.getFunctionNames() <<"' into " - << CalleeSites.size() << " callees.\n"); + << FunctionCalls.size() << " call nodes.\n"); - // Loop over all the callees... - for (std::multimap, - const DSCallSite*>::iterator I = CalleeSites.begin(), - E = CalleeSites.end(); I != E; ) { - DSGraph &CG = *I->first.first; + const BUDataStructures::ActualCalleesTy &ActualCallees = + getAnalysis().getActualCallees(); - DEBUG(std::cerr << " [TD] Inlining graph into callee graph '" - << CG.getFunctionNames() << "'\n"); - - // Clone our current graph into the callee... - DSGraph::ScalarMapTy OldValMap; - DSGraph::NodeMapTy OldNodeMap; - DSGraph::ReturnNodesTy ReturnNodes; - CG.cloneInto(Graph, OldValMap, ReturnNodes, OldNodeMap, - DSGraph::StripModRefBits | - DSGraph::KeepAllocaBit | DSGraph::DontCloneCallNodes | - DSGraph::DontCloneAuxCallNodes); - OldValMap.clear(); // We don't care about the ValMap - ReturnNodes.clear(); // We don't care about return values either + // Only inline this function into each real callee once. After that, just + // merge information into arguments... + hash_map InlinedSites; + + // Loop over all the callees... cloning this graph into each one exactly once, + // keeping track of the node mapping information... + for (unsigned i = 0, e = FunctionCalls.size(); i != e; ++i) { + // Inline this graph into each function in the invoked function list. + std::pair + IP = ActualCallees.equal_range(&FunctionCalls[i].getCallInst()); + + int NumArgs = 0; + if (IP.first != IP.second) { + NumArgs = IP.first->second->getFunctionType()->getNumParams(); + for (BUDataStructures::ActualCalleesTy::const_iterator I = IP.first; + I != IP.second; ++I) + if (NumArgs != (int)I->second->getFunctionType()->getNumParams()) { + NumArgs = -1; + break; + } + } - // Loop over all of the invocation sites of the callee, resolving - // arguments to our graph. This loop may iterate multiple times if the - // current function calls this callee multiple times with different - // signatures. - // - for (; I != E && I->first.first == &CG; ++I) { - Function &Callee = *I->first.second; - DEBUG(std::cerr << "\t [TD] Merging args for callee '" - << Callee.getName() << "'\n"); - - // Map call site into callee graph - DSCallSite NewCS(*I->second, OldNodeMap); - - // Resolve the return values... - NewCS.getRetVal().mergeWith(CG.getReturnNodeFor(Callee)); - - // Resolve all of the arguments... - Function::aiterator AI = Callee.abegin(); - for (unsigned i = 0, e = NewCS.getNumPtrArgs(); - i != e && AI != Callee.aend(); ++i, ++AI) { - // Advance the argument iterator to the first pointer argument... - while (AI != Callee.aend() && !DS::isPointerType(AI->getType())) - ++AI; - if (AI == Callee.aend()) break; - - // Add the link from the argument scalar to the provided value - DSNodeHandle &NH = CG.getNodeForValue(AI); - assert(NH.getNode() && "Pointer argument without scalarmap entry?"); - NH.mergeWith(NewCS.getPtrArg(i)); + if (NumArgs == -1) { + std::cerr << "ERROR: NONSAME NUMBER OF ARGUMENTS TO CALLEES\n"; + } + + for (BUDataStructures::ActualCalleesTy::const_iterator I = IP.first; + I != IP.second; ++I) { + DSGraph &CG = getDSGraph(*I->second); + assert(&CG != &Graph && "TD need not inline graph into self!"); + + if (!InlinedSites.count(&CG)) { // If we haven't already inlined into CG + DEBUG(std::cerr << " [TD] Inlining graph into callee graph '" + << CG.getFunctionNames() << "': " << I->second->getFunctionType()->getNumParams() << " args\n"); + DSGraph::ScalarMapTy OldScalarMap; + DSGraph::ReturnNodesTy ReturnNodes; + CG.cloneInto(Graph, OldScalarMap, ReturnNodes, InlinedSites[&CG], + DSGraph::StripModRefBits | DSGraph::KeepAllocaBit | + DSGraph::DontCloneCallNodes | + DSGraph::DontCloneAuxCallNodes); + ++NumTDInlines; } } + } - // Done with the nodemap... - OldNodeMap.clear(); - - // Recompute the Incomplete markers and eliminate unreachable nodes. - CG.removeTriviallyDeadNodes(); - //CG.maskIncompleteMarkers(); - //CG.markIncompleteNodes(DSGraph::MarkFormalArgs | DSGraph::IgnoreGlobals); - //CG.removeDeadNodes(DSGraph::RemoveUnreachableGlobals); + // Loop over all the callees... + for (unsigned i = 0, e = FunctionCalls.size(); i != e; ++i) { + // Inline this graph into each function in the invoked function list. + std::pair + IP = ActualCallees.equal_range(&FunctionCalls[i].getCallInst()); + for (BUDataStructures::ActualCalleesTy::const_iterator I = IP.first; + I != IP.second; ++I) { + DSGraph &CG = getDSGraph(*I->second); + DEBUG(std::cerr << " [TD] Resolving arguments for callee graph '" + << CG.getFunctionNames() << "'\n"); + + // Transform our call site information into the cloned version for CG + DSCallSite CS(FunctionCalls[i], InlinedSites[&CG]); + + // Get the arguments bindings for the called function in CG... and merge + // them with the cloned graph. + CG.getCallSiteForArguments(*I->second).mergeWith(CS); + } } DEBUG(std::cerr << " [TD] Done inlining into callees for: " << Graph.getFunctionNames() << " [" << Graph.getGraphSize() << "+" << Graph.getFunctionCalls().size() << "]\n"); - -#if 0 - // Loop over all the callees... making sure they are all resolved now... - Function *LastFunc = 0; - for (std::multimap::iterator - I = CalleeSites.begin(), E = CalleeSites.end(); I != E; ++I) - if (I->first != LastFunc) { // Only visit each callee once... - LastFunc = I->first; - calculateGraph(*I->first); - } -#endif } From lattner at cs.uiuc.edu Tue Jul 1 23:40:13 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 23:40:13 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Printer.cpp Message-ID: <200307020439.XAA20211@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: Printer.cpp updated: 1.56 -> 1.57 --- Log message: Print collapsed to match the paper --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/Printer.cpp diff -u llvm/lib/Analysis/DataStructure/Printer.cpp:1.56 llvm/lib/Analysis/DataStructure/Printer.cpp:1.57 --- llvm/lib/Analysis/DataStructure/Printer.cpp:1.56 Tue Jul 1 11:27:32 2003 +++ llvm/lib/Analysis/DataStructure/Printer.cpp Tue Jul 1 23:39:27 2003 @@ -36,7 +36,7 @@ M = G->getReturnNodes().begin()->first->getParent(); if (N->isNodeCompletelyFolded()) - OS << "FOLDED"; + OS << "COLLAPSED"; else { WriteTypeSymbolic(OS, N->getType(), M); if (N->isArray()) From lattner at cs.uiuc.edu Tue Jul 1 23:40:26 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jul 1 23:40:26 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructureAA.cpp Message-ID: <200307020439.XAA20357@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructureAA.cpp updated: 1.7 -> 1.8 --- Log message: Reduce amount of work we do calculating mustaliases if the arg is a global --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/DataStructureAA.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.7 llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.8 --- llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.7 Sat Jun 28 19:54:08 2003 +++ llvm/lib/Analysis/DataStructure/DataStructureAA.cpp Tue Jul 1 23:39:13 2003 @@ -146,17 +146,22 @@ /// specified vector. /// void DSAA::getMustAliases(Value *P, std::vector &RetVals) { - DSGraph *G = getGraphForValue(P); - if (!G) G = &TD->getGlobalsGraph(); - - // The only must alias information we can currently determine occurs when the - // node for P is a global node with only one entry. - const DSGraph::ScalarMapTy &GSM = G->getScalarMap(); - DSGraph::ScalarMapTy::const_iterator I = GSM.find(P); - if (I != GSM.end()) { - DSNode *N = I->second.getNode(); - if (isSinglePhysicalObject(N)) - RetVals.push_back(N->getGlobals()[0]); + // Currently the only must alias information we can provide is to say that + // something is equal to a global value. If we already have a global value, + // don't get worked up about it. + if (!isa(P)) { + DSGraph *G = getGraphForValue(P); + if (!G) G = &TD->getGlobalsGraph(); + + // The only must alias information we can currently determine occurs when + // the node for P is a global node with only one entry. + const DSGraph::ScalarMapTy &GSM = G->getScalarMap(); + DSGraph::ScalarMapTy::const_iterator I = GSM.find(P); + if (I != GSM.end()) { + DSNode *N = I->second.getNode(); + if (N->isComplete() && isSinglePhysicalObject(N)) + RetVals.push_back(N->getGlobals()[0]); + } } return getAnalysis().getMustAliases(P, RetVals); From lattner at cs.uiuc.edu Wed Jul 2 00:01:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jul 2 00:01:01 2003 Subject: [llvm-commits] CVS: llvm/samples/README sample.tar Message-ID: <200307020500.AAA01857@apoc.cs.uiuc.edu> Changes in directory llvm/samples: README (r1.2) removed sample.tar (r1.2) removed --- Log message: Remove sample project: it gets moved to the project dir --- Diffs of the changes: From lattner at cs.uiuc.edu Wed Jul 2 01:07:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jul 2 01:07:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Local.cpp Message-ID: <200307020606.BAA02707@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: Local.cpp updated: 1.58 -> 1.59 --- Log message: Remove dead Nodes list --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/Local.cpp diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.58 llvm/lib/Analysis/DataStructure/Local.cpp:1.59 --- llvm/lib/Analysis/DataStructure/Local.cpp:1.58 Tue Jul 1 23:37:26 2003 +++ llvm/lib/Analysis/DataStructure/Local.cpp Wed Jul 2 01:06:34 2003 @@ -64,16 +64,14 @@ class GraphBuilder : InstVisitor { Function &F; DSGraph &G; - std::vector &Nodes; DSNodeHandle &RetNode; // Node that gets returned... DSGraph::ScalarMapTy &ScalarMap; std::vector &FunctionCalls; public: - GraphBuilder(Function &f, DSGraph &g, std::vector &nodes, - DSNodeHandle &retNode, DSGraph::ScalarMapTy &SM, - std::vector &fc) - : F(f), G(g), Nodes(nodes), RetNode(retNode), ScalarMap(SM), + GraphBuilder(Function &f, DSGraph &g, DSNodeHandle &retNode, + DSGraph::ScalarMapTy &SM, std::vector &fc) + : F(f), G(g), RetNode(retNode), ScalarMap(SM), FunctionCalls(fc) { // Create scalar nodes for all pointer arguments... @@ -146,7 +144,7 @@ DEBUG(std::cerr << " [Loc] Calculating graph for: " << F.getName() << "\n"); // Use the graph builder to construct the local version of the graph - GraphBuilder B(F, *this, Nodes, ReturnNodes[&F], ScalarMap, FunctionCalls); + GraphBuilder B(F, *this, ReturnNodes[&F], ScalarMap, FunctionCalls); #ifndef NDEBUG Timer::addPeakMemoryMeasurement(); #endif From vadve at cs.uiuc.edu Wed Jul 2 02:00:02 2003 From: vadve at cs.uiuc.edu (Vikram Adve) Date: Wed Jul 2 02:00:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/SparcInstrSelection.cpp Message-ID: <200307020659.BAA24315@psmith.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: SparcInstrSelection.cpp updated: 1.104 -> 1.105 --- Log message: Force fixed-size but large alloca objects to the dynamically allocated area to avoid using up precious stack space within the 4095 offset limit from %fp. Such objects that would themselves live at a large offset were being put there already so this is a simple change. --- Diffs of the changes: Index: llvm/lib/Target/Sparc/SparcInstrSelection.cpp diff -u llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.104 llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.105 --- llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.104 Tue Jul 1 20:13:57 2003 +++ llvm/lib/Target/Sparc/SparcInstrSelection.cpp Wed Jul 2 01:59:22 2003 @@ -1109,15 +1109,21 @@ Function *F = result->getParent()->getParent(); MachineFunction &mcInfo = MachineFunction::get(F); - // Check if the offset would small enough to use as an immediate in - // load/stores (check LDX because all load/stores have the same-size immediate - // field). If not, put the variable in the dynamically sized area of the - // frame. - unsigned paddedSizeIgnored; + // Put the variable in the dynamically sized area of the frame if either: + // (a) The offset is too large to use as an immediate in load/stores + // (check LDX because all load/stores have the same-size immed. field). + // (b) The object is "large", so it could cause many other locals, + // spills, and temporaries to have large offsets. + // NOTE: We use LARGE = 8 * argSlotSize = 64 bytes. + // You've gotta love having only 13 bits for constant offset values :-|. + // + unsigned paddedSize; int offsetFromFP = mcInfo.getInfo()->computeOffsetforLocalVar(result, - paddedSizeIgnored, - tsize * numElements); - if (! target.getInstrInfo().constantFitsInImmedField(V9::LDXi,offsetFromFP)) { + paddedSize, + tsize * numElements); + + if (((int)paddedSize) > 8 * target.getFrameInfo().getSizeOfEachArgOnStack() || + ! target.getInstrInfo().constantFitsInImmedField(V9::LDXi,offsetFromFP)) { CreateCodeForVariableSizeAlloca(target, result, tsize, ConstantSInt::get(Type::IntTy,numElements), getMvec); From lattner at cs.uiuc.edu Wed Jul 2 09:50:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jul 2 09:50:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/Makefile Message-ID: <200307021449.JAA17669@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: Makefile updated: 1.16 -> 1.17 --- Log message: LLVMSource programs don't interact well with the nightly tester. Disable them until I get back --- Diffs of the changes: Index: llvm/test/Programs/Makefile diff -u llvm/test/Programs/Makefile:1.16 llvm/test/Programs/Makefile:1.17 --- llvm/test/Programs/Makefile:1.16 Tue Jul 1 13:12:20 2003 +++ llvm/test/Programs/Makefile Wed Jul 2 09:48:55 2003 @@ -6,7 +6,8 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. -PARALLEL_DIRS = LLVMSource SingleSource MultiSource External +PARALLEL_DIRS = SingleSource MultiSource External +#LLVMSource include ${LEVEL}/test/Makefile.tests From vadve at cs.uiuc.edu Wed Jul 2 10:44:01 2003 From: vadve at cs.uiuc.edu (Vikram Adve) Date: Wed Jul 2 10:44:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/Makefile.programs Message-ID: <200307021543.KAA20643@tank.cs.uiuc.edu> Changes in directory llvm/test/Programs: Makefile.programs updated: 1.62 -> 1.63 --- Log message: Use a longer RUNTIMELIMIT on Sparcs... like about 8x longer. --- Diffs of the changes: Index: llvm/test/Programs/Makefile.programs diff -u llvm/test/Programs/Makefile.programs:1.62 llvm/test/Programs/Makefile.programs:1.63 --- llvm/test/Programs/Makefile.programs:1.62 Tue Jul 1 13:12:10 2003 +++ llvm/test/Programs/Makefile.programs Wed Jul 2 10:43:41 2003 @@ -62,7 +62,11 @@ # timeout. This is overridable on the commandline or in tests makefiles. # ifndef RUNTIMELIMIT -RUNTIMELIMIT := 40 + ifeq ($(ARCH),Sparc) + RUNTIMELIMIT := 300 + else + RUNTIMELIMIT := 40 + endif endif # RUNSAFELY - This program simply runs another program. If the program works From criswell at choi.cs.uiuc.edu Wed Jul 2 11:54:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Wed Jul 2 11:54:01 2003 Subject: [llvm-commits] CVS: llvm/Makefile.config.in Message-ID: <200307021653.h62Grsg21935@choi.cs.uiuc.edu> Changes in directory llvm: Makefile.config.in updated: 1.6 -> 1.7 --- Log message: Removed the CPPFLAGS and CFLAGS variables since the -DHAVE_CONFIG_H messes up the test suite. Since all the LLVM software assumes that config.h exists, we can just do away with it for now. --- Diffs of the changes: Index: llvm/Makefile.config.in diff -u llvm/Makefile.config.in:1.6 llvm/Makefile.config.in:1.7 --- llvm/Makefile.config.in:1.6 Tue Jul 1 17:07:39 2003 +++ llvm/Makefile.config.in Wed Jul 2 11:53:44 2003 @@ -31,8 +31,13 @@ # # Compilation flags for the C and C++ compilers. # -CPPFLAGS+=@DEFS@ -CCFLAGS+=@DEFS@ + +# +# Removing the compiler flags for now. They interfere with the test suite +# (which has its own autoconf stuff), and we don't use -DHAVE_CONFIG_H anyway. +# +#CPPFLAGS+=@DEFS@ +#CCFLAGS+=@DEFS@ LDFLAGS+=@LDFLAGS@ # From brukman at cs.uiuc.edu Wed Jul 2 12:54:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Jul 2 12:54:02 2003 Subject: [llvm-commits] CVS: llvm/tools/lli/JIT/JIT.cpp Makefile Message-ID: <200307021753.MAA09606@zion.cs.uiuc.edu> Changes in directory llvm/tools/lli/JIT: JIT.cpp updated: 1.10 -> 1.11 Makefile updated: 1.1 -> 1.2 --- Log message: * If compiling on X86 or Sparc, automagically enable the JIT for that arch * Setting ENABLE_X86_JIT or ENABLE_SPARC_JIT on the `make' command-line will force the inclusion of that JIT on a different architecture * If neither JIT is enabled (e.g., compiling on a different architecture), the -march option will not be available to LLI. * As a side effect of the $ARCH variable, the Sparc LLI can now link just a bit faster by not including the x86 library. --- Diffs of the changes: Index: llvm/tools/lli/JIT/JIT.cpp diff -u llvm/tools/lli/JIT/JIT.cpp:1.10 llvm/tools/lli/JIT/JIT.cpp:1.11 --- llvm/tools/lli/JIT/JIT.cpp:1.10 Tue Jun 17 10:54:02 2003 +++ llvm/tools/lli/JIT/JIT.cpp Wed Jul 2 12:53:19 2003 @@ -14,24 +14,31 @@ // FIXME: REMOVE THIS #include "llvm/PassManager.h" +#if !defined(ENABLE_X86_JIT) && !defined(ENABLE_SPARC_JIT) +#define NO_JITS_ENABLED +#endif + namespace { - enum ArchName { nojit, x86, Sparc }; + enum ArchName { x86, Sparc }; +#ifndef NO_JITS_ENABLED cl::opt Arch("march", cl::desc("Architecture to JIT to:"), cl::Prefix, - cl::values(clEnumVal(x86, " IA-32 (pentium and above)"), -#if defined(sparc) || defined(__sparc__) || defined(__sparcv9) + cl::values( +#ifdef ENABLE_X86_JIT + clEnumVal(x86, " IA-32 (Pentium and above)"), +#endif +#ifdef ENABLE_SPARC_JIT clEnumValN(Sparc, "sparc", " Sparc-V9"), #endif 0), -#if defined(i386) || defined(__i386__) || defined(__x86__) +#if defined(ENABLE_X86_JIT) cl::init(x86) -#elif defined(sparc) || defined(__sparc__) || defined(__sparcv9) +#elif defined(ENABLE_SPARC_JIT) cl::init(Sparc) -#else - cl::init(nojit) #endif ); +#endif /* NO_JITS_ENABLED */ } /// createJIT - Create an return a new JIT compiler if there is one available @@ -43,20 +50,24 @@ // Allow a command-line switch to override what *should* be the default target // machine for this platform. This allows for debugging a Sparc JIT on X86 -- - // our X86 machines are much faster at recompiling LLVM and linking lli. + // our X86 machines are much faster at recompiling LLVM and linking LLI. +#ifdef NO_JITS_ENABLED + return 0; +#endif + switch (Arch) { +#ifdef ENABLE_X86_JIT case x86: TargetMachineAllocator = allocateX86TargetMachine; break; -#if defined(sparc) || defined(__sparc__) || defined(__sparcv9) +#endif +#ifdef ENABLE_SPARC_JIT case Sparc: TargetMachineAllocator = allocateSparcTargetMachine; break; #endif default: assert(0 && "-march flag not supported on this host!"); - case nojit: - return 0; } // Allocate a target... @@ -75,7 +86,7 @@ setupPassManager(); -#if defined(sparc) || defined(__sparc__) || defined(__sparcv9) +#ifdef ENABLE_SPARC_JIT // THIS GOES BEYOND UGLY HACKS if (TM.getName() == "UltraSparc-Native") { extern Pass *createPreSelectionPass(TargetMachine &TM); Index: llvm/tools/lli/JIT/Makefile diff -u llvm/tools/lli/JIT/Makefile:1.1 llvm/tools/lli/JIT/Makefile:1.2 --- llvm/tools/lli/JIT/Makefile:1.1 Mon Dec 23 18:01:05 2002 +++ llvm/tools/lli/JIT/Makefile Wed Jul 2 12:53:19 2003 @@ -1,4 +1,29 @@ LEVEL = ../../.. LIBRARYNAME = lli-jit +# Get the $(ARCH) setting +include $(LEVEL)/Makefile.config + +# Enable the X86 JIT if compiling on X86 +ifeq ($(ARCH), x86) + ENABLE_X86_JIT = 1 +endif + +# This flag can also be used on the command line to force inclusion +# of the X86 JIT on non-X86 hosts +ifdef ENABLE_X86_JIT + CPPFLAGS += -DENABLE_X86_JIT +endif + +# Enable the X86 JIT if compiling on X86 +ifeq ($(ARCH), Sparc) + ENABLE_SPARC_JIT = 1 +endif + +# This flag can also be used on the command line to force inclusion +# of the Sparc JIT on non-Sparc hosts +ifdef ENABLE_SPARC_JIT + CPPFLAGS += -DENABLE_SPARC_JIT +endif + include $(LEVEL)/Makefile.common From brukman at cs.uiuc.edu Wed Jul 2 12:54:14 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Jul 2 12:54:14 2003 Subject: [llvm-commits] CVS: llvm/tools/lli/Makefile Message-ID: <200307021753.MAA09593@zion.cs.uiuc.edu> Changes in directory llvm/tools/lli: Makefile updated: 1.32 -> 1.33 --- Log message: * If compiling on X86 or Sparc, automagically enable the JIT for that arch * Setting ENABLE_X86_JIT or ENABLE_SPARC_JIT on the `make' command-line will force the inclusion of that JIT on a different architecture * If neither JIT is enabled (e.g., compiling on a different architecture), the -march option will not be available to LLI. * As a side effect of the $ARCH variable, the Sparc LLI can now link just a bit faster by not including the x86 library. --- Diffs of the changes: Index: llvm/tools/lli/Makefile diff -u llvm/tools/lli/Makefile:1.32 llvm/tools/lli/Makefile:1.33 --- llvm/tools/lli/Makefile:1.32 Mon Jun 30 16:59:00 2003 +++ llvm/tools/lli/Makefile Wed Jul 2 12:53:14 2003 @@ -2,25 +2,41 @@ TOOLNAME = lli PARALLEL_DIRS = Interpreter JIT -# Get the config name... +# Get the $(ARCH) setting include $(LEVEL)/Makefile.config # Generic JIT libraries JITLIBS = lli-jit codegen ARCHLIBS = -# What the X86 JIT requires -JITLIBS += x86 -# X86 doesn't require any ARCHLIBS +# 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 + CPPFLAGS += -DENABLE_X86_JIT + JITLIBS += x86 + # X86 doesn't require any ARCHLIBS +endif +# You can enable the Sparc JIT on a non-Sparc host by setting the flag +# ENABLE_SPARC_JIT on the make command line. If not, it will still be +# enabled automagically on an Sparc host. +ifeq ($(ARCH), Sparc) + ENABLE_SPARC_JIT = 1 +endif # What the Sparc JIT requires -ifeq ($(ARCH),Sparc) -JITLIBS += sparc -ARCHLIBS = sched livevar instrument.a profpaths \ - bcwriter transforms.a ipo.a ipa.a datastructure.a regalloc \ - mapping select postopts.a preopts +ifdef ENABLE_SPARC_JIT + CPPFLAGS += -DENABLE_SPARC_JIT + JITLIBS += sparc + ARCHLIBS += sched livevar instrument.a profpaths \ + bcwriter transforms.a ipo.a ipa.a datastructure.a regalloc \ + mapping select postopts.a preopts endif USEDLIBS = lli-interpreter $(JITLIBS) $(ARCHLIBS) scalaropts analysis.a \ From brukman at cs.uiuc.edu Wed Jul 2 13:05:17 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Jul 2 13:05:17 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/SparcV9.td Message-ID: <200307021803.NAA12079@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: SparcV9.td updated: 1.21 -> 1.22 --- Log message: Fixed instruction syntax in the comments (specifies how instr is used). --- Diffs of the changes: Index: llvm/lib/Target/Sparc/SparcV9.td diff -u llvm/lib/Target/Sparc/SparcV9.td:1.21 llvm/lib/Target/Sparc/SparcV9.td:1.22 --- llvm/lib/Target/Sparc/SparcV9.td:1.21 Fri Jun 20 18:14:50 2003 +++ llvm/lib/Target/Sparc/SparcV9.td Wed Jul 2 13:02:58 2003 @@ -42,7 +42,7 @@ def ADDCccr : F3_1<2, 0b011000, "addCcc">; // addCcc r, r, r def ADDCcci : F3_2<2, 0b011000, "addCcc">; // addCcc r, i, r -// Section A.3: Branch on Integer Register with Prediction - p162 +// Section A.3: Branch on Integer Register with Prediction - p138 set op2 = 0b011 in { def BRZ : F2_4<0b001, "brz">; // Branch on rs1 == 0 def BRLEZ : F2_4<0b010, "brlez">; // Branch on rs1 <= 0 @@ -524,94 +524,94 @@ // Section A.35: Move Integer Register on Condition (MOVcc) - p194 // For integer condition codes -def MOVAr : F4_3<2, 0b101100, 0b1000, "mova">; // mova i/xcc, rs2, rd -def MOVAi : F4_4<2, 0b101100, 0b1000, "mova">; // mova i/xcc, rs2, rd -def MOVNr : F4_3<2, 0b101100, 0b0000, "movn">; // mova i/xcc, rs2, rd -def MOVNi : F4_4<2, 0b101100, 0b0000, "movn">; // mova i/xcc, rs2, rd -def MOVNEr : F4_3<2, 0b101100, 0b1001, "movne">; // mova i/xcc, rs2, rd -def MOVNEi : F4_4<2, 0b101100, 0b1001, "movne">; // mova i/xcc, rs2, rd -def MOVEr : F4_3<2, 0b101100, 0b0001, "move">; // mova i/xcc, rs2, rd -def MOVEi : F4_4<2, 0b101100, 0b0001, "move">; // mova i/xcc, rs2, rd -def MOVGr : F4_3<2, 0b101100, 0b1010, "movg">; // mova i/xcc, rs2, rd -def MOVGi : F4_4<2, 0b101100, 0b1010, "movg">; // mova i/xcc, rs2, rd -def MOVLEr : F4_3<2, 0b101100, 0b0010, "movle">; // mova i/xcc, rs2, rd -def MOVLEi : F4_4<2, 0b101100, 0b0010, "movle">; // mova i/xcc, rs2, rd -def MOVGEr : F4_3<2, 0b101100, 0b1011, "movge">; // mova i/xcc, rs2, rd -def MOVGEi : F4_4<2, 0b101100, 0b1011, "movge">; // mova i/xcc, rs2, rd -def MOVLr : F4_3<2, 0b101100, 0b0011, "movl">; // mova i/xcc, rs2, rd -def MOVLi : F4_4<2, 0b101100, 0b0011, "movl">; // mova i/xcc, rs2, rd -def MOVGUr : F4_3<2, 0b101100, 0b1100, "movgu">; // mova i/xcc, rs2, rd -def MOVGUi : F4_4<2, 0b101100, 0b1100, "movgu">; // mova i/xcc, rs2, rd -def MOVLEUr : F4_3<2, 0b101100, 0b0100, "movleu">; // mova i/xcc, rs2, rd -def MOVLEUi : F4_4<2, 0b101100, 0b0100, "movleu">; // mova i/xcc, rs2, rd -def MOVCCr : F4_3<2, 0b101100, 0b1101, "movcc">; // mova i/xcc, rs2, rd -def MOVCCi : F4_4<2, 0b101100, 0b1101, "movcc">; // mova i/xcc, rs2, rd -def MOVCSr : F4_3<2, 0b101100, 0b0101, "movcs">; // mova i/xcc, rs2, rd -def MOVCSi : F4_4<2, 0b101100, 0b0101, "movcs">; // mova i/xcc, rs2, rd -def MOVPOSr : F4_3<2, 0b101100, 0b1110, "movpos">; // mova i/xcc, rs2, rd -def MOVPOSi : F4_4<2, 0b101100, 0b1110, "movpos">; // mova i/xcc, rs2, rd -def MOVNEGr : F4_3<2, 0b101100, 0b0110, "movneg">; // mova i/xcc, rs2, rd -def MOVNEGi : F4_4<2, 0b101100, 0b0110, "movneg">; // mova i/xcc, rs2, rd -def MOVVCr : F4_3<2, 0b101100, 0b1111, "movvc">; // mova i/xcc, rs2, rd -def MOVVCi : F4_4<2, 0b101100, 0b1111, "movvc">; // mova i/xcc, rs2, rd -def MOVVSr : F4_3<2, 0b101100, 0b0111, "movvs">; // mova i/xcc, rs2, rd -def MOVVSi : F4_4<2, 0b101100, 0b0111, "movvs">; // mova i/xcc, rs2, rd +def MOVAr : F4_3<2, 0b101100, 0b1000, "mova">; // mova i/xcc, rs2, rd +def MOVAi : F4_4<2, 0b101100, 0b1000, "mova">; // mova i/xcc, rs2, rd +def MOVNr : F4_3<2, 0b101100, 0b0000, "movn">; // movn i/xcc, rs2, rd +def MOVNi : F4_4<2, 0b101100, 0b0000, "movn">; // movn i/xcc, rs2, rd +def MOVNEr : F4_3<2, 0b101100, 0b1001, "movne">; // movne i/xcc, rs2, rd +def MOVNEi : F4_4<2, 0b101100, 0b1001, "movne">; // movne i/xcc, rs2, rd +def MOVEr : F4_3<2, 0b101100, 0b0001, "move">; // move i/xcc, rs2, rd +def MOVEi : F4_4<2, 0b101100, 0b0001, "move">; // move i/xcc, rs2, rd +def MOVGr : F4_3<2, 0b101100, 0b1010, "movg">; // movg i/xcc, rs2, rd +def MOVGi : F4_4<2, 0b101100, 0b1010, "movg">; // movg i/xcc, rs2, rd +def MOVLEr : F4_3<2, 0b101100, 0b0010, "movle">; // movle i/xcc, rs2, rd +def MOVLEi : F4_4<2, 0b101100, 0b0010, "movle">; // movle i/xcc, rs2, rd +def MOVGEr : F4_3<2, 0b101100, 0b1011, "movge">; // movge i/xcc, rs2, rd +def MOVGEi : F4_4<2, 0b101100, 0b1011, "movge">; // movge i/xcc, rs2, rd +def MOVLr : F4_3<2, 0b101100, 0b0011, "movl">; // movl i/xcc, rs2, rd +def MOVLi : F4_4<2, 0b101100, 0b0011, "movl">; // movl i/xcc, rs2, rd +def MOVGUr : F4_3<2, 0b101100, 0b1100, "movgu">; // movgu i/xcc, rs2, rd +def MOVGUi : F4_4<2, 0b101100, 0b1100, "movgu">; // movgu i/xcc, rs2, rd +def MOVLEUr : F4_3<2, 0b101100, 0b0100, "movleu">; // movleu i/xcc, rs2, rd +def MOVLEUi : F4_4<2, 0b101100, 0b0100, "movleu">; // movleu i/xcc, rs2, rd +def MOVCCr : F4_3<2, 0b101100, 0b1101, "movcc">; // movcc i/xcc, rs2, rd +def MOVCCi : F4_4<2, 0b101100, 0b1101, "movcc">; // movcc i/xcc, rs2, rd +def MOVCSr : F4_3<2, 0b101100, 0b0101, "movcs">; // movcs i/xcc, rs2, rd +def MOVCSi : F4_4<2, 0b101100, 0b0101, "movcs">; // movcs i/xcc, rs2, rd +def MOVPOSr : F4_3<2, 0b101100, 0b1110, "movpos">; // movpos i/xcc, rs2, rd +def MOVPOSi : F4_4<2, 0b101100, 0b1110, "movpos">; // movpos i/xcc, rs2, rd +def MOVNEGr : F4_3<2, 0b101100, 0b0110, "movneg">; // movneg i/xcc, rs2, rd +def MOVNEGi : F4_4<2, 0b101100, 0b0110, "movneg">; // movneg i/xcc, rs2, rd +def MOVVCr : F4_3<2, 0b101100, 0b1111, "movvc">; // movvc i/xcc, rs2, rd +def MOVVCi : F4_4<2, 0b101100, 0b1111, "movvc">; // movvc i/xcc, rs2, rd +def MOVVSr : F4_3<2, 0b101100, 0b0111, "movvs">; // movvs i/xcc, rs2, rd +def MOVVSi : F4_4<2, 0b101100, 0b0111, "movvs">; // movvs i/xcc, rs2, rd // For floating-point condition codes -def MOVFAr : F4_3<2, 0b101100, 0b1000, "movfa">; // mova i/xcc, rs2, rd -def MOVFAi : F4_4<2, 0b101100, 0b1000, "movfa">; // mova i/xcc, rs2, rd -def MOVFNr : F4_3<2, 0b101100, 0b0000, "movfn">; // mova i/xcc, rs2, rd -def MOVFNi : F4_4<2, 0b101100, 0b0000, "movfn">; // mova i/xcc, rs2, rd -def MOVFUr : F4_3<2, 0b101100, 0b0111, "movfu">; // mova i/xcc, rs2, rd -def MOVFUi : F4_4<2, 0b101100, 0b0111, "movfu">; // mova i/xcc, rs2, rd -def MOVFGr : F4_3<2, 0b101100, 0b0110, "movfg">; // mova i/xcc, rs2, rd -def MOVFGi : F4_4<2, 0b101100, 0b0110, "movfg">; // mova i/xcc, rs2, rd -def MOVFUGr : F4_3<2, 0b101100, 0b0101, "movfug">; // mova i/xcc, rs2, rd -def MOVFUGi : F4_4<2, 0b101100, 0b0101, "movfug">; // mova i/xcc, rs2, rd -def MOVFLr : F4_3<2, 0b101100, 0b0100, "movfl">; // mova i/xcc, rs2, rd -def MOVFLi : F4_4<2, 0b101100, 0b0100, "movfl">; // mova i/xcc, rs2, rd -def MOVFULr : F4_3<2, 0b101100, 0b0011, "movful">; // mova i/xcc, rs2, rd -def MOVFULi : F4_4<2, 0b101100, 0b0011, "movful">; // mova i/xcc, rs2, rd -def MOVFLGr : F4_3<2, 0b101100, 0b0010, "movflg">; // mova i/xcc, rs2, rd -def MOVFLGi : F4_4<2, 0b101100, 0b0010, "movflg">; // mova i/xcc, rs2, rd -def MOVFNEr : F4_3<2, 0b101100, 0b0001, "movfne">; // mova i/xcc, rs2, rd -def MOVFNEi : F4_4<2, 0b101100, 0b0001, "movfne">; // mova i/xcc, rs2, rd -def MOVFEr : F4_3<2, 0b101100, 0b1001, "movfe">; // mova i/xcc, rs2, rd -def MOVFEi : F4_4<2, 0b101100, 0b1001, "movfe">; // mova i/xcc, rs2, rd -def MOVFUEr : F4_3<2, 0b101100, 0b1010, "movfue">; // mova i/xcc, rs2, rd -def MOVFUEi : F4_4<2, 0b101100, 0b1010, "movfue">; // mova i/xcc, rs2, rd -def MOVFGEr : F4_3<2, 0b101100, 0b1011, "movfge">; // mova i/xcc, rs2, rd -def MOVFGEi : F4_4<2, 0b101100, 0b1011, "movfge">; // mova i/xcc, rs2, rd -def MOVFUGEr : F4_3<2, 0b101100, 0b1100, "movfuge">; // mova i/xcc, rs2, rd -def MOVFUGEi : F4_4<2, 0b101100, 0b1100, "movfuge">; // mova i/xcc, rs2, rd -def MOVFLEr : F4_3<2, 0b101100, 0b1101, "movfle">; // mova i/xcc, rs2, rd -def MOVFLEi : F4_4<2, 0b101100, 0b1101, "movfle">; // mova i/xcc, rs2, rd -def MOVFULEr : F4_3<2, 0b101100, 0b1110, "movfule">; // mova i/xcc, rs2, rd -def MOVFULEi : F4_4<2, 0b101100, 0b1110, "movfule">; // mova i/xcc, rs2, rd -def MOVFOr : F4_3<2, 0b101100, 0b1111, "movfo">; // mova i/xcc, rs2, rd -def MOVFOi : F4_4<2, 0b101100, 0b1111, "movfo">; // mova i/xcc, rs2, rd +def MOVFAr : F4_3<2, 0b101100, 0b1000, "movfa">; // movfa i/xcc, rs2, rd +def MOVFAi : F4_4<2, 0b101100, 0b1000, "movfa">; // movfa i/xcc, rs2, rd +def MOVFNr : F4_3<2, 0b101100, 0b0000, "movfn">; // movfn i/xcc, rs2, rd +def MOVFNi : F4_4<2, 0b101100, 0b0000, "movfn">; // movfn i/xcc, rs2, rd +def MOVFUr : F4_3<2, 0b101100, 0b0111, "movfu">; // movfu i/xcc, rs2, rd +def MOVFUi : F4_4<2, 0b101100, 0b0111, "movfu">; // movfu i/xcc, rs2, rd +def MOVFGr : F4_3<2, 0b101100, 0b0110, "movfg">; // movfg i/xcc, rs2, rd +def MOVFGi : F4_4<2, 0b101100, 0b0110, "movfg">; // movfg i/xcc, rs2, rd +def MOVFUGr : F4_3<2, 0b101100, 0b0101, "movfug">; // movfug i/xcc, rs2, rd +def MOVFUGi : F4_4<2, 0b101100, 0b0101, "movfug">; // movfug i/xcc, rs2, rd +def MOVFLr : F4_3<2, 0b101100, 0b0100, "movfl">; // movfl i/xcc, rs2, rd +def MOVFLi : F4_4<2, 0b101100, 0b0100, "movfl">; // movfl i/xcc, rs2, rd +def MOVFULr : F4_3<2, 0b101100, 0b0011, "movful">; // movful i/xcc, rs2, rd +def MOVFULi : F4_4<2, 0b101100, 0b0011, "movful">; // movful i/xcc, rs2, rd +def MOVFLGr : F4_3<2, 0b101100, 0b0010, "movflg">; // movflg i/xcc, rs2, rd +def MOVFLGi : F4_4<2, 0b101100, 0b0010, "movflg">; // movflg i/xcc, rs2, rd +def MOVFNEr : F4_3<2, 0b101100, 0b0001, "movfne">; // movfne i/xcc, rs2, rd +def MOVFNEi : F4_4<2, 0b101100, 0b0001, "movfne">; // movfne i/xcc, rs2, rd +def MOVFEr : F4_3<2, 0b101100, 0b1001, "movfe">; // movfe i/xcc, rs2, rd +def MOVFEi : F4_4<2, 0b101100, 0b1001, "movfe">; // movfe i/xcc, rs2, rd +def MOVFUEr : F4_3<2, 0b101100, 0b1010, "movfue">; // movfue i/xcc, rs2, rd +def MOVFUEi : F4_4<2, 0b101100, 0b1010, "movfue">; // movfue i/xcc, rs2, rd +def MOVFGEr : F4_3<2, 0b101100, 0b1011, "movfge">; // movfge i/xcc, rs2, rd +def MOVFGEi : F4_4<2, 0b101100, 0b1011, "movfge">; // movfge i/xcc, rs2, rd +def MOVFUGEr : F4_3<2, 0b101100, 0b1100, "movfuge">; // movfuge i/xcc, rs2, rd +def MOVFUGEi : F4_4<2, 0b101100, 0b1100, "movfuge">; // movfuge i/xcc, rs2, rd +def MOVFLEr : F4_3<2, 0b101100, 0b1101, "movfle">; // movfle i/xcc, rs2, rd +def MOVFLEi : F4_4<2, 0b101100, 0b1101, "movfle">; // movfle i/xcc, rs2, rd +def MOVFULEr : F4_3<2, 0b101100, 0b1110, "movfule">; // movfule i/xcc, rs2, rd +def MOVFULEi : F4_4<2, 0b101100, 0b1110, "movfule">; // movfule i/xcc, rs2, rd +def MOVFOr : F4_3<2, 0b101100, 0b1111, "movfo">; // movfo i/xcc, rs2, rd +def MOVFOi : F4_4<2, 0b101100, 0b1111, "movfo">; // movfo i/xcc, rs2, rd // Section A.36: Move Integer Register on Register Condition (MOVR) -def MOVRZr : F3_5<2, 0b101111, 0b001, "movrz">; // movrz rs1, rs2, rd -def MOVRZi : F3_6<2, 0b101111, 0b001, "movrz">; // movrz rs1, imm, rd -def MOVRLEZr : F3_5<2, 0b101111, 0b010, "movrlez">; // movrz rs1, rs2, rd -def MOVRLEZi : F3_6<2, 0b101111, 0b010, "movrlez">; // movrz rs1, imm, rd -def MOVRLZr : F3_5<2, 0b101111, 0b011, "movrlz">; // movrz rs1, rs2, rd -def MOVRLZi : F3_6<2, 0b101111, 0b011, "movrlz">; // movrz rs1, imm, rd -def MOVRNZr : F3_5<2, 0b101111, 0b101, "movrnz">; // movrz rs1, rs2, rd -def MOVRNZi : F3_6<2, 0b101111, 0b101, "movrnz">; // movrz rs1, imm, rd -def MOVRGZr : F3_5<2, 0b101111, 0b110, "movrgz">; // movrz rs1, rs2, rd -def MOVRGZi : F3_6<2, 0b101111, 0b110, "movrgz">; // movrz rs1, imm, rd -def MOVRGEZr : F3_5<2, 0b101111, 0b111, "movrgez">; // movrz rs1, rs2, rd -def MOVRGEZi : F3_6<2, 0b101111, 0b111, "movrgez">; // movrz rs1, imm, rd +def MOVRZr : F3_5<2, 0b101111, 0b001, "movrz">; // movrz rs1, rs2, rd +def MOVRZi : F3_6<2, 0b101111, 0b001, "movrz">; // movrz rs1, imm, rd +def MOVRLEZr : F3_5<2, 0b101111, 0b010, "movrlez">; // movrlez rs1, rs2, rd +def MOVRLEZi : F3_6<2, 0b101111, 0b010, "movrlez">; // movrlez rs1, imm, rd +def MOVRLZr : F3_5<2, 0b101111, 0b011, "movrlz">; // movrlz rs1, rs2, rd +def MOVRLZi : F3_6<2, 0b101111, 0b011, "movrlz">; // movrlz rs1, imm, rd +def MOVRNZr : F3_5<2, 0b101111, 0b101, "movrnz">; // movrnz rs1, rs2, rd +def MOVRNZi : F3_6<2, 0b101111, 0b101, "movrnz">; // movrnz rs1, imm, rd +def MOVRGZr : F3_5<2, 0b101111, 0b110, "movrgz">; // movrgz rs1, rs2, rd +def MOVRGZi : F3_6<2, 0b101111, 0b110, "movrgz">; // movrgz rs1, imm, rd +def MOVRGEZr : F3_5<2, 0b101111, 0b111, "movrgez">; // movrgez rs1, rs2, rd +def MOVRGEZi : F3_6<2, 0b101111, 0b111, "movrgez">; // movrgez rs1, imm, rd // Section A.37: Multiply and Divide (64-bit) - p199 -def MULXr : F3_1<2, 0b001001, "mulx">; // mulx r, r, r -def SDIVXr : F3_1<2, 0b101101, "sdivx">; // mulx r, r, r -def UDIVXr : F3_1<2, 0b001101, "udivx">; // mulx r, r, r -def MULXi : F3_2<2, 0b001001, "mulx">; // mulx r, i, r -def SDIVXi : F3_2<2, 0b101101, "sdivx">; // mulx r, i, r -def UDIVXi : F3_2<2, 0b001101, "udivx">; // mulx r, i, r +def MULXr : F3_1<2, 0b001001, "mulx">; // mulx r, r, r +def SDIVXr : F3_1<2, 0b101101, "sdivx">; // sdivx r, r, r +def UDIVXr : F3_1<2, 0b001101, "udivx">; // udivx r, r, r +def MULXi : F3_2<2, 0b001001, "mulx">; // mulx r, i, r +def SDIVXi : F3_2<2, 0b101101, "sdivx">; // sdivx r, i, r +def UDIVXi : F3_2<2, 0b001101, "udivx">; // udivx r, i, r // Section A.38: Multiply (32-bit) - p200 // Not used in the Sparc backend From brukman at cs.uiuc.edu Wed Jul 2 13:16:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Jul 2 13:16:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/SparcV9.td Message-ID: <200307021815.NAA12125@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: SparcV9.td updated: 1.22 -> 1.23 --- Log message: Properly fix instruction syntax in comments, using `imm' for instructions that use an immediate value instead of a register. --- Diffs of the changes: Index: llvm/lib/Target/Sparc/SparcV9.td diff -u llvm/lib/Target/Sparc/SparcV9.td:1.22 llvm/lib/Target/Sparc/SparcV9.td:1.23 --- llvm/lib/Target/Sparc/SparcV9.td:1.22 Wed Jul 2 13:02:58 2003 +++ llvm/lib/Target/Sparc/SparcV9.td Wed Jul 2 13:15:43 2003 @@ -525,71 +525,71 @@ // Section A.35: Move Integer Register on Condition (MOVcc) - p194 // For integer condition codes def MOVAr : F4_3<2, 0b101100, 0b1000, "mova">; // mova i/xcc, rs2, rd -def MOVAi : F4_4<2, 0b101100, 0b1000, "mova">; // mova i/xcc, rs2, rd +def MOVAi : F4_4<2, 0b101100, 0b1000, "mova">; // mova i/xcc, imm, rd def MOVNr : F4_3<2, 0b101100, 0b0000, "movn">; // movn i/xcc, rs2, rd -def MOVNi : F4_4<2, 0b101100, 0b0000, "movn">; // movn i/xcc, rs2, rd +def MOVNi : F4_4<2, 0b101100, 0b0000, "movn">; // movn i/xcc, imm, rd def MOVNEr : F4_3<2, 0b101100, 0b1001, "movne">; // movne i/xcc, rs2, rd -def MOVNEi : F4_4<2, 0b101100, 0b1001, "movne">; // movne i/xcc, rs2, rd +def MOVNEi : F4_4<2, 0b101100, 0b1001, "movne">; // movne i/xcc, imm, rd def MOVEr : F4_3<2, 0b101100, 0b0001, "move">; // move i/xcc, rs2, rd -def MOVEi : F4_4<2, 0b101100, 0b0001, "move">; // move i/xcc, rs2, rd +def MOVEi : F4_4<2, 0b101100, 0b0001, "move">; // move i/xcc, imm, rd def MOVGr : F4_3<2, 0b101100, 0b1010, "movg">; // movg i/xcc, rs2, rd -def MOVGi : F4_4<2, 0b101100, 0b1010, "movg">; // movg i/xcc, rs2, rd +def MOVGi : F4_4<2, 0b101100, 0b1010, "movg">; // movg i/xcc, imm, rd def MOVLEr : F4_3<2, 0b101100, 0b0010, "movle">; // movle i/xcc, rs2, rd -def MOVLEi : F4_4<2, 0b101100, 0b0010, "movle">; // movle i/xcc, rs2, rd +def MOVLEi : F4_4<2, 0b101100, 0b0010, "movle">; // movle i/xcc, imm, rd def MOVGEr : F4_3<2, 0b101100, 0b1011, "movge">; // movge i/xcc, rs2, rd -def MOVGEi : F4_4<2, 0b101100, 0b1011, "movge">; // movge i/xcc, rs2, rd +def MOVGEi : F4_4<2, 0b101100, 0b1011, "movge">; // movge i/xcc, imm, rd def MOVLr : F4_3<2, 0b101100, 0b0011, "movl">; // movl i/xcc, rs2, rd -def MOVLi : F4_4<2, 0b101100, 0b0011, "movl">; // movl i/xcc, rs2, rd +def MOVLi : F4_4<2, 0b101100, 0b0011, "movl">; // movl i/xcc, imm, rd def MOVGUr : F4_3<2, 0b101100, 0b1100, "movgu">; // movgu i/xcc, rs2, rd -def MOVGUi : F4_4<2, 0b101100, 0b1100, "movgu">; // movgu i/xcc, rs2, rd +def MOVGUi : F4_4<2, 0b101100, 0b1100, "movgu">; // movgu i/xcc, imm, rd def MOVLEUr : F4_3<2, 0b101100, 0b0100, "movleu">; // movleu i/xcc, rs2, rd -def MOVLEUi : F4_4<2, 0b101100, 0b0100, "movleu">; // movleu i/xcc, rs2, rd +def MOVLEUi : F4_4<2, 0b101100, 0b0100, "movleu">; // movleu i/xcc, imm, rd def MOVCCr : F4_3<2, 0b101100, 0b1101, "movcc">; // movcc i/xcc, rs2, rd -def MOVCCi : F4_4<2, 0b101100, 0b1101, "movcc">; // movcc i/xcc, rs2, rd +def MOVCCi : F4_4<2, 0b101100, 0b1101, "movcc">; // movcc i/xcc, imm, rd def MOVCSr : F4_3<2, 0b101100, 0b0101, "movcs">; // movcs i/xcc, rs2, rd -def MOVCSi : F4_4<2, 0b101100, 0b0101, "movcs">; // movcs i/xcc, rs2, rd +def MOVCSi : F4_4<2, 0b101100, 0b0101, "movcs">; // movcs i/xcc, imm, rd def MOVPOSr : F4_3<2, 0b101100, 0b1110, "movpos">; // movpos i/xcc, rs2, rd -def MOVPOSi : F4_4<2, 0b101100, 0b1110, "movpos">; // movpos i/xcc, rs2, rd +def MOVPOSi : F4_4<2, 0b101100, 0b1110, "movpos">; // movpos i/xcc, imm, rd def MOVNEGr : F4_3<2, 0b101100, 0b0110, "movneg">; // movneg i/xcc, rs2, rd -def MOVNEGi : F4_4<2, 0b101100, 0b0110, "movneg">; // movneg i/xcc, rs2, rd +def MOVNEGi : F4_4<2, 0b101100, 0b0110, "movneg">; // movneg i/xcc, imm, rd def MOVVCr : F4_3<2, 0b101100, 0b1111, "movvc">; // movvc i/xcc, rs2, rd -def MOVVCi : F4_4<2, 0b101100, 0b1111, "movvc">; // movvc i/xcc, rs2, rd +def MOVVCi : F4_4<2, 0b101100, 0b1111, "movvc">; // movvc i/xcc, imm, rd def MOVVSr : F4_3<2, 0b101100, 0b0111, "movvs">; // movvs i/xcc, rs2, rd -def MOVVSi : F4_4<2, 0b101100, 0b0111, "movvs">; // movvs i/xcc, rs2, rd +def MOVVSi : F4_4<2, 0b101100, 0b0111, "movvs">; // movvs i/xcc, imm, rd // For floating-point condition codes def MOVFAr : F4_3<2, 0b101100, 0b1000, "movfa">; // movfa i/xcc, rs2, rd -def MOVFAi : F4_4<2, 0b101100, 0b1000, "movfa">; // movfa i/xcc, rs2, rd +def MOVFAi : F4_4<2, 0b101100, 0b1000, "movfa">; // movfa i/xcc, imm, rd def MOVFNr : F4_3<2, 0b101100, 0b0000, "movfn">; // movfn i/xcc, rs2, rd -def MOVFNi : F4_4<2, 0b101100, 0b0000, "movfn">; // movfn i/xcc, rs2, rd +def MOVFNi : F4_4<2, 0b101100, 0b0000, "movfn">; // movfn i/xcc, imm, rd def MOVFUr : F4_3<2, 0b101100, 0b0111, "movfu">; // movfu i/xcc, rs2, rd -def MOVFUi : F4_4<2, 0b101100, 0b0111, "movfu">; // movfu i/xcc, rs2, rd +def MOVFUi : F4_4<2, 0b101100, 0b0111, "movfu">; // movfu i/xcc, imm, rd def MOVFGr : F4_3<2, 0b101100, 0b0110, "movfg">; // movfg i/xcc, rs2, rd -def MOVFGi : F4_4<2, 0b101100, 0b0110, "movfg">; // movfg i/xcc, rs2, rd +def MOVFGi : F4_4<2, 0b101100, 0b0110, "movfg">; // movfg i/xcc, imm, rd def MOVFUGr : F4_3<2, 0b101100, 0b0101, "movfug">; // movfug i/xcc, rs2, rd -def MOVFUGi : F4_4<2, 0b101100, 0b0101, "movfug">; // movfug i/xcc, rs2, rd +def MOVFUGi : F4_4<2, 0b101100, 0b0101, "movfug">; // movfug i/xcc, imm, rd def MOVFLr : F4_3<2, 0b101100, 0b0100, "movfl">; // movfl i/xcc, rs2, rd -def MOVFLi : F4_4<2, 0b101100, 0b0100, "movfl">; // movfl i/xcc, rs2, rd +def MOVFLi : F4_4<2, 0b101100, 0b0100, "movfl">; // movfl i/xcc, imm, rd def MOVFULr : F4_3<2, 0b101100, 0b0011, "movful">; // movful i/xcc, rs2, rd -def MOVFULi : F4_4<2, 0b101100, 0b0011, "movful">; // movful i/xcc, rs2, rd +def MOVFULi : F4_4<2, 0b101100, 0b0011, "movful">; // movful i/xcc, imm, rd def MOVFLGr : F4_3<2, 0b101100, 0b0010, "movflg">; // movflg i/xcc, rs2, rd -def MOVFLGi : F4_4<2, 0b101100, 0b0010, "movflg">; // movflg i/xcc, rs2, rd +def MOVFLGi : F4_4<2, 0b101100, 0b0010, "movflg">; // movflg i/xcc, imm, rd def MOVFNEr : F4_3<2, 0b101100, 0b0001, "movfne">; // movfne i/xcc, rs2, rd -def MOVFNEi : F4_4<2, 0b101100, 0b0001, "movfne">; // movfne i/xcc, rs2, rd +def MOVFNEi : F4_4<2, 0b101100, 0b0001, "movfne">; // movfne i/xcc, imm, rd def MOVFEr : F4_3<2, 0b101100, 0b1001, "movfe">; // movfe i/xcc, rs2, rd -def MOVFEi : F4_4<2, 0b101100, 0b1001, "movfe">; // movfe i/xcc, rs2, rd +def MOVFEi : F4_4<2, 0b101100, 0b1001, "movfe">; // movfe i/xcc, imm, rd def MOVFUEr : F4_3<2, 0b101100, 0b1010, "movfue">; // movfue i/xcc, rs2, rd -def MOVFUEi : F4_4<2, 0b101100, 0b1010, "movfue">; // movfue i/xcc, rs2, rd +def MOVFUEi : F4_4<2, 0b101100, 0b1010, "movfue">; // movfue i/xcc, imm, rd def MOVFGEr : F4_3<2, 0b101100, 0b1011, "movfge">; // movfge i/xcc, rs2, rd -def MOVFGEi : F4_4<2, 0b101100, 0b1011, "movfge">; // movfge i/xcc, rs2, rd +def MOVFGEi : F4_4<2, 0b101100, 0b1011, "movfge">; // movfge i/xcc, imm, rd def MOVFUGEr : F4_3<2, 0b101100, 0b1100, "movfuge">; // movfuge i/xcc, rs2, rd -def MOVFUGEi : F4_4<2, 0b101100, 0b1100, "movfuge">; // movfuge i/xcc, rs2, rd +def MOVFUGEi : F4_4<2, 0b101100, 0b1100, "movfuge">; // movfuge i/xcc, imm, rd def MOVFLEr : F4_3<2, 0b101100, 0b1101, "movfle">; // movfle i/xcc, rs2, rd -def MOVFLEi : F4_4<2, 0b101100, 0b1101, "movfle">; // movfle i/xcc, rs2, rd +def MOVFLEi : F4_4<2, 0b101100, 0b1101, "movfle">; // movfle i/xcc, imm, rd def MOVFULEr : F4_3<2, 0b101100, 0b1110, "movfule">; // movfule i/xcc, rs2, rd -def MOVFULEi : F4_4<2, 0b101100, 0b1110, "movfule">; // movfule i/xcc, rs2, rd +def MOVFULEi : F4_4<2, 0b101100, 0b1110, "movfule">; // movfule i/xcc, imm, rd def MOVFOr : F4_3<2, 0b101100, 0b1111, "movfo">; // movfo i/xcc, rs2, rd -def MOVFOi : F4_4<2, 0b101100, 0b1111, "movfo">; // movfo i/xcc, rs2, rd +def MOVFOi : F4_4<2, 0b101100, 0b1111, "movfo">; // movfo i/xcc, imm, rd // Section A.36: Move Integer Register on Register Condition (MOVR) def MOVRZr : F3_5<2, 0b101111, 0b001, "movrz">; // movrz rs1, rs2, rd @@ -607,10 +607,10 @@ // Section A.37: Multiply and Divide (64-bit) - p199 def MULXr : F3_1<2, 0b001001, "mulx">; // mulx r, r, r -def SDIVXr : F3_1<2, 0b101101, "sdivx">; // sdivx r, r, r -def UDIVXr : F3_1<2, 0b001101, "udivx">; // udivx r, r, r def MULXi : F3_2<2, 0b001001, "mulx">; // mulx r, i, r +def SDIVXr : F3_1<2, 0b101101, "sdivx">; // sdivx r, r, r def SDIVXi : F3_2<2, 0b101101, "sdivx">; // sdivx r, i, r +def UDIVXr : F3_1<2, 0b001101, "udivx">; // udivx r, r, r def UDIVXi : F3_2<2, 0b001101, "udivx">; // udivx r, i, r // Section A.38: Multiply (32-bit) - p200 From brukman at cs.uiuc.edu Wed Jul 2 13:28:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Jul 2 13:28:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/SparcV9_F4.td Message-ID: <200307021827.NAA13409@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: SparcV9_F4.td updated: 1.4 -> 1.5 --- Log message: The classes F4_3 and F4_4 have an `rd' operand that needs to be set. --- Diffs of the changes: Index: llvm/lib/Target/Sparc/SparcV9_F4.td diff -u llvm/lib/Target/Sparc/SparcV9_F4.td:1.4 llvm/lib/Target/Sparc/SparcV9_F4.td:1.5 --- llvm/lib/Target/Sparc/SparcV9_F4.td:1.4 Tue Jun 3 23:48:31 2003 +++ llvm/lib/Target/Sparc/SparcV9_F4.td Wed Jul 2 13:27:47 2003 @@ -80,11 +80,13 @@ class F4_3 opVal, bits<6> op3Val, bits<4> condVal, string name> : F4_condcc { bits<5> rs2; + bits<5> rd; set op = opVal; set op3 = op3Val; set cond = condVal; set Name = name; + set Inst{29-25} = rd; set Inst{13} = 0; // i bit //set Inst{10-5} = dontcare; set Inst{4-0} = rs2; @@ -99,6 +101,7 @@ set op3 = op3Val; set cond = condVal; set Name = name; + set Inst{29-25} = rd; set Inst{13} = 1; // i bit set Inst{10-0} = sim11; } From brukman at cs.uiuc.edu Wed Jul 2 14:38:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Jul 2 14:38:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/SparcV9_F3.td SparcV9_F4.td Message-ID: <200307021937.OAA20556@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: SparcV9_F3.td updated: 1.11 -> 1.12 SparcV9_F4.td updated: 1.5 -> 1.6 --- Log message: * Force all "don't care" bits to 0 so that there are absolutely no unset bits in the TableGen descriptions; all unset bits are thus errors. * As a result, found and fixed instructions where some operands were not actually assigned into the right portion of the instruction. --- Diffs of the changes: Index: llvm/lib/Target/Sparc/SparcV9_F3.td diff -u llvm/lib/Target/Sparc/SparcV9_F3.td:1.11 llvm/lib/Target/Sparc/SparcV9_F3.td:1.12 --- llvm/lib/Target/Sparc/SparcV9_F3.td:1.11 Thu Jun 5 18:35:11 2003 +++ llvm/lib/Target/Sparc/SparcV9_F3.td Wed Jul 2 14:37:48 2003 @@ -95,7 +95,7 @@ set op3 = op3val; set Name = name; set Inst{13} = 0; // i field = 0 - //set Inst{12-5} = dontcare; + set Inst{12-5} = 0; // don't care } // The store instructions seem to like to see rd first, then rs1 and rs2 @@ -104,7 +104,7 @@ set op3 = op3val; set Name = name; set Inst{13} = 0; // i field = 0 - //set Inst{12-5} = dontcare; + set Inst{12-5} = 0; // don't care } class F3_2 opVal, bits<6> op3val, string name> : F3_rs1simm13rd { @@ -126,7 +126,9 @@ set op = opVal; set op3 = op3val; set Name = name; + set Inst{29-25} = 0; // don't care set Inst{13} = 0; + set Inst{12-5} = 0; // don't care } class F3_4 opVal, bits<6> op3Val, string name> : F3_rs1simm13 { @@ -134,7 +136,7 @@ set op = opVal; set op3 = op3Val; set Name = name; - //set Inst{29-25} = dontcare; + set Inst{29-25} = 0; // don't care set Inst{13} = 1; set Inst{12-0} = simm; } @@ -146,6 +148,7 @@ set Name = name; set Inst{13} = 0; // i field = 0 set Inst{12-10} = rcondVal; // rcond field + set Inst{9-5} = 0; // don't care } class F3_6 opVal, bits<6> op3Val, bits<3> rcondVal, @@ -156,8 +159,10 @@ set op = opVal; set op3 = op3Val; set Name = name; + set Inst{29-25} = rd; set Inst{13} = 1; // i field = 1 set Inst{12-10} = rcondVal; // rcond field + set Inst{9-0} = simm10; } //FIXME: classes 7-10 not defined!! @@ -169,7 +174,7 @@ set Name = name; set Inst{13} = 0; // i field = 0 set Inst{12} = x; - //set Inst{11-5} = dontcare; + set Inst{11-5} = 0; // don't care } class F3_12 opVal, bits<6> op3Val, string name> : F3_rs1 { @@ -182,7 +187,7 @@ set Inst{29-25} = rd; set Inst{13} = 1; // i field = 1 set Inst{12} = 0; // x field = 0 - //set Inst{11-5} = dontcare; + set Inst{11-5} = 0; // don't care set Inst{4-0} = shcnt; } @@ -196,7 +201,7 @@ set Inst{29-25} = rd; set Inst{13} = 1; // i field = 1 set Inst{12} = 1; // x field = 1 - //set Inst{11-6} = dontcare; + set Inst{11-6} = 0; // don't care set Inst{5-0} = shcnt; } @@ -205,7 +210,7 @@ set op = opVal; set op3 = op3Val; set Name = name; - //set Inst{18-14} = dontcare; + set Inst{18-14} = 0; // don't care set Inst{13-5} = opfVal; } @@ -218,6 +223,7 @@ set op = opVal; set op3 = op3Val; set Name = name; + set Inst{29-27} = 0; // defined to be zero set Inst{26-25} = cc; set Inst{18-14} = rs1; set Inst{13-5} = opfVal; @@ -236,7 +242,7 @@ set op = opVal; set op3 = op3Val; set Name = name; - //Inst{13-0} = dontcare; + set Inst{13-0} = 0; // don't care } class F3_18 fcn, string name> : F3 { @@ -244,14 +250,14 @@ set op3 = 0b111110; set Name = name; set Inst{29-25} = fcn; - //set Inst{18-0 } = dontcare; + set Inst{18-0 } = 0; // don't care; } class F3_19 opVal, bits<6> op3Val, string name> : F3_rd { set op = opVal; set op3 = op3Val; set Name = name; - //Inst{18-0} = dontcare; + set Inst{18-0} = 0; // don't care } // FIXME: class F3_20 Index: llvm/lib/Target/Sparc/SparcV9_F4.td diff -u llvm/lib/Target/Sparc/SparcV9_F4.td:1.5 llvm/lib/Target/Sparc/SparcV9_F4.td:1.6 --- llvm/lib/Target/Sparc/SparcV9_F4.td:1.5 Wed Jul 2 13:27:47 2003 +++ llvm/lib/Target/Sparc/SparcV9_F4.td Wed Jul 2 14:37:48 2003 @@ -14,14 +14,12 @@ // F4_rs1 - Common class of instructions that use an rs1 field class F4_rs1 : F4 { bits<5> rs1; - //set Inst{29-25} = dontcare; set Inst{18-14} = rs1; } // F4_rs1rs2 - Common class of instructions that have rs1 and rs2 fields class F4_rs1rs2 : F4_rs1 { bits<5> rs2; - //set Inst{12-5} = dontcare; set Inst{4-0} = rs2; } @@ -64,7 +62,7 @@ set Name = name; set Inst{13} = 0; // i bit set Inst{12-11} = cc; - //set Inst{10-5} = dontcare; + set Inst{10-5} = 0; // don't care } class F4_2 opVal, bits<6> op3Val, string name> : F4_rs1simm11rd { @@ -88,7 +86,7 @@ set Name = name; set Inst{29-25} = rd; set Inst{13} = 0; // i bit - //set Inst{10-5} = dontcare; + set Inst{10-5} = 0; // don't care set Inst{4-0} = rs2; } From lattner at cs.uiuc.edu Wed Jul 2 14:50:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jul 2 14:50:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Message-ID: <200307021949.OAA20218@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: TopDownClosure.cpp updated: 1.48 -> 1.49 --- Log message: Try using trivially dead deletion --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp diff -u llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.48 llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.49 --- llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.48 Tue Jul 1 23:39:44 2003 +++ llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Wed Jul 2 14:49:11 2003 @@ -135,6 +135,7 @@ void TDDataStructures::inlineGraphIntoCallees(DSGraph &Graph) { // Recompute the Incomplete markers and eliminate unreachable nodes. + Graph.removeTriviallyDeadNodes(); Graph.maskIncompleteMarkers(); // If any of the functions has incomplete incoming arguments, don't mark any From lattner at cs.uiuc.edu Wed Jul 2 15:25:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jul 2 15:25:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Message-ID: <200307022024.PAA24394@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: BottomUpClosure.cpp updated: 1.59 -> 1.60 --- Log message: Keep track of how many inlinings are performed --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.59 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.60 --- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.59 Tue Jul 1 23:37:48 2003 +++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Wed Jul 2 15:24:42 2003 @@ -14,6 +14,7 @@ namespace { Statistic<> MaxSCC("budatastructure", "Maximum SCC Size in Call Graph"); + Statistic<> NumBUInlines("budatastructures", "Number of graphs inlined"); RegisterAnalysis X("budatastructure", "Bottom-up Data Structure Analysis"); @@ -264,6 +265,7 @@ Graph.mergeInGraph(CS, *Callee, GI, DSGraph::KeepModRefBits | DSGraph::StripAllocaBit | DSGraph::DontCloneCallNodes); + ++NumBUInlines; #if 0 Graph.writeGraphToFile(std::cerr, "bu_" + F.getName() + "_after_" + From criswell at choi.cs.uiuc.edu Wed Jul 2 15:43:00 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Wed Jul 2 15:43:00 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/RunSafely.sh Message-ID: <200307022042.h62KgFP04369@choi.cs.uiuc.edu> Changes in directory llvm/test/Programs: RunSafely.sh updated: 1.7 -> 1.8 --- Log message: Modified the time command so that it correctly logs program output in the correct file and logs time information into the another file. --- Diffs of the changes: Index: llvm/test/Programs/RunSafely.sh diff -u llvm/test/Programs/RunSafely.sh:1.7 llvm/test/Programs/RunSafely.sh:1.8 --- llvm/test/Programs/RunSafely.sh:1.7 Tue Jul 1 13:04:43 2003 +++ llvm/test/Programs/RunSafely.sh Wed Jul 2 15:42:05 2003 @@ -25,7 +25,19 @@ ulimit -t $ULIMIT rm -f core core.* ulimit -c unlimited -(time -p $PROGRAM $* 2> $OUTFILE > $OUTFILE < $INFILE) 2> $OUTFILE.time + +# +# Run the command, timing its execution. +# The standard output and standard error of $PROGRAM should go in $OUTFILE, +# and the standard error of time should go in $OUTFILE.time. +# +# Ah, the joys of shell programming! +# To get the time program and the specified program different output filenames, +# we tell time to launch a shell which in turn executes $PROGRAM with the +# necessary I/O redirection. +# +(time sh -c "$PROGRAM $* >& $OUTFILE < $INFILE") >& $OUTFILE.time + if test $? -eq 0 then touch $OUTFILE.exitok @@ -39,4 +51,4 @@ rm -f StackTrace.$$ $corefile fi -exit 0 \ No newline at end of file +exit 0 From criswell at choi.cs.uiuc.edu Wed Jul 2 15:50:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Wed Jul 2 15:50:01 2003 Subject: [llvm-commits] CVS: llvm/configure.ac configure Message-ID: <200307022049.h62Knmv05217@choi.cs.uiuc.edu> Changes in directory llvm: configure.ac updated: 1.4 -> 1.5 configure updated: 1.4 -> 1.5 --- Log message: Removed the --enable-profiling option (again). --- Diffs of the changes: Index: llvm/configure.ac diff -u llvm/configure.ac:1.4 llvm/configure.ac:1.5 --- llvm/configure.ac:1.4 Tue Jul 1 17:07:39 2003 +++ llvm/configure.ac Wed Jul 2 15:49:38 2003 @@ -223,7 +223,6 @@ dnl * Enable various compile-time options dnl ************************************************************************** AC_ARG_ENABLE(purify,AC_HELP_STRING([--enable-purify],[Compile with purify (default is NO)]), AC_SUBST(ENABLE_PURIFY,[[ENABLE_PURIFY=1]]), AC_SUBST(ENABLE_PURIFY,[[]])) -AC_ARG_ENABLE(profiling,AC_HELP_STRING([--enable-profiling],[Compile with profiling information (default is NO)]), AC_SUBST(ENABLE_PROFILING,[[ENABLE_PROFILING=1]]), AC_SUBST(ENABLE_PROFILING,[[]])) AC_ARG_ENABLE(optimized,AC_HELP_STRING([--enable-optimized],[Compile with optimizations enabled (default is NO)]), AC_SUBST(ENABLE_OPTIMIZED,[[ENABLE_OPTIMIZED=1]]), AC_SUBST(ENABLE_OPTIMIZED,[[]])) AC_ARG_ENABLE(spec,AC_HELP_STRING([--enable-spec],[Compile SPEC benchmarks (default is NO)]), AC_SUBST(USE_SPEC,[[USE_SPEC=1]]), AC_SUBST(USE_SPEC,[[]])) AC_ARG_ENABLE(precompiled_bytecode,AC_HELP_STRING([--enable-precompiled_bytecode],[Use pre-compiled bytecode (default is NO)]), AC_SUBST(UPB,[[USE_PRECOMPILED_BYTECODE=1]]), AC_SUBST(UPB,[[]])) Index: llvm/configure diff -u llvm/configure:1.4 llvm/configure:1.5 --- llvm/configure:1.4 Tue Jul 1 17:07:39 2003 +++ llvm/configure Wed Jul 2 15:49:38 2003 @@ -1003,7 +1003,6 @@ --enable-fast-install=PKGS optimize for fast installation default=yes --disable-libtool-lock avoid locking (might break parallel builds) --enable-purify Compile with purify (default is NO) - --enable-profiling Compile with profiling information (default is NO) --enable-optimized Compile with optimizations enabled (default is NO) --enable-spec Compile SPEC benchmarks (default is NO) --enable-precompiled_bytecode @@ -4305,7 +4304,7 @@ case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4308 "configure"' > conftest.$ac_ext + echo '#line 4307 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4855,7 +4854,7 @@ save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:4858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:4857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && 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 @@ -6686,7 +6685,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: Makefile.config.in updated: 1.7 -> 1.8 --- Log message: Removed the --enable-profiling option. --- Diffs of the changes: Index: llvm/Makefile.config.in diff -u llvm/Makefile.config.in:1.7 llvm/Makefile.config.in:1.8 --- llvm/Makefile.config.in:1.7 Wed Jul 2 11:53:44 2003 +++ llvm/Makefile.config.in Wed Jul 2 16:16:06 2003 @@ -146,7 +146,6 @@ # information to allow gprof to be used to get execution frequencies. # #ENABLE_PROFILING = 1 - at ENABLE_PROFILING@ # # This open tells the Makefiles to produce verbose output. From brukman at cs.uiuc.edu Wed Jul 2 16:21:00 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Jul 2 16:21:00 2003 Subject: [llvm-commits] CVS: llvm/Makefile.config.in Message-ID: <200307022120.QAA20942@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.config.in updated: 1.8 -> 1.9 --- Log message: The word `open' was really intended to be `option'. --- Diffs of the changes: Index: llvm/Makefile.config.in diff -u llvm/Makefile.config.in:1.8 llvm/Makefile.config.in:1.9 --- llvm/Makefile.config.in:1.8 Wed Jul 2 16:16:06 2003 +++ llvm/Makefile.config.in Wed Jul 2 16:20:04 2003 @@ -148,7 +148,7 @@ #ENABLE_PROFILING = 1 # -# This open tells the Makefiles to produce verbose output. +# This option tells the Makefiles to produce verbose output. # It essentially prints the commands that make is executing # #VERBOSE = 1 From criswell at cs.uiuc.edu Wed Jul 2 18:04:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed Jul 2 18:04:01 2003 Subject: [llvm-commits] CVS: llvm/www/docs/ReleaseTasks.html Message-ID: <200307022303.SAA17757@tank.cs.uiuc.edu> Changes in directory llvm/www/docs: ReleaseTasks.html updated: 1.2 -> 1.3 --- Log message: Updated prior to the pre-release. Removed items which are done (or near completion). Added new items so that we don't forget them. --- Diffs of the changes: Index: llvm/www/docs/ReleaseTasks.html diff -u llvm/www/docs/ReleaseTasks.html:1.2 llvm/www/docs/ReleaseTasks.html:1.3 --- llvm/www/docs/ReleaseTasks.html:1.2 Sat May 31 14:55:19 2003 +++ llvm/www/docs/ReleaseTasks.html Wed Jul 2 18:03:18 2003 @@ -1,191 +1,190 @@ -LLVM Public Release Project - - -

        + + + LLVM Public Release Project + + + +

        LLVM Public Release Project

        -
        - +
        + -
        - - +
        + + - - - + - - - + + +
        +
        What is this?
        - +
          - - This document is a list of things to do before the LLVM project is publicly - released.  It will provide a checklist so that we know what has been - done and what is left to be done.  It will also keep a "wishlist" of - desirable features. -

          -

          - + + This document is a list of things to do before the LLVM project is publicly + released.  It will provide a checklist so that we know what has been + done and what is left to be done.  It will also keep a "wishlist" of + desirable features. +

          +

          +
        - + - - - + - - - + + +
        +
        Priorities
        - +
          - The - list of things to do... -

          -

          - + The + list of things to do... +

          +

          +
        - + - - - - + + - - - + + +
            +
           High Priority
        - +
          - +
            -
          • Modify the build environment so that the LLVM utilities -can be built outside of the research group.  This entails:
          • - +
              -
            • Modify the build environment so that it does not use absolute - paths.
            • -
            • Make the build environment more configurable via Makefile.config.
              -
            • -
            • Add support for dynamic build configuration (i.e. autoconf -or imake support).
            • -
            • Ensure that all build types (debug, optimized, profile) work -correctly.
              -
            • - +
            -
          • Ensure that the C front end compiles and installs nicely.
          • -
          • Place the C front end into the CVS repository.
            -
          • -
          • Get the Reoptimizer code to work, ensuring that it does not rely - upon code outside of the source tree.
            -
          • -
          • Create a structure that allows for the easy addition of outside - projects to the LLVM source tree.
          • -
          • Create a system for managing development and releases (i.e. CVS - branching, labeling revisions, etc).
            -
          • - +
          • Document the procedure for extracting, building, and installing +LLVM.
          • +
          • Document how to start a project that uses LLVM and its build system.
            +
          • +
          • Ensure that the C front end compiles and installs nicely.
          • +
          • Place the C front end into the CVS repository.
            +
          • +
          • Get the Reoptimizer code to work, ensuring that it does not +rely upon code outside of the source tree.
            +
          • +
          • Create a system for managing development and releases +(i.e. CVS branching, labeling revisions, etc).
            +
          • +
          - -

          -

          - + +

          +

          +
        - + - - - - + + - - - + + +
            +
           Medium Priority
        - +
          - +
            -
          • Improve the testing framework.
          • - +
          • Improve the testing framework.
          • +
              -
            • Cleanup Reoptimizer tests so that they fit into the framework.
              -
            • -
            • Create descriptions of what each test is doing (test specifications).
            • - +
            • Cleanup Reoptimizer tests so that they fit into the framework.
              +
            • +
            • Create descriptions of what each test is doing (test specifications).
            • +
            -
          • Get the Reoptimizer tests to compile under x86.
            -
          • -
          • Determine which sub-projects of LLVM will be distributed.
          • -
          • Review and update documentation.
          • -
          • Create an installer for the software.
            -
          • - +
          • Get the Reoptimizer tests to compile under x86.
            +
          • +
          • Determine which sub-projects of LLVM will be distributed.
          • +
          • Create an installer for the software.
          • +
          • Move over to the autoconf method of specifying object code directories.
          • +
          • Add an install target in the Makefiles that will "install" LLVM, +easing deployment.
            +
          • +
          - -

          -

          - + +

          +

          +
        - + - - - - + + - - - + + +
            +
           Low Priority
        - +
          - +
            -
          • Find and implement a bug reporting system (i.e. Bugzilla).
          • -
          • Test installations on various Linux distributions.
          • -
          • Create a license for the UIUC specific LLVM code.
          • -
          • Add a license file to the distribution.
          • -
          • Add a copyright notice and license information to each source -file.
          • -
          • Create man pages for the LLVM utilities.
            -
          • - +
          • Make the projects/sample directory an actual example of LLVM +code.
          • +
          • Find and implement a bug reporting system (i.e. Bugzilla).
          • +
          • Test installations on various Linux distributions.
          • +
          • Create a license for the UIUC specific LLVM code.
          • +
          • Add a license file to the distribution.
          • +
          • Add a copyright notice and license information to each source + file.
          • +
          • Create man pages for the LLVM utilities.
            +
          • +
          - +
        - +
        John Criswell
        - -Last modified: Sat May 31 14:54:03 CDT 2003 -

        -
        -
        + +Last modified: Sat May 31 14:54:03 CDT 2003

        +
        +
        +
        From lattner at cs.uiuc.edu Wed Jul 2 18:43:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jul 2 18:43:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp TopDownClosure.cpp Message-ID: <200307022342.SAA24792@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: BottomUpClosure.cpp updated: 1.60 -> 1.61 TopDownClosure.cpp updated: 1.49 -> 1.50 --- Log message: Fix how we are handling unreachable functions. This DRAMATICALLY improves efficiency --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.60 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.61 --- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.60 Wed Jul 2 15:24:42 2003 +++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Wed Jul 2 18:42:48 2003 @@ -15,6 +15,7 @@ namespace { Statistic<> MaxSCC("budatastructure", "Maximum SCC Size in Call Graph"); Statistic<> NumBUInlines("budatastructures", "Number of graphs inlined"); + Statistic<> NumCallEdges("budatastructures", "Number of 'actual' call edges"); RegisterAnalysis X("budatastructure", "Bottom-up Data Structure Analysis"); @@ -44,6 +45,8 @@ #endif calculateReachableGraphs(I); // Calculate all graphs... } + + NumCallEdges += ActualCallees.size(); return false; } Index: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp diff -u llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.49 llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.50 --- llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.49 Wed Jul 2 14:49:11 2003 +++ llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Wed Jul 2 18:42:48 2003 @@ -43,38 +43,31 @@ if (!FunctionHasCompleteArguments(*I)) ArgsRemainIncomplete.insert(I); + // We want to traverse the call graph in reverse post-order. To do this, we + // calculate a post-order traversal, then reverse it. + hash_set VisitedGraph; + std::vector PostOrder; + const BUDataStructures::ActualCalleesTy &ActualCallees = + getAnalysis().getActualCallees(); + // Calculate top-down from main... if (Function *F = M.getMainFunction()) - calculateGraphFrom(*F); + ComputePostOrder(*F, VisitedGraph, PostOrder, ActualCallees); // Next calculate the graphs for each function unreachable function... for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) - if (!I->isExternal() && !DSInfo.count(I)) - calculateGraphFrom(*I); + ComputePostOrder(*I, VisitedGraph, PostOrder, ActualCallees); - ArgsRemainIncomplete.clear(); - return false; -} + VisitedGraph.clear(); // Release memory! -// releaseMemory - If the pass pipeline is done with this pass, we can release -// our memory... here... -// -// FIXME: This should be releaseMemory and will work fine, except that LoadVN -// has no way to extend the lifetime of the pass, which screws up ds-aa. -// -void TDDataStructures::releaseMyMemory() { - for (hash_map::iterator I = DSInfo.begin(), - E = DSInfo.end(); I != E; ++I) { - I->second->getReturnNodes().erase(I->first); - if (I->second->getReturnNodes().empty()) - delete I->second; + // Visit each of the graphs in reverse post-order now! + while (!PostOrder.empty()) { + inlineGraphIntoCallees(*PostOrder.back()); + PostOrder.pop_back(); } - // Empty map so next time memory is released, data structures are not - // re-deleted. - DSInfo.clear(); - delete GlobalsGraph; - GlobalsGraph = 0; + ArgsRemainIncomplete.clear(); + return false; } @@ -116,22 +109,28 @@ -void TDDataStructures::calculateGraphFrom(Function &F) { - // We want to traverse the call graph in reverse post-order. To do this, we - // calculate a post-order traversal, then reverse it. - hash_set VisitedGraph; - std::vector PostOrder; - ComputePostOrder(F, VisitedGraph, PostOrder, - getAnalysis().getActualCallees()); - VisitedGraph.clear(); // Release memory! - // Visit each of the graphs in reverse post-order now! - while (!PostOrder.empty()) { - inlineGraphIntoCallees(*PostOrder.back()); - PostOrder.pop_back(); + +// releaseMemory - If the pass pipeline is done with this pass, we can release +// our memory... here... +// +// FIXME: This should be releaseMemory and will work fine, except that LoadVN +// has no way to extend the lifetime of the pass, which screws up ds-aa. +// +void TDDataStructures::releaseMyMemory() { + for (hash_map::iterator I = DSInfo.begin(), + E = DSInfo.end(); I != E; ++I) { + I->second->getReturnNodes().erase(I->first); + if (I->second->getReturnNodes().empty()) + delete I->second; } -} + // Empty map so next time memory is released, data structures are not + // re-deleted. + DSInfo.clear(); + delete GlobalsGraph; + GlobalsGraph = 0; +} void TDDataStructures::inlineGraphIntoCallees(DSGraph &Graph) { // Recompute the Incomplete markers and eliminate unreachable nodes. From lattner at cs.uiuc.edu Wed Jul 2 18:44:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jul 2 18:44:01 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DataStructure.h Message-ID: <200307022343.SAA24806@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DataStructure.h updated: 1.68 -> 1.69 --- Log message: Remove dead method --- Diffs of the changes: Index: llvm/include/llvm/Analysis/DataStructure.h diff -u llvm/include/llvm/Analysis/DataStructure.h:1.68 llvm/include/llvm/Analysis/DataStructure.h:1.69 --- llvm/include/llvm/Analysis/DataStructure.h:1.68 Tue Jul 1 16:12:10 2003 +++ llvm/include/llvm/Analysis/DataStructure.h Wed Jul 2 18:43:06 2003 @@ -167,7 +167,6 @@ } private: - void calculateGraphFrom(Function &F); void inlineGraphIntoCallees(DSGraph &G); DSGraph &getOrCreateDSGraph(Function &F); void ComputePostOrder(Function &F, hash_set &Visited, From lattner at cs.uiuc.edu Wed Jul 2 18:45:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jul 2 18:45:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Message-ID: <200307022344.SAA24818@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: TopDownClosure.cpp updated: 1.50 -> 1.51 --- Log message: Remove space at end of line --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp diff -u llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.50 llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.51 --- llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.50 Wed Jul 2 18:42:48 2003 +++ llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Wed Jul 2 18:44:15 2003 @@ -52,7 +52,7 @@ // Calculate top-down from main... if (Function *F = M.getMainFunction()) - ComputePostOrder(*F, VisitedGraph, PostOrder, ActualCallees); + ComputePostOrder(*F, VisitedGraph, PostOrder, ActualCallees); // Next calculate the graphs for each function unreachable function... for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) From lattner at cs.uiuc.edu Wed Jul 2 18:50:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jul 2 18:50:00 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/TEST.aa.Makefile Message-ID: <200307022349.SAA32767@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: TEST.aa.Makefile updated: 1.3 -> 1.4 --- Log message: Remove support for andersens --- Diffs of the changes: Index: llvm/test/Programs/TEST.aa.Makefile diff -u llvm/test/Programs/TEST.aa.Makefile:1.3 llvm/test/Programs/TEST.aa.Makefile:1.4 --- llvm/test/Programs/TEST.aa.Makefile:1.3 Wed Feb 26 14:00:09 2003 +++ llvm/test/Programs/TEST.aa.Makefile Wed Jul 2 18:49:06 2003 @@ -8,13 +8,7 @@ # We require the programs to be linked with libdummy include $(LEVEL)/test/Programs/Makefile.dummylib -ifdef ENABLE_OPTIMIZED -AND_LIB := $(LIBRELEASE)/libAndersens.so -else -AND_LIB := $(LIBDEBUG)/libAndersens.so -endif - -AA_IMPLS := basic steens-fi andersens steens ds-fi ds +AA_IMPLS := basic steens-fi steens ds-fi ds SUFFIX = -aa-eval -time-passes -disable-output -disable-verify < $< 2> $@ @@ -29,10 +23,6 @@ $(PROGRAMS_TO_TEST:%=Output/%.aa.steens.txt): \ Output/%.aa.steens.txt: Output/%.lib.bc $(LOPT) -$(LOPT) -steens-aa $(SUFFIX) - -$(PROGRAMS_TO_TEST:%=Output/%.aa.andersens.txt): \ -Output/%.aa.andersens.txt: Output/%.lib.bc $(LOPT) $(AND_LIB) - -$(LOPT) -load $(AND_LIB) -andersens-aa $(SUFFIX) $(PROGRAMS_TO_TEST:%=Output/%.aa.ds-fi.txt): \ Output/%.aa.ds-fi.txt: Output/%.lib.bc $(LOPT) From lattner at cs.uiuc.edu Wed Jul 2 18:51:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jul 2 18:51:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/TEST.aa.report Message-ID: <200307022350.SAA01879@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: TEST.aa.report updated: 1.2 -> 1.3 --- Log message: Remove andersens --- Diffs of the changes: Index: llvm/test/Programs/TEST.aa.report diff -u llvm/test/Programs/TEST.aa.report:1.2 llvm/test/Programs/TEST.aa.report:1.3 --- llvm/test/Programs/TEST.aa.report:1.2 Tue Feb 18 14:41:27 2003 +++ llvm/test/Programs/TEST.aa.report Wed Jul 2 18:50:28 2003 @@ -63,7 +63,7 @@ 'povray31' => 'povray31' ); - at LatexColumns = (2, 3, 4, 6, 7, 5); + at LatexColumns = (2, 3, 4, 5, 6); # Specify how to reformat columns to be presentable... %LatexColumnFormat = ( @@ -71,8 +71,7 @@ 3 => \&OnlyMayInfo, 4 => \&OnlyMayInfo, 5 => \&OnlyMayInfo, - 6 => \&OnlyMayInfo, - 7 => \&OnlyMayInfo); + 6 => \&OnlyMayInfo); # These are the columns for the report. The first entry is the header for the # column, the second is the regex to use to match the value. Empty list create @@ -85,7 +84,6 @@ ["basic", '.basic.txt: [^:]*Summary: (.*)'], ["steens-fi", '.steens-fi.txt: [^:]*Summary: (.*)'], ["steens", '.steens.txt: [^:]*Summary: (.*)'], - ["andersens", '.andersens.txt: [^:]*Summary: (.*)'], ["ds-fi", '.ds-fi.txt: [^:]*Summary: (.*)'], ["ds", '.ds.txt: [^:]*Summary: (.*)'], [], From lattner at cs.uiuc.edu Wed Jul 2 18:58:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jul 2 18:58:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructureAA.cpp Message-ID: <200307022357.SAA09876@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructureAA.cpp updated: 1.8 -> 1.9 --- Log message: Disable incorrect mustalias code --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/DataStructureAA.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.8 llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.9 --- llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.8 Tue Jul 1 23:39:13 2003 +++ llvm/lib/Analysis/DataStructure/DataStructureAA.cpp Wed Jul 2 18:56:51 2003 @@ -107,6 +107,7 @@ if (N1 != N2) return NoAlias; // Completely different nodes. +#if 0 // This does not correctly handle arrays! // Both point to the same node and same offset, and there is only one // physical memory object represented in the node, return must alias. // @@ -115,6 +116,7 @@ if (O1 == O2 && isSinglePhysicalObject(N1)) return MustAlias; // Exactly the same object & offset +#endif // See if they point to different offsets... if so, we may be able to // determine that they do not alias... @@ -146,6 +148,7 @@ /// specified vector. /// void DSAA::getMustAliases(Value *P, std::vector &RetVals) { +#if 0 // This does not correctly handle arrays! // Currently the only must alias information we can provide is to say that // something is equal to a global value. If we already have a global value, // don't get worked up about it. @@ -163,6 +166,6 @@ RetVals.push_back(N->getGlobals()[0]); } } - +#endif return getAnalysis().getMustAliases(P, RetVals); } From lattner at cs.uiuc.edu Wed Jul 2 18:58:13 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jul 2 18:58:13 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DSNode.h Message-ID: <200307022357.SAA09871@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DSNode.h updated: 1.29 -> 1.30 --- Log message: INCLUDE_PARENT_GRAPH is required --- Diffs of the changes: Index: llvm/include/llvm/Analysis/DSNode.h diff -u llvm/include/llvm/Analysis/DSNode.h:1.29 llvm/include/llvm/Analysis/DSNode.h:1.30 --- llvm/include/llvm/Analysis/DSNode.h:1.29 Tue Jul 1 23:33:55 2003 +++ llvm/include/llvm/Analysis/DSNode.h Wed Jul 2 18:57:21 2003 @@ -9,10 +9,6 @@ #include "llvm/Analysis/DSSupport.h" -#ifndef NDEBUG -#define INCLUDE_PARENT_GRAPH 1 -#endif - template class DSNodeIterator; // Data structure graph traversal iterator @@ -41,11 +37,9 @@ /// unsigned Size; -#ifdef INCLUDE_PARENT_GRAPH /// ParentGraph - The graph this node is currently embedded into. /// DSGraph *ParentGraph; -#endif /// Ty - Keep track of the current outer most type of this object, in addition /// to whether or not it has been indexed like an array or not. If the @@ -130,10 +124,8 @@ /// return the number of nodes forwarding over the node! unsigned getNumReferrers() const { return NumReferrers; } -#ifdef INCLUDE_PARENT_GRAPH DSGraph *getParentGraph() const { return ParentGraph; } void setParentGraph(DSGraph *G) { ParentGraph = G; } -#endif /// getForwardNode - This method returns the node that this node is forwarded /// to, if any. From lattner at cs.uiuc.edu Wed Jul 2 18:58:24 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jul 2 18:58:24 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200307022357.SAA09859@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.112 -> 1.113 --- Log message: INCLUDE_PARENT_GRAPH is required! --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.112 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.113 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.112 Tue Jul 1 23:38:49 2003 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Wed Jul 2 18:57:05 2003 @@ -51,11 +51,7 @@ //===----------------------------------------------------------------------===// DSNode::DSNode(const Type *T, DSGraph *G) - : NumReferrers(0), Size(0), -#ifdef INCLUDE_PARENT_GRAPH - ParentGraph(G), -#endif - Ty(Type::VoidTy), NodeType(0) { + : NumReferrers(0), Size(0), ParentGraph(G), Ty(Type::VoidTy), NodeType(0) { // Add the type entry if it is specified... if (T) mergeTypeInfo(T, 0); G->getNodes().push_back(this); @@ -63,10 +59,7 @@ // DSNode copy constructor... do not copy over the referrers list! DSNode::DSNode(const DSNode &N, DSGraph *G) - : NumReferrers(0), Size(N.Size), -#ifdef INCLUDE_PARENT_GRAPH - ParentGraph(G), -#endif + : NumReferrers(0), Size(N.Size), ParentGraph(G), Ty(N.Ty), Links(N.Links), Globals(N.Globals), NodeType(N.NodeType) { G->getNodes().push_back(this); } @@ -120,13 +113,7 @@ ++NumFolds; // Create the node we are going to forward to... - DSNode *DestNode = new DSNode(0, -#ifdef INCLUDE_PARENT_GRAPH - ParentGraph -#else - 0 -#endif - ); + DSNode *DestNode = new DSNode(0, ParentGraph); DestNode->NodeType = NodeType|DSNode::Array; DestNode->Ty = Type::VoidTy; DestNode->Size = 1; @@ -489,10 +476,8 @@ } Module *M = 0; -#ifdef INCLUDE_PARENT_GRAPH if (getParentGraph()->getReturnNodes().size()) M = getParentGraph()->getReturnNodes().begin()->first->getParent(); -#endif DEBUG(std::cerr << "MergeTypeInfo Folding OrigTy: "; WriteTypeSymbolic(std::cerr, Ty, M) << "\n due to:"; WriteTypeSymbolic(std::cerr, NewTy, M) << " @ " << Offset << "!\n" @@ -1268,7 +1253,7 @@ std::vector AuxFCallsAlive(AuxFunctionCalls.size()); do { Visited.clear(); - // If any global nodes points to a non-global that is "alive", the global is + // If any global node points to a non-global that is "alive", the global is // "alive" as well... Remove it from the GlobalNodes list so we only have // unreachable globals in the list. // @@ -1319,9 +1304,7 @@ if (!(Flags & DSGraph::RemoveUnreachableGlobals) && // Not in TD pass Visited.count(N)) { // Visited but not alive? GlobalsGraph->Nodes.push_back(N); // Move node to globals graph -#ifdef INCLUDE_PARENT_GRAPH N->setParentGraph(GlobalsGraph); -#endif } else { // Otherwise, delete the node assert((!N->isGlobalNode() || (Flags & DSGraph::RemoveUnreachableGlobals)) From lattner at cs.uiuc.edu Wed Jul 2 21:05:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jul 2 21:05:00 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200307030204.VAA17431@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.113 -> 1.114 --- Log message: Remove globals more aggressively from graphs. Fix a bug where we removed nodes that were marked U. --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.113 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.114 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.113 Wed Jul 2 18:57:05 2003 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Wed Jul 2 21:03:53 2003 @@ -69,6 +69,13 @@ Ty == Type::VoidTy && (Size == 0 || (NodeType & DSNode::Array))) && "Node not OK!"); + + assert(ParentGraph && "Node has no parent?"); + const DSGraph::ScalarMapTy &SM = ParentGraph->getScalarMap(); + for (unsigned i = 0, e = Globals.size(); i != e; ++i) { + assert(SM.find(Globals[i]) != SM.end()); + assert(SM.find(Globals[i])->second.getNode() == this); + } } /// forwardNode - Mark this node as being obsolete, and all references to it @@ -1160,10 +1167,15 @@ // marked as alive... // static bool CanReachAliveNodes(DSNode *N, hash_set &Alive, - hash_set &Visited) { + hash_set &Visited, + bool IgnoreGlobals) { if (N == 0) return false; assert(N->getForwardNode() == 0 && "Cannot mark a forwarded node!"); + // If this is a global node, it will end up in the globals graph anyway, so we + // don't need to worry about it. + if (IgnoreGlobals && N->isGlobalNode()) return false; + // If we know that this node is alive, return so! if (Alive.count(N)) return true; @@ -1173,7 +1185,8 @@ Visited.insert(N); // No recursion, insert into Visited... for (unsigned i = 0, e = N->getSize(); i < e; i += DS::PointerSize) - if (CanReachAliveNodes(N->getLink(i).getNode(), Alive, Visited)) { + if (CanReachAliveNodes(N->getLink(i).getNode(), Alive, Visited, + IgnoreGlobals)) { N->markReachableNodes(Alive); return true; } @@ -1184,14 +1197,17 @@ // alive nodes. // static bool CallSiteUsesAliveArgs(DSCallSite &CS, hash_set &Alive, - hash_set &Visited) { - if (CanReachAliveNodes(CS.getRetVal().getNode(), Alive, Visited)) + hash_set &Visited, + bool IgnoreGlobals) { + if (CanReachAliveNodes(CS.getRetVal().getNode(), Alive, Visited, + IgnoreGlobals)) return true; if (CS.isIndirectCall() && - CanReachAliveNodes(CS.getCalleeNode(), Alive, Visited)) + CanReachAliveNodes(CS.getCalleeNode(), Alive, Visited, IgnoreGlobals)) return true; for (unsigned i = 0, e = CS.getNumPtrArgs(); i != e; ++i) - if (CanReachAliveNodes(CS.getPtrArg(i).getNode(), Alive, Visited)) + if (CanReachAliveNodes(CS.getPtrArg(i).getNode(), Alive, Visited, + IgnoreGlobals)) return true; return false; } @@ -1203,6 +1219,8 @@ // inlining graphs. // void DSGraph::removeDeadNodes(unsigned Flags) { + DEBUG(AssertGraphOK(); GlobalsGraph->AssertGraphOK()); + // Reduce the amount of work we have to do... remove dummy nodes left over by // merging... removeTriviallyDeadNodes(); @@ -1231,7 +1249,7 @@ // these, prune the scalar pointing to it. // DSNode *N = I->second.getNode(); - if (N->isUnknownNode() && !isa(I->first)) { + if (N->getNodeFlags() == DSNode::UnknownNode && !isa(I->first)){ ScalarMap.erase(I++); } else { I->second.getNode()->markReachableNodes(Alive); @@ -1259,7 +1277,8 @@ // Iterate = false; for (unsigned i = 0; i != GlobalNodes.size(); ++i) - if (CanReachAliveNodes(GlobalNodes[i].second, Alive, Visited)) { + if (CanReachAliveNodes(GlobalNodes[i].second, Alive, Visited, + Flags & DSGraph::RemoveUnreachableGlobals)) { std::swap(GlobalNodes[i--], GlobalNodes.back()); // Move to end to erase GlobalNodes.pop_back(); // Erase efficiently Iterate = true; @@ -1267,7 +1286,8 @@ for (unsigned i = 0, e = AuxFunctionCalls.size(); i != e; ++i) if (!AuxFCallsAlive[i] && - CallSiteUsesAliveArgs(AuxFunctionCalls[i], Alive, Visited)) { + CallSiteUsesAliveArgs(AuxFunctionCalls[i], Alive, Visited, + Flags & DSGraph::RemoveUnreachableGlobals)) { AuxFunctionCalls[i].markReachableNodes(Alive); AuxFCallsAlive[i] = true; Iterate = true; @@ -1347,7 +1367,8 @@ // If we are in the top-down pass, remove all unreachable globals from the // ScalarMap... for (unsigned i = 0, e = GlobalNodes.size(); i != e; ++i) - ScalarMap.erase(GlobalNodes[i].first); + if (!Alive.count(GlobalNodes[i].second)) + ScalarMap.erase(GlobalNodes[i].first); } // Loop over all of the dead nodes now, deleting them since their referrer @@ -1361,7 +1382,7 @@ void DSGraph::AssertGraphOK() const { for (unsigned i = 0, e = Nodes.size(); i != e; ++i) Nodes[i]->assertOK(); - return; // FIXME: remove + for (ScalarMapTy::const_iterator I = ScalarMap.begin(), E = ScalarMap.end(); I != E; ++I) { assert(I->second.getNode() && "Null node in scalarmap!"); From lattner at cs.uiuc.edu Thu Jul 3 00:54:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jul 3 00:54:03 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/TEST.dsgraph.report Message-ID: <200307030553.AAA03493@zion.cs.uiuc.edu> Changes in directory llvm/test/Programs: TEST.dsgraph.report updated: 1.5 -> 1.6 --- Log message: Remove obsolete benchmarks, add more spec bm's --- Diffs of the changes: Index: llvm/test/Programs/TEST.dsgraph.report diff -u llvm/test/Programs/TEST.dsgraph.report:1.5 llvm/test/Programs/TEST.dsgraph.report:1.6 --- llvm/test/Programs/TEST.dsgraph.report:1.5 Tue Feb 18 14:40:04 2003 +++ llvm/test/Programs/TEST.dsgraph.report Thu Jul 3 00:52:57 2003 @@ -61,24 +61,25 @@ 'yacr2' => 'ptrdist-yacr2', 'bc' => 'ptrdist-bc', '-' => '-', + '179.art' => '179.art', + '183.equake' => '183.equake', '181.mcf' => '181.mcf', '256.bzip2' => '256.bzip2', '164.gzip' => '164.gzip', '197.parser' => '197.parser', + '188.ammp' => '188.ammp', + '175.vpr' => '175.vpr', '300.twolf' => '300.twolf', + '186.crafty' => '186.crafty', '255.vortex' => '255.vortex', + '254.gap' => '254.gap', '-' => '-', 'sgefa' => 'sgefa', 'sim' => 'sim', - 'burg' => 'burg', - 'gnuchess' => 'gnuchess', - 'larn' => 'larn', - 'flex' => 'flex', - 'moria' => 'moria', - 'povray31' => 'povray31' + 'burg' => 'burg' ); - at LatexColumns = (1, 27, 19, # LOC, #Instrs, MaxSCC + at LatexColumns = (1, 27, 19, # LOC, #MemInstrs, MaxSCC 4, 5, 6, 7, # Execution times 11, # Memory BU 12, # Memory TD From lattner at cs.uiuc.edu Thu Jul 3 01:30:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jul 3 01:30:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/BasicAA/2003-07-03-BasicAACrash.ll Message-ID: <200307030629.BAA18662@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/BasicAA: 2003-07-03-BasicAACrash.ll added (r1.1) --- Log message: New testcase --- Diffs of the changes: Index: llvm/test/Regression/Transforms/BasicAA/2003-07-03-BasicAACrash.ll diff -c /dev/null llvm/test/Regression/Transforms/BasicAA/2003-07-03-BasicAACrash.ll:1.1 *** /dev/null Thu Jul 3 01:29:25 2003 --- llvm/test/Regression/Transforms/BasicAA/2003-07-03-BasicAACrash.ll Thu Jul 3 01:29:15 2003 *************** *** 0 **** --- 1,12 ---- + ; RUN: as < %s | opt -basicaa -aa-eval -disable-output + + %struct..RefPoint = type { int, { uint, ushort, ushort } } + %struct..RefRect = type { %struct..RefPoint, %struct..RefPoint } + + implementation ; Functions: + + uint %BMT_CommitPartDrawObj() { + %tmp.19111 = getelementptr %struct..RefRect* null, long 0, ubyte 0, ubyte 1, ubyte 2 + %tmp.20311 = getelementptr %struct..RefRect* null, long 0, ubyte 1, ubyte 1, ubyte 2 + ret uint 0 + } From lattner at cs.uiuc.edu Thu Jul 3 01:43:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jul 3 01:43:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/BasicAliasAnalysis.cpp Message-ID: <200307030642.BAA19614@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: BasicAliasAnalysis.cpp updated: 1.11 -> 1.12 --- Log message: Reuse the values if they are constants: this is important so that we index into the right structure field This fixes bug: BasicAA/2003-07-03-BasicAACrash.ll --- Diffs of the changes: Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.11 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.12 --- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.11 Tue Jun 17 10:25:37 2003 +++ llvm/lib/Analysis/BasicAliasAnalysis.cpp Thu Jul 3 01:42:38 2003 @@ -288,8 +288,13 @@ const Value *Op1 = GEP1->getOperand(i); const Value *Op2 = GEP2->getOperand(i); if (Op1 == Op2) { // If they are equal, use a zero index... - Indices1.push_back(Constant::getNullValue(Op1->getType())); - Indices2.push_back(Indices1.back()); + if (!isa(Op1)) { + Indices1.push_back(Constant::getNullValue(Op1->getType())); + Indices2.push_back(Indices1.back()); + } else { + Indices1.push_back((Value*)Op1); + Indices2.push_back((Value*)Op2); + } } else { if (const ConstantInt *Op1C = dyn_cast(Op1)) { // If this is an array index, make sure the array element is in range... From lattner at cs.uiuc.edu Thu Jul 3 02:02:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jul 3 02:02:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/TEST.aa.report Message-ID: <200307030701.CAA23401@zion.cs.uiuc.edu> Changes in directory llvm/test/Programs: TEST.aa.report updated: 1.3 -> 1.4 --- Log message: Clean up report, add new benchmarks --- Diffs of the changes: Index: llvm/test/Programs/TEST.aa.report diff -u llvm/test/Programs/TEST.aa.report:1.3 llvm/test/Programs/TEST.aa.report:1.4 --- llvm/test/Programs/TEST.aa.report:1.3 Wed Jul 2 18:50:28 2003 +++ llvm/test/Programs/TEST.aa.report Thu Jul 3 02:01:37 2003 @@ -22,7 +22,8 @@ } # Sort by ds time... -$SortCol = 15; +$SortCol = 12; +$SortNumeric = 1; # Sort in ascending order $SortReverse = 0; @@ -46,21 +47,22 @@ 'yacr2' => 'ptrdist-yacr2', 'bc' => 'ptrdist-bc', '-' => '-', + '179.art' => '179.art', + '183.equake' => '183.equake', '181.mcf' => '181.mcf', '256.bzip2' => '256.bzip2', '164.gzip' => '164.gzip', '197.parser' => '197.parser', + '188.ammp' => '188.ammp', + '175.vpr' => '175.vpr', '300.twolf' => '300.twolf', + '186.crafty' => '186.crafty', '255.vortex' => '255.vortex', + '254.gap' => '254.gap', '-' => '-', 'sgefa' => 'sgefa', 'sim' => 'sim', - 'burg' => 'burg', - 'gnuchess' => 'gnuchess', - 'larn' => 'larn', - 'flex' => 'flex', - 'moria' => 'moria', - 'povray31' => 'povray31' + 'burg' => 'burg' ); @LatexColumns = (2, 3, 4, 5, 6); @@ -92,7 +94,6 @@ ["basic", '.basic.txt: [^(]*\(([-e0-9.]+) wall'], ["steens-fi", '.steens-fi.txt: [^(]*\(([-e0-9.]+) wall'], ["steens", '.steens.txt: [^(]*\(([-e0-9.]+) wall'], - ["andersens", '.andersens.txt: [^(]*\(([-e0-9.]+) wall'], ["ds-fi", '.ds-fi.txt: [^(]*\(([-e0-9.]+) wall'], ["ds", '.ds.txt: [^(]*\(([-e0-9.]+) wall'], [] From criswell at cs.uiuc.edu Thu Jul 3 10:39:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Jul 3 10:39:02 2003 Subject: [llvm-commits] CVS: llvm/www/docs/Projects.html Message-ID: <200307031538.KAA06079@tank.cs.uiuc.edu> Changes in directory llvm/www/docs: Projects.html added (r1.1) --- Log message: Adding a web page on how to start a new LLVM Project. --- Diffs of the changes: Index: llvm/www/docs/Projects.html diff -c /dev/null llvm/www/docs/Projects.html:1.1 *** /dev/null Thu Jul 3 10:38:04 2003 --- llvm/www/docs/Projects.html Thu Jul 3 10:37:52 2003 *************** *** 0 **** --- 1,221 ---- + + + + Creating an LLVM Project + + + + +

        Creating an LLVM Project

        + + +

        Overview

        + + + In order to set up a new project that uses the LLVM build system, + libraries, and header files, follow these steps: + +
          +
        1. + Copy the llvm/projects/sample directory to any place + of your choosing. You can place it anywhere you like, although + someplace underneath your home directory would work best. +

          + +

        2. + Edit the Makefile.config and Makefile.common + files so that the LLVM_SRC_ROOT variable equals the absolute + pathname of the LLVM source tree and LLVM_OBJ_ROOT equals the + pathname of where LLVM was built. + +

          + + For example, if the LLVM source tree is in + /usr/home/joe/src/llvm, and you configured it with + --with-objroot=/tmp when his home directory is + /usr/home/joe, then + LLVM_SRC_ROOT=/usr/home/joe/src/llvm and + LLVM_OBJ_ROOT=/tmp/src/llvm. +

          + +

        3. + Add your source code to the source tree. +

          + +

        4. + Modify the various Makefiles to contain the names of the + objects that you want to build. +
        + + +

        Source Tree Layout

        + + + In order to use the LLVM build system, you will want to lay out your + source code so that it can benefit from the build system's features. + Mainly, you want your source tree layout to look similar to the LLVM + source tree layout. The best way to do this is to just copy the + project tree from llvm/projects/sample and modify it to meet + your needs, but you can certainly add to it if you want. + + Underneath your top level directory, you should have the following + directories: + +
        +
        lib +
        + This subdirectory should contain all of your library source + code. For each library that you build, you will have one + directory in lib that will contain that library's source + code. + +

        + Libraries can be object files, archives, or dynamic libraries. + The lib directory is just a good place for these as it + places them all in a directory from which they can be linked + later on. + +

        include +
        + This subdirectory should contain any header files that are + global to your project. By global, we mean that they are used + by more than one library or executable of your project. +

        + By placing your header files in include, they will be + found automatically by the LLVM build system. For example, if + you have a file include/jazz/note.h, then your source + files can include it simply with #include "jazz/note.h". + +

        tools +
        + This subdirectory should contain all of your source + code for executables. For each program that you build, you + will have one directory in tools that will contain that + program's source code. +
        + + Typically, you will want to build your lib directory first + followed by your tools directory. + + +

        Makefile Variables

        + + The LLVM build system provides several variables which you may + use. + +

        Required Variables

        +
        +
        LEVEL +
        + This variable is the relative path from this Makefile to the + top directory of your project's source code. For example, if + your source code is in /tmp/src, then the Makefile in + /tmp/src/jump/high would set LEVEL to "../..". +
        + +

        Variables for Building Subdirectories

        +
        +
        DIRS +
        + This is a space separated list of subdirectories that should be + built. They will be built, one at a time, in the order + specified. +

        + +

        PARALLEL_DIRS +
        + This is a list of directories that can be built in parallel. + These will be built after the directories in DIRS have been + built. +

        + +

        OPTIONAL_DIRS +
        + This is a list of directories that can be built if they exist, + but will not cause an error if they do not exist. They are + built serially in the order in which they are listed. +
        + +

        Variables for Building Libraries

        +
        +
        LIBRARYNAME +
        + This variable contains the base name of the library that will + be built. For example, to build a library named + libsample.a, LIBRARYNAME should be set to + sample. +

        + +

        BUILD_ARCHIVE +
        + By default, a library is a .o file that is linked + directly into a program. However, if you set the BUILD_ARCHIVE + variable, an archive library (sometimes known as a static + library) will be built instead. +

        + +

        SHARED_LIBRARY +
        + If SHARED_LIBRARY is defined in your Makefile, then the + Makefiles will generate a shared (or dynamic) library. +
        + +

        Variables for Building Programs

        +
        +
        TOOLNAME +
        + This variable contains the name of the program that will + be built. For example, to build an executable named + sample, TOOLNAME should be set to sample. +

        + +

        USEDLIBS +
        + This variable holds a space separated list of libraries that + should be linked into the program. These libraries must either + be LLVM libraries or libraries that come from your lib + directory. The libraries must be specified by their base name. + For example, to link libsample.a, you would set USEDLIBS to + sample. +

        +

        + +

        Miscellaneous Variables

        +
        +
        ExtraSource +
        + This variable contains a space separated list of extra source + files that needs to be built. It is useful for including the + output of Lex and Yacc programs. +

        + +

        CFLAGS +
        CPPFLAGS +
        + This variable can be used to add options to the C and C++ + compiler, respectively. It is typically used to add options + that tell the compiler the location of additional directories + to search for header files. +

        + It is highly suggested that you append to these variable as + opposed to overwriting them. The master Makefiles may already + have useful options in them that you may not want to overwrite. +

        +

        + + +

        Caveats

        + + + Some caveats and known issues: +
          +
        1. + The projects system currently uses the $HOME environment + variable in determining where object files should go. If $HOME + is not set, then your path relative to the root directory may + be used to determine where your object files go. It is + therefore advised that your source directory reside underneath + your home directory. +
        + + From criswell at cs.uiuc.edu Thu Jul 3 11:02:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Jul 3 11:02:01 2003 Subject: [llvm-commits] CVS: llvm/www/docs/GettingStarted.html Message-ID: <200307031601.LAA06253@tank.cs.uiuc.edu> Changes in directory llvm/www/docs: GettingStarted.html updated: 1.18 -> 1.19 --- Log message: Performed a major update for the pre-release. Attempted to better structure and order the document. Added more information about autoconf, the build system, and how to build LLVM. Added directions on how to build the C front end. Added a section on common problems and their solutions. --- Diffs of the changes: Index: llvm/www/docs/GettingStarted.html diff -u llvm/www/docs/GettingStarted.html:1.18 llvm/www/docs/GettingStarted.html:1.19 --- llvm/www/docs/GettingStarted.html:1.18 Tue Jul 1 16:55:57 2003 +++ llvm/www/docs/GettingStarted.html Thu Jul 3 11:01:38 2003 @@ -18,26 +18,27 @@
      -
    12. Solaris on Sparc +
    13. Solaris on SparcV9 (Ultrasparc)
      • Approximately 1.03 GB of Free Disk Space
          @@ -99,8 +101,12 @@
      - LLVM may compile on other platforms. While the LLVM utilities should work, - they will only generate Sparc or x86 machine code. + LLVM may compile on other platforms. The LLVM utilities should work + on other platforms, so it should be possible to generate and produce LLVM + bytecode on unsupported platforms (although bytecode generated on one + platform may not work on another platform). However, the code generators + and Just In Time Compilers (JIT's) only generate SparcV9 or x86 machine + code.

      Software

      @@ -109,30 +115,33 @@ Compiling LLVM requires that you have several different software packages installed: -
        -
      • GCC -

        +

        +
        GCC +
        The GNU Compiler Collection must be installed with C and C++ language - support. GCC 3.x is supported, although some effort has been made to - support GCC 2.96. -

        + support. GCC 3.2.x works, and GCC 3.x is generally supported.

        Note that we currently do not support any other C++ compiler.

        -
      • GNU Make -

        +

        GNU Make +
        The LLVM build system relies upon GNU Make extensions. Therefore, you will need GNU Make (sometimes known as gmake) to build LLVM. -

        - -
      • Flex and Bison

        + +

        Flex and Bison +
        The LLVM source code is built using flex and bison. You will not be able to configure and compile LLVM without them. -

        -
      +

      + +

      GNU M4 +
      + If you are installing Bison on your machine for the first time, you + will need GNU M4 (version 1.4 or higher). +

      There are some additional tools that you may want to have when working with @@ -140,39 +149,70 @@

        -
      • GNU Autoconf and GNU M4 +
      • GNU Autoconf +
      • GNU M4

        - If you want to make changes to the autoconf scripts which configure LLVM - for compilation, you will need GNU autoconf, and consequently, GNU M4. - LLVM was built with autoconf 2.53, so that release and any later - release should work. + If you want to make changes to the configure scripts, you will need + GNU autoconf (2.53 or higher), and consequently, GNU M4 (version 1.4 + or higher).

      + +

      The next section of this guide is meant to get + you up and running with LLVM and to give you some basic information about + the LLVM environment. The first subsection gives + a short summary for those who are already familiar with the system and + want to get started as quickly as possible. + +

      The later sections of this guide describe the general layout of the the LLVM source-tree, a simple example using the LLVM tool chain, and links to find more information about LLVM or to get + help via e-mail. + + +

      +

      Getting Started

      +
      + +

      Getting Started Quickly (A Summary)

      Here's the short story for getting up and running quickly with LLVM:
        -
      1. Find the path to the CVS repository containing LLVM (we'll call this CVSROOTDIR). -
      2. cd where-you-want-llvm-to-live -
      3. cvs -d CVSROOTDIR checkout llvm -
      4. cd llvm -
      5. Run configure to configure the Makefiles and header files. - Useful options include: -
          -
        • --with-objroot=directory -
          - Specifiy where object files should be placed during the build. - -
        • --with-llvmgccdir=directory -
          - Specifiy where the LLVM C frontend has been installed. -
        -
      6. Set your LLVM_LIB_SEARCH_PATH environment variable. -
      7. gmake -k |& tee gnumake.out -    # this is csh or tcsh syntax +
      8. Build the LLVM suite +
          +
        1. Find the path to the CVS repository containing LLVM (we'll call this CVSROOTDIR). +
        2. cd where-you-want-llvm-to-live +
        3. cvs -d CVSROOTDIR checkout llvm +
        4. cd llvm +
        5. Run configure to configure the Makefiles and header files. + Useful options include: +
            +
          • --with-objroot=directory +
            + Specify where object files should be placed during the build. + +
          • --with-llvmgccdir=directory +
            + Specify where the LLVM C frontend is going to be installed. +
          +
        6. Set your LLVM_LIB_SEARCH_PATH environment variable. +
        7. gmake -k |& tee gnumake.out +    # this is csh or tcsh syntax +
        +

        +

      9. Build the LLVM C Front End +
          +
        1. Create a directory for the object files to live. +
        2. cd object file directory +
        3. Run Pathname-to-where-the-source-code-lives/configure --prefix=LLVMGCCDIR to configure GCC. +
        4. make bootstrap +
        5. make install +

      See Setting up your environment on tips to @@ -191,17 +231,93 @@ of this document below. In any of the examples below, simply replace each of these names with the appropriate pathname on your local system. All these paths are absolute:

      -
        -
      +
      +
      CVSROOTDIR +
      + This is the path for the CVS repository containing the LLVM source + code. Ask the person responsible for your local LLVM installation to + give you this path. +

      + +

      OBJ_ROOT +
      + This is the top level directory for where the LLVM suite object files + will be placed during the build. +

      + +

      LLVMGCCDIR +
      + This is the pathname to the location where the LLVM C Front End will + be installed. Note that the C front end does not need to be installed + during the LLVM suite build; you will just need to know where it will + go for configuring the build system and running the test suite later. +

      + +

      GCCSRC +
      + This is the pathname of the directory where the LLVM C front end source + code can be found. +

      + +

      GCCOBJ +
      + This is the pathname of the directory where the LLVM C front end object + code will be placed during the build. It can be safely removed once + the build is complete. +
      -

      Checkout LLVM from CVS

      +

      Setting up your environment

      -

      Before checking out the source code, you will need to know the path to - the CVS repository containing the LLVM source code (we'll call this - CVSROOTDIR below). Ask the person responsible for your local LLVM - installation to give you this path. +

      + In order to compile and use LLVM, you will need to set some environment + variables. There are also some shell aliases which you may find useful. + You can set these on the command line, or better yet, set them in your + .cshrc or .profile. + +

      +
      LLVM_LIB_SEARCH_PATH=LLVMGCCDIR/llvm-gcc/bytecode-libs +
      + This environment variable helps the LLVM C front end find bytecode + libraries that it will need for compilation. +

      + +

      PATH=${PATH}:OBJ_ROOT/llvm/tools/Debug +
      + Adding this directory to the end of your path will allow the + compilation of the C front end to find the LLVM tools. The LLVM tools + are needed for the C front end compile. +

      + +

      CC=Pathname to your GCC compiler +
      + The GCC compiler that you want to use must be the first C compiler in + your PATH. Otherwise, set this variable so that + configure will use the GCC compiler that you want to use. +

      + +

      CXX=Pathname to your GCC C++ compiler +
      + The GCC compiler that you want to use must be the first C++ compiler in + your PATH. Otherwise, set this variable so that + configure will use the GCC compiler that you want to use. +

      + +

      CVSROOT=CVSROOT +
      + This environment variable tells CVS where to find the CVS repository. +

      + +

      alias llvmgcc LLVMGCCDIR/bin/llvm-gcc +
      + This alias allows you to use the LLVM C front end without putting it in + your PATH or typing in its complete pathname. +
      + + +

      Checkout LLVM from CVS

      +

      To get a fresh copy of the entire source code, all you need to do is check it out from CVS as follows: @@ -214,13 +330,19 @@ directory and fully populate it with the LLVM source code, Makefiles, test directories, and local copies of documentation files.

      +

      + Note that the C front end is not included in the CVS repository. You + should have either downloaded the source, or better yet, downloaded the + binary distribution for your platform. +

      + -

      Local Configuration Options

      +

      Local LLVM Configuration

      -

      Once checked out from the CVS repository, options and pathnames specific - to an installation of LLVM can be set via the configure script. - This script sets variables in llvm/Makefile.config and +

      Once checked out from the CVS repository, the LLVM suite source code + must be configured via the configure script. This script sets + variables in llvm/Makefile.config and llvm/include/Config/config.h.

      @@ -229,102 +351,250 @@

        -

      • CXX = Pathname of the C++ compiler to use. -

      • CC = Pathname of the C compiler to use. +

      • CXX = Pathname of the C++ compiler to use. +

      • CC = Pathname of the C compiler to use.
      The following options can be used to set or enable LLVM specific options: -
        -

      • --with-objroot=LLVM_OBJ_ROOT = +
        +
        --with-objroot=OBJ_ROOT +
        Path to the directory where object files, libraries, and executables should be placed. + If this is set to ., then the object files will be placed + within the source code tree. If left unspecified, the default value is + .. (See the Section on The location for LLVM object files for more information.) -

      • --with-llvmgccdir=LLVMGCCDIR = - Path to the location of the LLVM front-end - binaries and associated libraries. -

      • --enable-optimized = +

        +

        --with-llvmgccdir=LLVMGCCDIR +
        + Path to the location where the LLVM C front end binaries and + associated libraries will be installed. +

        +

        --enable-optimized +
        Enables optimized compilation (debugging symbols are removed and GCC - optimization flags are enabled). -

      • --enable-jit = + optimization flags are enabled). The default is to use an unoptimized + build (also known as a debug build). +

        +

        --enable-jit +
        Compile the Just In Time (JIT) functionality. This is not available - on all platforms. -
      + on all platforms. The default is dependent on platform, so it is best + to explicitly enable it if you want it. + In addition to running configure, you must set the LLVM_LIB_SEARCH_PATH environment variable in your startup scripts. This environment variable is used to locate "system" libraries like "-lc" and "-lm" when linking. This variable should be set to the absolute path for the bytecode-libs subdirectory of the C front-end - install. For example, one might set LLVM_LIB_SEARCH_PATH to + install, or LLVMGCCDIR/llvm-gcc/bytecode-libs. For example, one might + set LLVM_LIB_SEARCH_PATH to /home/vadve/lattner/local/x86/llvm-gcc/bytecode-libs for the X86 version of the C front-end on our research machines.

      +

      Compiling the LLVM Suite Source Code

      + + + Once you have configured LLVM, you can build it. There are three types of + builds: + +
      +
      Debug Builds +
      + These builds are the default. They compile the tools and libraries + with debugging information. +

      + +

      Release (Optimized) Builds +
      + These builds are enabled with the --enable-optimized option to + configure. They compile the tools and libraries with GCC + optimizer flags on and strip debugging information from the libraries + and executables it generates. +

      + +

      Profile Builds +
      + These builds are for use with profiling. They compile profiling + information into the code for use with programs like gprof. + Profile builds must be started by setting variables on the + make command line. +
      + + Once you have LLVM configured, you can build it by entering the top level + llvm directory and issuing the following command: +

      + make + +

      + If you have multiple processors in your machine, you may wish to use some + of the parallel build options provided by GNU Make. For example, you could + use the command: +

      + +

      + make -j2 + +

      + There are several other targets which are useful when working with the LLVM + source code: + +

      +
      make clean +
      + Removes all files generated by the build. This includes object files, + generated C/C++ files, libraries, and executables. +

      + +

      make distclean +
      + Removes everything that make clean does, but also removes + files generated by configure. It attempts to return the + source tree to the original state in which it was shipped. +

      +

      + + It is also possible to override default values from configure by + declaring variables on the command line. The following are some examples: + +
      +
      make ENABLE_OPTIMIZED=1 +
      + Perform a Release (Optimized) build. +

      + +

      make ENABLE_PROFILING=1 +
      + Perform a Profiling build. +

      + +

      make VERBOSE=1 +
      + Print what make is doing on standard output. +

      +

      + + Every directory in the LLVM source tree includes a Makefile to + build it and any subdirectories that it contains. Entering any directory + inside the LLVM source tree and typing make should rebuild + anything in or below that directory that is out of date. + + +

      Building the LLVM C Front End

      + + + +

      + This step is optional if you have the C front end binary distrubtion for + your platform. +

      +
      + + Now that you have the LLVM Suite built, you can build the C front end. For + those of you that have built GCC before, the process is very similar. +

      + Be forewarned, though: the build system for the C front end is not as + polished as the rest of the LLVM code, so there will be many warnings and + errors that you will need to ignore for now: + +

        +
      1. Ensure that OBJ_ROOT/llvm/tools/Debug is at the + end of your PATH environment variable. + +
      2. cd GCCOBJ + +
      3. Configure the source code: +
          +
        • On Linux/x86, use +
            +
          • GCCSRC/configure --prefix=LLVMGCCDIR + --enable-languages=c +
          + +
        • On Solaris/Sparc, use +
            +
          • GCCSRC/configure --prefix=LLVMGCCDIR + --enable-languages=c --target=sparcv9-sun-solaris2 +
          +
        + +
      4. make bootstrap + +
      5. The build will eventually fail. Don't worry; chances are good that + everything that needed to build is built. + +
      6. make install +
      + + At this point, you should have a working copy of the LLVM C front end + installed in LLVMGCCDIR. + +

      The location for LLVM object files

      -

      The LLVM make system sends most output files generated during the build - into the directory defined by the variable OBJ_ROOT in - llvm/Makefile.config. This can be either just your normal LLVM +

      The LLVM build system sends most output files generated during the build + into the directory defined by the variable OBJ_ROOT in + llvm/Makefile.config, which is set by the --with-objroot + option in configure. This can be either just your normal LLVM source tree or some other directory writable by you. You may wish to put object files on a different filesystem either to keep them from being backed up or to speed up local builds. -

      If you wish to place output files into a separate directory, use the - --with-objroot=directory option of configure to - set the top level directory of where the object files will go. Otherwise, - leave this option unspecified, and configure will place files - within the LLVM source tree. +

      + If OBJ_ROOT is specified, then the build system will create a + directory tree underneath it that resembles the source code's pathname + relative to your home directory. +

      - -

      Setting up your environment

      - +

      + For example, suppose that OBJ_ROOT is set to /tmp and the + LLVM suite source code is located in /usr/home/joe/src/llvm, where + /usr/home/joe is the home directory of a user named Joe. Then, + the object files will be placed in /tmp/src/llvm. +

      - NOTE: This step is optional but will set up your environment so you - can use the compiled LLVM tools with as little hassle as - possible.) - -

      Add the following lines to your .cshrc (or the corresponding - lines to your .profile if you use a bourne shell derivative). - -

      -       # Make the C front end easy to use...
      -       alias llvmgcc LLVMGCCDIR/bin/llvm-gcc
      -
      -       # Make the LLVM tools easy to use...
      -       setenv PATH OBJ_ROOT/llvm/tools/Debug:${PATH}
      -    
      - The llvmgcc alias is useful because the C compiler is not - included in the CVS tree you just checked out. - -

      The other LLVM tools are part of the LLVM - source base and built when compiling LLVM. They will be built into the - OBJ_ROOT/tools/Debug directory.

      - - -

      Compiling the source code

      - - -

      Every directory in the LLVM source tree includes a Makefile to - build it and any subdirectories that it contains. These makefiles require - that you use GNU Make (sometimes called gmake) instead of - make to - build them, but can - otherwise be used freely. To build the entire LLVM system, just enter the - top level llvm directory and type gmake. A few minutes - later you will hopefully have a freshly compiled toolchain waiting for you - in OBJ_ROOT/llvm/tools/Debug. If you want to look at the - libraries that - were compiled, look in OBJ_ROOT/llvm/lib/Debug.

      - - If you get an error about a /localhome directory, follow the - instructions in the section about Setting Up Your - Environment. +

      + The LLVM build will place files underneath OBJ_ROOT in directories + named after the build type: +

      +
      +
      Debug Builds +
      +
      +
      Tools +
      OBJ_ROOT/llvm/tools/Debug +
      Libraries +
      OBJ_ROOT/llvm/lib/Debug +
      +

      +

      Release Builds +
      +
      +
      Tools +
      OBJ_ROOT/llvm/tools/Release +
      Libraries +
      OBJ_ROOT/llvm/lib/Release +
      +

      + +

      Profile Builds +
      +
      +
      Tools +
      OBJ_ROOT/llvm/tools/Profile +
      Libraries +
      OBJ_ROOT/llvm/lib/Profile +
      +
      @@ -332,7 +602,7 @@
      -

      One useful source of infomation about the LLVM sourcebase is the LLVM One useful source of information about the LLVM source base is the LLVM doxygen documentation, available at http://llvm.cs.uiuc.edu/doxygen/. The following is a brief introduction to code layout:

      @@ -347,25 +617,6 @@ -

      Depend, Debug, & Release - directories

      - - - If you are building with the "OBJ_ROOT=." option enabled in the - Makefile.config file (i.e. you did not specify - --with-objroot when you ran configure), most source - directories will contain two - directories, Depend and Debug. The Depend - directory contains automatically generated dependance files which are used - during compilation to make sure that source files get rebuilt if a header - file they use is modified. The Debug directory holds the object - files, library files, and executables that are used for building a debug - enabled build. The Release directory is created to hold the same - files when the ENABLE_OPTIMIZED=1 flag is passed to gmake, - causing an optimized build to be performed.

      - - -

      llvm/include

      @@ -379,7 +630,7 @@ Reoptimizer, Target, Transforms, etc...
    14. llvm/include/Support - This directory contains generic - support libraries that are independant of LLVM, but are used by LLVM. + support libraries that are independent of LLVM, but are used by LLVM. For example, some C++ STL utilities and a Command Line option processing library. @@ -466,7 +717,7 @@
      lli
      lli is the LLVM interpreter, which can directly execute LLVM bytecode (although very slowly...). In addition - to a simple intepreter, lli is also has debugger and tracing + to a simple interpreter, lli is also has debugger and tracing modes (entered by specifying -debug or -trace on the command line, respectively).

      @@ -491,7 +742,7 @@ disassembled or manipulated just like any other bytecode file). The command line interface to gccas is designed to be as close as possible to the system 'as' utility so that the gcc - frontend itself did not have to be modified to interface to a "wierd" + frontend itself did not have to be modified to interface to a "weird" assembler.

      gccld
      gccld links together several LLVM @@ -571,6 +822,58 @@ +

      Common Problems

      + + + Below are common problems and their remedies: + +
      +
      When I run configure, it finds the wrong C compiler. +
      + The configure script attempts to locate first gcc and + then cc, unless it finds compiler paths set in CC and + CXX for the C and C++ compiler, respectively. + + If configure finds the wrong compiler, either adjust your + PATH environment variable or set CC and CXX + explicitly. +

      + +

      I compile the code, and I get some error about /localhome. +
      + There are several possible causes for this. The first is that you + didn't set a pathname properly when using configure, and it + defaulted to a pathname that we use on our research machines. +

      + Another possibility is that we hardcoded a path in our Makefiles. If + you see this, please email the LLVM bug mailing list with the name of + the offending Makefile and a description of what is wrong with it. + +

      The configure script finds the right C compiler, but it + uses the LLVM linker from a previous build. What do I do? +
      + The configure script uses the PATH to find + executables, so if it's grabbing the wrong linker/assembler/etc, there + are two ways to fix it: +
        +
      1. Adjust your PATH environment variable so that the + correct program appears first in the PATH. This may work, + but may not be convenient when you want them first in your + path for other work. +

        + +

      2. Run configure with an alternative PATH that + is correct. In a Borne compatible shell, the syntax would be: +

        + PATH= ./configure ... +

        + This is still somewhat inconvenient, but it allows + configure to do its work without having to adjust your + PATH permanently. +

      +
      + +

      Links

      @@ -583,6 +886,7 @@
      From criswell at cs.uiuc.edu Thu Jul 3 11:04:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Jul 3 11:04:01 2003 Subject: [llvm-commits] CVS: llvm/www/docs/GettingStarted.html Message-ID: <200307031603.LAA06303@tank.cs.uiuc.edu> Changes in directory llvm/www/docs: GettingStarted.html updated: 1.19 -> 1.20 --- Log message: Added another remark on how building the C front end is optional. --- Diffs of the changes: Index: llvm/www/docs/GettingStarted.html diff -u llvm/www/docs/GettingStarted.html:1.19 llvm/www/docs/GettingStarted.html:1.20 --- llvm/www/docs/GettingStarted.html:1.19 Thu Jul 3 11:01:38 2003 +++ llvm/www/docs/GettingStarted.html Thu Jul 3 11:03:39 2003 @@ -205,7 +205,7 @@    # this is csh or tcsh syntax

    -

  • Build the LLVM C Front End +
  • Build the LLVM C Front End (optional)
    1. Create a directory for the object files to live.
    2. cd object file directory From brukman at cs.uiuc.edu Thu Jul 3 11:30:01 2003 From: brukman at cs.uiuc.edu (Michael Brukman) Date: Thu Jul 3 11:30:01 2003 Subject: [llvm-commits] CVS: llvm/www/docs/GettingStarted.html Message-ID: <200307031629.LAA06567@tank.cs.uiuc.edu> Changes in directory llvm/www/docs: GettingStarted.html updated: 1.20 -> 1.21 --- Log message: * Reworded a bit about JITs (I don't like acronyms followed by 's) * Added JIT capability to the LLI description section * LLC is quasi-x86-capable --- Diffs of the changes: Index: llvm/www/docs/GettingStarted.html diff -u llvm/www/docs/GettingStarted.html:1.20 llvm/www/docs/GettingStarted.html:1.21 --- llvm/www/docs/GettingStarted.html:1.20 Thu Jul 3 11:03:39 2003 +++ llvm/www/docs/GettingStarted.html Thu Jul 3 11:29:36 2003 @@ -105,8 +105,7 @@ on other platforms, so it should be possible to generate and produce LLVM bytecode on unsupported platforms (although bytecode generated on one platform may not work on another platform). However, the code generators - and Just In Time Compilers (JIT's) only generate SparcV9 or x86 machine - code. + and Just-In-Time (JIT) compilers only generate SparcV9 or x86 machine code.

      Software

      @@ -719,10 +718,13 @@ can directly execute LLVM bytecode (although very slowly...). In addition to a simple interpreter, lli is also has debugger and tracing modes (entered by specifying -debug or -trace on the - command line, respectively).

      + command line, respectively). Finally, for architectures that support it + (currently only x86 and Sparc), by default, lli will function as + a Just-In-Time compiler (if the functionality was compiled in), and will + execute the code much faster than the interpreter.

      llc
      llc is the LLVM backend compiler, - which translates LLVM bytecode to a SPARC assembly file.

      + which translates LLVM bytecode to a SPARC or x86 assembly file.

      llvmgcc
      llvmgcc is a GCC based C frontend that has been retargeted to emit LLVM code as the machine code output. It @@ -806,7 +808,7 @@ % dis < hello.bc | less

    3. Compile the program to native Sparc assembly using the code - generator:

      + generator (assuming you are currently on a Sparc system):

      % llc hello.bc -o hello.s

      From criswell at cs.uiuc.edu Thu Jul 3 11:44:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Jul 3 11:44:02 2003 Subject: [llvm-commits] CVS: llvm/www/docs/GettingStarted.html Message-ID: <200307031643.LAA06679@tank.cs.uiuc.edu> Changes in directory llvm/www/docs: GettingStarted.html updated: 1.21 -> 1.22 --- Log message: Added information on software requirements for unpacking the archives that we will eventually distribute. --- Diffs of the changes: Index: llvm/www/docs/GettingStarted.html diff -u llvm/www/docs/GettingStarted.html:1.21 llvm/www/docs/GettingStarted.html:1.22 --- llvm/www/docs/GettingStarted.html:1.21 Thu Jul 3 11:29:36 2003 +++ llvm/www/docs/GettingStarted.html Thu Jul 3 11:43:01 2003 @@ -111,6 +111,17 @@

      Software

      + + Unpacking the distribution requires the following tools: +

      +
      GNU Zip (gzip) +
      GNU Tar +
      + These tools are needed to uncompress and unarchive the software. + Regular Solaris tar may work for unpacking the TAR archive but + is untested. +
      + Compiling LLVM requires that you have several different software packages installed: @@ -247,10 +258,12 @@
      LLVMGCCDIR
      This is the pathname to the location where the LLVM C Front End will - be installed. Note that the C front end does not need to be installed + be installed. Note that the C front end does not need to be installed during the LLVM suite build; you will just need to know where it will go for configuring the build system and running the test suite later.

      + For the pre-built binaries, the LLVMGCCDIR is + cfrontend//llvm-gcc.

      GCCSRC
      From criswell at cs.uiuc.edu Thu Jul 3 11:50:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Jul 3 11:50:01 2003 Subject: [llvm-commits] CVS: llvm/www/docs/GettingStarted.html Message-ID: <200307031649.LAA07101@tank.cs.uiuc.edu> Changes in directory llvm/www/docs: GettingStarted.html updated: 1.22 -> 1.23 --- Log message: Fixed an error in the pathname to LLVMGCCDIR for the pre-built binaries (forgot that <> denotes a tag). --- Diffs of the changes: Index: llvm/www/docs/GettingStarted.html diff -u llvm/www/docs/GettingStarted.html:1.22 llvm/www/docs/GettingStarted.html:1.23 --- llvm/www/docs/GettingStarted.html:1.22 Thu Jul 3 11:43:01 2003 +++ llvm/www/docs/GettingStarted.html Thu Jul 3 11:49:40 2003 @@ -262,8 +262,8 @@ during the LLVM suite build; you will just need to know where it will go for configuring the build system and running the test suite later.

      - For the pre-built binaries, the LLVMGCCDIR is - cfrontend//llvm-gcc. + For the pre-built C front end binaries, the LLVMGCCDIR is + cfrontend/platform/llvm-gcc.

      GCCSRC
      From criswell at cs.uiuc.edu Thu Jul 3 12:52:00 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Jul 3 12:52:00 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/RunSafely.sh Message-ID: <200307031751.MAA05550@trinity.cs.uiuc.edu> Changes in directory llvm/test/Programs: RunSafely.sh updated: 1.8 -> 1.9 --- Log message: Fixed the time command code (once again) so that it conforms to proper Borne syntax. Added code that generates stack traces using gdb-64 when on Sparc. --- Diffs of the changes: Index: llvm/test/Programs/RunSafely.sh diff -u llvm/test/Programs/RunSafely.sh:1.8 llvm/test/Programs/RunSafely.sh:1.9 --- llvm/test/Programs/RunSafely.sh:1.8 Wed Jul 2 15:42:05 2003 +++ llvm/test/Programs/RunSafely.sh Thu Jul 3 12:50:57 2003 @@ -27,6 +27,18 @@ ulimit -c unlimited # +# If we are on a sun4u machine (UltraSparc), then the code we're generating +# is 64 bit code. In that case, use gdb-64 instead of gdb. +# +myarch=`uname -m` +if [ "$myarch" = "sun4u" ] +then + GDB="gdb-64" +else + GDB=gdb +fi + +# # Run the command, timing its execution. # The standard output and standard error of $PROGRAM should go in $OUTFILE, # and the standard error of time should go in $OUTFILE.time. @@ -36,7 +48,7 @@ # we tell time to launch a shell which in turn executes $PROGRAM with the # necessary I/O redirection. # -(time sh -c "$PROGRAM $* >& $OUTFILE < $INFILE") >& $OUTFILE.time +(time sh -c "$PROGRAM $* > $OUTFILE 2>&1 < $INFILE") > $OUTFILE.time 2>&1 if test $? -eq 0 then @@ -47,7 +59,7 @@ then corefile=`ls core* | head -1` echo "where" > StackTrace.$$ - gdb -q -batch --command=StackTrace.$$ --core=$corefile $PROGRAM < /dev/null + $GDB -q -batch --command=StackTrace.$$ --core=$corefile $PROGRAM < /dev/null rm -f StackTrace.$$ $corefile fi From kowshik at cs.uiuc.edu Thu Jul 3 12:56:01 2003 From: kowshik at cs.uiuc.edu (Sumant Kowshik) Date: Thu Jul 3 12:56:01 2003 Subject: [llvm-commits] CVS: llvm/test/Libraries/libpoolalloc/PoolAllocatorChained.c Message-ID: <200307031755.MAA17584@apoc.cs.uiuc.edu> Changes in directory llvm/test/Libraries/libpoolalloc: PoolAllocatorChained.c updated: 1.1 -> 1.2 --- Log message: Added support for poolallocarray and poolmakeunfreeable. The latter is used by the SAFECode project --- Diffs of the changes: Index: llvm/test/Libraries/libpoolalloc/PoolAllocatorChained.c diff -u llvm/test/Libraries/libpoolalloc/PoolAllocatorChained.c:1.1 llvm/test/Libraries/libpoolalloc/PoolAllocatorChained.c:1.2 --- llvm/test/Libraries/libpoolalloc/PoolAllocatorChained.c:1.1 Wed Jan 29 12:38:11 2003 +++ llvm/test/Libraries/libpoolalloc/PoolAllocatorChained.c Thu Jul 3 12:55:47 2003 @@ -5,11 +5,14 @@ #define assert(X) -#define NODES_PER_SLAB 512 +#define NODES_PER_SLAB 65536 typedef struct PoolTy { void *Data; unsigned NodeSize; + unsigned FreeablePool; /* Set to false if the memory from this pool cannot be + freed before destroy*/ + } PoolTy; /* PoolSlab Structure - Hold NODES_PER_SLAB objects of the current node type. @@ -20,7 +23,9 @@ int LastUsed; /* Last allocated node in slab */ struct PoolSlab *Next; unsigned char AllocatedBitVector[NODES_PER_SLAB/8]; + unsigned char StartOfAllocation[NODES_PER_SLAB/8]; char Data[1]; /* Buffer to hold data in this slab... variable sized */ + } PoolSlab; #define NODE_ALLOCATED(POOLSLAB, NODENUM) \ @@ -29,21 +34,37 @@ (POOLSLAB)->AllocatedBitVector[(NODENUM) >> 3] |= 1 << ((NODENUM) & 7) #define MARK_NODE_FREE(POOLSLAB, NODENUM) \ (POOLSLAB)->AllocatedBitVector[(NODENUM) >> 3] &= ~(1 << ((NODENUM) & 7)) +#define ALLOCATION_BEGINS(POOLSLAB, NODENUM) \ + ((POOLSLAB)->StartOfAllocation[(NODENUM) >> 3] & (1 << ((NODENUM) & 7))) +#define SET_START_BIT(POOLSLAB, NODENUM) \ + (POOLSLAB)->StartOfAllocation[(NODENUM) >> 3] |= 1 << ((NODENUM) & 7) +#define CLEAR_START_BIT(POOLSLAB, NODENUM) \ + (POOLSLAB)->StartOfAllocation[(NODENUM) >> 3] &= ~(1 << ((NODENUM) & 7)) /* poolinit - Initialize a pool descriptor to empty */ -void poolinit(PoolTy *Pool, unsigned Size) { - assert(Pool && "Null pool pointer passed in!"); +void poolinit(PoolTy *Pool, unsigned NodeSize) { + assert(Pool && "Null pool pointer passed into poolinit!"); - Pool->NodeSize = Size; + Pool->NodeSize = NodeSize; Pool->Data = 0; + + Pool->FreeablePool = 1; + +} + +void poolmakeunfreeable(PoolTy *Pool) { + assert(Pool && "Null pool pointer passed in to poolmakeunfreeable!"); + Pool->FreeablePool = 0; } /* pooldestroy - Release all memory allocated for a pool */ void pooldestroy(PoolTy *Pool) { - PoolSlab *PS = (PoolSlab*)Pool->Data; + PoolSlab *PS; + assert(Pool && "Null pool pointer passed in to pooldestroy!"); + PS = (PoolSlab*)Pool->Data; while (PS) { PoolSlab *Next = PS->Next; free(PS); @@ -58,6 +79,7 @@ if (PS->LastUsed < NODES_PER_SLAB-1) { /* Mark the returned entry used */ MARK_NODE_ALLOCATED(PS, PS->LastUsed+1); + SET_START_BIT(PS, PS->LastUsed+1); /* If we are allocating out the first unused field, bump its index also */ if (PS->FirstUnused == PS->LastUsed+1) @@ -73,7 +95,10 @@ if (PS->FirstUnused < NODES_PER_SLAB) { /* Successfully allocate out the first unused node */ unsigned Idx = PS->FirstUnused; - + + MARK_NODE_ALLOCATED(PS, Idx); + SET_START_BIT(PS, Idx); + /* Increment FirstUnused to point to the new first unused value... */ do { ++PS->FirstUnused; @@ -89,20 +114,28 @@ } char *poolalloc(PoolTy *Pool) { - unsigned NodeSize = Pool->NodeSize; - PoolSlab *PS = (PoolSlab*)Pool->Data; + unsigned NodeSize; + PoolSlab *PS; void *Result; + assert(Pool && "Null pool pointer passed in to poolalloc!"); + NodeSize = Pool->NodeSize; + PS = (PoolSlab*)Pool->Data; + if ((Result = FindSlabEntry(PS, NodeSize))) return Result; /* Otherwise we must allocate a new slab and add it to the list */ PS = (PoolSlab*)malloc(sizeof(PoolSlab)+NodeSize*NODES_PER_SLAB-1); + assert (PS && "Could not allocate memory!"); + /* Initialize the slab to indicate that the first element is allocated */ PS->FirstUnused = 1; PS->LastUsed = 0; - PS->AllocatedBitVector[0] = 1; + + MARK_NODE_ALLOCATED(PS, 0); + SET_START_BIT(PS, 0); /* Add the slab to the list... */ PS->Next = (PoolSlab*)Pool->Data; @@ -111,9 +144,15 @@ } void poolfree(PoolTy *Pool, char *Node) { - unsigned NodeSize = Pool->NodeSize, Idx; - PoolSlab *PS = (PoolSlab*)Pool->Data; - PoolSlab **PPS = (PoolSlab**)&Pool->Data; + unsigned NodeSize, Idx; + PoolSlab *PS; + PoolSlab **PPS; + unsigned idxiter; + + assert(Pool && "Null pool pointer passed in to poolfree!"); + NodeSize = Pool->NodeSize; + PS = (PoolSlab*)Pool->Data; + PPS = (PoolSlab**)&Pool->Data; /* Seach for the slab that contains this node... */ while (&PS->Data[0] > Node || &PS->Data[NodeSize*NODES_PER_SLAB] < Node) { @@ -125,18 +164,32 @@ Idx = (Node-&PS->Data[0])/NodeSize; assert(Idx < NODES_PER_SLAB && "Pool slab searching loop broken!"); + assert(ALLOCATION_BEGINS(PS, Idx) && + "Attempt to free middle of allocated array"); + + /* Free the first node */ + CLEAR_START_BIT(PS, Idx); + MARK_NODE_FREE(PS, Idx); + + // Free all nodes + idxiter = Idx + 1; + while (idxiter < NODES_PER_SLAB && (!ALLOCATION_BEGINS(PS,idxiter)) && + (NODE_ALLOCATED(PS, idxiter))) { + MARK_NODE_FREE(PS, idxiter); + } + /* Update the first free field if this node is below the free node line */ if (Idx < PS->FirstUnused) PS->FirstUnused = Idx; /* If we are not freeing the last element in a slab... */ - if (Idx != PS->LastUsed) { - MARK_NODE_FREE(PS, Idx); + if (idxiter - 1 != PS->LastUsed) { return; - } + } /* Otherwise we are freeing the last element in a slab... shrink the * LastUsed marker down to last used node. */ + PS->LastUsed = Idx; do { --PS->LastUsed; /* Fixme, this should scan the allocated array an entire byte at a time for @@ -151,16 +204,131 @@ * it to the head of the list, or free it, depending on whether or not there * is already an empty slab at the head of the list. */ - if (PS->LastUsed == -1) { /* Empty slab? */ - PoolSlab *HeadSlab; - *PPS = PS->Next; /* Unlink from the list of slabs... */ - - HeadSlab = (PoolSlab*)Pool->Data; - if (HeadSlab && HeadSlab->LastUsed == -1){/* List already has empty slab? */ - free(PS); /* Free memory for slab */ - } else { - PS->Next = HeadSlab; /* No empty slab yet, add this */ - Pool->Data = PS; /* one to the head of the list */ + /* Do this only if the pool is freeable */ + if (Pool->FreeablePool) { + if (PS->LastUsed == -1) { /* Empty slab? */ + PoolSlab *HeadSlab; + *PPS = PS->Next; /* Unlink from the list of slabs... */ + + HeadSlab = (PoolSlab*)Pool->Data; + if (HeadSlab && HeadSlab->LastUsed == -1){/* List already has empty slab? */ + free(PS); /* Free memory for slab */ + } else { + PS->Next = HeadSlab; /* No empty slab yet, add this */ + Pool->Data = PS; /* one to the head of the list */ + } + } + } else { + /* Pool is not freeable for safety reasons */ + /* Leave it in the list of PoolSlabs as an empty PoolSlab */ + if (PS->LastUsed == -1) { + PS->FirstUnused = 0; + + /* Do not free the pool, but move it to the head of the list if there is no + empty slab there already */ + PoolSlab *HeadSlab; + HeadSlab = (PoolSlab*)Pool->Data; + if (HeadSlab && HeadSlab->LastUsed != -1) { + PS->Next = HeadSlab; + Pool->Data = PS; + } + } + } +} + +/* The poolallocarray version of FindSlabEntry */ +static void *FindSlabEntryArray(PoolSlab *PS, unsigned NodeSize, + unsigned Size) { + unsigned i; + + /* Loop through all of the slabs looking for one with an opening */ + for (; PS; PS = PS->Next) { + /* Check to see if there are empty entries at the end of the slab... */ + if (PS->LastUsed < NODES_PER_SLAB-Size) { + /* Mark the returned entry used and set the start bit*/ + SET_START_BIT(PS, PS->LastUsed + 1); + for (i = PS->LastUsed + 1; i <= PS->LastUsed + Size; ++i) + MARK_NODE_ALLOCATED(PS, i); + + /* If we are allocating out the first unused field, bump its index also */ + if (PS->FirstUnused == PS->LastUsed+1) + PS->FirstUnused += Size; + + /* Increment LastUsed */ + PS->LastUsed += Size; + + /* Return the entry */ + return &PS->Data[0] + (PS->LastUsed - Size + 1) * NodeSize; + } + + /* If not, check to see if this node has a declared "FirstUnused" value + * starting which Size nodes can be allocated + */ + if (PS->FirstUnused < NODES_PER_SLAB - Size + 1 && + (PS->LastUsed < PS->FirstUnused || + PS->LastUsed - PS->FirstUnused >= Size)) { + unsigned Idx = PS->FirstUnused, foundArray; + + /* Check if there is a continuous array of Size nodes starting + FirstUnused */ + foundArray = 1; + for (i = Idx; (i < Idx + Size) && foundArray; ++i) + if (NODE_ALLOCATED(PS, i)) + foundArray = 0; + + if (foundArray) { + /* Successfully allocate out the first unused node */ + SET_START_BIT(PS, Idx); + for (i = Idx; i < Idx + Size; ++i) + MARK_NODE_ALLOCATED(PS, i); + + PS->FirstUnused += Size; + while (PS->FirstUnused < NODES_PER_SLAB && + NODE_ALLOCATED(PS, PS->FirstUnused)) { + ++PS->FirstUnused; + } + return &PS->Data[0] + Idx*NodeSize; + } + } } + + /* No empty nodes available, must grow # slabs! */ + return 0; +} + +char* poolallocarray(PoolTy* Pool, unsigned Size) { + unsigned NodeSize; + PoolSlab *PS; + void *Result; + unsigned i; + + assert(Pool && "Null pool pointer passed in to poolallocarray!"); + NodeSize = Pool->NodeSize; + PS = (PoolSlab*)Pool->Data; + + assert(Size <= NODES_PER_SLAB && + "Exceeded the maximum size of an individual malloc"); + + if ((Result = FindSlabEntryArray(PS, NodeSize,Size))) + return Result; + + /* Otherwise we must allocate a new slab and add it to the list */ + PS = (PoolSlab*)malloc(sizeof(PoolSlab)+NodeSize*NODES_PER_SLAB-1); + + assert (PS && "Could not allocate memory!"); + + /* Initialize the slab to indicate that the first element is allocated */ + PS->FirstUnused = Size; + PS->LastUsed = Size - 1; + + SET_START_BIT(PS, 0); + for (i = 0; i < Size; ++i) { + MARK_NODE_ALLOCATED(PS, i); + } + + /* Add the slab to the list... */ + PS->Next = (PoolSlab*)Pool->Data; + Pool->Data = PS; + return &PS->Data[0]; } From criswell at choi.cs.uiuc.edu Thu Jul 3 13:22:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Thu Jul 3 13:22:01 2003 Subject: [llvm-commits] CVS: llvm/www/releases/ Message-ID: <200307031821.h63ILra19225@choi.cs.uiuc.edu> Changes in directory llvm/www/releases: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/www/releases added to the repository --- Diffs of the changes: From criswell at choi.cs.uiuc.edu Thu Jul 3 13:23:01 2003 From: criswell at choi.cs.uiuc.edu (John Criswell) Date: Thu Jul 3 13:23:01 2003 Subject: [llvm-commits] CVS: llvm/www/releases/pre10/ Message-ID: <200307031822.h63IM2L19236@choi.cs.uiuc.edu> Changes in directory llvm/www/releases/pre10: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/www/releases/pre10 added to the repository --- Diffs of the changes: From criswell at cs.uiuc.edu Thu Jul 3 13:26:00 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Jul 3 13:26:00 2003 Subject: [llvm-commits] CVS: llvm/www/releases/pre10/cfrontend-src.tar.gz cfrontend.sparc.tar.gz cfrontend.x86.tar.gz llvm.tar.gz Message-ID: <200307031825.NAA10889@tank.cs.uiuc.edu> Changes in directory llvm/www/releases/pre10: cfrontend-src.tar.gz added (r1.1) cfrontend.sparc.tar.gz added (r1.1) cfrontend.x86.tar.gz added (r1.1) llvm.tar.gz added (r1.1) --- Log message: These are the pre-release files. --- Diffs of the changes: Index: llvm/www/releases/pre10/cfrontend-src.tar.gz Index: llvm/www/releases/pre10/cfrontend.sparc.tar.gz Index: llvm/www/releases/pre10/cfrontend.x86.tar.gz Index: llvm/www/releases/pre10/llvm.tar.gz From brukman at cs.uiuc.edu Thu Jul 3 13:37:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Thu Jul 3 13:37:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/SparcV9CodeEmitter.h SparcV9CodeEmitter.cpp Message-ID: <200307031836.NAA24276@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: SparcV9CodeEmitter.h updated: 1.7 -> 1.8 SparcV9CodeEmitter.cpp updated: 1.17 -> 1.18 --- Log message: Apparently, the "regType" and "regClass" used in the Sparc backend are not both correct: empirically, "regType" is wrong for a number of registers. Thus, one can only rely on the "regClass" to figure out what kind of register one is dealing with. This change switches to using only "regClass" and adds a few extra DEBUG() print statements and a few clean-ups in comments and code, mostly minor. --- Diffs of the changes: Index: llvm/lib/Target/Sparc/SparcV9CodeEmitter.h diff -u llvm/lib/Target/Sparc/SparcV9CodeEmitter.h:1.7 llvm/lib/Target/Sparc/SparcV9CodeEmitter.h:1.8 --- llvm/lib/Target/Sparc/SparcV9CodeEmitter.h:1.7 Thu Jun 5 15:52:06 2003 +++ llvm/lib/Target/Sparc/SparcV9CodeEmitter.h Thu Jul 3 13:36:47 2003 @@ -43,13 +43,15 @@ private: int64_t getMachineOpValue(MachineInstr &MI, MachineOperand &MO); - unsigned getValueBit(int64_t Val, unsigned bit); + inline unsigned getValueBit(int64_t Val, unsigned bit); void emitBasicBlock(MachineBasicBlock &MBB); void* getGlobalAddress(GlobalValue *V, MachineInstr &MI, bool isPCRelative); bool isFPInstr(MachineInstr &MI); - unsigned getRealRegNum(unsigned fakeReg, unsigned regClass, - MachineInstr &MI); + unsigned getRealRegNumByType(unsigned fakeReg, unsigned regType, + MachineInstr &MI); + unsigned getRealRegNumByClass(unsigned fakeReg, unsigned regClass, + MachineInstr &MI); }; Index: llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp diff -u llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.17 llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.18 --- llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.17 Fri Jun 6 04:53:28 2003 +++ llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp Thu Jul 3 13:36:47 2003 @@ -334,9 +334,9 @@ unsigned fakeReg = MO.getReg(), realReg, regClass, regType; regType = TM.getRegInfo().getRegType(fakeReg); // At least map fakeReg into its class - fakeReg = TM.getRegInfo().getClassRegNum(fakeReg, regClass); - if (regClass == UltraSparcRegInfo::FPSingleRegType || - regClass == UltraSparcRegInfo::FPDoubleRegType) + // fakeReg = TM.getRegInfo().getClassRegNum(fakeReg, regClass); + if (regType == UltraSparcRegInfo::FPSingleRegType || + regType == UltraSparcRegInfo::FPDoubleRegType) return true; } } @@ -344,9 +344,9 @@ } unsigned -SparcV9CodeEmitter::getRealRegNum(unsigned fakeReg, unsigned regClass, - MachineInstr &MI) { - switch (regClass) { +SparcV9CodeEmitter::getRealRegNumByType(unsigned fakeReg, unsigned regType, + MachineInstr &MI) { + switch (regType) { case UltraSparcRegInfo::IntRegType: { // Sparc manual, p31 static const unsigned IntRegMap[] = { @@ -354,11 +354,9 @@ 8, 9, 10, 11, 12, 13, 15, // "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7", 16, 17, 18, 19, 20, 21, 22, 23, - // "i0", "i1", "i2", "i3", "i4", "i5", - 24, 25, 26, 27, 28, 29, - // "i6", "i7", - 30, 31, - // "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", + // "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", + 24, 25, 26, 27, 28, 29, 30, 31, + // "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", 0, 1, 2, 3, 4, 5, 6, 7, // "o6" 14 @@ -368,15 +366,17 @@ break; } case UltraSparcRegInfo::FPSingleRegType: { + DEBUG(std::cerr << "FP single reg: " << fakeReg << "\n"); return fakeReg; } case UltraSparcRegInfo::FPDoubleRegType: { + DEBUG(std::cerr << "FP double reg: " << fakeReg << "\n"); return fakeReg; } case UltraSparcRegInfo::FloatCCRegType: { /* These are laid out %fcc0 - %fcc3 => 0 - 3, so are correct */ + DEBUG(std::cerr << "FP CC reg: " << fakeReg << "\n"); return fakeReg; - } case UltraSparcRegInfo::IntCCRegType: { static const unsigned FPInstrIntCCReg[] = { 6 /* xcc */, 4 /* icc */ }; @@ -384,11 +384,13 @@ if (isFPInstr(MI)) { assert(fakeReg < sizeof(FPInstrIntCCReg)/sizeof(FPInstrIntCCReg[0]) - && "Int CC register out of bounds for FPInstr IntCCReg map"); + && "FP CC register out of bounds for FPInstr IntCCReg map"); + DEBUG(std::cerr << "FP instr, IntCC reg: " << FPInstrIntCCReg[fakeReg] << "\n"); return FPInstrIntCCReg[fakeReg]; } else { assert(fakeReg < sizeof(IntInstrIntCCReg)/sizeof(IntInstrIntCCReg[0]) && "Int CC register out of bounds for IntInstr IntCCReg map"); + DEBUG(std::cerr << "FP instr, IntCC reg: " << IntInstrIntCCReg[fakeReg] << "\n"); return IntInstrIntCCReg[fakeReg]; } } @@ -398,6 +400,60 @@ } } +unsigned +SparcV9CodeEmitter::getRealRegNumByClass(unsigned fakeReg, unsigned regClass, + MachineInstr &MI) { + switch (regClass) { + case UltraSparcRegInfo::IntRegClassID: { + // Sparc manual, p31 + static const unsigned IntRegMap[] = { + // "o0", "o1", "o2", "o3", "o4", "o5", "o7", + 8, 9, 10, 11, 12, 13, 15, + // "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7", + 16, 17, 18, 19, 20, 21, 22, 23, + // "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", + 24, 25, 26, 27, 28, 29, 30, 31, + // "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", + 0, 1, 2, 3, 4, 5, 6, 7, + // "o6" + 14 + }; + + return IntRegMap[fakeReg]; + break; + } + case UltraSparcRegInfo::FloatRegClassID: { + DEBUG(std::cerr << "FP reg: " << fakeReg << "\n"); + return fakeReg; + } + case UltraSparcRegInfo::IntCCRegClassID: { + static const unsigned FPInstrIntCCReg[] = { 6 /* xcc */, 4 /* icc */ }; + static const unsigned IntInstrIntCCReg[] = { 2 /* xcc */, 0 /* icc */ }; + + if (isFPInstr(MI)) { + assert(fakeReg < sizeof(FPInstrIntCCReg)/sizeof(FPInstrIntCCReg[0]) + && "FP CC register out of bounds for FPInstr IntCCReg map"); + DEBUG(std::cerr << "FP instr, IntCC reg: " << FPInstrIntCCReg[fakeReg] << "\n"); + return FPInstrIntCCReg[fakeReg]; + } else { + assert(fakeReg < sizeof(IntInstrIntCCReg)/sizeof(IntInstrIntCCReg[0]) + && "Int CC register out of bounds for IntInstr IntCCReg map"); + DEBUG(std::cerr << "FP instr, IntCC reg: " << IntInstrIntCCReg[fakeReg] << "\n"); + return IntInstrIntCCReg[fakeReg]; + } + } + case UltraSparcRegInfo::FloatCCRegClassID: { + /* These are laid out %fcc0 - %fcc3 => 0 - 3, so are correct */ + DEBUG(std::cerr << "FP CC reg: " << fakeReg << "\n"); + return fakeReg; + } + default: + assert(0 && "Invalid unified register number in getRegType"); + return fakeReg; + } +} + + int64_t SparcV9CodeEmitter::getMachineOpValue(MachineInstr &MI, MachineOperand &MO) { int64_t rv = 0; // Return value; defaults to 0 for unhandled cases @@ -477,19 +533,22 @@ } else if (MO.isPhysicalRegister() || MO.getType() == MachineOperand::MO_CCRegister) { - // This is necessary because the Sparc doesn't actually lay out registers - // in the real fashion -- it skips those that it chooses not to allocate, - // i.e. those that are the SP, etc. - unsigned fakeReg = MO.getReg(), realReg, regClass, regType; - regType = TM.getRegInfo().getRegType(fakeReg); + // This is necessary because the Sparc backend doesn't actually lay out + // registers in the real fashion -- it skips those that it chooses not to + // allocate, i.e. those that are the FP, SP, etc. + unsigned fakeReg = MO.getAllocatedRegNum(), regClass, regType; + unsigned realRegByClass; //realRegByType, + const TargetRegInfo &RI = TM.getRegInfo(); + DEBUG(std::cerr << std::dec << "LLC: " << fakeReg << " => " + << RI.getUnifiedRegName(fakeReg) << "\n"); + regType = RI.getRegType(fakeReg); // At least map fakeReg into its class - fakeReg = TM.getRegInfo().getClassRegNum(fakeReg, regClass); - // Find the real register number for use in an instruction - /////realReg = getRealRegNum(fakeReg, regClass, MI); - realReg = getRealRegNum(fakeReg, regType, MI); - DEBUG(std::cerr << MO << ": Reg[" << std::dec << fakeReg << "] = " - << realReg << "\n"); - rv = realReg; + fakeReg = RI.getClassRegNum(fakeReg, regClass); + //realRegByType = getRealRegNumByType(fakeReg, regType, MI); + realRegByClass = getRealRegNumByClass(fakeReg, regClass, MI); + DEBUG(std::cerr << MO << ": Reg[" << std::dec << fakeReg << "] = by class: " + << realRegByClass << "\n"); + rv = realRegByClass; } else if (MO.isImmediate()) { rv = MO.getImmedValue(); DEBUG(std::cerr << "immed: " << rv << "\n"); @@ -561,8 +620,7 @@ { Constant *C = (Constant*)*I; unsigned idx = MCP.getConstantPoolIndex(C); - DEBUG(std::cerr << "Mapping constant 0x" << (intptr_t)C << " to " - << idx << "\n"); + DEBUG(std::cerr << "Constant[" << idx << "] = 0x" << (intptr_t)C << "\n"); ConstantMap[C] = idx; } MCE.emitConstantPool(&MCP); @@ -571,31 +629,24 @@ emitBasicBlock(*I); MCE.finishFunction(MF); - DEBUG(std::cerr << "Finishing function " << MF.getFunction()->getName() - << "\n"); + DEBUG(std::cerr << "Finishing fn " << MF.getFunction()->getName() << "\n"); ConstantMap.clear(); - for (unsigned i = 0, e = BBRefs.size(); i != e; ++i) { - long Location = BBLocations[BBRefs[i].first]; - unsigned *Ref = BBRefs[i].second.first; - MachineInstr *MI = BBRefs[i].second.second; - DEBUG(std::cerr << "Fixup @" << std::hex << Ref << " to " << Location - << " in instr: " << std::dec << *MI << "\n"); - } // Resolve branches to BasicBlocks for the entire function for (unsigned i = 0, e = BBRefs.size(); i != e; ++i) { long Location = BBLocations[BBRefs[i].first]; unsigned *Ref = BBRefs[i].second.first; MachineInstr *MI = BBRefs[i].second.second; - DEBUG(std::cerr << "attempting to resolve BB: " << i << "\n"); + DEBUG(std::cerr << "Fixup @ " << std::hex << Ref << " to 0x" << Location + << " in instr: " << std::dec << *MI); for (unsigned ii = 0, ee = MI->getNumOperands(); ii != ee; ++ii) { MachineOperand &op = MI->getOperand(ii); if (op.isPCRelativeDisp()) { // the instruction's branch target is made such that it branches to - // PC + (br target * 4), so undo that arithmetic here: + // PC + (branchTarget * 4), so undo that arithmetic here: // Location is the target of the branch // Ref is the location of the instruction, and hence the PC - unsigned branchTarget = (Location - (long)Ref) >> 2; + int64_t branchTarget = (Location - (long)Ref) >> 2; // Save the flags. bool loBits32=false, hiBits32=false, loBits64=false, hiBits64=false; if (op.opLoBits32()) { loBits32=true; } From criswell at cs.uiuc.edu Thu Jul 3 13:45:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Jul 3 13:45:01 2003 Subject: [llvm-commits] CVS: llvm/www/releases/pre10/cfrontend-src.tar.gz Message-ID: <200307031844.NAA10989@tank.cs.uiuc.edu> Changes in directory llvm/www/releases/pre10: cfrontend-src.tar.gz updated: 1.1 -> 1.2 --- Log message: Attempt 2 to checkin. --- Diffs of the changes: Index: llvm/www/releases/pre10/cfrontend-src.tar.gz From gaeke at cs.uiuc.edu Thu Jul 3 16:16:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Thu Jul 3 16:16:01 2003 Subject: [llvm-commits] CVS: llvm/utils/codegen-diff Message-ID: <200307032115.QAA15091@neo.cs.uiuc.edu> Changes in directory llvm/utils: codegen-diff added (r1.1) --- Log message: here little scriptie, nice scriptie... --- Diffs of the changes: Index: llvm/utils/codegen-diff diff -c /dev/null llvm/utils/codegen-diff:1.1 *** /dev/null Thu Jul 3 16:15:12 2003 --- llvm/utils/codegen-diff Thu Jul 3 16:15:02 2003 *************** *** 0 **** --- 1,112 ---- + #!/usr/bin/perl + + sub parse_objdump_file { + my ($filename) = @_; + my @result; + open (INPUT, $filename) or die "$filename: $!\n"; + while () { + if (/\s*([0-9a-f]*):\t(([0-9a-f]{2} )+) *\t(.*)$/) { + my ($addr, $bytes, $instr) = ($1, $2, $4); + $addr = "0x" . $addr; + $bytes =~ s/\s*(.*\S)\s*/$1/; # trim any remaining whitespace + $instr =~ s/\s*(.*\S)\s*/$1/; + push (@result, {'addr' => $addr, 'bytes' => $bytes, 'instr' => $instr}); + } + } + close INPUT; + return @result; + } + + sub parse_gdb_file { + my ($filename) = @_; + my @result; + my $got_addr; + open (INPUT, $filename) or die "$filename: $!\n"; + while () { + if (/^(0x[0-9a-f]*):\t([^\t]*)\t[^:]*:\t((0x[0-9a-f]{2}\s*)+)\s*$/) { + my ($addr, $bytes, $instr) = ($1, $3, $2); + $bytes =~ s/0x//g; + $bytes =~ s/\s+/ /g; # regularize whitespace + $bytes =~ s/\s*(.*\S)\s*/$1/; # trim any remaining whitespace + $instr =~ s/\s*(.*\S)\s*/$1/; + push (@result, {'addr' => $addr, 'bytes' => $bytes, 'instr' => $instr}); + } elsif (/^(0x[0-9a-f]*):\t$/) { # deal with gdb's line breaker + $got_addr = $1; + } elsif ($got_addr && /^ ([^\t]*)\t[^:]*:\t((0x[0-9a-f]{2}\s*)+)\s*$/) { + my ($addr, $bytes, $instr) = ($got_addr, $2, $1); + $bytes =~ s/0x//g; + $bytes =~ s/\s+/ /g; # regularize whitespace + $bytes =~ s/\s*(.*\S)\s*/$1/; # trim any remaining whitespace + $instr =~ s/\s*(.*\S)\s*/$1/; + push (@result, {'addr' => $addr, 'bytes' => $bytes, 'instr' => $instr}); + undef $got_addr; + } + } + close INPUT; + return @result; + } + + sub binary_diffs { + my ($objdump_file, $gdb_file) = @_; + my @file1 = parse_objdump_file ($objdump_file); + my @file2 = parse_gdb_file ($gdb_file); + my $lastrecord = ($#file1 >= $#file2) ? ($#file1) : ($#file2); + for (my $i = 0; $i <= $lastrecord; ++$i) { + my $d1 = $file1[$i]; + my $d2 = $file2[$i]; + if ($d1->{'bytes'} ne $d2->{'bytes'}) { + printf "0x%08x:\t%30s \t%s\n", 0+$d1->{'addr'}, $d1->{'bytes'}, $d1->{'instr'}; + printf "0x%08x:\t%30s \t%s\n\n", 0+$d2->{'addr'}, $d2->{'bytes'}, $d2->{'instr'}; + } + } + } + + $objdump_file = $ARGV[0]; + $gdb_file = $ARGV[1]; + binary_diffs ($objdump_file, $gdb_file); + exit (0); + __END__ + =pod + + =head1 NAME + + codegen-diff + + =head1 SYNOPSIS + + codegen-diff I I + + =head1 DESCRIPTION + + B is a program that tries to show you the differences + between the code that B generated and the code that B generated. + + The way you use it is as follows: first, you create I + by running B on the B compiled and linked binary. You need to + trim down the result so it contains only the function of interest. + + Second, you create I by running B, with my patch + to print out hex bytes in the B command output, on + B. Set a breakpoint in C and wait until + the function you want is compiled. Then use the B command + to print out the assembly dump of the function B just compiled. + (Use C to find out where the function starts and ends in memory.) + It's easiest to save this output by using B