diff options
350 files changed, 112691 insertions, 0 deletions
diff --git a/A5.1/C#/A5.sln b/A5.1/C#/A5.sln new file mode 100644 index 0000000..43e63dd --- /dev/null +++ b/A5.1/C#/A5.sln @@ -0,0 +1,20 @@ +
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "A5", "A5\A5.csproj", "{2D7658AD-F358-402A-B869-65EF26DE8080}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {2D7658AD-F358-402A-B869-65EF26DE8080}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2D7658AD-F358-402A-B869-65EF26DE8080}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2D7658AD-F358-402A-B869-65EF26DE8080}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2D7658AD-F358-402A-B869-65EF26DE8080}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/A5.1/C#/A5/A5.csproj b/A5.1/C#/A5/A5.csproj new file mode 100644 index 0000000..0562241 --- /dev/null +++ b/A5.1/C#/A5/A5.csproj @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{2D7658AD-F358-402A-B869-65EF26DE8080}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>A5</RootNamespace>
+ <AssemblyName>A5</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="A5Engine.cs" />
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/A5.1/C#/A5/A5Engine.cs b/A5.1/C#/A5/A5Engine.cs new file mode 100644 index 0000000..040c245 --- /dev/null +++ b/A5.1/C#/A5/A5Engine.cs @@ -0,0 +1,443 @@ +/*
+ * A5/1 Implementation
+ *
+ * Information: http://en.wikipedia.org/wiki/A5/1
+ * Released : 24/10/2008
+ * App Options: -d (Debugging mode)
+ *
+ * Written by : Brett Gervasoni (brett.gervasoni [at] gmail.com)
+ * Thanks to : Angus McMahon (angusmcmahon [at] gmail.com)
+ *
+ * Notes:
+ * - Debugging mode will show step by step processes
+ * - The code has been designed to be easily expandable, so that more secure
+ * versions of the A5 family can be introduced.
+ * - Various properties of the A5Engine class can be modified
+ * - If order matters then put things in order to begin with!
+ * Polynomials, clocking bits, and maximum register lengths.
+ * - If data is not in order the application will try its best to make
+ * the cipher work.
+ * - Polynomials for each register are chosen based on their largest exponent
+ * being less than register length.
+ *
+ * Instructions:
+ * numRegisters = The number of registers to use
+ * maxRegLens = The max register length for each register
+ * regIndexes = The clocking bits for each register
+ * polynomialsArray = The polynomials to use for each register
+ * sourceArray = Random binary bits
+ * */
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+
+namespace A5
+{
+ class A5Engine
+ {
+ public bool dbMode; //Debug mode
+
+ private int nRegisters; //number of registers
+ private int[] mRegLens; //max register lengths
+ private int[] sArray; //source array
+ private int[] rIndexes; //register indexes (clocking bits)
+ private string[] pArray; //polynomials
+ private int[][] registers; //registers
+
+ private int[][] uExponents; //exponents being used
+
+ /* --- Setting properties --- */
+ public int numRegisters
+ {
+ get
+ { return nRegisters; }
+ set
+ { nRegisters = value; }
+ }
+
+ public int[] maxRegLens
+ {
+ get
+ { return mRegLens; }
+ set
+ { mRegLens = value; }
+ }
+
+ public int[] sourceArray
+ {
+ get
+ { return sArray; }
+ set
+ { sArray = value; }
+ }
+
+ public int[] regIndexes
+ {
+ get
+ { return rIndexes; }
+ set
+ { rIndexes = value; }
+ }
+
+ public string[] polynomialsArray
+ {
+ get
+ { return pArray; }
+ set
+ { pArray = value; }
+ }
+
+ public int[][] Registers
+ {
+ get
+ { return registers; }
+ set
+ { registers = value; }
+ }
+
+ /* --- Begin methods ---*/
+ private void slowText(string message)
+ {
+ foreach (char c in message.ToCharArray())
+ {
+ Console.Write(c);
+ System.Threading.Thread.Sleep(60);
+ }
+
+ Console.WriteLine();
+ }
+
+ public void Intro()
+ {
+ string message = "#################################################################\n";
+ message += "# A5/1 Implementation #\n";
+ message += "# #\n";
+ message += "# Information: http://en.wikipedia.org/wiki/A5/1 #\n";
+ message += "# Released: 24th October 2008 #\n";
+ message += "# App Options: -d [NumOfLoops] (Debugging mode) #\n";
+ message += "# #\n";
+ message += "# Written By: Brett Gervasoni (brett.gervasoni [at] gmail.com) #\n";
+ message += "#################################################################\n";
+
+ Console.WriteLine(message);
+
+ string matrix = "Now you will see how deep the rabit hole really goes...";
+ slowText(matrix);
+
+ System.Threading.Thread.Sleep(2500);
+ }
+
+ public int GetMaxRegLensTotal()
+ {
+ int total = 0;
+
+ foreach (int len in mRegLens)
+ total += len;
+
+ return total;
+ }
+
+ private int XorValues(int val1, int val2)
+ {
+ int res = 0;
+
+ if (val1 != val2)
+ res = 1;
+
+ return res;
+ }
+
+ private int XorRegValues(int[] vToXor)
+ {
+ int final = 0;
+
+ for (int i = 0; i < vToXor.Length; i++)
+ final = XorValues(final, vToXor[i]);
+
+ return final;
+ }
+
+ private int[][] RemoveIntArrElement(int[][] oArray, int index)
+ {
+ int[][] nArray = new int[oArray.Length-1][];
+
+ for (int i = 0; i < oArray.Length; i++)
+ {
+ if (i != index)
+ {
+ nArray[i-1] = new int[oArray[i].Length];
+ for (int x = 0; x < oArray[i].Length; x++)
+ {
+ nArray[i-1][x] = oArray[i][x];
+ }
+ }
+ }
+
+ return nArray;
+ }
+
+ private int[][] ExtractPolyExponents(string[] polynomialsArray)
+ {
+ int[][] exponents = new int[polynomialsArray.Length][];
+
+ for (int i = 0; i < polynomialsArray.Length; i++)
+ {
+ Regex expression = new Regex(@"x\^(\d+)");
+ MatchCollection polyMatches = expression.Matches(polynomialsArray[i]);
+
+ exponents[i] = new int[polyMatches.Count];
+
+ for (int x = 0; x < polyMatches.Count; x++)
+ {
+ //Console.WriteLine(polyMatches[x].Groups[1].ToString());
+ exponents[i][x] = int.Parse(polyMatches[x].Groups[1].ToString());
+ }
+ }
+
+ return exponents;
+ }
+
+ private int FindLargestInt(int[] intArray)
+ {
+ int largest = 0;
+
+ foreach (int num in intArray)
+ {
+ if (num > largest)
+ largest = num;
+ }
+
+ return largest;
+ }
+
+ private int[][] PolySelection()
+ {
+ int[][] exponents = ExtractPolyExponents(pArray);
+ int[][] usingPolynomials = new int[nRegisters][];
+
+ int counter = 0;
+ int j = 0; //since i variable is reset
+ for (int i = 0; i < exponents.Length; i++)
+ {
+ if (counter == nRegisters)
+ break;
+
+ int largest = FindLargestInt(exponents[i]);
+
+ if (largest < mRegLens[j])
+ {
+ usingPolynomials[counter] = new int[exponents[i].Length];
+
+ for (int x = 0; x < exponents[i].Length; x++)
+ usingPolynomials[counter][x] = exponents[i][x];
+
+ exponents = RemoveIntArrElement(exponents, i);
+
+ i = -1; //reset loop
+ counter++;
+ }
+
+ j++;
+ }
+
+ return usingPolynomials;
+ }
+
+ private int[] RegisterFill(int offset, int regNum)
+ {
+ int[] outArray = new int[regNum];
+
+ for (int i = 0; i < regNum; i++)
+ {
+ outArray[i] = sArray[offset + i];
+ }
+
+ return outArray;
+ }
+
+ private int[] GetIndexValues()
+ {
+ int[] indexValues = new int[registers.Length];
+
+ for (int i = 0; i < registers.Length; i++)
+ {
+ indexValues[i] = registers[i][rIndexes[i]];
+ }
+
+ return indexValues;
+ }
+
+ private int[] FindFrequency(int[] indexValues)
+ {
+ int[] tally = new int[2]; //size of 2 since its just binary
+
+ foreach (int val in indexValues)
+ {
+ if (val == 0)
+ tally[0]++;
+ else if (val == 1)
+ tally[1]++;
+ }
+
+ return tally;
+ }
+
+ public int[][] CreateRegisters()
+ {
+ int[][] filledRegisters = new int[nRegisters][];
+ int offset = 0;
+
+ //Does source array have enough data to fill?
+ if (GetMaxRegLensTotal() <= sArray.Length)
+ {
+ for (int i = 0; i < nRegisters; i++)
+ {
+ filledRegisters[i] = RegisterFill(offset, mRegLens[i]);
+ offset += mRegLens[i];
+ }
+ }
+
+ uExponents = PolySelection();
+
+ if (dbMode)
+ {
+ //Exponents in use
+ int counter = 0;
+
+ Console.WriteLine("[exponents]");
+ foreach (int[] set in uExponents)
+ {
+ Console.WriteLine("set: {0}", counter.ToString());
+
+ foreach (int exp in set)
+ Console.Write(exp.ToString() + " ");
+
+ Console.WriteLine();
+ counter++;
+ }
+
+ Console.WriteLine("[/exponents]");
+ }
+
+ return filledRegisters;
+ }
+
+ public int GetOutValue()
+ {
+ int[] vToXor = new int[registers.Length];
+ int outValue = 0;
+
+ for (int i = 0; i < registers.Length; i++)
+ vToXor[i] = registers[i][0];
+
+ outValue = XorRegValues(vToXor);
+
+ return outValue;
+ }
+
+ public int[] RegistersToShift()
+ {
+ int[] indexValues = GetIndexValues();
+ int[] tally = FindFrequency(indexValues);
+
+ int highest = 0;
+ int movVal = 0;
+
+ if (dbMode)
+ {
+ Console.WriteLine("[indexValues]:");
+ foreach (int v in indexValues)
+ Console.Write(v.ToString() + " ");
+ Console.WriteLine("\n[/indexValues]:");
+
+ Console.WriteLine("[tally]:");
+ foreach (int v in tally)
+ Console.Write(v.ToString() + " ");
+ Console.WriteLine("\n[/tally]:");
+ }
+
+ foreach (int count in tally)
+ {
+ if (count > highest)
+ highest = count;
+ }
+
+ for (int i = 0; i < tally.Length; i++)
+ {
+ if (tally[i] == highest)
+ movVal = i;
+ }
+
+ ArrayList regTS = new ArrayList();
+
+ for (int i = 0; i < indexValues.Length; i++)
+ {
+ if (indexValues[i] == movVal)
+ regTS.Add(i);
+ }
+
+ return (int[])regTS.ToArray(typeof(int));
+ }
+
+ private int[] GetFeedbackValues(int[] regTS)
+ {
+ int[] regTSFBV = new int[regTS.Length]; //Reg To Shift Feed Back Values (regTSFBV)
+
+ for (int i = 0; i < regTS.Length; i++)
+ {
+ int[] feedbackSet = new int[uExponents[regTS[i]].Length];
+
+ for (int x = 0; x < uExponents[regTS[i]].Length; x++)
+ {
+ feedbackSet[x] = registers[regTS[i]][uExponents[regTS[i]][x]];
+ }
+
+ regTSFBV[i] = XorRegValues(feedbackSet);
+ }
+
+ return regTSFBV;
+ }
+
+ public void RegisterShift(int[] regTS)
+ {
+ int[] shiftedElements = new int[regTS.Length];
+ int[] regTSFBV = GetFeedbackValues(regTS);
+
+ if (dbMode)
+ {
+ Console.WriteLine("[regTS]:");
+ foreach (int v in regTS)
+ Console.Write(v.ToString() + " ");
+ Console.WriteLine("\n[/regTS]:");
+
+ Console.WriteLine("[regTSFBV]:");
+ foreach (int v in regTSFBV)
+ Console.Write(v.ToString() + " ");
+ Console.WriteLine("\n[/regTSFBV]:");
+ }
+
+ for (int i = 0; i < regTS.Length; i++)
+ {
+ int[] regShifting = registers[regTS[i]]; //Alias the register to shift
+
+ shiftedElements[i] = registers[regTS[i]][0]; //Copy position zero value in registers to shift
+
+ //Creates new register with appropriate max reg length
+ int[] nRegister = new int[regShifting.Length]; //Could also use mRegLens[regTS[i]].Length
+
+ //Fill values to length -1
+ for (int x = 0; x < (regShifting.Length - 1); x++)
+ nRegister[x] = regShifting[x + 1]; //+1 Grabbing everything after position zero
+
+ //Now put feedback values on the end (former RegisterPush method)
+ nRegister[nRegister.Length - 1] = regTSFBV[i];
+
+ registers[regTS[i]] = nRegister; //assign to register (update)
+ }
+ }
+ }
+}
\ No newline at end of file diff --git a/A5.1/C#/A5/Program.cs b/A5.1/C#/A5/Program.cs new file mode 100644 index 0000000..efa4150 --- /dev/null +++ b/A5.1/C#/A5/Program.cs @@ -0,0 +1,150 @@ +/*
+ * A5/1 Implementation
+ *
+ * Information: http://en.wikipedia.org/wiki/A5/1
+ * Released : 24/10/2008
+ * App Options: -d (Debugging mode)
+ *
+ * Written by : Brett Gervasoni (brett.gervasoni [at] gmail.com)
+ * Thanks to : Angus McMahon (angusmcmahon [at] gmail.com)
+ *
+ * Notes:
+ * - Debugging mode will show step by step processes
+ * - The code has been designed to be easily expandable, so that more secure
+ * versions of the A5 family can be introduced.
+ * - Various properties of the A5Engine class can be modified
+ * - If order matters then put things in order to begin with!
+ * Polynomials, clocking bits, and maximum register lengths.
+ * - If data is not in order the application will try its best to make
+ * the cipher work.
+ * - Polynomials for each register are chosen based on their largest exponent
+ * being less than register length.
+ *
+ * Instructions:
+ * numRegisters = The number of registers to use
+ * maxRegLens = The max register length for each register
+ * regIndexes = The clocking bits for each register
+ * polynomialsArray = The polynomials to use for each register
+ * sourceArray = Random binary bits
+ * */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace A5
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ //Create registers
+ A5Engine A5eng = new A5Engine();
+
+ //To expand the algorithm...
+ //Edit below properties
+ A5eng.numRegisters = 3; //Number of registers to use
+ A5eng.maxRegLens = new int[] { 19, 22, 23 }; //Test max reg lengths: { 5,5,5 };
+ A5eng.regIndexes = new int[] { 8, 10, 10 }; //Test clocking bits: { 0,0,0 };
+
+ //Test polynomials: { "x^1+x^2+x^3+1", "x^0+x^2+x^3+1", "x^3+x^4+1" };
+ A5eng.polynomialsArray = new string[] { "x^8+x^17+x^16+x^13+1",
+ "x^21+x^20+1",
+ "x^22+x^21+x^20+x^7+1" };
+ A5eng.sourceArray = new int[] { 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1,
+ 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1,
+ 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1,
+ 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1,
+ 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1,
+ 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1 };
+
+ /* DO NOT EDIT BELOW THIS POINT */
+ int numRegPushes = 100;
+ bool testPassed = true; //For cipher check
+
+ if (args.Length > 0)
+ {
+ if (args[0] == "-d")
+ {
+ A5eng.dbMode = true;
+ if (args.Length > 1)
+ {
+ try
+ {
+ numRegPushes = int.Parse(args[1]);
+ }
+ catch (Exception ex)
+ {
+ testPassed = false;
+
+ Console.WriteLine("Error: Numeric values only!");
+ Console.WriteLine("Exception: " + ex.Message);
+ }
+ }
+ }
+ }
+
+ if (A5eng.sourceArray.Length < A5eng.GetMaxRegLensTotal())
+ {
+ testPassed = false;
+ Console.WriteLine("[-] Not enough source data!");
+ }
+
+ if (A5eng.polynomialsArray.Length != A5eng.numRegisters)
+ {
+ testPassed = false;
+ Console.WriteLine("[-] Not enough polynomials");
+ }
+
+ if (testPassed)
+ {
+ A5eng.Registers = A5eng.CreateRegisters();
+
+ if (A5eng.dbMode)
+ {
+ Console.WriteLine("Output (debugging mode): ");
+ for (int ia = 0; ia < numRegPushes; ia++)
+ {
+ Console.WriteLine("[register]");
+ int c = 0;
+ foreach (int[] p in A5eng.Registers)
+ {
+ Console.Write("register: {0} ", c);
+ foreach (int poly in p)
+ {
+ Console.Write(poly.ToString());
+ }
+ Console.WriteLine();
+
+ c++;
+ }
+ Console.WriteLine("[/register]");
+
+ int[] regTS = A5eng.RegistersToShift();
+ A5eng.RegisterShift(regTS);
+
+ System.Threading.Thread.Sleep(20); //Slow the output
+ }
+
+ Console.WriteLine("\n{0} loops of A5/1 have been completed.", numRegPushes.ToString());
+ }
+ else
+ {
+ A5eng.Intro();
+
+ Console.WriteLine("Output: ");
+ while (true)
+ {
+ Console.Write(A5eng.GetOutValue().ToString());
+
+ int[] regTS = A5eng.RegistersToShift();
+ A5eng.RegisterShift(regTS);
+
+ System.Threading.Thread.Sleep(20); //Slow the output
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/A5.1/C#/A5/Properties/AssemblyInfo.cs b/A5.1/C#/A5/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..eb08b29 --- /dev/null +++ b/A5.1/C#/A5/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("A5")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("A5")]
+[assembly: AssemblyCopyright("Copyright © 2008")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("9c339432-71f0-44fd-8e07-f8f83a148db7")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/A5.1/C#/A5/bin/Debug/A5.exe b/A5.1/C#/A5/bin/Debug/A5.exe Binary files differnew file mode 100644 index 0000000..536aae5 --- /dev/null +++ b/A5.1/C#/A5/bin/Debug/A5.exe diff --git a/A5.1/C#/A5/bin/Debug/A5.pdb b/A5.1/C#/A5/bin/Debug/A5.pdb Binary files differnew file mode 100644 index 0000000..12425d9 --- /dev/null +++ b/A5.1/C#/A5/bin/Debug/A5.pdb diff --git a/A5.1/C#/A5/bin/Debug/A5.vshost.exe b/A5.1/C#/A5/bin/Debug/A5.vshost.exe Binary files differnew file mode 100644 index 0000000..69ed6c0 --- /dev/null +++ b/A5.1/C#/A5/bin/Debug/A5.vshost.exe diff --git a/A5.1/C#/A5/bin/Debug/A5.vshost.exe.manifest b/A5.1/C#/A5/bin/Debug/A5.vshost.exe.manifest new file mode 100644 index 0000000..f96b1d6 --- /dev/null +++ b/A5.1/C#/A5/bin/Debug/A5.vshost.exe.manifest @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
+ <security>
+ <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
+ <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+</assembly>
diff --git a/A5.1/C#/A5/obj/Debug/A5.csproj.FileListAbsolute.txt b/A5.1/C#/A5/obj/Debug/A5.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..af8c666 --- /dev/null +++ b/A5.1/C#/A5/obj/Debug/A5.csproj.FileListAbsolute.txt @@ -0,0 +1,5 @@ +C:\Users\Brett\Documents\Visual Studio 2008\Projects\A5\A5\bin\Debug\A5.exe
+C:\Users\Brett\Documents\Visual Studio 2008\Projects\A5\A5\bin\Debug\A5.pdb
+C:\Users\Brett\Documents\Visual Studio 2008\Projects\A5\A5\obj\Debug\ResolveAssemblyReference.cache
+C:\Users\Brett\Documents\Visual Studio 2008\Projects\A5\A5\obj\Debug\A5.exe
+C:\Users\Brett\Documents\Visual Studio 2008\Projects\A5\A5\obj\Debug\A5.pdb
diff --git a/A5.1/C#/A5/obj/Debug/A5.exe b/A5.1/C#/A5/obj/Debug/A5.exe Binary files differnew file mode 100644 index 0000000..536aae5 --- /dev/null +++ b/A5.1/C#/A5/obj/Debug/A5.exe diff --git a/A5.1/C#/A5/obj/Debug/A5.pdb b/A5.1/C#/A5/obj/Debug/A5.pdb Binary files differnew file mode 100644 index 0000000..12425d9 --- /dev/null +++ b/A5.1/C#/A5/obj/Debug/A5.pdb diff --git a/A5.1/C/A5.1.c b/A5.1/C/A5.1.c new file mode 100644 index 0000000..364851c --- /dev/null +++ b/A5.1/C/A5.1.c @@ -0,0 +1,318 @@ +/* + * A pedagogical implementation of A5/1. + * + * Copyright (C) 1998-1999: Marc Briceno, Ian Goldberg, and David Wagner + * + * The source code below is optimized for instructional value and clarity. + * Performance will be terrible, but that's not the point. + * The algorithm is written in the C programming language to avoid ambiguities + * inherent to the English language. Complain to the 9th Circuit of Appeals + * if you have a problem with that. + * + * This software may be export-controlled by US law. + * + * This software is free for commercial and non-commercial use as long as + * the following conditions are aheared to. + * Copyright remains the authors' and as such any Copyright notices in + * the code are not to be removed. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The license and distribution terms for any publicly available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution license + * [including the GNU Public License.] + * + * Background: The Global System for Mobile communications is the most widely + * deployed cellular telephony system in the world. GSM makes use of + * four core cryptographic algorithms, neither of which has been published by + * the GSM MOU. This failure to subject the algorithms to public review is all + * the more puzzling given that over 100 million GSM + * subscribers are expected to rely on the claimed security of the system. + * + * The four core GSM algorithms are: + * A3 authentication algorithm + * A5/1 "strong" over-the-air voice-privacy algorithm + * A5/2 "weak" over-the-air voice-privacy algorithm + * A8 voice-privacy key generation algorithm + * + * In April of 1998, our group showed that COMP128, the algorithm used by the + * overwhelming majority of GSM providers for both A3 and A8 + * functionality was fatally flawed and allowed for cloning of GSM mobile + * phones. + * Furthermore, we demonstrated that all A8 implementations we could locate, + * including the few that did not use COMP128 for key generation, had been + * deliberately weakened by reducing the keyspace from 64 bits to 54 bits. + * The remaining 10 bits are simply set to zero! + * + * See http://www.scard.org/gsm for additional information. + * + * The question so far unanswered is if A5/1, the "stronger" of the two + * widely deployed voice-privacy algorithm is at least as strong as the + * key. Meaning: "Does A5/1 have a work factor of at least 54 bits"? + * Absent a publicly available A5/1 reference implementation, this question + * could not be answered. We hope that our reference implementation below, + * which has been verified against official A5/1 test vectors, will provide + * the cryptographic community with the base on which to construct the + * answer to this important question. + * + * Initial indications about the strength of A5/1 are not encouraging. + * A variant of A5, while not A5/1 itself, has been estimated to have a + * work factor of well below 54 bits. See http://jya.com/crack-a5.htm for + * background information and references. + * + * With COMP128 broken and A5/1 published below, we will now turn our attention + * to A5/2. The latter has been acknowledged by the GSM community to have + * been specifically designed by intelligence agencies for lack of security. + * + * We hope to publish A5/2 later this year. + * + * -- Marc Briceno <marc@scard.org> + * Voice: +1 (925) 798-4042 + * + */ + + +#include <stdio.h> + +/* Masks for the three shift registers */ +#define R1MASK 0x07FFFF /* 19 bits, numbered 0..18 */ +#define R2MASK 0x3FFFFF /* 22 bits, numbered 0..21 */ +#define R3MASK 0x7FFFFF /* 23 bits, numbered 0..22 */ + +/* Middle bit of each of the three shift registers, for clock control */ +#define R1MID 0x000100 /* bit 8 */ +#define R2MID 0x000400 /* bit 10 */ +#define R3MID 0x000400 /* bit 10 */ + +/* Feedback taps, for clocking the shift registers. + * These correspond to the primitive polynomials + * x^19 + x^5 + x^2 + x + 1, x^22 + x + 1, + * and x^23 + x^15 + x^2 + x + 1. */ +#define R1TAPS 0x072000 /* bits 18,17,16,13 */ +#define R2TAPS 0x300000 /* bits 21,20 */ +#define R3TAPS 0x700080 /* bits 22,21,20,7 */ + +/* Output taps, for output generation */ +#define R1OUT 0x040000 /* bit 18 (the high bit) */ +#define R2OUT 0x200000 /* bit 21 (the high bit) */ +#define R3OUT 0x400000 /* bit 22 (the high bit) */ + +typedef unsigned char byte; +typedef unsigned long word; +typedef word bit; + +/* Calculate the parity of a 32-bit word, i.e. the sum of its bits modulo 2 */ +bit parity(word x) { + x ^= x>>16; + x ^= x>>8; + x ^= x>>4; + x ^= x>>2; + x ^= x>>1; + return x&1; +} + +/* Clock one shift register */ +word clockone(word reg, word mask, word taps) { + word t = reg & taps; + reg = (reg << 1) & mask; + reg |= parity(t); + return reg; +} + +/* The three shift registers. They're in global variables to make the code + * easier to understand. + * A better implementation would not use global variables. */ +word R1, R2, R3; + +/* Look at the middle bits of R1,R2,R3, take a vote, and + * return the majority value of those 3 bits. */ +bit majority() { + int sum; + sum = parity(R1&R1MID) + parity(R2&R2MID) + parity(R3&R3MID); + if (sum >= 2) + return 1; + else + return 0; +} + +/* Clock two or three of R1,R2,R3, with clock control + * according to their middle bits. + * Specifically, we clock Ri whenever Ri's middle bit + * agrees with the majority value of the three middle bits.*/ +void clock() { + bit maj = majority(); + if (((R1&R1MID)!=0) == maj) + R1 = clockone(R1, R1MASK, R1TAPS); + if (((R2&R2MID)!=0) == maj) + R2 = clockone(R2, R2MASK, R2TAPS); + if (((R3&R3MID)!=0) == maj) + R3 = clockone(R3, R3MASK, R3TAPS); +} + +/* Clock all three of R1,R2,R3, ignoring their middle bits. + * This is only used for key setup. */ +void clockallthree() { + R1 = clockone(R1, R1MASK, R1TAPS); + R2 = clockone(R2, R2MASK, R2TAPS); + R3 = clockone(R3, R3MASK, R3TAPS); +} + +/* Generate an output bit from the current state. + * You grab a bit from each register via the output generation taps; + * then you XOR the resulting three bits. */ +bit getbit() { + return parity(R1&R1OUT)^parity(R2&R2OUT)^parity(R3&R3OUT); +} + +/* Do the A5/1 key setup. This routine accepts a 64-bit key and + * a 22-bit frame number. */ +void keysetup(byte key[8], word frame) { + int i; + bit keybit, framebit; + + /* Zero out the shift registers. */ + R1 = R2 = R3 = 0; + + /* Load the key into the shift registers, + * LSB of first byte of key array first, + * clocking each register once for every + * key bit loaded. (The usual clock + * control rule is temporarily disabled.) */ + for (i=0; i<64; i++) { + clockallthree(); /* always clock */ + keybit = (key[i/8] >> (i&7)) & 1; /* The i-th bit of the key */ + R1 ^= keybit; R2 ^= keybit; R3 ^= keybit; + } + + /* Load the frame number into the shift + * registers, LSB first, + * clocking each register once for every + * key bit loaded. (The usual clock + * control rule is still disabled.) */ + for (i=0; i<22; i++) { + clockallthree(); /* always clock */ + framebit = (frame >> i) & 1; /* The i-th bit of the frame # */ + R1 ^= framebit; R2 ^= framebit; R3 ^= framebit; + } + + /* Run the shift registers for 100 clocks + * to mix the keying material and frame number + * together with output generation disabled, + * so that there is sufficient avalanche. + * We re-enable the majority-based clock control + * rule from now on. */ + for (i=0; i<100; i++) { + clock(); + } + + /* Now the key is properly set up. */ +} + +/* Generate output. We generate 228 bits of + * keystream output. The first 114 bits is for + * the A->B frame; the next 114 bits is for the + * B->A frame. You allocate a 15-byte buffer + * for each direction, and this function fills + * it in. */ +void run(byte AtoBkeystream[], byte BtoAkeystream[]) { + int i; + + /* Zero out the output buffers. */ + for (i=0; i<=113/8; i++) + AtoBkeystream[i] = BtoAkeystream[i] = 0; + + /* Generate 114 bits of keystream for the + * A->B direction. Store it, MSB first. */ + for (i=0; i<114; i++) { + clock(); + AtoBkeystream[i/8] |= getbit() << (7-(i&7)); + } + + /* Generate 114 bits of keystream for the + * B->A direction. Store it, MSB first. */ + for (i=0; i<114; i++) { + clock(); + BtoAkeystream[i/8] |= getbit() << (7-(i&7)); + } +} + +/* Test the code by comparing it against + * a known-good test vector. */ +void test() { + byte key[8] = {0x12, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF}; + word frame = 0x134; + byte goodAtoB[15] = { 0x53, 0x4E, 0xAA, 0x58, 0x2F, 0xE8, 0x15, + 0x1A, 0xB6, 0xE1, 0x85, 0x5A, 0x72, 0x8C, 0x00 }; + byte goodBtoA[15] = { 0x24, 0xFD, 0x35, 0xA3, 0x5D, 0x5F, 0xB6, + 0x52, 0x6D, 0x32, 0xF9, 0x06, 0xDF, 0x1A, 0xC0 }; + byte AtoB[15], BtoA[15]; + int i, failed=0; + + keysetup(key, frame); + run(AtoB, BtoA); + + /* Compare against the test vector. */ + for (i=0; i<15; i++) + if (AtoB[i] != goodAtoB[i]) + failed = 1; + for (i=0; i<15; i++) + if (BtoA[i] != goodBtoA[i]) + failed = 1; + + /* Print some debugging output. */ + printf("key: 0x"); + for (i=0; i<8; i++) + printf("%02X", key[i]); + printf("\n"); + printf("frame number: 0x%06X\n", (unsigned int)frame); + printf("known good output:\n"); + printf(" A->B: 0x"); + for (i=0; i<15; i++) + printf("%02X", goodAtoB[i]); + printf(" B->A: 0x"); + for (i=0; i<15; i++) + printf("%02X", goodBtoA[i]); + printf("\n"); + printf("observed output:\n"); + printf(" A->B: 0x"); + for (i=0; i<15; i++) + printf("%02X", AtoB[i]); + printf(" B->A: 0x"); + for (i=0; i<15; i++) + printf("%02X", BtoA[i]); + printf("\n"); + + if (!failed) { + printf("Self-check succeeded: everything looks ok.\n"); + return; + } else { + /* Problems! The test vectors didn't compare*/ + printf("\nI don't know why this broke; contact the authors.\n"); + exit(1); + } +} + +int main(void) { + test(); + return 0; +} diff --git a/A5.1/C/calculate_chain.c b/A5.1/C/calculate_chain.c new file mode 100644 index 0000000..28aec0f --- /dev/null +++ b/A5.1/C/calculate_chain.c @@ -0,0 +1,159 @@ +/* + * Calculation of chains for A5/1 rainbow table cracking. + * + * + * Loosely based on: A pedagogical implementation of A5/1. + * + * Copyright (C) 1998-1999: Marc Briceno, Ian Goldberg, and David Wagner + * + * See accompanying file A5.1.c for original version and full copyright + */ + + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <math.h> + +/* Masks for the three shift registers */ +#define R1MASK 0x07FFFF /* 19 bits, numbered 0..18 */ +#define R2MASK 0x3FFFFF /* 22 bits, numbered 0..21 */ +#define R3MASK 0x7FFFFF /* 23 bits, numbered 0..22 */ + +/* Middle bit of each of the three shift registers, for clock control */ +#define R1MID 0x000100 /* bit 8 */ +#define R2MID 0x000400 /* bit 10 */ +#define R3MID 0x000400 /* bit 10 */ + +/* Feedback taps, for clocking the shift registers. */ +#define R1TAPS 0x072000 /* bits 18,17,16,13 */ +#define R2TAPS 0x300000 /* bits 21,20 */ +#define R3TAPS 0x700080 /* bits 22,21,20,7 */ + +/* Output taps, for output generation */ +#define R1OUT 0x040000 /* bit 18 (the high bit) */ +#define R2OUT 0x200000 /* bit 21 (the high bit) */ +#define R3OUT 0x400000 /* bit 22 (the high bit) */ + +typedef unsigned char byte; +#ifdef BITSIZE_32 +typedef unsigned long uint32; +typedef unsigned long long uint64; +#else +typedef unsigned int uint32; +typedef unsigned long uint64; +#endif + +typedef unsigned int bit; + +bit parity32(uint32 x) { + x ^= x>>16; + x ^= x>>8; + x ^= x>>4; + x ^= x>>2; + x ^= x>>1; + return x&1; +} + +bit parity64(uint64 x) { + x ^= x>>32; + x ^= x>>16; + x ^= x>>8; + x ^= x>>4; + x ^= x>>2; + x ^= x>>1; + return x&1; +} + +uint32 clockone(uint32 reg, uint32 mask, uint32 taps) { + uint32 t = reg & taps; + reg = (reg << 1) & mask; + reg |= parity32(t); + return reg; +} + +uint32 R1, R2, R3; + +inline bit majority() { + int sum; + sum = ((R1&R1MID) >> 8) + ((R2&R2MID) >> 10) + ((R3&R3MID) >> 10); + if (sum >= 2) + return 1; + else + return 0; +} + +inline void clock() { + bit maj = majority(); + if (((R1&R1MID)!=0) == maj) + R1 = clockone(R1, R1MASK, R1TAPS); + if (((R2&R2MID)!=0) == maj) + R2 = clockone(R2, R2MASK, R2TAPS); + if (((R3&R3MID)!=0) == maj) + R3 = clockone(R3, R3MASK, R3TAPS); +} + +inline bit getbit() { + return ((R1&R1OUT) >> 18) ^ ((R2&R2OUT) >> 21) ^ ((R3&R3OUT) >> 22); +} + +inline uint64 calculate_link (uint64 input, uint32 count) { + uint64 result; + int i; + + /* Reduction function. */ + R1 = ((input >> (22 + 23))^count) & R1MASK; + R2 = ((input >> 23)^count) & R2MASK; + R3 = (input^count) & R3MASK; + + result = getbit(); + for(i=1;i<64;i++) { + // Yes, virginia, we only need to clock 63 times for 64 bits of output + clock(); + result = (result << 1)| getbit(); + } + return result; +} + +uint64 calculate_chain (uint64 input, uint32 count) { + int i; + + for(i=count-1; i>=0; i--) { + input = calculate_link(input, i); + } + return input; +} + +/* Linear congruential generator used to whiten start value. + * Numbers stolen from Lawrence Livermore National Laboratory RNG + * library: http://nuclear.llnl.gov/CNP/rng/rngman/node4.html + */ +uint64 start_value_from_index (uint64 count) { + return 2862933555777941757UL * (count + 1) + 3037000493L; +} + +void usage (char* argv[]) { + printf("Usage: %s <startvalue>\n\nSpecify the start value as 16 hex digits, or chain number as 10 hex digits. Calculates one\nchain of the A5/1 rainbow table, and outputs the end value.\n", argv[0]); + exit(1); +} + +int main(int argc, char* argv[]) { + int i,j; + uint64 current; + + if (argc<2) { + usage(argv); + } else if (strlen(argv[1])==16 && sscanf(argv[1], "%16lx", ¤t) == 1) { + printf("Calculating chain from start value 0x%16.16lx\n", current); + current = calculate_chain(current, pow(2, 21)); + } else if (sscanf(argv[1], "%16lx", ¤t) == 1) { + current = start_value_from_index(current); + printf("Calculating chain from start value 0x%16.16lx\n", current); + current = calculate_chain(current, pow(2, 21)); + } else { + usage(argv); + } + printf("End value: 0x%16.16lx\n", current); + return 0; +} diff --git a/A5.1/C/generate.c b/A5.1/C/generate.c new file mode 100644 index 0000000..55bcfbb --- /dev/null +++ b/A5.1/C/generate.c @@ -0,0 +1,371 @@ +/* +proof of concept. +does not generate table, only calculate and show one chain. + +example: +~/a5$ gcc -o generate generate.c +~/a5$ date; ./generate 1010101010101010101 1100110011001100110011 11100011100011100011100 23; date +Wed Jan 14 08:50:59 CST 2009 +Done in 4142022 steps. + 0000000000000000000 0000110111010001100010 01000000001010000101101 +Wed Jan 14 08:52:53 CST 2009 + +*/ + +/* + * A pedagogical implementation of A5/1. + * + * Copyright (C) 1998-1999: Marc Briceno, Ian Goldberg, and David Wagner + * + * The source code below is optimized for instructional value and clarity. + * Performance will be terrible, but that's not the point. + * The algorithm is written in the C programming language to avoid ambiguities + * inherent to the English language. Complain to the 9th Circuit of Appeals + * if you have a problem with that. + * + * This software may be export-controlled by US law. + * + * This software is free for commercial and non-commercial use as long as + * the following conditions are aheared to. + * Copyright remains the authors' and as such any Copyright notices in + * the code are not to be removed. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The license and distribution terms for any publicly available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution license + * [including the GNU Public License.] + * + * Background: The Global System for Mobile communications is the most widely + * deployed cellular telephony system in the world. GSM makes use of + * four core cryptographic algorithms, neither of which has been published by + * the GSM MOU. This failure to subject the algorithms to public review is all + * the more puzzling given that over 100 million GSM + * subscribers are expected to rely on the claimed security of the system. + * + * The four core GSM algorithms are: + * A3 authentication algorithm + * A5/1 "strong" over-the-air voice-privacy algorithm + * A5/2 "weak" over-the-air voice-privacy algorithm + * A8 voice-privacy key generation algorithm + * + * In April of 1998, our group showed that COMP128, the algorithm used by the + * overwhelming majority of GSM providers for both A3 and A8 + * functionality was fatally flawed and allowed for cloning of GSM mobile + * phones. + * Furthermore, we demonstrated that all A8 implementations we could locate, + * including the few that did not use COMP128 for key generation, had been + * deliberately weakened by reducing the keyspace from 64 bits to 54 bits. + * The remaining 10 bits are simply set to zero! + * + * See http://www.scard.org/gsm for additional information. + * + * The question so far unanswered is if A5/1, the "stronger" of the two + * widely deployed voice-privacy algorithm is at least as strong as the + * key. Meaning: "Does A5/1 have a work factor of at least 54 bits"? + * Absent a publicly available A5/1 reference implementation, this question + * could not be answered. We hope that our reference implementation below, + * which has been verified against official A5/1 test vectors, will provide + * the cryptographic community with the base on which to construct the + * answer to this important question. + * + * Initial indications about the strength of A5/1 are not encouraging. + * A variant of A5, while not A5/1 itself, has been estimated to have a + * work factor of well below 54 bits. See http://jya.com/crack-a5.htm for + * background information and references. + * + * With COMP128 broken and A5/1 published below, we will now turn our attention + * to A5/2. The latter has been acknowledged by the GSM community to have + * been specifically designed by intelligence agencies for lack of security. + * + * We hope to publish A5/2 later this year. + * + * -- Marc Briceno <marc@scard.org> + * Voice: +1 (925) 798-4042 + * + */ + +#include <stdio.h> + +/* Masks for the three shift registers */ +#define R1MASK 0x07FFFF /* 19 bits, numbered 0..18 */ +#define R2MASK 0x3FFFFF /* 22 bits, numbered 0..21 */ +#define R3MASK 0x7FFFFF /* 23 bits, numbered 0..22 */ + +/* Middle bit of each of the three shift registers, for clock control */ +#define R1MID 0x000100 /* bit 8 */ +#define R2MID 0x000400 /* bit 10 */ +#define R3MID 0x000400 /* bit 10 */ + +/* Feedback taps, for clocking the shift registers. + * These correspond to the primitive polynomials + * x^19 + x^5 + x^2 + x + 1, x^22 + x + 1, + * and x^23 + x^15 + x^2 + x + 1. */ +#define R1TAPS 0x072000 /* bits 18,17,16,13 */ +#define R2TAPS 0x300000 /* bits 21,20 */ +#define R3TAPS 0x700080 /* bits 22,21,20,7 */ + +/* Output taps, for output generation */ +#define R1OUT 0x040000 /* bit 18 (the high bit) */ +#define R2OUT 0x200000 /* bit 21 (the high bit) */ +#define R3OUT 0x400000 /* bit 22 (the high bit) */ + +/* +#define R1MATCH 0x07ffff +#define R2MATCH 0x3f0000 +#define R3MATCH 0x000000 +*/ + +#define R1LENGTH 18 +#define R2LENGTH 21 +#define R3LENGTH 22 + +typedef unsigned char byte; +typedef unsigned long word; +typedef word bit; + +/* The three shift registers. They're in global variables to make the code + * easier to understand. + * A better implementation would not use global variables. */ +word R1, R2, R3; + +/* Calculate the parity of a 32-bit word, i.e. the sum of its bits modulo 2 */ +bit parity(word x) { + x ^= x>>16; + x ^= x>>8; + x ^= x>>4; + x ^= x>>2; + x ^= x>>1; + return x&1; +} + +void printreg (void) +{ + int i; + word bit; + + printf(" "); + bit = R1OUT; + for (i = 0; i <= R1LENGTH; i++) + { + printf("%01x",parity(R1&bit)); + bit /= 2; + } + printf(" "); + bit = R2OUT; + for (i = 0; i <= R2LENGTH; i++) + { + printf("%01x",parity(R2&bit)); + bit /= 2; + } + printf(" "); + bit = R3OUT; + for (i = 0; i <= R3LENGTH; i++) + { + printf("%01x",parity(R3&bit)); + bit /= 2; + } + printf("\n"); +} +/* Clock one shift register */ + +word clockone(word reg, word mask, word taps) { + word t = reg & taps; + reg = (reg << 1) & mask; + reg |= parity(t); + return reg; +} + + + +/* Look at the middle bits of R1,R2,R3, take a vote, and + * return the majority value of those 3 bits. */ +bit majority() { + int sum; + sum = parity(R1&R1MID) + parity(R2&R2MID) + parity(R3&R3MID); + if (sum >= 2) + return 1; + else + return 0; +} + +/* Clock two or three of R1,R2,R3, with clock control + * according to their middle bits. + * Specifically, we clock Ri whenever Ri's middle bit + * agrees with the majority value of the three middle bits.*/ +void clock() { + bit maj = majority(); + if (((R1&R1MID)!=0) == maj) + R1 = clockone(R1, R1MASK, R1TAPS); + if (((R2&R2MID)!=0) == maj) + R2 = clockone(R2, R2MASK, R2TAPS); + if (((R3&R3MID)!=0) == maj) + R3 = clockone(R3, R3MASK, R3TAPS); +} + +/* Clock all three of R1,R2,R3, ignoring their middle bits. + * This is only used for key setup. */ +void clockallthree() { + R1 = clockone(R1, R1MASK, R1TAPS); + R2 = clockone(R2, R2MASK, R2TAPS); + R3 = clockone(R3, R3MASK, R3TAPS); +} + +/* Generate an output bit from the current state. + * You grab a bit from each register via the output generation taps; + * then you XOR the resulting three bits. */ +bit getbit() { + return parity(R1&R1OUT)^parity(R2&R2OUT)^parity(R3&R3OUT); +} + +word bin2hex (char *string) +{ + int i; + word res = 0; + int length; + + length = strlen (string); + + for (i = 0; i < length; i++) + { + res = res << 1; + if (string[0] == '1') res += 1; + string++; + } + return res; + +} + +int main(int argv, char **argc) { + + int i,j,k; + word in1, in2, in3, reg, tmp; + word R1MATCH, R2MATCH, R3MATCH; + int numofbits; + int fm = 0; + int debug = 0; + word counter = 0; + + in1 = in2 = in3 = 0; + + + if (argv < 5) + { + printf("usage: %s R1 R2 R3 bit_length [debug]\n",argc[0]); + exit(0); + } + + R1 = bin2hex(argc[1]); + R2 = bin2hex(argc[2]); + R3 = bin2hex(argc[3]); + numofbits = atoi (argc[4]); + if (argc[5] != 0 && argc[5][0] != 0) debug = 1; + + +// Set mask (number of bits) for chain + R1MATCH = R2MATCH = R3MATCH = 0; + + j = numofbits; + tmp = 1 << R1LENGTH; + for (i = 0; i < ((R1LENGTH+1)<j?(R1LENGTH+1):j); i++) + { + R1MATCH ^= tmp; + tmp = tmp >> 1; + } + j -= (R1LENGTH + 1); + tmp = 1 << R2LENGTH; + for (i = 0; i < ((R2LENGTH+1)<j?(R2LENGTH+1):j); i++) + { + R2MATCH ^= tmp; + tmp = tmp >> 1; + } + j -= (R2LENGTH +1); + tmp = 1 << R3LENGTH; + for (i = 0; i < ((R3LENGTH+1)<j?(R3LENGTH+1):j); i++) + { + R3MATCH ^= tmp; + tmp = tmp >> 1; + } + +// generate single chain +// <generate> + while(1) + { + tmp = 1 << R1LENGTH; + reg = 0; + for (i = 0; i <= R1LENGTH; i ++) + { + if (getbit()) + reg ^= tmp; + tmp = tmp >> 1; + clock(); + if (debug) printf("%d ",i); + if (debug) printreg (); + } + in1 = reg; + + tmp = 1 << R2LENGTH; + reg = 0; + for (i = 0; i <= R2LENGTH; i ++) + { + if (getbit()) + reg ^= tmp; + tmp = tmp >> 1; + clock(); + if (debug) printf("%d ",i); + if (debug) printreg (); + } + in2 = reg; + + tmp = 1 << R3LENGTH; + reg = 0; + for (i = 0; i <= R3LENGTH; i ++) + { + + if (getbit()) + reg ^= tmp; + tmp = tmp >> 1; + clock(); + if (debug) printf("%d ",i); + if (debug) printreg (); + } + in3=reg; + + + R1 = in1; + R2 = in2; + R3 = in3; + + counter ++; + if (((R1&R1MATCH) | (R2&R2MATCH) | (R3&R3MATCH)) == 0) + break; + + } +// </generate> + + printf("Done in %d steps.\n",counter); + printreg(); + + return 0; +} + diff --git a/A5.1/CUDA/Makefile b/A5.1/CUDA/Makefile new file mode 100644 index 0000000..06e4889 --- /dev/null +++ b/A5.1/CUDA/Makefile @@ -0,0 +1,46 @@ +################################################################################ +# +# Copyright 1993-2006 NVIDIA Corporation. All rights reserved. +# +# NOTICE TO USER: +# +# This source code is subject to NVIDIA ownership rights under U.S. and +# international Copyright laws. +# +# NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE +# CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR +# IMPLIED WARRANTY OF ANY KIND. NVIDIA DISCLAIMS ALL WARRANTIES WITH +# REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. +# IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, +# OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +# OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE +# OR PERFORMANCE OF THIS SOURCE CODE. +# +# U.S. Government End Users. This source code is a "commercial item" as +# that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting of +# "commercial computer software" and "commercial computer software +# documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) +# and is provided to the U.S. Government only as a commercial end item. +# Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through +# 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the +# source code with only those rights set forth herein. +# +################################################################################ +# +# Build script for project +# +################################################################################ + +# Add source files here +EXECUTABLE := calculate_chain +# CUDA source files (compiled with cudacc) +CUFILES := calculate_chain.cu +# CUDA dependency files +CU_DEPS := calculate_chain_kernel.cu + +################################################################################ +# Rules and targets + +include ../../common/common.mk diff --git a/A5.1/CUDA/README b/A5.1/CUDA/README new file mode 100644 index 0000000..02b3c5e --- /dev/null +++ b/A5.1/CUDA/README @@ -0,0 +1,5 @@ + +To compile the CUDA kernel, copy (not link) this directory +into your the project directory of your CUDA SDK, cd into +it and "make verbose=1". + diff --git a/A5.1/CUDA/calculate_chain.cu b/A5.1/CUDA/calculate_chain.cu new file mode 100644 index 0000000..fe8baca --- /dev/null +++ b/A5.1/CUDA/calculate_chain.cu @@ -0,0 +1,167 @@ +/* + * Driver program for a CUDA-based A5/1 rainbow table generator. + * + * Copyright (C) 2009: Ingo Albrecht <prom@berlin.ccc.de> + */ + +#ifndef TEST_INTERMEDIATES +/* values below are for normal runs */ + +/* + * These values are appropriate for a Quadro FX 570M. + * + * Before running this on different hardware, you + * should decrease OPERATIONS_PER_RUN and then + * increase it incrementally until you get + * run lengths approaching 5 seconds. + * + * Thread and block count should be selected + * so that they almost hit the register bound. + * + * If you want to tune the code for your card, + * you should do it incrementally, keeping + * the run length below 5 seconds, or your + * graphics subsystem might go wonky. + */ + +// number of threads per block +#define NUM_THREADS 32 + +// number of blocks to schedule +#define NUM_BLOCKS 32 + +// how long each run should be in cycles. +// must be a power of two for now. +#define OPERATIONS_PER_RUN 32768 + +#else +// values below are for intermediate testing + +#define NUM_THREADS 10 +#define NUM_BLOCKS 1 + +#define OPERATIONS_PER_RUN 32768 + +#endif + +// total operations per chain (2^21) +#define OPERATIONS_PER_CHAIN 2097152 + +// number of chains to be computed +#define NUM_CHAINS NUM_THREADS * NUM_BLOCKS + + +#include <stdio.h> +#include <unistd.h> + +#include <cutil.h> + +#include "calculate_chain_kernel.cu" + +int +main(int argc, char **argv) { + CUT_DEVICE_INIT(argc, argv); + + uint32 i; + + uint64 start = 0; // XXX put your start vector here + + printf("Computing %d chains divided into %d blocks of %d threads, starting at 0x%16.16llx\n", + NUM_CHAINS, NUM_BLOCKS, NUM_THREADS, start); + + uint32 num_runs = OPERATIONS_PER_CHAIN / OPERATIONS_PER_RUN; + + printf("Will execute %d runs of %d steps each.\n", num_runs, OPERATIONS_PER_RUN); + + // create a timer for the whole run + unsigned int total_timer = 0; + CUT_SAFE_CALL(cutCreateTimer(&total_timer)); + + // compute size of state + uint32 s_results = NUM_CHAINS * sizeof(uint64); + + // allocate and initialize host memory + uint64* h_results = (uint64*) calloc(1, s_results); + for(i = 0; i < NUM_CHAINS; i++) { + h_results[i] = start + i; + } + + // allocate and initialize device memory + uint64* d_results; + CUDA_SAFE_CALL(cudaMalloc((void**)&d_results, s_results)); + + CUT_SAFE_CALL(cutStartTimer(total_timer)); + + CUDA_SAFE_CALL(cudaMemcpy(d_results, h_results, s_results, cudaMemcpyHostToDevice)); + + double total_run_time = 0.0; + + uint32 run; + for(run = 0; run < num_runs; run++) { + unsigned int run_timer = 0; + CUT_SAFE_CALL(cutCreateTimer(&run_timer)); + + uint32 index = OPERATIONS_PER_CHAIN - 1 - run * OPERATIONS_PER_RUN; + +#ifdef TEST_INTERMEDIATES + // print intermediates (for testing against calculate_chains_dump) + for(i = 0; i < NUM_CHAINS; i++) { + printf("results[%d] = 0x%16.16llx\n", i, h_results[i]); + } +#endif + + printf("Run %3.3d/%3.3d, starting at index 0x%6.6x... ", run+1, num_runs, index); + + fflush(stdout); + usleep(500*1000); + + CUT_SAFE_CALL(cutStartTimer(run_timer)); + +#ifdef TEST_INTERMEDIATES + CUDA_SAFE_CALL(cudaMemcpy(d_results, h_results, s_results, cudaMemcpyHostToDevice)); +#endif + + dim3 gridDims(NUM_BLOCKS, 1, 1); + dim3 blockDims(NUM_THREADS, 1, 1); + crunch<<<gridDims, blockDims>>>(d_results, index); + + CUDA_SAFE_CALL(cudaThreadSynchronize()); + +#ifdef TEST_INTERMEDIATES + CUDA_SAFE_CALL(cudaMemcpy(h_results, d_results, s_results, cudaMemcpyDeviceToHost)); +#endif + + CUT_SAFE_CALL(cutStopTimer(run_timer)); + + float run_time = cutGetTimerValue(run_timer); + printf("%f ms.\n", run_time); + total_run_time += run_time; + fflush(stdout); + + + CUT_SAFE_CALL(cutDeleteTimer(run_timer)); + } + + CUDA_SAFE_CALL(cudaMemcpy(h_results, d_results, s_results, cudaMemcpyDeviceToHost)); + + CUT_SAFE_CALL(cutStopTimer(total_timer)); + + // free device memory + CUDA_SAFE_CALL(cudaFree((void**)d_results)); + + // print results + for(i = 0; i < NUM_CHAINS; i++) { + printf("results[%d] = 0x%16.16llx\n", i, h_results[i]); + } + + // free host memory + free(h_results); + + // report total time + printf("Total time: %f ms, %f spent crunching\n", cutGetTimerValue(total_timer), total_run_time); + + // delete the whole-run timer + CUT_SAFE_CALL(cutDeleteTimer(total_timer)); + + return 0; +} diff --git a/A5.1/CUDA/calculate_chain_dump.c b/A5.1/CUDA/calculate_chain_dump.c new file mode 100644 index 0000000..c518d7c --- /dev/null +++ b/A5.1/CUDA/calculate_chain_dump.c @@ -0,0 +1,154 @@ + +/* + * Modified by Ingo Albrecht <prom@berlin.ccc.de>. + * + * This is a specially modified version of the table + * generator that always calculates chains 0 through 9. + * + * It emits intermediate values every 2^15 cycles that + * can be used to verify the CUDA implementation. + */ + +/* + * Calculation of chains for A5/1 rainbow table cracking. + * + * + * Loosely based on: A pedagogical implementation of A5/1. + * + * Copyright (C) 1998-1999: Marc Briceno, Ian Goldberg, and David Wagner + * + * See accompanying file A5.1.c for original version and full copyright + */ + + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <math.h> + +/* Masks for the three shift registers */ +#define R1MASK 0x07FFFF /* 19 bits, numbered 0..18 */ +#define R2MASK 0x3FFFFF /* 22 bits, numbered 0..21 */ +#define R3MASK 0x7FFFFF /* 23 bits, numbered 0..22 */ + +/* Middle bit of each of the three shift registers, for clock control */ +#define R1MID 0x000100 /* bit 8 */ +#define R2MID 0x000400 /* bit 10 */ +#define R3MID 0x000400 /* bit 10 */ + +/* Feedback taps, for clocking the shift registers. */ +#define R1TAPS 0x072000 /* bits 18,17,16,13 */ +#define R2TAPS 0x300000 /* bits 21,20 */ +#define R3TAPS 0x700080 /* bits 22,21,20,7 */ + +/* Output taps, for output generation */ +#define R1OUT 0x040000 /* bit 18 (the high bit) */ +#define R2OUT 0x200000 /* bit 21 (the high bit) */ +#define R3OUT 0x400000 /* bit 22 (the high bit) */ + +typedef unsigned char byte; +#ifdef BITSIZE_32 +typedef unsigned long uint32; +typedef unsigned long long uint64; +#else +typedef unsigned int uint32; +typedef unsigned long uint64; +#endif + +typedef unsigned int bit; + +bit parity32(uint32 x) { + x ^= x>>16; + x ^= x>>8; + x ^= x>>4; + x ^= x>>2; + x ^= x>>1; + return x&1; +} + +bit parity64(uint64 x) { + x ^= x>>32; + x ^= x>>16; + x ^= x>>8; + x ^= x>>4; + x ^= x>>2; + x ^= x>>1; + return x&1; +} + +uint32 clockone(uint32 reg, uint32 mask, uint32 taps) { + uint32 t = reg & taps; + reg = (reg << 1) & mask; + reg |= parity32(t); + return reg; +} + +uint32 R1, R2, R3; + +inline bit majority() { + int sum; + sum = ((R1&R1MID) >> 8) + ((R2&R2MID) >> 10) + ((R3&R3MID) >> 10); + if (sum >= 2) + return 1; + else + return 0; +} + +inline void clock() { + bit maj = majority(); + if (((R1&R1MID)!=0) == maj) + R1 = clockone(R1, R1MASK, R1TAPS); + if (((R2&R2MID)!=0) == maj) + R2 = clockone(R2, R2MASK, R2TAPS); + if (((R3&R3MID)!=0) == maj) + R3 = clockone(R3, R3MASK, R3TAPS); +} + +inline bit getbit() { + return ((R1&R1OUT) >> 18) ^ ((R2&R2OUT) >> 21) ^ ((R3&R3OUT) >> 22); +} + +inline uint64 calculate_link (uint64 input, uint32 count) { + uint64 result; + int i; + + /* Reduction function. */ + R1 = ((input >> (22 + 23))^count) & R1MASK; + R2 = ((input >> 23)^count) & R2MASK; + R3 = (input^count) & R3MASK; + + result = getbit(); + for(i=1;i<64;i++) { + // Yes, virginia, we only need to clock 63 times for 64 bits of output + clock(); + result = (result << 1)| getbit(); + } + return result; +} + +uint64 calculate_chain (uint64 input, uint32 count) { + int i; + int j = 0; + for(i=count-1; i>=0; i--) { + if((i & 0x7FFF) == 0x7FFF) { + printf("Before 0x%6.6x: 0x%16.16llx\n", i, input); + } + input = calculate_link(input, i); + } + return input; +} + +int main(int argc, char* argv[]) { + int i; + uint64 current = 0; + + for(i = 0; i < 10; i++) { + current = i; + printf("Calculating chain from start value 0x%16.16llx\n", current); + current = calculate_chain(current, pow(2, 21)); + printf("End value: 0x%16.16llx\n", current); + } + + return 0; +} diff --git a/A5.1/CUDA/calculate_chain_dump.out b/A5.1/CUDA/calculate_chain_dump.out new file mode 100644 index 0000000..d43c837 --- /dev/null +++ b/A5.1/CUDA/calculate_chain_dump.out @@ -0,0 +1,717 @@ +Computing 10 chains divided into 1 blocks of 10 threads, starting at 0x0000000000000000 +Will execute 64 runs of 32768 steps each. +results[0] = 0x0000000000000000 +results[1] = 0x0000000000000001 +results[2] = 0x0000000000000002 +results[3] = 0x0000000000000003 +results[4] = 0x0000000000000004 +results[5] = 0x0000000000000005 +results[6] = 0x0000000000000006 +results[7] = 0x0000000000000007 +results[8] = 0x0000000000000008 +results[9] = 0x0000000000000009 +Run 001/064, starting at index 0x1fffff... 2662.287109 ms. +results[0] = 0xf86a3913f7a6fe1d +results[1] = 0x3b932e8d8e7874f9 +results[2] = 0xad4e7a8cda62ff88 +results[3] = 0x0941fb54cbcc88b6 +results[4] = 0xd533f9846e024afa +results[5] = 0x08ce95182121319e +results[6] = 0x0071d5867bab50a9 +results[7] = 0x2176f05038537afe +results[8] = 0x903fa08a52b54fae +results[9] = 0x3ab7957e3bb63f8e +Run 002/064, starting at index 0x1f7fff... 2662.290039 ms. +results[0] = 0x06c8e2628b279454 +results[1] = 0xc795d5f7e0b74f43 +results[2] = 0x2e368c931b5c0d38 +results[3] = 0xaca66326a8e8e646 +results[4] = 0x9e559f8fe3d07aac +results[5] = 0x37c633f5becc8da7 +results[6] = 0xa2ccd2b60303c2bd +results[7] = 0x44dc4a96f2439c43 +results[8] = 0x37a61f187afe477d +results[9] = 0x550220d9cc5fd367 +Run 003/064, starting at index 0x1effff... 2662.282959 ms. +results[0] = 0x1edae43c1d2514dc +results[1] = 0x0113e9b9e9a99566 +results[2] = 0x598f3761a9327c17 +results[3] = 0xd0a9607e97753266 +results[4] = 0xee220804b7266874 +results[5] = 0x5bb130066a9729eb +results[6] = 0x8a071550a439cd90 +results[7] = 0x54d2746e701d961b +results[8] = 0x36435a4743382921 +results[9] = 0x7e01f144ddb17925 +Run 004/064, starting at index 0x1e7fff... 2662.239990 ms. +results[0] = 0x9d0dc09bae18e7b4 +results[1] = 0xa7e3644fb6dda1ee +results[2] = 0xcb3672cb94c29fef +results[3] = 0x21f996340e7b5b56 +results[4] = 0xf45f38be00914661 +results[5] = 0x82df8577b9a6e849 +results[6] = 0x690994664330b069 +results[7] = 0x151b0e7753c0ff8f +results[8] = 0xec91747262eaae89 +results[9] = 0x053033e52cee9ca5 +Run 005/064, starting at index 0x1dffff... 2662.287109 ms. +results[0] = 0xde8e3b8a95849386 +results[1] = 0x30066fd8921a09e1 +results[2] = 0x531fb03c87f92237 +results[3] = 0x6baee0b564b75324 +results[4] = 0xd4814e3e32d3899f +results[5] = 0xf4a494f319fa8dd6 +results[6] = 0x04d19c41aa6d7a69 +results[7] = 0xc5bd07e7c4918d69 +results[8] = 0xa88a5d6b61592d84 +results[9] = 0x1398cd680b44395d +Run 006/064, starting at index 0x1d7fff... 2662.418945 ms. +results[0] = 0x9a792143c8ddfc38 +results[1] = 0x3466a07129bb39d6 +results[2] = 0x4506ebfa7a629466 +results[3] = 0x5ab8e5158093c74e +results[4] = 0xea3716a4f281d37e +results[5] = 0xd5d538f3bb41cc0d +results[6] = 0xf17a2a7115f0d3b8 +results[7] = 0xfd8e2be2063eb97e +results[8] = 0xd26195a2c95057ab +results[9] = 0x893adf018f29be0c +Run 007/064, starting at index 0x1cffff... 2662.280029 ms. +results[0] = 0x4789bda256ee5479 +results[1] = 0x369b5987ef460e2d +results[2] = 0x9dd030ad5fe4cfe7 +results[3] = 0x8bf145603f5179fe +results[4] = 0xd752f521be6c7148 +results[5] = 0x4844b1b92f9eb55e +results[6] = 0x76e4375ced46978a +results[7] = 0xf13503689b962866 +results[8] = 0x124cbab3cfb0d1a4 +results[9] = 0x3eef0736434f4dc5 +Run 008/064, starting at index 0x1c7fff... 2662.277100 ms. +results[0] = 0xe673e34b3ec049b4 +results[1] = 0x25e0e80d23bccaa4 +results[2] = 0xc9e70df2a90d75f5 +results[3] = 0xe3344c1407dd2fd8 +results[4] = 0x812785bb44950cb4 +results[5] = 0xbe777c056ec9a7fc +results[6] = 0xe14fa85c1ee0a88c +results[7] = 0x580c650090bd3a06 +results[8] = 0xdf6b38107ec66e8d +results[9] = 0xacbcf6bd0cdcd884 +Run 009/064, starting at index 0x1bffff... 2662.283936 ms. +results[0] = 0x0c04d9a6e5dafb00 +results[1] = 0x4026209f57a61698 +results[2] = 0x33dd4e53d67c1af4 +results[3] = 0x95993eec1a900978 +results[4] = 0xd2363b5734b25761 +results[5] = 0x77875c8914ad4df3 +results[6] = 0x485355bcbb0c35a0 +results[7] = 0xc212dc66e6bcd69d +results[8] = 0x733c6d9db011f73f +results[9] = 0xe2e0af7da058c3b4 +Run 010/064, starting at index 0x1b7fff... 2662.479004 ms. +results[0] = 0x6d8c5578ca5b0ed9 +results[1] = 0x750925714172abc4 +results[2] = 0x26365978f129e89f +results[3] = 0x85163a0fbc185558 +results[4] = 0x74d54d17e57adea0 +results[5] = 0x1195655ab64ea258 +results[6] = 0xb5c29f836403b468 +results[7] = 0x0806bf8eec1a3a02 +results[8] = 0x1987371a68e7d4ed +results[9] = 0x75d955abb1d829a3 +Run 011/064, starting at index 0x1affff... 2662.237061 ms. +results[0] = 0x431c105c0e2c573d +results[1] = 0xe7d0c4698a5a4a53 +results[2] = 0x0882558280d62656 +results[3] = 0x79c6bae1d6ba6c96 +results[4] = 0x5aaf411f2b443a76 +results[5] = 0xef1bdd0bdcfdc5f3 +results[6] = 0xb873fad0089f82ca +results[7] = 0x8b2efd50ca3db141 +results[8] = 0x0cd1ace106b05318 +results[9] = 0xed931258aa4e0c4c +Run 012/064, starting at index 0x1a7fff... 2662.257080 ms. +results[0] = 0x2ebd47d7dc599d40 +results[1] = 0xb4f2447883d50c91 +results[2] = 0x221e2d948174c04e +results[3] = 0x5b553053e685c22c +results[4] = 0x91be8c84415b6916 +results[5] = 0x73b9f18eecf85f79 +results[6] = 0x17924f15ac25f0e8 +results[7] = 0x9f77330cd86987e1 +results[8] = 0x80bdd941d92cf422 +results[9] = 0x27daa54f07138967 +Run 013/064, starting at index 0x19ffff... 2662.278076 ms. +results[0] = 0x442722b786ab17a4 +results[1] = 0xf9748ead71845e23 +results[2] = 0x101166f3f2c2906a +results[3] = 0xa7a77816ccf78911 +results[4] = 0x363711026502302d +results[5] = 0x963bd7c815090cda +results[6] = 0x8f1b9da8c8591a2d +results[7] = 0x0455b18b8ed1394e +results[8] = 0x9b2aeb0d8231581a +results[9] = 0x9bd8ebd135f7b8ff +Run 014/064, starting at index 0x197fff... 2662.278076 ms. +results[0] = 0x009efce4b1df9a0d +results[1] = 0x71ba22f94143b717 +results[2] = 0xc6188f670c5c8523 +results[3] = 0x6da7af35f88493f7 +results[4] = 0x0ae72d1d358a576c +results[5] = 0x26ad3f46c6101f50 +results[6] = 0x7ce4bdd095504c1e +results[7] = 0xd27b31aa3a127f82 +results[8] = 0x08e921ad0bf30d04 +results[9] = 0x618af3c1f2091429 +Run 015/064, starting at index 0x18ffff... 2662.237061 ms. +results[0] = 0x0d42264a8e054714 +results[1] = 0xc924cde7422c9193 +results[2] = 0x4bcb1d6343d4b6ff +results[3] = 0x7fe079f84dd935dc +results[4] = 0x2d4c5b6103c76e9c +results[5] = 0x9ab5f689347c758c +results[6] = 0x5df9a6ff135ea9fb +results[7] = 0xa704584001143428 +results[8] = 0x0547f3fd0068620f +results[9] = 0x9c8cd0897c5a9ce2 +Run 016/064, starting at index 0x187fff... 2662.281982 ms. +results[0] = 0x0f12aa31bc33c77c +results[1] = 0x01c80661532a2195 +results[2] = 0x89e32d01099dc139 +results[3] = 0x629e44a90ece6fa1 +results[4] = 0x4e9e8daae2c481c2 +results[5] = 0xf6e2b731b35b43e0 +results[6] = 0x5abd0200df85c9b8 +results[7] = 0x6c2279057a3441c7 +results[8] = 0xd9bcb24dd0208166 +results[9] = 0x486dad8085c3d5cb +Run 017/064, starting at index 0x17ffff... 2662.263916 ms. +results[0] = 0xa58c3a57abd05233 +results[1] = 0x1f13eabb0b785c7a +results[2] = 0x91e4fcbebe4a3460 +results[3] = 0xc7b478524c315ddc +results[4] = 0x5ab937be093de5e6 +results[5] = 0x8684bfde1876bdd9 +results[6] = 0x8c4db8995cf30a14 +results[7] = 0x5dc7ca43a96b53d0 +results[8] = 0x803d3fc734edd1a1 +results[9] = 0xe2c0044fb89e9f8c +Run 018/064, starting at index 0x177fff... 2662.283936 ms. +results[0] = 0x958746f2e2edfb64 +results[1] = 0x7a7bdb3ffacf881d +results[2] = 0xbad21d46523f914d +results[3] = 0xcb0b56c8b2c7d277 +results[4] = 0xeca57b21cbc1222b +results[5] = 0x9fa42f8b3ae3970d +results[6] = 0x10beda8721904789 +results[7] = 0xae2330cb6eb9cb41 +results[8] = 0x8a928736b0282147 +results[9] = 0xdd8bc55f2bb2106d +Run 019/064, starting at index 0x16ffff... 2662.238037 ms. +results[0] = 0x9a368197a5b86b38 +results[1] = 0xfa0f9ebdf81d47d4 +results[2] = 0x68f28ccfdf49ab98 +results[3] = 0x942e534b51337153 +results[4] = 0x8f350a0811c317b2 +results[5] = 0x456a6fa823d49da6 +results[6] = 0xcad798cb2dc1d768 +results[7] = 0xb3d486a7642f9c69 +results[8] = 0x9da2fb9cb1fa8b02 +results[9] = 0x0c80520e33439d03 +Run 020/064, starting at index 0x167fff... 2662.281982 ms. +results[0] = 0x152c4d609f5f7652 +results[1] = 0x2b6a843a2ebdab14 +results[2] = 0x124e3145474f8a1a +results[3] = 0x74831c4c8beff73d +results[4] = 0x97e61ba325750343 +results[5] = 0x67ef1dee2e864581 +results[6] = 0x38eff5a78b6f074f +results[7] = 0xb309a2babdabd03c +results[8] = 0x9798775c080fe984 +results[9] = 0xbf3f192de8930950 +Run 021/064, starting at index 0x15ffff... 2662.287109 ms. +results[0] = 0xd751e0b173fbd1e0 +results[1] = 0x9ab3111d647091b1 +results[2] = 0x287672d6d49178d0 +results[3] = 0xc4bfc15df2424d39 +results[4] = 0x49c366461f6ddf47 +results[5] = 0xa16b415b2e8228fa +results[6] = 0xe5e599509ddd17a9 +results[7] = 0xd6fddb3cb1693741 +results[8] = 0xc868157f69cf3ba0 +results[9] = 0x13b01276863200be +Run 022/064, starting at index 0x157fff... 2662.288086 ms. +results[0] = 0xaa14b720785a72f2 +results[1] = 0xbd0342a6a6d5495e +results[2] = 0x61818dedd3e9cdf4 +results[3] = 0x062c16a328c45496 +results[4] = 0x0741e9ce45d555c2 +results[5] = 0x4803648d3f5e9dc1 +results[6] = 0x3a7d5e031ca3db91 +results[7] = 0x70c4ee533f39d296 +results[8] = 0xc3f61ca8ae1fdd60 +results[9] = 0x3965db9b065aa9a1 +Run 023/064, starting at index 0x14ffff... 2662.468994 ms. +results[0] = 0xbabea967f2238696 +results[1] = 0xae76eb1bd7625d09 +results[2] = 0x0fc43f9cef954b89 +results[3] = 0x7790428b51155a78 +results[4] = 0x0884067f31947a06 +results[5] = 0x09eceb25c4d3b26e +results[6] = 0x2067cbb814a09808 +results[7] = 0xf985180006624c77 +results[8] = 0x54b66353e6411084 +results[9] = 0x309ba3b26a28603f +Run 024/064, starting at index 0x147fff... 2662.260986 ms. +results[0] = 0x4b020676a2952c07 +results[1] = 0x283e96831534763c +results[2] = 0x7bb39b603114ea5b +results[3] = 0x7631b00003302ccf +results[4] = 0xffc9917c676709c7 +results[5] = 0x98563f1a8257ed99 +results[6] = 0xd0928d28a4f44c54 +results[7] = 0xb9a9efd5c22bc6de +results[8] = 0xd34d795295043ec7 +results[9] = 0x993fd5f8f89e6e46 +Run 025/064, starting at index 0x13ffff... 2662.419922 ms. +results[0] = 0xa0bd574ce6a4c71a +results[1] = 0x15f6ddb6d7af0e23 +results[2] = 0x38b3c5e438083ead +results[3] = 0x294e60a96e5b8682 +results[4] = 0xb5401abe8cfe3d1b +results[5] = 0xabfa2d21ee9149d7 +results[6] = 0xb0f04c0101c6d649 +results[7] = 0xebbcacf720df312a +results[8] = 0xe99a010201a7fb2a +results[9] = 0x3d896f5c0663794b +Run 026/064, starting at index 0x137fff... 2662.267090 ms. +results[0] = 0x3215358436ec9e99 +results[1] = 0x71f12fd7d2c51d40 +results[2] = 0xf0b2de9146b0fbdd +results[3] = 0x1127ca103b8437cf +results[4] = 0xbe591f8e5672e493 +results[5] = 0xb5c0da59634e53b2 +results[6] = 0x413313cf45802088 +results[7] = 0xe696976f81d91020 +results[8] = 0x526326165d24d052 +results[9] = 0xedc4c5960d1b9740 +Run 027/064, starting at index 0x12ffff... 2662.288086 ms. +results[0] = 0xdb74d36c2cebaa7d +results[1] = 0x7eb90ba1dc2f2d9a +results[2] = 0xb35dfb423d70e76f +results[3] = 0xf727c54fda50fdd8 +results[4] = 0x28414a89f572cad5 +results[5] = 0x560e86d786ae7dfd +results[6] = 0xcadf6b4201127812 +results[7] = 0x335ad260941ebf06 +results[8] = 0x8bae4958dcf7065e +results[9] = 0xb17f729890190924 +Run 028/064, starting at index 0x127fff... 2662.475098 ms. +results[0] = 0xad230dd4433eb3c3 +results[1] = 0xa02808cf11c37991 +results[2] = 0x879ac083c7a3cd39 +results[3] = 0x30cc19e3baf047dd +results[4] = 0x5ece631956ef02d4 +results[5] = 0xb942a83d8fa065b8 +results[6] = 0x9a7410426a6bf18c +results[7] = 0xf88d12d1d4fb4c55 +results[8] = 0x235d05530634bb61 +results[9] = 0xd325062b37d20453 +Run 029/064, starting at index 0x11ffff... 2662.294922 ms. +results[0] = 0x2d30c2b772f07cf0 +results[1] = 0x468661c0d8183091 +results[2] = 0x654ee9e44da4a62d +results[3] = 0x1e4158ef14faacda +results[4] = 0x613e2ced3718deb6 +results[5] = 0xebd086ef7ce2dc86 +results[6] = 0x05fe150301395cf7 +results[7] = 0x99435225b5541a88 +results[8] = 0x842e49b596323bdb +results[9] = 0xbbaaf3d7a867b640 +Run 030/064, starting at index 0x117fff... 2662.240967 ms. +results[0] = 0x5c97568216a22d02 +results[1] = 0x14bc8421553ac318 +results[2] = 0xf840f89db83f784a +results[3] = 0xe57ac8cd31b1d3a7 +results[4] = 0x4650d66d9e2d8879 +results[5] = 0x3abe2fc6e4c5c73a +results[6] = 0x4261ecef0bf4edb8 +results[7] = 0x25fcb5a7a8c22443 +results[8] = 0x6fa81edb6ca7dd26 +results[9] = 0x0c919103ee8908a5 +Run 031/064, starting at index 0x10ffff... 2662.279053 ms. +results[0] = 0x5ee59393ff0d1f24 +results[1] = 0x92ceeec6e42e9397 +results[2] = 0x9e57d0bf16e88244 +results[3] = 0x90fbaf6931902914 +results[4] = 0x6a584e0c7e911599 +results[5] = 0xaa3652b2ce38c209 +results[6] = 0x593d8d600860c57c +results[7] = 0xd680f97fc1559840 +results[8] = 0x796f69974e245ae4 +results[9] = 0xdc6aea77946490df +Run 032/064, starting at index 0x107fff... 2662.278076 ms. +results[0] = 0xce8eb17338956d0b +results[1] = 0x484f0c10f4eaec49 +results[2] = 0xd98aa866b0e8a5f0 +results[3] = 0xdac6f3d9788853a4 +results[4] = 0x12aba364208f2bbf +results[5] = 0xf40dc5fec3961769 +results[6] = 0x1ef8ca7d7dee4661 +results[7] = 0x5637d9bcb5798054 +results[8] = 0xd95f07de3fb9a196 +results[9] = 0x196c7a3eb65a6482 +Run 033/064, starting at index 0x0fffff... 2662.279053 ms. +results[0] = 0x4f4b501eb70a2d56 +results[1] = 0x266ab5d62bac21eb +results[2] = 0xf4f365c88d874e6d +results[3] = 0xb8f4ecbc1e30fba4 +results[4] = 0x6fa654fa8349caa5 +results[5] = 0x90be139af90a7c7f +results[6] = 0x63d58d1348fe7cb9 +results[7] = 0xaca293cc0374a4bd +results[8] = 0xb009676f5c977200 +results[9] = 0x4e9eaff71b48ad8b +Run 034/064, starting at index 0x0f7fff... 2662.236084 ms. +results[0] = 0x8158c2aabc055783 +results[1] = 0x243ef3a2a06ceb50 +results[2] = 0xe6ca244277a1aeb8 +results[3] = 0xc06b54774988d4ec +results[4] = 0x84e15ac76fc73ae7 +results[5] = 0x97555fa7d3bd2da4 +results[6] = 0x92df803a0cd5d7e2 +results[7] = 0x83e4626481f8b5b2 +results[8] = 0xc1c0402c5f3f96db +results[9] = 0xffca8ee3247ea439 +Run 035/064, starting at index 0x0effff... 2662.288086 ms. +results[0] = 0x414b0e9f2866f8a5 +results[1] = 0x54b825a8d17b04c0 +results[2] = 0x07a3f89d49baddb5 +results[3] = 0xc2f42437c763783f +results[4] = 0x23ef2d25214e703b +results[5] = 0xcb28727140e5263d +results[6] = 0x17e6d53bf2fd8cfa +results[7] = 0xd7f2fd8a213be599 +results[8] = 0x1c5034df6445ed5e +results[9] = 0x4a6650254f5f47f3 +Run 036/064, starting at index 0x0e7fff... 2662.294922 ms. +results[0] = 0x7a2e5e3f1cf35b7f +results[1] = 0x3fde742c7fef8823 +results[2] = 0x9f4acf84cd57f9ef +results[3] = 0x6fee4eb0d109ab48 +results[4] = 0xf3b3ca3f2dd5d4cc +results[5] = 0x99a989a8fe494396 +results[6] = 0x5db7886f83bfa1d6 +results[7] = 0x294b460e1349c17e +results[8] = 0xdc316ec62aeed3b0 +results[9] = 0xdcfd395fd2d46033 +Run 037/064, starting at index 0x0dffff... 2662.285889 ms. +results[0] = 0xac0ccb6f06d75169 +results[1] = 0x012e908519257924 +results[2] = 0x740fe275ac878254 +results[3] = 0x68dbd5f5509a31c4 +results[4] = 0xe695c67f98abcb3c +results[5] = 0xa8ff6ffe3fa46787 +results[6] = 0x83087aad942a917c +results[7] = 0x10cf2bbc195d461b +results[8] = 0x21ae9cb12af383ec +results[9] = 0x99939e0f7e6149fe +Run 038/064, starting at index 0x0d7fff... 2662.237061 ms. +results[0] = 0xab1f220a15a81ca1 +results[1] = 0x3f900a4f4fb0d4f3 +results[2] = 0x650c56f7ebde254e +results[3] = 0x3aa2dcfe96e57eb6 +results[4] = 0xaf55ddf3f47a8620 +results[5] = 0xa9403c1e335cf40c +results[6] = 0xf34a7c7c5ac44109 +results[7] = 0x1c358e2bf242b65d +results[8] = 0xbbcd547fdef56104 +results[9] = 0x1c488ae1d1ad732f +Run 039/064, starting at index 0x0cffff... 2662.289062 ms. +results[0] = 0xa7376383d7ea1c53 +results[1] = 0x922ea52e8d702443 +results[2] = 0x9bcc28578870b80e +results[3] = 0x719b02f71c458022 +results[4] = 0x99e380ba05f007b3 +results[5] = 0x0122066cccf800b7 +results[6] = 0xe3311e362e2ff65c +results[7] = 0xdcf4c25f341d02d3 +results[8] = 0xdd665962c6b4b05c +results[9] = 0x82007a5123e56f6d +Run 040/064, starting at index 0x0c7fff... 2662.245117 ms. +results[0] = 0x930aab10528e011a +results[1] = 0xcab4ab331175291d +results[2] = 0x6a548c9df034c95a +results[3] = 0x503e4d0d8db6ab48 +results[4] = 0xb6aee29527590315 +results[5] = 0x0753e778f036c74d +results[6] = 0xda34b33e0502470c +results[7] = 0x67f6ac59b70822d1 +results[8] = 0xeb2819fca0d0b12a +results[9] = 0x3ff4576486969bac +Run 041/064, starting at index 0x0bffff... 2662.297119 ms. +results[0] = 0xfeb930d5de2a9301 +results[1] = 0x7c52692499aa9d9e +results[2] = 0xdf25a8b3997999cb +results[3] = 0x6ecbe9d3fdc65366 +results[4] = 0xccc92936d9211774 +results[5] = 0x374aec65737a4b52 +results[6] = 0x8abee7b9e1658b43 +results[7] = 0x854b61c7193a1427 +results[8] = 0xe9ce7a2bfe13de36 +results[9] = 0x08dae5640dc70f8e +Run 042/064, starting at index 0x0b7fff... 2662.283936 ms. +results[0] = 0xef4836464ed8ffcf +results[1] = 0xb54d7122c71f1ce5 +results[2] = 0x6503ce9e282bfe49 +results[3] = 0xeaa981a1b1de3f45 +results[4] = 0xf749b6b700d4df15 +results[5] = 0xe2543a962e7cda60 +results[6] = 0x07e4b4901eec6163 +results[7] = 0xe42a64b937a7594a +results[8] = 0xb7758ddb5231fff5 +results[9] = 0xc577d889f3fd3c5f +Run 043/064, starting at index 0x0affff... 2662.272949 ms. +results[0] = 0x088460b3fc8ffdc8 +results[1] = 0x66ee48ffc8ab48cf +results[2] = 0xddc9b9198b008093 +results[3] = 0x62c7e089708c1835 +results[4] = 0xad2266e01e60c036 +results[5] = 0x91e283710b651ceb +results[6] = 0x7d9f5985852f5c2c +results[7] = 0xcef62b2eb9424ee5 +results[8] = 0x8693f31f6d1e22b9 +results[9] = 0xd3eae85053a474e4 +Run 044/064, starting at index 0x0a7fff... 2662.268066 ms. +results[0] = 0x9416e5b668a1bc79 +results[1] = 0x3c257f6c56dd59e1 +results[2] = 0xfbd461fcc443e864 +results[3] = 0xe9ee16991dd52b5c +results[4] = 0x3742a2c573292a68 +results[5] = 0x1f2617ec0ec361a2 +results[6] = 0xb0a3637cda32d818 +results[7] = 0xf3fc170b6f3a8aa2 +results[8] = 0x4ba3e092428a8f55 +results[9] = 0x5e48da793238f3a5 +Run 045/064, starting at index 0x09ffff... 2662.284912 ms. +results[0] = 0x6eb302deaa1289b6 +results[1] = 0x11fa39d2e4d5bb0d +results[2] = 0xe790e0e71bbbb8ed +results[3] = 0xc8ba72dd58d3b344 +results[4] = 0x3bf99c1db1920acb +results[5] = 0x4548e08578918080 +results[6] = 0xfb2120e3313aeb3c +results[7] = 0xe49ec1266dd9bea0 +results[8] = 0xbad525f3cecf83fa +results[9] = 0x3c9f6bda4828d0a0 +Run 046/064, starting at index 0x097fff... 2662.472900 ms. +results[0] = 0x55201f5cb02341b7 +results[1] = 0x199446b47eca05e4 +results[2] = 0x6e5b36817ec1cb7f +results[3] = 0x55643a74e927b308 +results[4] = 0xe353dea2c655d168 +results[5] = 0x44a5c2fbd691e6a3 +results[6] = 0x9e46715bf3bbfea7 +results[7] = 0xa8a0173532fc7db7 +results[8] = 0xbf84caad86c9da1c +results[9] = 0xb0921e0d9c513786 +Run 047/064, starting at index 0x08ffff... 2662.277100 ms. +results[0] = 0x877f7f2b828e36bd +results[1] = 0xfe25e99c8408b1f2 +results[2] = 0x3756231209b0b506 +results[3] = 0x2bc6c92d902f8606 +results[4] = 0xed0d8199420aa2dd +results[5] = 0x8dacc43ffd445b68 +results[6] = 0x196ed232fbf03a6c +results[7] = 0x142e9c377f296d4c +results[8] = 0xfebb793e55799d80 +results[9] = 0x77ec08388a99c3db +Run 048/064, starting at index 0x087fff... 2662.237061 ms. +results[0] = 0x011f7de977460441 +results[1] = 0x441e1d85acef45c3 +results[2] = 0xf0b6e4e19565e0f3 +results[3] = 0x0bc80944f617fa7f +results[4] = 0xefb2c502890c5130 +results[5] = 0x82de41ea486db991 +results[6] = 0xf0d78812e966b54c +results[7] = 0x0907d6d1c25bc8d1 +results[8] = 0x62326c17f06945c9 +results[9] = 0x139bc23aaa774dd3 +Run 049/064, starting at index 0x07ffff... 2662.271973 ms. +results[0] = 0x1578cd47a06e9675 +results[1] = 0xcb8b058681f8521c +results[2] = 0x3988b98c1ea1116d +results[3] = 0xcb6a3840170792ab +results[4] = 0x7d3b2dd56405cfb2 +results[5] = 0x1224dd8871bd0b36 +results[6] = 0xd4ed9d2b84c70289 +results[7] = 0x4f984f8417b9e9db +results[8] = 0xda07f9a0ce4dfe1c +results[9] = 0xeb0748caa39f477e +Run 050/064, starting at index 0x077fff... 2662.288086 ms. +results[0] = 0xa813ea9f8e8a583f +results[1] = 0x18c3fec356c29461 +results[2] = 0xb32075991342b37b +results[3] = 0xb0df12c1eeeb987f +results[4] = 0x6f44cac155b7db6c +results[5] = 0xf9c5849824ce889c +results[6] = 0x79829012d4e7ea68 +results[7] = 0xd90faea06a21ca10 +results[8] = 0xb09881de63c5f422 +results[9] = 0x0ac83cc9cbbe4131 +Run 051/064, starting at index 0x06ffff... 2662.285889 ms. +results[0] = 0x69f6b3be7fa98cc7 +results[1] = 0xe0b22f3f10c89d24 +results[2] = 0x7194c0ad02e4099b +results[3] = 0x2750bad0213f846c +results[4] = 0x95dc27b2ab007a4b +results[5] = 0x92c0329da2787cfa +results[6] = 0xac99450e7c89d616 +results[7] = 0x82bd03d6977bd670 +results[8] = 0xd1cf937ac4ecb69a +results[9] = 0x3ec5eec4f08de300 +Run 052/064, starting at index 0x067fff... 2662.285889 ms. +results[0] = 0x8aa69f6fce2e97f4 +results[1] = 0x56147e351eba5c16 +results[2] = 0x2e7138de6aff08fa +results[3] = 0xca627fe5f8dadf05 +results[4] = 0x2030909b05587d84 +results[5] = 0x3949479a596f36d9 +results[6] = 0x34d37d44c67188c6 +results[7] = 0x74a0e1a0a19cf825 +results[8] = 0x36572b778abdfcb0 +results[9] = 0x0caf3e33fdea55a9 +Run 053/064, starting at index 0x05ffff... 2662.241943 ms. +results[0] = 0x848af474c7f1bfb7 +results[1] = 0x28b34b78ef8c06b8 +results[2] = 0x6db53cb6d7d4520a +results[3] = 0x86b8e3054ff06d7d +results[4] = 0x6b0787c6f73312bc +results[5] = 0x11d7570f0b6f7a9f +results[6] = 0xbece8197c19f847e +results[7] = 0xfa96f3d6589e376b +results[8] = 0x1e22877f28e0c16e +results[9] = 0x62d826dec0217a3f +Run 054/064, starting at index 0x057fff... 2662.292969 ms. +results[0] = 0xfb479eff3d98bffc +results[1] = 0x8828a821fd98fe08 +results[2] = 0xad55cc4007163324 +results[3] = 0xda3a33dfbeafa504 +results[4] = 0x8d8aee604767cf44 +results[5] = 0xf1a5da4a161350cf +results[6] = 0x646012def196d0d9 +results[7] = 0x5b7c1769427643b3 +results[8] = 0xb390bed32f6aa879 +results[9] = 0xfba9fe789321059b +Run 055/064, starting at index 0x04ffff... 2662.281982 ms. +results[0] = 0x9b397e51c8083aa4 +results[1] = 0xdf1469b465f983e0 +results[2] = 0x8088b59faa3aa8ba +results[3] = 0x9b8157f00fed8f9a +results[4] = 0xa71b223c90979b1a +results[5] = 0xb29d02c5fc213ec9 +results[6] = 0x883b73c818fc651a +results[7] = 0x9c6ae6fbcc9387a6 +results[8] = 0x6df3d508f57c5228 +results[9] = 0x60582c02f1745b1e +Run 056/064, starting at index 0x047fff... 2662.282959 ms. +results[0] = 0x95c58974aa102d3c +results[1] = 0xdaea3be25fd46e51 +results[2] = 0x76ab896adfe4cc18 +results[3] = 0xbb0a17f45403ef1d +results[4] = 0x5018dce8604ba2b7 +results[5] = 0x8e91e195edfa64a0 +results[6] = 0x4eb0aa5fc3db4c1f +results[7] = 0xb11fbccfe3bc8efd +results[8] = 0x973ac71e92d1fc65 +results[9] = 0xf7916af0ee9cec05 +Run 057/064, starting at index 0x03ffff... 2662.238037 ms. +results[0] = 0xabb8a84fbc0a4212 +results[1] = 0xfbe65c1e91d58a20 +results[2] = 0x94116806368c9327 +results[3] = 0xf887708590624c87 +results[4] = 0xf1db03f9cb5b9231 +results[5] = 0x5979e977435822b2 +results[6] = 0x03bd9a865e630a8f +results[7] = 0x5acddf735df7d501 +results[8] = 0xc0b4c6232c898a2b +results[9] = 0x5eb1fbe551f52c5d +Run 058/064, starting at index 0x037fff... 2662.236084 ms. +results[0] = 0xbc0a0514be09405f +results[1] = 0xa055cdd9814fdc92 +results[2] = 0x71dca901aae86df7 +results[3] = 0xfdd3e2a3b3952dbb +results[4] = 0x58a7f350420221a9 +results[5] = 0x7be3af4bc9b4d7ab +results[6] = 0x22fc3cd7de26dd0f +results[7] = 0xdeea274b5b76fa2c +results[8] = 0x85499beb34bb32b1 +results[9] = 0x5980d282431987db +Run 059/064, starting at index 0x02ffff... 2662.285889 ms. +results[0] = 0xef5fedd9f75764e9 +results[1] = 0xbc4a64b9d5839355 +results[2] = 0xe0f45a28639df0b9 +results[3] = 0x10f4ee62a79e13da +results[4] = 0x5701d9dcaa8007aa +results[5] = 0x816d3ddcd4ec223a +results[6] = 0x9316a519b3182765 +results[7] = 0x7f6b6af222d70cf2 +results[8] = 0x8b3cdbca2af87fbc +results[9] = 0x549eda30518c1835 +Run 060/064, starting at index 0x027fff... 2662.284912 ms. +results[0] = 0xcbc201b7b21197fd +results[1] = 0xb0fc06822d7716d1 +results[2] = 0x65908f94d9209467 +results[3] = 0x5c35f425c909fc03 +results[4] = 0x01e833a48598d934 +results[5] = 0x9d8d02fdc8718234 +results[6] = 0x331b31b733ea7c41 +results[7] = 0x9f621b8bf8d58ffe +results[8] = 0x610fe7ce5b7a1808 +results[9] = 0xa98271a10ec7cbd4 +Run 061/064, starting at index 0x01ffff... 2662.258057 ms. +results[0] = 0xc220feb527c8a4c2 +results[1] = 0x4d17033ab28c56fb +results[2] = 0x8e0626c6ecfef53b +results[3] = 0xe9eefb03fd9ca7d0 +results[4] = 0x10896a774d304b04 +results[5] = 0xf195c0c98bae98e6 +results[6] = 0x14827e0542db9e05 +results[7] = 0xbf03f81d89483091 +results[8] = 0x5b0fb98f940c6c0e +results[9] = 0x24f84f1ed182cef3 +Run 062/064, starting at index 0x017fff... 2662.270020 ms. +results[0] = 0x6a8de46a0f034d0c +results[1] = 0x79395dd5911ed402 +results[2] = 0x70f6e5fd45d594fb +results[3] = 0x17b91f12d11da6be +results[4] = 0x8e6c473c9d77a33e +results[5] = 0xdc1fa8c93d28bb0f +results[6] = 0xdde91c128133dc21 +results[7] = 0x8c3517e924639409 +results[8] = 0x057d6e8119b4b20a +results[9] = 0xb193debe9e2f8a34 +Run 063/064, starting at index 0x00ffff... 2662.395996 ms. +results[0] = 0x7bbbf41154a3a0dd +results[1] = 0xb92608177e4841c8 +results[2] = 0xab96059ef3d86887 +results[3] = 0xabbfd04efafb471c +results[4] = 0x98e1a89a2e71e96a +results[5] = 0x21ee4cefb852c9c7 +results[6] = 0x790249ccbb376f5e +results[7] = 0xc4f2f004196ce26d +results[8] = 0xe38e2c5620ba48b6 +results[9] = 0x2e569f7f8bae5a05 +Run 064/064, starting at index 0x007fff... 2662.293945 ms. +results[0] = 0x6d14a53d7fe0574c +results[1] = 0x635809b0850c5594 +results[2] = 0x55085ccd8357a140 +results[3] = 0x808608202d55b473 +results[4] = 0x905ddf13110ca25a +results[5] = 0xcbbe903d8847444e +results[6] = 0xb32dcd0ee320992f +results[7] = 0x38087d640fea5c81 +results[8] = 0xdbd57f6ee98bb3ad +results[9] = 0xd688814759e2afec +Total time: 202394.093750 ms, 170386.655762 spent crunching diff --git a/A5.1/CUDA/calculate_chain_dump.ref b/A5.1/CUDA/calculate_chain_dump.ref new file mode 100644 index 0000000..32a66fb --- /dev/null +++ b/A5.1/CUDA/calculate_chain_dump.ref @@ -0,0 +1,660 @@ +Calculating chain from start value 0x0000000000000000 +Before 0x1fffff: 0x0000000000000000 +Before 0x1f7fff: 0xf86a3913f7a6fe1d +Before 0x1effff: 0x06c8e2628b279454 +Before 0x1e7fff: 0x1edae43c1d2514dc +Before 0x1dffff: 0x9d0dc09bae18e7b4 +Before 0x1d7fff: 0xde8e3b8a95849386 +Before 0x1cffff: 0x9a792143c8ddfc38 +Before 0x1c7fff: 0x4789bda256ee5479 +Before 0x1bffff: 0xe673e34b3ec049b4 +Before 0x1b7fff: 0x0c04d9a6e5dafb00 +Before 0x1affff: 0x6d8c5578ca5b0ed9 +Before 0x1a7fff: 0x431c105c0e2c573d +Before 0x19ffff: 0x2ebd47d7dc599d40 +Before 0x197fff: 0x442722b786ab17a4 +Before 0x18ffff: 0x009efce4b1df9a0d +Before 0x187fff: 0x0d42264a8e054714 +Before 0x17ffff: 0x0f12aa31bc33c77c +Before 0x177fff: 0xa58c3a57abd05233 +Before 0x16ffff: 0x958746f2e2edfb64 +Before 0x167fff: 0x9a368197a5b86b38 +Before 0x15ffff: 0x152c4d609f5f7652 +Before 0x157fff: 0xd751e0b173fbd1e0 +Before 0x14ffff: 0xaa14b720785a72f2 +Before 0x147fff: 0xbabea967f2238696 +Before 0x13ffff: 0x4b020676a2952c07 +Before 0x137fff: 0xa0bd574ce6a4c71a +Before 0x12ffff: 0x3215358436ec9e99 +Before 0x127fff: 0xdb74d36c2cebaa7d +Before 0x11ffff: 0xad230dd4433eb3c3 +Before 0x117fff: 0x2d30c2b772f07cf0 +Before 0x10ffff: 0x5c97568216a22d02 +Before 0x107fff: 0x5ee59393ff0d1f24 +Before 0x0fffff: 0xce8eb17338956d0b +Before 0x0f7fff: 0x4f4b501eb70a2d56 +Before 0x0effff: 0x8158c2aabc055783 +Before 0x0e7fff: 0x414b0e9f2866f8a5 +Before 0x0dffff: 0x7a2e5e3f1cf35b7f +Before 0x0d7fff: 0xac0ccb6f06d75169 +Before 0x0cffff: 0xab1f220a15a81ca1 +Before 0x0c7fff: 0xa7376383d7ea1c53 +Before 0x0bffff: 0x930aab10528e011a +Before 0x0b7fff: 0xfeb930d5de2a9301 +Before 0x0affff: 0xef4836464ed8ffcf +Before 0x0a7fff: 0x088460b3fc8ffdc8 +Before 0x09ffff: 0x9416e5b668a1bc79 +Before 0x097fff: 0x6eb302deaa1289b6 +Before 0x08ffff: 0x55201f5cb02341b7 +Before 0x087fff: 0x877f7f2b828e36bd +Before 0x07ffff: 0x011f7de977460441 +Before 0x077fff: 0x1578cd47a06e9675 +Before 0x06ffff: 0xa813ea9f8e8a583f +Before 0x067fff: 0x69f6b3be7fa98cc7 +Before 0x05ffff: 0x8aa69f6fce2e97f4 +Before 0x057fff: 0x848af474c7f1bfb7 +Before 0x04ffff: 0xfb479eff3d98bffc +Before 0x047fff: 0x9b397e51c8083aa4 +Before 0x03ffff: 0x95c58974aa102d3c +Before 0x037fff: 0xabb8a84fbc0a4212 +Before 0x02ffff: 0xbc0a0514be09405f +Before 0x027fff: 0xef5fedd9f75764e9 +Before 0x01ffff: 0xcbc201b7b21197fd +Before 0x017fff: 0xc220feb527c8a4c2 +Before 0x00ffff: 0x6a8de46a0f034d0c +Before 0x007fff: 0x7bbbf41154a3a0dd +End value: 0x6d14a53d7fe0574c +Calculating chain from start value 0x0000000000000001 +Before 0x1fffff: 0x0000000000000001 +Before 0x1f7fff: 0x3b932e8d8e7874f9 +Before 0x1effff: 0xc795d5f7e0b74f43 +Before 0x1e7fff: 0x0113e9b9e9a99566 +Before 0x1dffff: 0xa7e3644fb6dda1ee +Before 0x1d7fff: 0x30066fd8921a09e1 +Before 0x1cffff: 0x3466a07129bb39d6 +Before 0x1c7fff: 0x369b5987ef460e2d +Before 0x1bffff: 0x25e0e80d23bccaa4 +Before 0x1b7fff: 0x4026209f57a61698 +Before 0x1affff: 0x750925714172abc4 +Before 0x1a7fff: 0xe7d0c4698a5a4a53 +Before 0x19ffff: 0xb4f2447883d50c91 +Before 0x197fff: 0xf9748ead71845e23 +Before 0x18ffff: 0x71ba22f94143b717 +Before 0x187fff: 0xc924cde7422c9193 +Before 0x17ffff: 0x01c80661532a2195 +Before 0x177fff: 0x1f13eabb0b785c7a +Before 0x16ffff: 0x7a7bdb3ffacf881d +Before 0x167fff: 0xfa0f9ebdf81d47d4 +Before 0x15ffff: 0x2b6a843a2ebdab14 +Before 0x157fff: 0x9ab3111d647091b1 +Before 0x14ffff: 0xbd0342a6a6d5495e +Before 0x147fff: 0xae76eb1bd7625d09 +Before 0x13ffff: 0x283e96831534763c +Before 0x137fff: 0x15f6ddb6d7af0e23 +Before 0x12ffff: 0x71f12fd7d2c51d40 +Before 0x127fff: 0x7eb90ba1dc2f2d9a +Before 0x11ffff: 0xa02808cf11c37991 +Before 0x117fff: 0x468661c0d8183091 +Before 0x10ffff: 0x14bc8421553ac318 +Before 0x107fff: 0x92ceeec6e42e9397 +Before 0x0fffff: 0x484f0c10f4eaec49 +Before 0x0f7fff: 0x266ab5d62bac21eb +Before 0x0effff: 0x243ef3a2a06ceb50 +Before 0x0e7fff: 0x54b825a8d17b04c0 +Before 0x0dffff: 0x3fde742c7fef8823 +Before 0x0d7fff: 0x012e908519257924 +Before 0x0cffff: 0x3f900a4f4fb0d4f3 +Before 0x0c7fff: 0x922ea52e8d702443 +Before 0x0bffff: 0xcab4ab331175291d +Before 0x0b7fff: 0x7c52692499aa9d9e +Before 0x0affff: 0xb54d7122c71f1ce5 +Before 0x0a7fff: 0x66ee48ffc8ab48cf +Before 0x09ffff: 0x3c257f6c56dd59e1 +Before 0x097fff: 0x11fa39d2e4d5bb0d +Before 0x08ffff: 0x199446b47eca05e4 +Before 0x087fff: 0xfe25e99c8408b1f2 +Before 0x07ffff: 0x441e1d85acef45c3 +Before 0x077fff: 0xcb8b058681f8521c +Before 0x06ffff: 0x18c3fec356c29461 +Before 0x067fff: 0xe0b22f3f10c89d24 +Before 0x05ffff: 0x56147e351eba5c16 +Before 0x057fff: 0x28b34b78ef8c06b8 +Before 0x04ffff: 0x8828a821fd98fe08 +Before 0x047fff: 0xdf1469b465f983e0 +Before 0x03ffff: 0xdaea3be25fd46e51 +Before 0x037fff: 0xfbe65c1e91d58a20 +Before 0x02ffff: 0xa055cdd9814fdc92 +Before 0x027fff: 0xbc4a64b9d5839355 +Before 0x01ffff: 0xb0fc06822d7716d1 +Before 0x017fff: 0x4d17033ab28c56fb +Before 0x00ffff: 0x79395dd5911ed402 +Before 0x007fff: 0xb92608177e4841c8 +End value: 0x635809b0850c5594 +Calculating chain from start value 0x0000000000000002 +Before 0x1fffff: 0x0000000000000002 +Before 0x1f7fff: 0xad4e7a8cda62ff88 +Before 0x1effff: 0x2e368c931b5c0d38 +Before 0x1e7fff: 0x598f3761a9327c17 +Before 0x1dffff: 0xcb3672cb94c29fef +Before 0x1d7fff: 0x531fb03c87f92237 +Before 0x1cffff: 0x4506ebfa7a629466 +Before 0x1c7fff: 0x9dd030ad5fe4cfe7 +Before 0x1bffff: 0xc9e70df2a90d75f5 +Before 0x1b7fff: 0x33dd4e53d67c1af4 +Before 0x1affff: 0x26365978f129e89f +Before 0x1a7fff: 0x0882558280d62656 +Before 0x19ffff: 0x221e2d948174c04e +Before 0x197fff: 0x101166f3f2c2906a +Before 0x18ffff: 0xc6188f670c5c8523 +Before 0x187fff: 0x4bcb1d6343d4b6ff +Before 0x17ffff: 0x89e32d01099dc139 +Before 0x177fff: 0x91e4fcbebe4a3460 +Before 0x16ffff: 0xbad21d46523f914d +Before 0x167fff: 0x68f28ccfdf49ab98 +Before 0x15ffff: 0x124e3145474f8a1a +Before 0x157fff: 0x287672d6d49178d0 +Before 0x14ffff: 0x61818dedd3e9cdf4 +Before 0x147fff: 0x0fc43f9cef954b89 +Before 0x13ffff: 0x7bb39b603114ea5b +Before 0x137fff: 0x38b3c5e438083ead +Before 0x12ffff: 0xf0b2de9146b0fbdd +Before 0x127fff: 0xb35dfb423d70e76f +Before 0x11ffff: 0x879ac083c7a3cd39 +Before 0x117fff: 0x654ee9e44da4a62d +Before 0x10ffff: 0xf840f89db83f784a +Before 0x107fff: 0x9e57d0bf16e88244 +Before 0x0fffff: 0xd98aa866b0e8a5f0 +Before 0x0f7fff: 0xf4f365c88d874e6d +Before 0x0effff: 0xe6ca244277a1aeb8 +Before 0x0e7fff: 0x07a3f89d49baddb5 +Before 0x0dffff: 0x9f4acf84cd57f9ef +Before 0x0d7fff: 0x740fe275ac878254 +Before 0x0cffff: 0x650c56f7ebde254e +Before 0x0c7fff: 0x9bcc28578870b80e +Before 0x0bffff: 0x6a548c9df034c95a +Before 0x0b7fff: 0xdf25a8b3997999cb +Before 0x0affff: 0x6503ce9e282bfe49 +Before 0x0a7fff: 0xddc9b9198b008093 +Before 0x09ffff: 0xfbd461fcc443e864 +Before 0x097fff: 0xe790e0e71bbbb8ed +Before 0x08ffff: 0x6e5b36817ec1cb7f +Before 0x087fff: 0x3756231209b0b506 +Before 0x07ffff: 0xf0b6e4e19565e0f3 +Before 0x077fff: 0x3988b98c1ea1116d +Before 0x06ffff: 0xb32075991342b37b +Before 0x067fff: 0x7194c0ad02e4099b +Before 0x05ffff: 0x2e7138de6aff08fa +Before 0x057fff: 0x6db53cb6d7d4520a +Before 0x04ffff: 0xad55cc4007163324 +Before 0x047fff: 0x8088b59faa3aa8ba +Before 0x03ffff: 0x76ab896adfe4cc18 +Before 0x037fff: 0x94116806368c9327 +Before 0x02ffff: 0x71dca901aae86df7 +Before 0x027fff: 0xe0f45a28639df0b9 +Before 0x01ffff: 0x65908f94d9209467 +Before 0x017fff: 0x8e0626c6ecfef53b +Before 0x00ffff: 0x70f6e5fd45d594fb +Before 0x007fff: 0xab96059ef3d86887 +End value: 0x55085ccd8357a140 +Calculating chain from start value 0x0000000000000003 +Before 0x1fffff: 0x0000000000000003 +Before 0x1f7fff: 0x0941fb54cbcc88b6 +Before 0x1effff: 0xaca66326a8e8e646 +Before 0x1e7fff: 0xd0a9607e97753266 +Before 0x1dffff: 0x21f996340e7b5b56 +Before 0x1d7fff: 0x6baee0b564b75324 +Before 0x1cffff: 0x5ab8e5158093c74e +Before 0x1c7fff: 0x8bf145603f5179fe +Before 0x1bffff: 0xe3344c1407dd2fd8 +Before 0x1b7fff: 0x95993eec1a900978 +Before 0x1affff: 0x85163a0fbc185558 +Before 0x1a7fff: 0x79c6bae1d6ba6c96 +Before 0x19ffff: 0x5b553053e685c22c +Before 0x197fff: 0xa7a77816ccf78911 +Before 0x18ffff: 0x6da7af35f88493f7 +Before 0x187fff: 0x7fe079f84dd935dc +Before 0x17ffff: 0x629e44a90ece6fa1 +Before 0x177fff: 0xc7b478524c315ddc +Before 0x16ffff: 0xcb0b56c8b2c7d277 +Before 0x167fff: 0x942e534b51337153 +Before 0x15ffff: 0x74831c4c8beff73d +Before 0x157fff: 0xc4bfc15df2424d39 +Before 0x14ffff: 0x062c16a328c45496 +Before 0x147fff: 0x7790428b51155a78 +Before 0x13ffff: 0x7631b00003302ccf +Before 0x137fff: 0x294e60a96e5b8682 +Before 0x12ffff: 0x1127ca103b8437cf +Before 0x127fff: 0xf727c54fda50fdd8 +Before 0x11ffff: 0x30cc19e3baf047dd +Before 0x117fff: 0x1e4158ef14faacda +Before 0x10ffff: 0xe57ac8cd31b1d3a7 +Before 0x107fff: 0x90fbaf6931902914 +Before 0x0fffff: 0xdac6f3d9788853a4 +Before 0x0f7fff: 0xb8f4ecbc1e30fba4 +Before 0x0effff: 0xc06b54774988d4ec +Before 0x0e7fff: 0xc2f42437c763783f +Before 0x0dffff: 0x6fee4eb0d109ab48 +Before 0x0d7fff: 0x68dbd5f5509a31c4 +Before 0x0cffff: 0x3aa2dcfe96e57eb6 +Before 0x0c7fff: 0x719b02f71c458022 +Before 0x0bffff: 0x503e4d0d8db6ab48 +Before 0x0b7fff: 0x6ecbe9d3fdc65366 +Before 0x0affff: 0xeaa981a1b1de3f45 +Before 0x0a7fff: 0x62c7e089708c1835 +Before 0x09ffff: 0xe9ee16991dd52b5c +Before 0x097fff: 0xc8ba72dd58d3b344 +Before 0x08ffff: 0x55643a74e927b308 +Before 0x087fff: 0x2bc6c92d902f8606 +Before 0x07ffff: 0x0bc80944f617fa7f +Before 0x077fff: 0xcb6a3840170792ab +Before 0x06ffff: 0xb0df12c1eeeb987f +Before 0x067fff: 0x2750bad0213f846c +Before 0x05ffff: 0xca627fe5f8dadf05 +Before 0x057fff: 0x86b8e3054ff06d7d +Before 0x04ffff: 0xda3a33dfbeafa504 +Before 0x047fff: 0x9b8157f00fed8f9a +Before 0x03ffff: 0xbb0a17f45403ef1d +Before 0x037fff: 0xf887708590624c87 +Before 0x02ffff: 0xfdd3e2a3b3952dbb +Before 0x027fff: 0x10f4ee62a79e13da +Before 0x01ffff: 0x5c35f425c909fc03 +Before 0x017fff: 0xe9eefb03fd9ca7d0 +Before 0x00ffff: 0x17b91f12d11da6be +Before 0x007fff: 0xabbfd04efafb471c +End value: 0x808608202d55b473 +Calculating chain from start value 0x0000000000000004 +Before 0x1fffff: 0x0000000000000004 +Before 0x1f7fff: 0xd533f9846e024afa +Before 0x1effff: 0x9e559f8fe3d07aac +Before 0x1e7fff: 0xee220804b7266874 +Before 0x1dffff: 0xf45f38be00914661 +Before 0x1d7fff: 0xd4814e3e32d3899f +Before 0x1cffff: 0xea3716a4f281d37e +Before 0x1c7fff: 0xd752f521be6c7148 +Before 0x1bffff: 0x812785bb44950cb4 +Before 0x1b7fff: 0xd2363b5734b25761 +Before 0x1affff: 0x74d54d17e57adea0 +Before 0x1a7fff: 0x5aaf411f2b443a76 +Before 0x19ffff: 0x91be8c84415b6916 +Before 0x197fff: 0x363711026502302d +Before 0x18ffff: 0x0ae72d1d358a576c +Before 0x187fff: 0x2d4c5b6103c76e9c +Before 0x17ffff: 0x4e9e8daae2c481c2 +Before 0x177fff: 0x5ab937be093de5e6 +Before 0x16ffff: 0xeca57b21cbc1222b +Before 0x167fff: 0x8f350a0811c317b2 +Before 0x15ffff: 0x97e61ba325750343 +Before 0x157fff: 0x49c366461f6ddf47 +Before 0x14ffff: 0x0741e9ce45d555c2 +Before 0x147fff: 0x0884067f31947a06 +Before 0x13ffff: 0xffc9917c676709c7 +Before 0x137fff: 0xb5401abe8cfe3d1b +Before 0x12ffff: 0xbe591f8e5672e493 +Before 0x127fff: 0x28414a89f572cad5 +Before 0x11ffff: 0x5ece631956ef02d4 +Before 0x117fff: 0x613e2ced3718deb6 +Before 0x10ffff: 0x4650d66d9e2d8879 +Before 0x107fff: 0x6a584e0c7e911599 +Before 0x0fffff: 0x12aba364208f2bbf +Before 0x0f7fff: 0x6fa654fa8349caa5 +Before 0x0effff: 0x84e15ac76fc73ae7 +Before 0x0e7fff: 0x23ef2d25214e703b +Before 0x0dffff: 0xf3b3ca3f2dd5d4cc +Before 0x0d7fff: 0xe695c67f98abcb3c +Before 0x0cffff: 0xaf55ddf3f47a8620 +Before 0x0c7fff: 0x99e380ba05f007b3 +Before 0x0bffff: 0xb6aee29527590315 +Before 0x0b7fff: 0xccc92936d9211774 +Before 0x0affff: 0xf749b6b700d4df15 +Before 0x0a7fff: 0xad2266e01e60c036 +Before 0x09ffff: 0x3742a2c573292a68 +Before 0x097fff: 0x3bf99c1db1920acb +Before 0x08ffff: 0xe353dea2c655d168 +Before 0x087fff: 0xed0d8199420aa2dd +Before 0x07ffff: 0xefb2c502890c5130 +Before 0x077fff: 0x7d3b2dd56405cfb2 +Before 0x06ffff: 0x6f44cac155b7db6c +Before 0x067fff: 0x95dc27b2ab007a4b +Before 0x05ffff: 0x2030909b05587d84 +Before 0x057fff: 0x6b0787c6f73312bc +Before 0x04ffff: 0x8d8aee604767cf44 +Before 0x047fff: 0xa71b223c90979b1a +Before 0x03ffff: 0x5018dce8604ba2b7 +Before 0x037fff: 0xf1db03f9cb5b9231 +Before 0x02ffff: 0x58a7f350420221a9 +Before 0x027fff: 0x5701d9dcaa8007aa +Before 0x01ffff: 0x01e833a48598d934 +Before 0x017fff: 0x10896a774d304b04 +Before 0x00ffff: 0x8e6c473c9d77a33e +Before 0x007fff: 0x98e1a89a2e71e96a +End value: 0x905ddf13110ca25a +Calculating chain from start value 0x0000000000000005 +Before 0x1fffff: 0x0000000000000005 +Before 0x1f7fff: 0x08ce95182121319e +Before 0x1effff: 0x37c633f5becc8da7 +Before 0x1e7fff: 0x5bb130066a9729eb +Before 0x1dffff: 0x82df8577b9a6e849 +Before 0x1d7fff: 0xf4a494f319fa8dd6 +Before 0x1cffff: 0xd5d538f3bb41cc0d +Before 0x1c7fff: 0x4844b1b92f9eb55e +Before 0x1bffff: 0xbe777c056ec9a7fc +Before 0x1b7fff: 0x77875c8914ad4df3 +Before 0x1affff: 0x1195655ab64ea258 +Before 0x1a7fff: 0xef1bdd0bdcfdc5f3 +Before 0x19ffff: 0x73b9f18eecf85f79 +Before 0x197fff: 0x963bd7c815090cda +Before 0x18ffff: 0x26ad3f46c6101f50 +Before 0x187fff: 0x9ab5f689347c758c +Before 0x17ffff: 0xf6e2b731b35b43e0 +Before 0x177fff: 0x8684bfde1876bdd9 +Before 0x16ffff: 0x9fa42f8b3ae3970d +Before 0x167fff: 0x456a6fa823d49da6 +Before 0x15ffff: 0x67ef1dee2e864581 +Before 0x157fff: 0xa16b415b2e8228fa +Before 0x14ffff: 0x4803648d3f5e9dc1 +Before 0x147fff: 0x09eceb25c4d3b26e +Before 0x13ffff: 0x98563f1a8257ed99 +Before 0x137fff: 0xabfa2d21ee9149d7 +Before 0x12ffff: 0xb5c0da59634e53b2 +Before 0x127fff: 0x560e86d786ae7dfd +Before 0x11ffff: 0xb942a83d8fa065b8 +Before 0x117fff: 0xebd086ef7ce2dc86 +Before 0x10ffff: 0x3abe2fc6e4c5c73a +Before 0x107fff: 0xaa3652b2ce38c209 +Before 0x0fffff: 0xf40dc5fec3961769 +Before 0x0f7fff: 0x90be139af90a7c7f +Before 0x0effff: 0x97555fa7d3bd2da4 +Before 0x0e7fff: 0xcb28727140e5263d +Before 0x0dffff: 0x99a989a8fe494396 +Before 0x0d7fff: 0xa8ff6ffe3fa46787 +Before 0x0cffff: 0xa9403c1e335cf40c +Before 0x0c7fff: 0x0122066cccf800b7 +Before 0x0bffff: 0x0753e778f036c74d +Before 0x0b7fff: 0x374aec65737a4b52 +Before 0x0affff: 0xe2543a962e7cda60 +Before 0x0a7fff: 0x91e283710b651ceb +Before 0x09ffff: 0x1f2617ec0ec361a2 +Before 0x097fff: 0x4548e08578918080 +Before 0x08ffff: 0x44a5c2fbd691e6a3 +Before 0x087fff: 0x8dacc43ffd445b68 +Before 0x07ffff: 0x82de41ea486db991 +Before 0x077fff: 0x1224dd8871bd0b36 +Before 0x06ffff: 0xf9c5849824ce889c +Before 0x067fff: 0x92c0329da2787cfa +Before 0x05ffff: 0x3949479a596f36d9 +Before 0x057fff: 0x11d7570f0b6f7a9f +Before 0x04ffff: 0xf1a5da4a161350cf +Before 0x047fff: 0xb29d02c5fc213ec9 +Before 0x03ffff: 0x8e91e195edfa64a0 +Before 0x037fff: 0x5979e977435822b2 +Before 0x02ffff: 0x7be3af4bc9b4d7ab +Before 0x027fff: 0x816d3ddcd4ec223a +Before 0x01ffff: 0x9d8d02fdc8718234 +Before 0x017fff: 0xf195c0c98bae98e6 +Before 0x00ffff: 0xdc1fa8c93d28bb0f +Before 0x007fff: 0x21ee4cefb852c9c7 +End value: 0xcbbe903d8847444e +Calculating chain from start value 0x0000000000000006 +Before 0x1fffff: 0x0000000000000006 +Before 0x1f7fff: 0x0071d5867bab50a9 +Before 0x1effff: 0xa2ccd2b60303c2bd +Before 0x1e7fff: 0x8a071550a439cd90 +Before 0x1dffff: 0x690994664330b069 +Before 0x1d7fff: 0x04d19c41aa6d7a69 +Before 0x1cffff: 0xf17a2a7115f0d3b8 +Before 0x1c7fff: 0x76e4375ced46978a +Before 0x1bffff: 0xe14fa85c1ee0a88c +Before 0x1b7fff: 0x485355bcbb0c35a0 +Before 0x1affff: 0xb5c29f836403b468 +Before 0x1a7fff: 0xb873fad0089f82ca +Before 0x19ffff: 0x17924f15ac25f0e8 +Before 0x197fff: 0x8f1b9da8c8591a2d +Before 0x18ffff: 0x7ce4bdd095504c1e +Before 0x187fff: 0x5df9a6ff135ea9fb +Before 0x17ffff: 0x5abd0200df85c9b8 +Before 0x177fff: 0x8c4db8995cf30a14 +Before 0x16ffff: 0x10beda8721904789 +Before 0x167fff: 0xcad798cb2dc1d768 +Before 0x15ffff: 0x38eff5a78b6f074f +Before 0x157fff: 0xe5e599509ddd17a9 +Before 0x14ffff: 0x3a7d5e031ca3db91 +Before 0x147fff: 0x2067cbb814a09808 +Before 0x13ffff: 0xd0928d28a4f44c54 +Before 0x137fff: 0xb0f04c0101c6d649 +Before 0x12ffff: 0x413313cf45802088 +Before 0x127fff: 0xcadf6b4201127812 +Before 0x11ffff: 0x9a7410426a6bf18c +Before 0x117fff: 0x05fe150301395cf7 +Before 0x10ffff: 0x4261ecef0bf4edb8 +Before 0x107fff: 0x593d8d600860c57c +Before 0x0fffff: 0x1ef8ca7d7dee4661 +Before 0x0f7fff: 0x63d58d1348fe7cb9 +Before 0x0effff: 0x92df803a0cd5d7e2 +Before 0x0e7fff: 0x17e6d53bf2fd8cfa +Before 0x0dffff: 0x5db7886f83bfa1d6 +Before 0x0d7fff: 0x83087aad942a917c +Before 0x0cffff: 0xf34a7c7c5ac44109 +Before 0x0c7fff: 0xe3311e362e2ff65c +Before 0x0bffff: 0xda34b33e0502470c +Before 0x0b7fff: 0x8abee7b9e1658b43 +Before 0x0affff: 0x07e4b4901eec6163 +Before 0x0a7fff: 0x7d9f5985852f5c2c +Before 0x09ffff: 0xb0a3637cda32d818 +Before 0x097fff: 0xfb2120e3313aeb3c +Before 0x08ffff: 0x9e46715bf3bbfea7 +Before 0x087fff: 0x196ed232fbf03a6c +Before 0x07ffff: 0xf0d78812e966b54c +Before 0x077fff: 0xd4ed9d2b84c70289 +Before 0x06ffff: 0x79829012d4e7ea68 +Before 0x067fff: 0xac99450e7c89d616 +Before 0x05ffff: 0x34d37d44c67188c6 +Before 0x057fff: 0xbece8197c19f847e +Before 0x04ffff: 0x646012def196d0d9 +Before 0x047fff: 0x883b73c818fc651a +Before 0x03ffff: 0x4eb0aa5fc3db4c1f +Before 0x037fff: 0x03bd9a865e630a8f +Before 0x02ffff: 0x22fc3cd7de26dd0f +Before 0x027fff: 0x9316a519b3182765 +Before 0x01ffff: 0x331b31b733ea7c41 +Before 0x017fff: 0x14827e0542db9e05 +Before 0x00ffff: 0xdde91c128133dc21 +Before 0x007fff: 0x790249ccbb376f5e +End value: 0xb32dcd0ee320992f +Calculating chain from start value 0x0000000000000007 +Before 0x1fffff: 0x0000000000000007 +Before 0x1f7fff: 0x2176f05038537afe +Before 0x1effff: 0x44dc4a96f2439c43 +Before 0x1e7fff: 0x54d2746e701d961b +Before 0x1dffff: 0x151b0e7753c0ff8f +Before 0x1d7fff: 0xc5bd07e7c4918d69 +Before 0x1cffff: 0xfd8e2be2063eb97e +Before 0x1c7fff: 0xf13503689b962866 +Before 0x1bffff: 0x580c650090bd3a06 +Before 0x1b7fff: 0xc212dc66e6bcd69d +Before 0x1affff: 0x0806bf8eec1a3a02 +Before 0x1a7fff: 0x8b2efd50ca3db141 +Before 0x19ffff: 0x9f77330cd86987e1 +Before 0x197fff: 0x0455b18b8ed1394e +Before 0x18ffff: 0xd27b31aa3a127f82 +Before 0x187fff: 0xa704584001143428 +Before 0x17ffff: 0x6c2279057a3441c7 +Before 0x177fff: 0x5dc7ca43a96b53d0 +Before 0x16ffff: 0xae2330cb6eb9cb41 +Before 0x167fff: 0xb3d486a7642f9c69 +Before 0x15ffff: 0xb309a2babdabd03c +Before 0x157fff: 0xd6fddb3cb1693741 +Before 0x14ffff: 0x70c4ee533f39d296 +Before 0x147fff: 0xf985180006624c77 +Before 0x13ffff: 0xb9a9efd5c22bc6de +Before 0x137fff: 0xebbcacf720df312a +Before 0x12ffff: 0xe696976f81d91020 +Before 0x127fff: 0x335ad260941ebf06 +Before 0x11ffff: 0xf88d12d1d4fb4c55 +Before 0x117fff: 0x99435225b5541a88 +Before 0x10ffff: 0x25fcb5a7a8c22443 +Before 0x107fff: 0xd680f97fc1559840 +Before 0x0fffff: 0x5637d9bcb5798054 +Before 0x0f7fff: 0xaca293cc0374a4bd +Before 0x0effff: 0x83e4626481f8b5b2 +Before 0x0e7fff: 0xd7f2fd8a213be599 +Before 0x0dffff: 0x294b460e1349c17e +Before 0x0d7fff: 0x10cf2bbc195d461b +Before 0x0cffff: 0x1c358e2bf242b65d +Before 0x0c7fff: 0xdcf4c25f341d02d3 +Before 0x0bffff: 0x67f6ac59b70822d1 +Before 0x0b7fff: 0x854b61c7193a1427 +Before 0x0affff: 0xe42a64b937a7594a +Before 0x0a7fff: 0xcef62b2eb9424ee5 +Before 0x09ffff: 0xf3fc170b6f3a8aa2 +Before 0x097fff: 0xe49ec1266dd9bea0 +Before 0x08ffff: 0xa8a0173532fc7db7 +Before 0x087fff: 0x142e9c377f296d4c +Before 0x07ffff: 0x0907d6d1c25bc8d1 +Before 0x077fff: 0x4f984f8417b9e9db +Before 0x06ffff: 0xd90faea06a21ca10 +Before 0x067fff: 0x82bd03d6977bd670 +Before 0x05ffff: 0x74a0e1a0a19cf825 +Before 0x057fff: 0xfa96f3d6589e376b +Before 0x04ffff: 0x5b7c1769427643b3 +Before 0x047fff: 0x9c6ae6fbcc9387a6 +Before 0x03ffff: 0xb11fbccfe3bc8efd +Before 0x037fff: 0x5acddf735df7d501 +Before 0x02ffff: 0xdeea274b5b76fa2c +Before 0x027fff: 0x7f6b6af222d70cf2 +Before 0x01ffff: 0x9f621b8bf8d58ffe +Before 0x017fff: 0xbf03f81d89483091 +Before 0x00ffff: 0x8c3517e924639409 +Before 0x007fff: 0xc4f2f004196ce26d +End value: 0x38087d640fea5c81 +Calculating chain from start value 0x0000000000000008 +Before 0x1fffff: 0x0000000000000008 +Before 0x1f7fff: 0x903fa08a52b54fae +Before 0x1effff: 0x37a61f187afe477d +Before 0x1e7fff: 0x36435a4743382921 +Before 0x1dffff: 0xec91747262eaae89 +Before 0x1d7fff: 0xa88a5d6b61592d84 +Before 0x1cffff: 0xd26195a2c95057ab +Before 0x1c7fff: 0x124cbab3cfb0d1a4 +Before 0x1bffff: 0xdf6b38107ec66e8d +Before 0x1b7fff: 0x733c6d9db011f73f +Before 0x1affff: 0x1987371a68e7d4ed +Before 0x1a7fff: 0x0cd1ace106b05318 +Before 0x19ffff: 0x80bdd941d92cf422 +Before 0x197fff: 0x9b2aeb0d8231581a +Before 0x18ffff: 0x08e921ad0bf30d04 +Before 0x187fff: 0x0547f3fd0068620f +Before 0x17ffff: 0xd9bcb24dd0208166 +Before 0x177fff: 0x803d3fc734edd1a1 +Before 0x16ffff: 0x8a928736b0282147 +Before 0x167fff: 0x9da2fb9cb1fa8b02 +Before 0x15ffff: 0x9798775c080fe984 +Before 0x157fff: 0xc868157f69cf3ba0 +Before 0x14ffff: 0xc3f61ca8ae1fdd60 +Before 0x147fff: 0x54b66353e6411084 +Before 0x13ffff: 0xd34d795295043ec7 +Before 0x137fff: 0xe99a010201a7fb2a +Before 0x12ffff: 0x526326165d24d052 +Before 0x127fff: 0x8bae4958dcf7065e +Before 0x11ffff: 0x235d05530634bb61 +Before 0x117fff: 0x842e49b596323bdb +Before 0x10ffff: 0x6fa81edb6ca7dd26 +Before 0x107fff: 0x796f69974e245ae4 +Before 0x0fffff: 0xd95f07de3fb9a196 +Before 0x0f7fff: 0xb009676f5c977200 +Before 0x0effff: 0xc1c0402c5f3f96db +Before 0x0e7fff: 0x1c5034df6445ed5e +Before 0x0dffff: 0xdc316ec62aeed3b0 +Before 0x0d7fff: 0x21ae9cb12af383ec +Before 0x0cffff: 0xbbcd547fdef56104 +Before 0x0c7fff: 0xdd665962c6b4b05c +Before 0x0bffff: 0xeb2819fca0d0b12a +Before 0x0b7fff: 0xe9ce7a2bfe13de36 +Before 0x0affff: 0xb7758ddb5231fff5 +Before 0x0a7fff: 0x8693f31f6d1e22b9 +Before 0x09ffff: 0x4ba3e092428a8f55 +Before 0x097fff: 0xbad525f3cecf83fa +Before 0x08ffff: 0xbf84caad86c9da1c +Before 0x087fff: 0xfebb793e55799d80 +Before 0x07ffff: 0x62326c17f06945c9 +Before 0x077fff: 0xda07f9a0ce4dfe1c +Before 0x06ffff: 0xb09881de63c5f422 +Before 0x067fff: 0xd1cf937ac4ecb69a +Before 0x05ffff: 0x36572b778abdfcb0 +Before 0x057fff: 0x1e22877f28e0c16e +Before 0x04ffff: 0xb390bed32f6aa879 +Before 0x047fff: 0x6df3d508f57c5228 +Before 0x03ffff: 0x973ac71e92d1fc65 +Before 0x037fff: 0xc0b4c6232c898a2b +Before 0x02ffff: 0x85499beb34bb32b1 +Before 0x027fff: 0x8b3cdbca2af87fbc +Before 0x01ffff: 0x610fe7ce5b7a1808 +Before 0x017fff: 0x5b0fb98f940c6c0e +Before 0x00ffff: 0x057d6e8119b4b20a +Before 0x007fff: 0xe38e2c5620ba48b6 +End value: 0xdbd57f6ee98bb3ad +Calculating chain from start value 0x0000000000000009 +Before 0x1fffff: 0x0000000000000009 +Before 0x1f7fff: 0x3ab7957e3bb63f8e +Before 0x1effff: 0x550220d9cc5fd367 +Before 0x1e7fff: 0x7e01f144ddb17925 +Before 0x1dffff: 0x053033e52cee9ca5 +Before 0x1d7fff: 0x1398cd680b44395d +Before 0x1cffff: 0x893adf018f29be0c +Before 0x1c7fff: 0x3eef0736434f4dc5 +Before 0x1bffff: 0xacbcf6bd0cdcd884 +Before 0x1b7fff: 0xe2e0af7da058c3b4 +Before 0x1affff: 0x75d955abb1d829a3 +Before 0x1a7fff: 0xed931258aa4e0c4c +Before 0x19ffff: 0x27daa54f07138967 +Before 0x197fff: 0x9bd8ebd135f7b8ff +Before 0x18ffff: 0x618af3c1f2091429 +Before 0x187fff: 0x9c8cd0897c5a9ce2 +Before 0x17ffff: 0x486dad8085c3d5cb +Before 0x177fff: 0xe2c0044fb89e9f8c +Before 0x16ffff: 0xdd8bc55f2bb2106d +Before 0x167fff: 0x0c80520e33439d03 +Before 0x15ffff: 0xbf3f192de8930950 +Before 0x157fff: 0x13b01276863200be +Before 0x14ffff: 0x3965db9b065aa9a1 +Before 0x147fff: 0x309ba3b26a28603f +Before 0x13ffff: 0x993fd5f8f89e6e46 +Before 0x137fff: 0x3d896f5c0663794b +Before 0x12ffff: 0xedc4c5960d1b9740 +Before 0x127fff: 0xb17f729890190924 +Before 0x11ffff: 0xd325062b37d20453 +Before 0x117fff: 0xbbaaf3d7a867b640 +Before 0x10ffff: 0x0c919103ee8908a5 +Before 0x107fff: 0xdc6aea77946490df +Before 0x0fffff: 0x196c7a3eb65a6482 +Before 0x0f7fff: 0x4e9eaff71b48ad8b +Before 0x0effff: 0xffca8ee3247ea439 +Before 0x0e7fff: 0x4a6650254f5f47f3 +Before 0x0dffff: 0xdcfd395fd2d46033 +Before 0x0d7fff: 0x99939e0f7e6149fe +Before 0x0cffff: 0x1c488ae1d1ad732f +Before 0x0c7fff: 0x82007a5123e56f6d +Before 0x0bffff: 0x3ff4576486969bac +Before 0x0b7fff: 0x08dae5640dc70f8e +Before 0x0affff: 0xc577d889f3fd3c5f +Before 0x0a7fff: 0xd3eae85053a474e4 +Before 0x09ffff: 0x5e48da793238f3a5 +Before 0x097fff: 0x3c9f6bda4828d0a0 +Before 0x08ffff: 0xb0921e0d9c513786 +Before 0x087fff: 0x77ec08388a99c3db +Before 0x07ffff: 0x139bc23aaa774dd3 +Before 0x077fff: 0xeb0748caa39f477e +Before 0x06ffff: 0x0ac83cc9cbbe4131 +Before 0x067fff: 0x3ec5eec4f08de300 +Before 0x05ffff: 0x0caf3e33fdea55a9 +Before 0x057fff: 0x62d826dec0217a3f +Before 0x04ffff: 0xfba9fe789321059b +Before 0x047fff: 0x60582c02f1745b1e +Before 0x03ffff: 0xf7916af0ee9cec05 +Before 0x037fff: 0x5eb1fbe551f52c5d +Before 0x02ffff: 0x5980d282431987db +Before 0x027fff: 0x549eda30518c1835 +Before 0x01ffff: 0xa98271a10ec7cbd4 +Before 0x017fff: 0x24f84f1ed182cef3 +Before 0x00ffff: 0xb193debe9e2f8a34 +Before 0x007fff: 0x2e569f7f8bae5a05 +End value: 0xd688814759e2afec diff --git a/A5.1/CUDA/calculate_chain_kernel.cu b/A5.1/CUDA/calculate_chain_kernel.cu new file mode 100644 index 0000000..0c6ebec --- /dev/null +++ b/A5.1/CUDA/calculate_chain_kernel.cu @@ -0,0 +1,130 @@ +/* + * Calculation of chains for A5/1 rainbow table cracking. + * + * + * Loosely based on: A pedagogical implementation of A5/1. + * + * Copyright (C) 1998-1999: Marc Briceno, Ian Goldberg, and David Wagner + * + * See accompanying file A5.1.c for original version and full copyright + * + * + * Modified and optimized for running on CUDA. + * + * Copyright (C) 2009: Ingo Albrecht <prom@berlin.ccc.de> + * + */ + +// XXX: Undefine for 64bit platform. You will also have to fix up printfs. +#define BITSIZE_32 + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <math.h> + +/* Masks for the three shift registers */ +#define R1MASK 0x07FFFF /* 19 bits, numbered 0..18 */ +#define R2MASK 0x3FFFFF /* 22 bits, numbered 0..21 */ +#define R3MASK 0x7FFFFF /* 23 bits, numbered 0..22 */ + +/* Middle bit of each of the three shift registers, for clock control */ +#define R1MID 0x000100 /* bit 8 */ +#define R2MID 0x000400 /* bit 10 */ +#define R3MID 0x000400 /* bit 10 */ + +/* Feedback taps, for clocking the shift registers. */ +#define R1TAPS 0x072000 /* bits 18,17,16,13 */ +#define R2TAPS 0x300000 /* bits 21,20 */ +#define R3TAPS 0x700080 /* bits 22,21,20,7 */ + +/* Output taps, for output generation */ +#define R1OUT 0x040000 /* bit 18 (the high bit) */ +#define R2OUT 0x200000 /* bit 21 (the high bit) */ +#define R3OUT 0x400000 /* bit 22 (the high bit) */ + +typedef unsigned char byte; +#ifdef BITSIZE_32 +typedef unsigned long uint32; +typedef unsigned long long uint64; +#else +typedef unsigned int uint32; +typedef unsigned long uint64; +#endif + +typedef unsigned int bit; + +__device__ bit parity32(uint32 x) { + x ^= x>>16; + x ^= x>>8; + x ^= x>>4; + x ^= x>>2; + x ^= x>>1; + return x&1; +} + +__device__ uint32 clockone(uint32 reg, uint32 mask, uint32 taps) { + uint32 t = reg & taps; + reg = (reg << 1) & mask; + reg |= parity32(t); + return reg; +} + +__device__ bit majority(uint32 R1, uint32 R2, uint32 R3) { + int sum; + sum = ((R1&R1MID) >> 8) + ((R2&R2MID) >> 10) + ((R3&R3MID) >> 10); + if (sum >= 2) + return 1; + else + return 0; +} + +__device__ bit getbit(uint32 R1, uint32 R2, uint32 R3) { + return ((R1&R1OUT) >> 18) ^ ((R2&R2OUT) >> 21) ^ ((R3&R3OUT) >> 22); +} + +__device__ uint64 calculate_link (uint64 input, uint32 count) { + uint64 result; + int i; + + /* Reduction function. */ + uint32 R1 = ((input >> (22 + 23))^count) & R1MASK; + uint32 R2 = ((input >> 23)^count) & R2MASK; + uint32 R3 = (input^count) & R3MASK; + + result = getbit(R1, R2, R3); + for(i=1;i<64;i++) { + // Yes, virginia, we only need to clock 63 times for 64 bits of output + + // clock() + bit maj = majority(R1, R2, R3); + uint32 T1 = clockone(R1, R1MASK, R1TAPS); + uint32 T2 = clockone(R2, R2MASK, R2TAPS); + uint32 T3 = clockone(R3, R3MASK, R3TAPS); + + if (((R1&R1MID)!=0) == maj) + R1 = T1; + if (((R2&R2MID)!=0) == maj) + R2 = T2; + if (((R3&R3MID)!=0) == maj) + R3 = T3; + + result = (result << 1)| getbit(R1, R2, R3); + } + return result; +} + +__global__ void crunch(uint64* results, uint32 index) { + uint32 tid = blockIdx.x * blockDim.x + threadIdx.x; + + uint64 state = results[tid]; + + uint32 i; + for(i = 0; i < OPERATIONS_PER_RUN; i++) { + state = calculate_link(state, index - i); + } + + results[tid] = state; +} + diff --git a/A5.1/CUDA/demorun_geforcegtx280_0000_0000_0000_0000.divergent b/A5.1/CUDA/demorun_geforcegtx280_0000_0000_0000_0000.divergent new file mode 100644 index 0000000..8a4c5f3 --- /dev/null +++ b/A5.1/CUDA/demorun_geforcegtx280_0000_0000_0000_0000.divergent @@ -0,0 +1,4163 @@ +Computing 4096 chains divided into 16 blocks of 256 threads, starting at 0x0000000000000000 +Will execute 64 runs of 32768 steps each. +Run 001/064, starting at index 0x1fffff... 4530.112793 ms. +Run 002/064, starting at index 0x1f7fff... 4530.094238 ms. +Run 003/064, starting at index 0x1effff... 4530.121094 ms. +Run 004/064, starting at index 0x1e7fff... 4530.120117 ms. +Run 005/064, starting at index 0x1dffff... 4530.138184 ms. +Run 006/064, starting at index 0x1d7fff... 4530.209961 ms. +Run 007/064, starting at index 0x1cffff... 4530.047852 ms. +Run 008/064, starting at index 0x1c7fff... 4530.099121 ms. +Run 009/064, starting at index 0x1bffff... 4530.125000 ms. +Run 010/064, starting at index 0x1b7fff... 4530.152832 ms. +Run 011/064, starting at index 0x1affff... 4530.143066 ms. +Run 012/064, starting at index 0x1a7fff... 4530.105957 ms. +Run 013/064, starting at index 0x19ffff... 4530.171875 ms. +Run 014/064, starting at index 0x197fff... 4530.198242 ms. +Run 015/064, starting at index 0x18ffff... 4530.170898 ms. +Run 016/064, starting at index 0x187fff... 4530.227051 ms. +Run 017/064, starting at index 0x17ffff... 4530.105957 ms. +Run 018/064, starting at index 0x177fff... 4530.161133 ms. +Run 019/064, starting at index 0x16ffff... 4530.137207 ms. +Run 020/064, starting at index 0x167fff... 4530.145996 ms. +Run 021/064, starting at index 0x15ffff... 4530.122070 ms. +Run 022/064, starting at index 0x157fff... 4530.127930 ms. +Run 023/064, starting at index 0x14ffff... 4530.066895 ms. +Run 024/064, starting at index 0x147fff... 4530.059082 ms. +Run 025/064, starting at index 0x13ffff... 4530.034180 ms. +Run 026/064, starting at index 0x137fff... 4530.051758 ms. +Run 027/064, starting at index 0x12ffff... 4530.121094 ms. +Run 028/064, starting at index 0x127fff... 4530.035156 ms. +Run 029/064, starting at index 0x11ffff... 4530.076172 ms. +Run 030/064, starting at index 0x117fff... 4530.076172 ms. +Run 031/064, starting at index 0x10ffff... 4530.071777 ms. +Run 032/064, starting at index 0x107fff... 4530.144043 ms. +Run 033/064, starting at index 0x0fffff... 4530.129883 ms. +Run 034/064, starting at index 0x0f7fff... 4530.143066 ms. +Run 035/064, starting at index 0x0effff... 4530.092773 ms. +Run 036/064, starting at index 0x0e7fff... 4530.063965 ms. +Run 037/064, starting at index 0x0dffff... 4530.075195 ms. +Run 038/064, starting at index 0x0d7fff... 4530.137207 ms. +Run 039/064, starting at index 0x0cffff... 4530.169922 ms. +Run 040/064, starting at index 0x0c7fff... 4530.175781 ms. +Run 041/064, starting at index 0x0bffff... 4530.157227 ms. +Run 042/064, starting at index 0x0b7fff... 4529.996094 ms. +Run 043/064, starting at index 0x0affff... 4530.143066 ms. +Run 044/064, starting at index 0x0a7fff... 4530.118164 ms. +Run 045/064, starting at index 0x09ffff... 4530.129883 ms. +Run 046/064, starting at index 0x097fff... 4530.084961 ms. +Run 047/064, starting at index 0x08ffff... 4530.121094 ms. +Run 048/064, starting at index 0x087fff... 4530.152832 ms. +Run 049/064, starting at index 0x07ffff... 4530.191895 ms. +Run 050/064, starting at index 0x077fff... 4530.111816 ms. +Run 051/064, starting at index 0x06ffff... 4530.181152 ms. +Run 052/064, starting at index 0x067fff... 4530.118164 ms. +Run 053/064, starting at index 0x05ffff... 4530.095215 ms. +Run 054/064, starting at index 0x057fff... 4530.083008 ms. +Run 055/064, starting at index 0x04ffff... 4530.064941 ms. +Run 056/064, starting at index 0x047fff... 4530.075195 ms. +Run 057/064, starting at index 0x03ffff... 4530.216797 ms. +Run 058/064, starting at index 0x037fff... 4530.089844 ms. +Run 059/064, starting at index 0x02ffff... 4530.141113 ms. +Run 060/064, starting at index 0x027fff... 4530.196777 ms. +Run 061/064, starting at index 0x01ffff... 4530.183105 ms. +Run 062/064, starting at index 0x017fff... 4530.157227 ms. +Run 063/064, starting at index 0x00ffff... 4530.097168 ms. +Run 064/064, starting at index 0x007fff... 4530.059082 ms. +results[0] = 0x6d14a53d7fe0574c +results[1] = 0x635809b0850c5594 +results[2] = 0x55085ccd8357a140 +results[3] = 0x808608202d55b473 +results[4] = 0x905ddf13110ca25a +results[5] = 0xcbbe903d8847444e +results[6] = 0xb32dcd0ee320992f +results[7] = 0x38087d640fea5c81 +results[8] = 0xdbd57f6ee98bb3ad +results[9] = 0xd688814759e2afec +results[10] = 0xc6544dcb35b0662c +results[11] = 0xaa412cb2ee69a252 +results[12] = 0xb81bc666d899e7b2 +results[13] = 0x17c7f536f8ed71ad +results[14] = 0xca96ee565f91a065 +results[15] = 0x7d3ad8fa8fd1592f +results[16] = 0x54dac55590718d8b +results[17] = 0xb40a7b47844b1a45 +results[18] = 0xd7fca4d986f21d50 +results[19] = 0x7caed26f67b95da9 +results[20] = 0xb4959d0385ede6ba +results[21] = 0xd331067eb96588a0 +results[22] = 0xba018003fc1a615f +results[23] = 0x4f9793de6a64e2ae +results[24] = 0x0908f1e250b2cc4b +results[25] = 0xf934542afa2090e2 +results[26] = 0x9a35d808b4876606 +results[27] = 0xce300c008809c67a +results[28] = 0x8064b9299b48bbdb +results[29] = 0x5fdc5d28b326482a +results[30] = 0xc7abc499c9ea64b4 +results[31] = 0xb6940626c78a7282 +results[32] = 0x084c95b71cec57aa +results[33] = 0x8b5b4ceafa392859 +results[34] = 0x7ee4a05b3e94f9cf +results[35] = 0x46d3283cf8fe0f16 +results[36] = 0x117e303f21335eaf +results[37] = 0xbe4395045eca2d1b +results[38] = 0xf0bee73601967d87 +results[39] = 0xbaf8c91d1773505d +results[40] = 0x6e2431517df580aa +results[41] = 0xafd417bc45bdf857 +results[42] = 0xe12245e0a97abfd0 +results[43] = 0x168966fc179664dd +results[44] = 0x12b26b9c1470800f +results[45] = 0x40061cb2130cc20a +results[46] = 0x6de3eda57996d5d2 +results[47] = 0xcc858c9362e57136 +results[48] = 0x9f70ef2e9b2fdcf3 +results[49] = 0x6726efd6d3b052b0 +results[50] = 0x93c0a82cfc8513e0 +results[51] = 0x1a4895aa29fd46c1 +results[52] = 0x51500bbdf8264f28 +results[53] = 0xaabd1418d1c15897 +results[54] = 0x4793bc05d85dfe5f +results[55] = 0x846e5dacde619498 +results[56] = 0x7ad5c746e49292a3 +results[57] = 0x277570f191b13e3f +results[58] = 0x220909d1b8af5291 +results[59] = 0xb925eefe0d8e6282 +results[60] = 0x394ae931e61c2501 +results[61] = 0xa05a576939a6b171 +results[62] = 0x5766fa32b07b3a23 +results[63] = 0xdf132753bccce175 +results[64] = 0x981d30ccd74f0b33 +results[65] = 0x996326910f10f7ad +results[66] = 0x007dfe6d63cd294d +results[67] = 0xbc4c6a9b85eb6306 +results[68] = 0xdb0170f16533cfcf +results[69] = 0x4a46229e764951d6 +results[70] = 0x99f9a461e39c6714 +results[71] = 0x71b44bcb4dafece4 +results[72] = 0x3254e61a5dc13531 +results[73] = 0xf93aacc76b52669c +results[74] = 0x4b0bcfe6e74e18c0 +results[75] = 0x9fd2688ffca19491 +results[76] = 0xee3f5b23eca2f6ec +results[77] = 0x8e5dd0fb4e99a493 +results[78] = 0x93bdc4b0d78c1202 +results[79] = 0x03c56c39d840be03 +results[80] = 0x22200a85ca952455 +results[81] = 0x4cb6d5d853b1e6d9 +results[82] = 0x36cded8207d4fe22 +results[83] = 0x078fad74194e2cf7 +results[84] = 0xd15a1134d82466c0 +results[85] = 0x74c7f05c524b5bd0 +results[86] = 0xdc0681590a2e7a49 +results[87] = 0x2d82c1467bc2010c +results[88] = 0x7ffd37315cc0698b +results[89] = 0x21155049dd1bab55 +results[90] = 0x3241f3db60941abc +results[91] = 0xb0d2a7a66965b595 +results[92] = 0xef4696d7758bffa6 +results[93] = 0xd2a4b0b1bc5ac6f1 +results[94] = 0xb51cd3897b1db885 +results[95] = 0xce4cc912b7b99eea +results[96] = 0x592c60b8a0cc8caf +results[97] = 0x936e5ab76bfb36a3 +results[98] = 0x587ebe213161b80f +results[99] = 0xa33ba2717d3ec085 +results[100] = 0xaa4d5cf576eda748 +results[101] = 0x050a5d8f62717e32 +results[102] = 0x4bb9553a4539da78 +results[103] = 0xc8f7e1aa0c8b454c +results[104] = 0xd180afc5c3cf7710 +results[105] = 0x9009a5b0ded8f742 +results[106] = 0xc67376779552ae17 +results[107] = 0xde4ff4fda752be26 +results[108] = 0x98b3573f0069f967 +results[109] = 0x33543db4d2a687e1 +results[110] = 0xb60df09650b000db +results[111] = 0xfeed30dc328902b2 +results[112] = 0xc082f7484ffc2f24 +results[113] = 0xe5e9c530b420a605 +results[114] = 0x7008a5c9c2b3d7f0 +results[115] = 0x2f00e701b9985ca5 +results[116] = 0x9380f8c6e320b6a8 +results[117] = 0x5beb78279c6d72e7 +results[118] = 0xec50944bb9f2986b +results[119] = 0xaf00a8fadce7ddfc +results[120] = 0xbacbbe6838cf9071 +results[121] = 0x77af8db8c2989fe6 +results[122] = 0x5659aeb2f64e6cf6 +results[123] = 0x5ca33f9374bca2a1 +results[124] = 0x5dae5ad3173c21e1 +results[125] = 0xf204cd37fda76144 +results[126] = 0x83fd5b47876779f2 +results[127] = 0xa68e807b715ac1b6 +results[128] = 0xd65c37f3b72fa0f3 +results[129] = 0xd20542aa09b7d9b0 +results[130] = 0x02a8fe11bb73f552 +results[131] = 0x533f2ed0718a69c5 +results[132] = 0x2374856bc1c5b347 +results[133] = 0x5f16b55459910405 +results[134] = 0xa70f7aa639ec66e5 +results[135] = 0x72c87254b9be8e34 +results[136] = 0x00a4457291d198a2 +results[137] = 0xb7f5816b88f6b7d5 +results[138] = 0x9101d53ac93b0a94 +results[139] = 0xc2847d8cd0959446 +results[140] = 0xdc9d0b6a2eaa5fc5 +results[141] = 0x4ce9969b3339d3f9 +results[142] = 0xa0aa52c4ae30d2e7 +results[143] = 0x7df19fb7fadaad9c +results[144] = 0xbf90a4b6381f553b +results[145] = 0x3e30aeadcf7f55f9 +results[146] = 0x5a4337688ebd87a6 +results[147] = 0x7df4712a3f8b877b +results[148] = 0x49412cb81c6ace13 +results[149] = 0xb124ab8b5d09a229 +results[150] = 0xb9611e36d130a666 +results[151] = 0x8a7121f493725a12 +results[152] = 0x392b6a8915401b0c +results[153] = 0x4ce685fc0f085ad7 +results[154] = 0xe960f6f076aacfae +results[155] = 0xa81ea00a77d58aab +results[156] = 0xcf4db41629064327 +results[157] = 0x9b5a7e72f5f5a9a5 +results[158] = 0x796f0471536603ee +results[159] = 0x999b694085195303 +results[160] = 0x786c4813534c4f7c +results[161] = 0xf5734d8c5fab8d6b +results[162] = 0x2de391cfb5779de0 +results[163] = 0x2e3f7fa3ba9eb56f +results[164] = 0xdead5a9a4df0dfb3 +results[165] = 0x1b8f4a4dfdd80e70 +results[166] = 0x7609e2f868f18404 +results[167] = 0x68b361ba0a70313a +results[168] = 0x76ce87165c528f7f +results[169] = 0x0dc10772a8ea9c4e +results[170] = 0xd2e5fa25a72ab09e +results[171] = 0xad809fb3939cd777 +results[172] = 0x16352adf9d6a3a9c +results[173] = 0x9bdeb820279213dc +results[174] = 0x80b6a1e6866b12fd +results[175] = 0x7f527dc3ac0d1694 +results[176] = 0x17496b42c5dbe6db +results[177] = 0xc24dc19c7ca79e34 +results[178] = 0xa64831e836c8a034 +results[179] = 0x24682d6a512f6826 +results[180] = 0x176275478bb34dd6 +results[181] = 0x15d14340add1bed8 +results[182] = 0xde6b230f4d4c3296 +results[183] = 0x7293ce6defb240c2 +results[184] = 0x423af83e8d97b26b +results[185] = 0xabe4514bb0e55c3d +results[186] = 0x652e9a64cf11ec25 +results[187] = 0x982b98dc8db3d487 +results[188] = 0x091135485f55e699 +results[189] = 0x695918ddefbd52f1 +results[190] = 0x0a7dc80e9a5b0a40 +results[191] = 0xca9d15f34c1ba45b +results[192] = 0x6c935d64d3b7302d +results[193] = 0x5234bbb90aaa70de +results[194] = 0x0ef1958a2296aa29 +results[195] = 0x25d3620809eecd2c +results[196] = 0x16f134b0d34b5bb1 +results[197] = 0xf82a969dd4881442 +results[198] = 0x49d2814bd89ef6c2 +results[199] = 0x6e7fb38294a01fbf +results[200] = 0x164d9d9b1da6d494 +results[201] = 0xbb5dfb096c35abc4 +results[202] = 0xcabae90257fa224c +results[203] = 0x9ab6a559c87cab80 +results[204] = 0x380d68e8e49b7e9f +results[205] = 0xf79c083adc0d37e8 +results[206] = 0xba64d909bdc4ba53 +results[207] = 0x0dc6667b572cc789 +results[208] = 0x55ee24aabb30861c +results[209] = 0xc502f73ecb1c4a20 +results[210] = 0x38b1456fcde93918 +results[211] = 0x2141ee9a3c77b6b0 +results[212] = 0xe69f51236ca3fb66 +results[213] = 0xc5f37aaa9b1ce932 +results[214] = 0xd68679f9d4b8a081 +results[215] = 0xed66941007951c78 +results[216] = 0xb0e4474a859787e7 +results[217] = 0xcfeaf39ded99a0f2 +results[218] = 0xe5631fff49814ab2 +results[219] = 0x16b261b42c457050 +results[220] = 0xbe5f102c724f3351 +results[221] = 0x1e79c2df84a854d8 +results[222] = 0x6a769cef03911ee4 +results[223] = 0x1718cec6b1a1f709 +results[224] = 0x5d7a257882fe9f1c +results[225] = 0xa54287b1675753a1 +results[226] = 0x74918d83c5878bdf +results[227] = 0x29db1bc986985790 +results[228] = 0x1c5ea996a8f42b38 +results[229] = 0x222fef0ba2c0197e +results[230] = 0xad7673fb29cdcc53 +results[231] = 0x21bd8144e4b084a4 +results[232] = 0x9b8693ee41b9b617 +results[233] = 0xbbe1eb9cc0bcbb9f +results[234] = 0x71c986eea66ec29e +results[235] = 0xbf24c98d5628acfb +results[236] = 0x8f5d11e30f781f40 +results[237] = 0x747f7e448812a84e +results[238] = 0x399abfb26d43fb42 +results[239] = 0xe6ba704e0e7b2363 +results[240] = 0xd5112f74ecf7f6a9 +results[241] = 0xd8668344c60e3250 +results[242] = 0x2620109986090869 +results[243] = 0xdcf66d7cf1397126 +results[244] = 0x8376756bff04e460 +results[245] = 0x838ff1d568bedd7d +results[246] = 0xa23f150b7bfca521 +results[247] = 0x0fb944ce24389485 +results[248] = 0x5e575860c8bfaf7d +results[249] = 0x080b316340206fa8 +results[250] = 0x91b7437d3e530e25 +results[251] = 0xf2097c1377db6ec5 +results[252] = 0xcd384a436421570f +results[253] = 0x7775a69042f4f0c7 +results[254] = 0x14ec6147300fea3e +results[255] = 0xd1f309f6409d2573 +results[256] = 0x677746d469287ae3 +results[257] = 0xcb5aca7829ed4c57 +results[258] = 0x02991e295bc48c8c +results[259] = 0x4632379c55af2b00 +results[260] = 0xabd0f789496a3644 +results[261] = 0x451c09536e9d3050 +results[262] = 0x9005b9d93161c21b +results[263] = 0x4e59bae5392dca20 +results[264] = 0x706444f94b0f414f +results[265] = 0xc3dcebd0183398a2 +results[266] = 0xbe5474a1a1e1cf96 +results[267] = 0x94be1d03b5e4eac2 +results[268] = 0xa3de1ec15d871eb8 +results[269] = 0x8ae244cb80486941 +results[270] = 0xca97adc6282ac16e +results[271] = 0xc8fdb250684927c5 +results[272] = 0x6872dd21bd535ae5 +results[273] = 0xb51228d01050e096 +results[274] = 0x859df64e0fd8c7cc +results[275] = 0x5d05e27f276b7e4f +results[276] = 0x0584540e31d1b9e5 +results[277] = 0xc337f4a0e21552fd +results[278] = 0x95ea3db92e6f032b +results[279] = 0x4a6b37effdde29b0 +results[280] = 0x7914115791ad2ae1 +results[281] = 0x5b47cb34cf864b7f +results[282] = 0x7edd07c2698ff07d +results[283] = 0x395fdd0cc3bc2cc3 +results[284] = 0xcd1ce6b7765de4d2 +results[285] = 0xf16e7025f1efe4af +results[286] = 0xc3a29cc74b73ef20 +results[287] = 0x3031a3d3380d6177 +results[288] = 0xc7ee08f5c1702bf9 +results[289] = 0x5e0cedba33bdb27b +results[290] = 0xcdb3950db1e49147 +results[291] = 0xcca6d14bc8fc50ef +results[292] = 0xaca626852b8fe7d2 +results[293] = 0xc5a40c61e15a80d7 +results[294] = 0x49c4528d698cc559 +results[295] = 0x3708db09df0d0f3e +results[296] = 0x6b733f779d27040f +results[297] = 0x26d84922327ad9f1 +results[298] = 0xeda39686465f96d2 +results[299] = 0xe5b5c42876946b34 +results[300] = 0xa6cb87c957ec83dc +results[301] = 0x6b44a89533045ddc +results[302] = 0x3f35de10c3e26064 +results[303] = 0xc59f6afa5679972e +results[304] = 0x8626be715f04d86c +results[305] = 0x286e08ccd80737ec +results[306] = 0xdeda5761d66c84cc +results[307] = 0x31dd7d556a544cf4 +results[308] = 0xba44448041b1cd16 +results[309] = 0x2555a56568a7eb49 +results[310] = 0x0b420f719026cd80 +results[311] = 0xd073dacd8c3db70b +results[312] = 0xc9cc5c5476dd8db4 +results[313] = 0xedf29198ccf146f9 +results[314] = 0x586b211c632850e9 +results[315] = 0x01b9e8e3015fc8be +results[316] = 0x3a4462c3c7fa47ad +results[317] = 0xb1380492f9c73546 +results[318] = 0xcff353156ffac399 +results[319] = 0xada757a7af7642df +results[320] = 0xa8b80eb5936555a1 +results[321] = 0xa7238b14f09620cc +results[322] = 0x4eb7decac3868de6 +results[323] = 0x0f14a28f0b3d1095 +results[324] = 0x4808e5e0057a004a +results[325] = 0x95bb21af452bbf48 +results[326] = 0xac187f2b85d75dc8 +results[327] = 0x812d607cb42e5804 +results[328] = 0xe58996930dde8cc9 +results[329] = 0x8bec4343dd7a138f +results[330] = 0x6ffd94370aa81f89 +results[331] = 0x5722c29feb5637af +results[332] = 0xe0f3b6e3ab68e74e +results[333] = 0x99064ae7d1afb3b2 +results[334] = 0xa632681d337a8f7a +results[335] = 0x9a9be73081878b50 +results[336] = 0xd7c7cf29ee906120 +results[337] = 0x40ad8d85d47614f0 +results[338] = 0x50034f9a76a277c7 +results[339] = 0xb340384cd6141cde +results[340] = 0xed813af3456cfe1f +results[341] = 0xfef8d0d7dc644864 +results[342] = 0x193fd150466768d2 +results[343] = 0x69ad1b9fe283faa3 +results[344] = 0x5c3b777a3e9e032f +results[345] = 0xd716722b08f92a48 +results[346] = 0x22b291b41667022b +results[347] = 0x02600a7dab453030 +results[348] = 0x75e50af8853c17f8 +results[349] = 0xd41e62e8dae9a150 +results[350] = 0x384790fde2a27283 +results[351] = 0x0681a60d921e369b +results[352] = 0x1f3491b1bcfc52da +results[353] = 0x8fd85d83d83c27b2 +results[354] = 0xb1eecc9d0675dcf6 +results[355] = 0x8350a8c2c74fb5c8 +results[356] = 0x20dee52010b21949 +results[357] = 0x894220cf22e1e916 +results[358] = 0x9ce3fe83da4ee327 +results[359] = 0x2f6c4a3707b7e5d0 +results[360] = 0x3e863c0281fc0d42 +results[361] = 0x830a5b785ea0f837 +results[362] = 0x0a6c8b7e54093d49 +results[363] = 0xd60956b3d4b19643 +results[364] = 0xcea7e4315589110d +results[365] = 0xb04464c8d6098390 +results[366] = 0x29db2e4a0d4e76c0 +results[367] = 0xea0ad0ef0634e1b6 +results[368] = 0x396d3ffd94a81164 +results[369] = 0x8a47e19f30a90895 +results[370] = 0xb0885c909b229a17 +results[371] = 0x1daf57397efc5b9c +results[372] = 0x18be9508ce34a4aa +results[373] = 0xb495058aba0e6be2 +results[374] = 0xf75a13a381d9ad98 +results[375] = 0xa9fdd73a3de17e5f +results[376] = 0xb62793f40fdc783f +results[377] = 0xe2828ed112467e1f +results[378] = 0x94ee71b1e07fbed6 +results[379] = 0xdad47f8930c0520a +results[380] = 0xe7990492b9b789a2 +results[381] = 0x9bc816c5dd87fb85 +results[382] = 0xf54a61f921d446fe +results[383] = 0x7b653dfd479bafd3 +results[384] = 0x552e97881a0c374a +results[385] = 0x9b016fbd9bf67c77 +results[386] = 0x7915059d93cf468f +results[387] = 0xd455c888838afcc6 +results[388] = 0x5cc8e81bf7bb9e3a +results[389] = 0xed0d7e95c0c483e7 +results[390] = 0x708aa3760f9be348 +results[391] = 0x0ab7579085a2f989 +results[392] = 0x8fb4331524c2c7d1 +results[393] = 0xe6981e11428e6022 +results[394] = 0x4d3e3bbd36d5681a +results[395] = 0xdf291fca0b7632fa +results[396] = 0x0bebb53361e08268 +results[397] = 0x1e476a43fa89d45a +results[398] = 0x2bfadc82eb9e6dd2 +results[399] = 0x5420a16dde02daa8 +results[400] = 0x17fdc9cbcf0f540e +results[401] = 0xca3af4066ab2f0e5 +results[402] = 0xcfa9ed369f0f00f5 +results[403] = 0x364851a637af9896 +results[404] = 0x79392e9d5f482118 +results[405] = 0xcf522c550c5a711d +results[406] = 0x51e48bb11c6259e5 +results[407] = 0x7d93e5c45073ec9f +results[408] = 0x7eb99bfd5ea1764c +results[409] = 0xdbbea01082f97af1 +results[410] = 0x28cf2d04ed4d515d +results[411] = 0xb52b8d946c189445 +results[412] = 0x07fb1890367d1952 +results[413] = 0xecb45ee942c8dd7e +results[414] = 0xbc70696cfd008362 +results[415] = 0x16ae0ff3438a746c +results[416] = 0x5673f4ffbcb7cdd4 +results[417] = 0xd26a07d773276056 +results[418] = 0xdbbe2875550f0e65 +results[419] = 0x05772545f8896464 +results[420] = 0x0db46442abf7c050 +results[421] = 0x6c13666ac77df703 +results[422] = 0xfe7c49f6a125b85c +results[423] = 0xc8afa681bae7ac64 +results[424] = 0xd5d43449a724f52f +results[425] = 0x7e59b6641341c468 +results[426] = 0x8cd5f7a926dd9026 +results[427] = 0xfc5c664d71af9e5d +results[428] = 0x28a833be194f59cd +results[429] = 0x23bde71eff584608 +results[430] = 0xa1c080185a8f8162 +results[431] = 0x1ee92f1f2e0f98d2 +results[432] = 0x52934207f27a4686 +results[433] = 0xe847e4b196201cca +results[434] = 0x57ac5b29cd5a0317 +results[435] = 0xcf9be064aac13c00 +results[436] = 0x0e19b366d1f6c4cb +results[437] = 0x94bea7ab64ad0b58 +results[438] = 0x5931ab92f6b3a625 +results[439] = 0x81fe316587f27eda +results[440] = 0x232e73c25f27f907 +results[441] = 0x88ba39167ce51fb1 +results[442] = 0xcf2e418dbe568b8a +results[443] = 0x7152a5d2946a380e +results[444] = 0x4fe9be9e32e74995 +results[445] = 0x87663b2dc218a5ba +results[446] = 0x34e40f0b1dfafbd3 +results[447] = 0xe6d2f64e20f2723e +results[448] = 0x57954b5830b63f0c +results[449] = 0x8a3acc12d33c5cf0 +results[450] = 0xfcf5a0a02fa62a46 +results[451] = 0xd1ab723b316f588e +results[452] = 0xbeac0a360fda06a9 +results[453] = 0x6ccf47c23ac018e7 +results[454] = 0xf35a4ca458278eb7 +results[455] = 0x801e80e3dbb3b19c +results[456] = 0x972833538af422e9 +results[457] = 0xee969257af072a74 +results[458] = 0x11ca642e24d3ac72 +results[459] = 0xbecc81f959f3a752 +results[460] = 0xa1dd21222e6aaeb8 +results[461] = 0x812d6099dfbf9a97 +results[462] = 0x0e40134ca941e2dc +results[463] = 0x0faa1149a4a2af70 +results[464] = 0x1da4054a9d9bd399 +results[465] = 0x182659c92e6f2e5a +results[466] = 0xc97536881cd775cb +results[467] = 0xc225441fd50ea311 +results[468] = 0x4ef21a9e620a2bd0 +results[469] = 0xc1118fa90b680650 +results[470] = 0xbd0181826a554c5d +results[471] = 0xdf02221a9352d7dd +results[472] = 0xf08548af7cc09a43 +results[473] = 0x25f1c22b4e3c1780 +results[474] = 0x9b3e81c03db8b6aa +results[475] = 0xf7ccaabd32178402 +results[476] = 0x8a407f23fe367580 +results[477] = 0x9e2dbaf5b0420afb +results[478] = 0x091d5835709a4520 +results[479] = 0x954d7b8a3e023eb2 +results[480] = 0xf8f8908db26b8954 +results[481] = 0x4140e828e71513aa +results[482] = 0x655537cfb083bbb4 +results[483] = 0x4003e4209ae22086 +results[484] = 0xb9a0a2a45b6006fa +results[485] = 0x94b2ff0cfd252ca4 +results[486] = 0x7cb6221e9a0d22c6 +results[487] = 0xb16e881aed23ba33 +results[488] = 0x5eae96ae6161e7df +results[489] = 0xffdf4fbaee88f309 +results[490] = 0x91c9af0dbb1e9046 +results[491] = 0x08abc6c4fc6dcbf0 +results[492] = 0xf29639ddf6d8e95a +results[493] = 0x6950ab53cb401e40 +results[494] = 0x91a899d45e522d50 +results[495] = 0x15238972e62feb6f +results[496] = 0x9f79e434045fdcdc +results[497] = 0xcb54bacaccd45eb6 +results[498] = 0x74975b281eca06e7 +results[499] = 0xa20e1718fa978588 +results[500] = 0xebd2af98b3780b6d +results[501] = 0xb5974db2a730e0ac +results[502] = 0x3dca212289344329 +results[503] = 0x428034f0b6a97456 +results[504] = 0x55a0e24931d95cde +results[505] = 0x4c40d566f5ce5f0a +results[506] = 0x70d2eec638a872de +results[507] = 0x763e632ff5173fce +results[508] = 0x1255522da2fe3ed7 +results[509] = 0x9c88fe0b9b18387a +results[510] = 0xa3da5f6f9b66fb39 +results[511] = 0x6a097736d72b3ef9 +results[512] = 0x8a3e0a2bcf4a7d36 +results[513] = 0xf155568fa815b0db +results[514] = 0x58ddde97c653b126 +results[515] = 0x81565b2f9c80a5cc +results[516] = 0x0cd4315cd80ab9a3 +results[517] = 0x3335be6e2d2458c5 +results[518] = 0x6d083ef49d9220d5 +results[519] = 0xe927d7c72e1ab01d +results[520] = 0xcfdcec0318a94e07 +results[521] = 0xbf08fe5ff6916c7a +results[522] = 0x5b4a5961bba50562 +results[523] = 0xcd697bfe961542d0 +results[524] = 0x7d3554c2291bfb51 +results[525] = 0xff5c793b3345819e +results[526] = 0x018bb0a93dae2888 +results[527] = 0xa3a21e74f071a749 +results[528] = 0x0e046d38fd804789 +results[529] = 0x8f85ea67d9538257 +results[530] = 0x8fa642b7b23c0988 +results[531] = 0xd97e5efbe493a3db +results[532] = 0xca91b47cfe973cd3 +results[533] = 0x4e156e82b12a8a7c +results[534] = 0x670bc9ddbdc136b9 +results[535] = 0xd3f2209662283f5e +results[536] = 0x56f00dabcf852c4c +results[537] = 0xa5daa56cc57609d6 +results[538] = 0x62dfbea04411ff59 +results[539] = 0x8113a93376332070 +results[540] = 0xd4313affadb3b050 +results[541] = 0x3d9c21f5f4c195d2 +results[542] = 0x2b9e32dcfa219241 +results[543] = 0x421077c18e7ab7e3 +results[544] = 0xa7634c395d32f69a +results[545] = 0x5b25af2205bf4edc +results[546] = 0x69be1d91a66b7506 +results[547] = 0x7e7d42e5f3f67f79 +results[548] = 0x58f848b24fe18de2 +results[549] = 0x91925a527107175b +results[550] = 0xca2257a7aa7f3115 +results[551] = 0x767f18993ea820bf +results[552] = 0xd9df057dee20f976 +results[553] = 0x37f258469f5edcee +results[554] = 0xa82530c013415730 +results[555] = 0xecb8b69ed3aaa6e7 +results[556] = 0x4ee0a2c874e22e63 +results[557] = 0x88cb367234f35bc2 +results[558] = 0x35c03f74efa977c7 +results[559] = 0x6ac47e77ff516844 +results[560] = 0xf47b04d73a158a9a +results[561] = 0x29f66b0663b93b7e +results[562] = 0x4cbeec6480b90ea9 +results[563] = 0x9fdf9b365790b68b +results[564] = 0x1aff965258f5a425 +results[565] = 0x87bd6d5afe0dd2e4 +results[566] = 0x7bf4d5263302e953 +results[567] = 0x1642e54546bb1075 +results[568] = 0x1849460523881335 +results[569] = 0xddbad0a84f8b7a2a +results[570] = 0xe5762be4ff3ee80f +results[571] = 0x65631ca58a4d95f9 +results[572] = 0x69545550c47bdc6e +results[573] = 0x4841dd1f657814da +results[574] = 0x0ae6680ad895da48 +results[575] = 0xa60a52472cd93e92 +results[576] = 0x3be98a28a2876f36 +results[577] = 0x907f81ccbc1f80b7 +results[578] = 0x40076f72137647f3 +results[579] = 0x07f03d49ac31f62a +results[580] = 0x7db4263df59cd21f +results[581] = 0x737b0c709f0e64e1 +results[582] = 0xd92c6512808fda03 +results[583] = 0x644c21a051268800 +results[584] = 0xf34b573d5b9ba5de +results[585] = 0x829305077e77fa44 +results[586] = 0x64b211a76a75b7e8 +results[587] = 0xb570469ecd9684a0 +results[588] = 0xe6f748a6b27d8062 +results[589] = 0x6ec4c26562f52b05 +results[590] = 0x1304f79102cad5ac +results[591] = 0xce6ea3d6facba2a9 +results[592] = 0xf1ad07f0cacc9bfb +results[593] = 0x4eb01d80c1f56ce6 +results[594] = 0x999b81aa0c07ff0a +results[595] = 0x7c7ae19beb2f5c6e +results[596] = 0x58c74dee1c40c7c6 +results[597] = 0x92ca325f7910e1a7 +results[598] = 0x4dd112b8c5229066 +results[599] = 0x0a693d77880a27a9 +results[600] = 0x332533a54ebc8731 +results[601] = 0xf2e9ae37c925c07f +results[602] = 0xdd09e9863779dfd5 +results[603] = 0xf0596ace78e70807 +results[604] = 0x088463e8e80dfac4 +results[605] = 0x2412bf71fd2dea21 +results[606] = 0xda0fc390e9a8e66a +results[607] = 0xb24aad47da8ac4c2 +results[608] = 0x4b7be929b65f5d5e +results[609] = 0x2273a2ca9026e405 +results[610] = 0x5b7b35392fcc50b8 +results[611] = 0x3c5611e6cae996f8 +results[612] = 0xb915534b35e5aaba +results[613] = 0xc0bb6e706c2b185d +results[614] = 0xd9c5e4f94c04e48c +results[615] = 0xc03a1122b956f606 +results[616] = 0x8391f84955485609 +results[617] = 0xd6bd34362dd1b985 +results[618] = 0xf3c43155f396303e +results[619] = 0x11a24d5c8d5a9d0b +results[620] = 0x10eecca92241de9a +results[621] = 0xfa8c67052e884cc4 +results[622] = 0xba31add190c20349 +results[623] = 0xda5961ed12e1ad56 +results[624] = 0x75e101640d16d8cb +results[625] = 0xf40afd244e2c5548 +results[626] = 0x837120b4da158a9f +results[627] = 0xd19adbdebda3002d +results[628] = 0xbc99a3bb8b681f61 +results[629] = 0x730993fe4d054964 +results[630] = 0x20ad5f663edcb184 +results[631] = 0xbbee978a742d1698 +results[632] = 0xa5d7cf05f695081e +results[633] = 0x59c9e1326092c686 +results[634] = 0x51a7a9c5734ecb97 +results[635] = 0x9d267db8a6523efd +results[636] = 0xeee7ef607bfb4b5a +results[637] = 0x13ec3e62fff91090 +results[638] = 0xfcdc993a4ba2e158 +results[639] = 0x3a94189b174dc0d0 +results[640] = 0x8aa43474e3941295 +results[641] = 0xf98c916d13e83ebe +results[642] = 0x2008f9d27959f9f1 +results[643] = 0x618c501fbacea917 +results[644] = 0xa3c681154874aa41 +results[645] = 0xde78a3053c5c879b +results[646] = 0xd2575f6d088ad202 +results[647] = 0x68a8db73accd3fd2 +results[648] = 0xbf753841363c57c5 +results[649] = 0xf21e80ed129ff33c +results[650] = 0x4b01d17b415faeff +results[651] = 0x774e46ab5a688933 +results[652] = 0x961fd279b36a8cfe +results[653] = 0x239b9e79531cf50c +results[654] = 0x4355c6465ca54755 +results[655] = 0x8651f8c215df68b7 +results[656] = 0x7085accb497f789d +results[657] = 0xe71850cdcd4b0f8d +results[658] = 0xbde81a6e83e45666 +results[659] = 0x4089693a675b86d4 +results[660] = 0x84b4891f8b1b3a35 +results[661] = 0xf02fc79f3dd81dab +results[662] = 0x2443d93a066e5cc2 +results[663] = 0x7abeb2bac8fd2fb4 +results[664] = 0x1756726cd00f7aa9 +results[665] = 0x066f1e072c449408 +results[666] = 0xc1527f97f37f3ec9 +results[667] = 0x5558aa7cf01f268d +results[668] = 0x8c263a395f47caa0 +results[669] = 0x768cbc7d2d36d20a +results[670] = 0x387917bfb2befc2a +results[671] = 0x52f58fb464f2aa09 +results[672] = 0xe1b3c4f752763193 +results[673] = 0xa2ae07db2e068672 +results[674] = 0xa05e986ef7fd9fc9 +results[675] = 0x4474984630af6726 +results[676] = 0x34b7ad282c9a270d +results[677] = 0xffebc23f2279798f +results[678] = 0xef9b8fc490d8b3df +results[679] = 0xb8ba31cadb383d30 +results[680] = 0xf46ad8ccd6ccb968 +results[681] = 0xfbc60e36f8f95a0a +results[682] = 0x4048a9c6e24e39f8 +results[683] = 0xa599e623029d9136 +results[684] = 0xff4ecca509c4c299 +results[685] = 0x99394c3741971251 +results[686] = 0x681f0d0578b33a80 +results[687] = 0xb896f1dcb4fdf75c +results[688] = 0x024d2999634b95dd +results[689] = 0x181f43111dc72da0 +results[690] = 0x4246a9b6e0b8f9e4 +results[691] = 0x93ba84c20c53ff2d +results[692] = 0x5d1fb1636c27ca8a +results[693] = 0x3d42be332ff2e060 +results[694] = 0xe378dbf61ecc6687 +results[695] = 0x6a159e364bc6531e +results[696] = 0x71c66b0e082bf07d +results[697] = 0x59a09b04f52f512a +results[698] = 0x7a0d46be04a0604c +results[699] = 0x74e101b250b14361 +results[700] = 0xc896e37746a05e46 +results[701] = 0x4796a8b24d45e6a2 +results[702] = 0xeb82569ea7cf731b +results[703] = 0xc9119a950c8113cd +results[704] = 0x735031d7e7ccfb18 +results[705] = 0x9f77683db43c51e7 +results[706] = 0x2f59450e2b725ca1 +results[707] = 0xd5882fecc028135d +results[708] = 0xfe6cd4e3b764e4c6 +results[709] = 0x49a08526101dd386 +results[710] = 0x22a9eb7f5189af92 +results[711] = 0x4f34d58a7167cf97 +results[712] = 0x99835bbb2e9d1836 +results[713] = 0xce791fc932e6c974 +results[714] = 0x93711ccd77ea40ca +results[715] = 0xf1cf81803b5687cf +results[716] = 0x7b3ed9f479ed806a +results[717] = 0xf7b0fdf2f06777f5 +results[718] = 0x820f408b748af14a +results[719] = 0x7d8a138024bb8dd5 +results[720] = 0xf46712468ac164f5 +results[721] = 0x305623432da20595 +results[722] = 0x5b208b5198e746e6 +results[723] = 0x60c6292f45ebaa97 +results[724] = 0x0a10e633e2941ed0 +results[725] = 0xe6bf138626a78c05 +results[726] = 0x057a7e5333e751df +results[727] = 0x65f79205b57bff3a +results[728] = 0xca2d1a4aca9fbd04 +results[729] = 0x8d32cca8e3182c8d +results[730] = 0xd18e8b26931eb799 +results[731] = 0xa3dc3485a8bf7b5d +results[732] = 0xbcc16ad6816fad76 +results[733] = 0x21b4c8988dd1474a +results[734] = 0xfb862e8475d1c153 +results[735] = 0x91ab3b6e49505493 +results[736] = 0xce5e5fccb7fd08e2 +results[737] = 0x079ac7be2974ea07 +results[738] = 0x69f4bc540ce5062c +results[739] = 0x471cb77bbdee417e +results[740] = 0x568be73d3232edd5 +results[741] = 0x84e367231428e196 +results[742] = 0x403c774c43b0aa30 +results[743] = 0xf8a4048b3230b6bc +results[744] = 0x6442363986f0259d +results[745] = 0xa20d34b39fbf7142 +results[746] = 0x8a0f26508da61073 +results[747] = 0xa4a44a3ae3bebd57 +results[748] = 0xe137f5826cc2d443 +results[749] = 0x6786e92c374c7630 +results[750] = 0x63a509c0c7b57f8d +results[751] = 0xf22544598a9b64f6 +results[752] = 0xce0b11a6640717f5 +results[753] = 0x2d2dde6bd7c8b3d9 +results[754] = 0x97ca53a2724377d9 +results[755] = 0x9b7837d1c8b1075a +results[756] = 0xd56b80945b1428bd +results[757] = 0x3c38726d81fa9336 +results[758] = 0xa2f521c225320fb7 +results[759] = 0x9304abf547ca25d3 +results[760] = 0xb964d5fded91d25a +results[761] = 0x76d451f2760ba394 +results[762] = 0xe5bc37603a765eab +results[763] = 0x7e806c5b8a948b05 +results[764] = 0x3fd79614e3556873 +results[765] = 0xf14ceadc72c639e0 +results[766] = 0xbd7a5531be3b465c +results[767] = 0x4451e0144c499527 +results[768] = 0xe193d509afd65235 +results[769] = 0x4f52c1c539f097a2 +results[770] = 0x3933efa2f7e80191 +results[771] = 0x33233864ce2e3763 +results[772] = 0xd83f40c2e1753e7b +results[773] = 0x8fbeb3484aaa52db +results[774] = 0xcf1e95e3cd78d100 +results[775] = 0x326be561c26d6087 +results[776] = 0x0b2bd72911dd5346 +results[777] = 0x127d356657db50b3 +results[778] = 0x8a0a09937a52343e +results[779] = 0xa748e26a8e3d61a0 +results[780] = 0x428393bdf30feaed +results[781] = 0xd70b4f69c5f24b65 +results[782] = 0xc6730ffc40613c64 +results[783] = 0xb1635dd0e4e9bac3 +results[784] = 0x91f6b23afd340dc7 +results[785] = 0xc8da28b1ca1b1bda +results[786] = 0x0bba33ff35edc52d +results[787] = 0x4c2e4aee7203740c +results[788] = 0x0c397663a1eb678a +results[789] = 0x1962c2a24f5445cb +results[790] = 0x952c5e48849fde76 +results[791] = 0x3fac78955ef6bc4e +results[792] = 0x482f74569ba0caf2 +results[793] = 0x8343887340c9142a +results[794] = 0x346807ef9e14170c +results[795] = 0x35d60eff968f8250 +results[796] = 0xa7e8f17e5c24805e +results[797] = 0x6d97d93575d64b8b +results[798] = 0xe8c20505e5d51394 +results[799] = 0xb14d64addfe39f3d +results[800] = 0x4c7bc8a520b4729f +results[801] = 0x70b72d3acc828651 +results[802] = 0xf7a8a7a3923bc3df +results[803] = 0x96fe9fb38435fb7a +results[804] = 0xb350b04b7d8c8c58 +results[805] = 0xed3c28d69c79cd0f +results[806] = 0x4cb6f7877d62e0f0 +results[807] = 0x7135e14ea73dd5d3 +results[808] = 0x3d3ccdf44aefbb15 +results[809] = 0x96f86b3860e024ab +results[810] = 0xb0c7dfa854250683 +results[811] = 0x45e0ffd6cddda764 +results[812] = 0xe07913a41d430d57 +results[813] = 0x6597b2c4e8f69cbc +results[814] = 0x4996ea439f392f45 +results[815] = 0x4c01cfc56a79785e +results[816] = 0xec84128dda47defe +results[817] = 0x78b8c16de40a6f18 +results[818] = 0x37a1ea14cfcce431 +results[819] = 0x75a4aa49c892fbd0 +results[820] = 0xfb8ea38c48ac6a8c +results[821] = 0x4d3fe650a0b8b5ea +results[822] = 0xc2fcdc32bcb10a0c +results[823] = 0xf925a9bdc6b9f749 +results[824] = 0x892ed1c4f8f31c12 +results[825] = 0x3294f07be9a9e9c1 +results[826] = 0x0a942375bba0f0c7 +results[827] = 0x605a4c4da4d8a255 +results[828] = 0xf8bd4fb081504f37 +results[829] = 0xcd28df9547bbeead +results[830] = 0x0812ff7487bfc0f8 +results[831] = 0x43ec58656d43419e +results[832] = 0xe9368941b44cc5ed +results[833] = 0x7347ac4cf7f8daac +results[834] = 0xdd9ca403626d4b47 +results[835] = 0xcd18aa38abba295b +results[836] = 0xaf56dadcf52b2a45 +results[837] = 0x8f50f41dcf8c0f85 +results[838] = 0xa4aef8e4191d1a45 +results[839] = 0xd061b83d1498bafb +results[840] = 0x8d7e382c1830c113 +results[841] = 0xbdea6c6dec3814cc +results[842] = 0x547991819dd50189 +results[843] = 0x456ad501fd6f9850 +results[844] = 0x58c60e3ae1aeda71 +results[845] = 0x668a950a277dd26f +results[846] = 0xa6e5367192a8eee7 +results[847] = 0x5a39c21167f7db87 +results[848] = 0xc0c1f211a98ab2ea +results[849] = 0x2e5a323a71fd213a +results[850] = 0x2067eadb64d2c43c +results[851] = 0x35a228fd107e2348 +results[852] = 0x4453268c39f06d99 +results[853] = 0x741221f15d5c37ab +results[854] = 0xbd1c6ead9ac5326d +results[855] = 0x4718f86cb54f1b91 +results[856] = 0xd9d103ac84cf4d56 +results[857] = 0x803194945d0f0fda +results[858] = 0xa8967716f9406485 +results[859] = 0xcc1a58e22747accf +results[860] = 0xdd2eae48772f3a9b +results[861] = 0x0c90cdcde376bb98 +results[862] = 0x521ec0424bf76261 +results[863] = 0x7d3c26e630230e7c +results[864] = 0xaba28352229955c1 +results[865] = 0xf18a4fab9f03ae8f +results[866] = 0x2f444364304776d5 +results[867] = 0x82472e72730def56 +results[868] = 0x4c2bac170df4384b +results[869] = 0xd4a69991fbc2a26e +results[870] = 0xd78d7d4ad7691348 +results[871] = 0xb588f43aa08c643e +results[872] = 0xd86a58e477cce73c +results[873] = 0xdc1b777462bddb88 +results[874] = 0x890e325ed58f7cf5 +results[875] = 0xd213f5e207ce034c +results[876] = 0xd60e9f25ae934863 +results[877] = 0xb4332d289b803ad8 +results[878] = 0xe6aaf577e860ce87 +results[879] = 0x39f5f441b279c687 +results[880] = 0x8b8b502b78aa24b1 +results[881] = 0x37f0e2221b92bf51 +results[882] = 0x5aadae8c52f5737b +results[883] = 0xfb42836bd285fe49 +results[884] = 0x657b084fa7e52576 +results[885] = 0xcd2a47a7c6759800 +results[886] = 0x5589b34d42a65f14 +results[887] = 0xe2fd3b9582f58c5e +results[888] = 0x7349953c446236ed +results[889] = 0x0deee402d8ea320e +results[890] = 0xbac0b88a7d2dc244 +results[891] = 0x56e9c38b2334a879 +results[892] = 0xb2d93997fd640a25 +results[893] = 0x056d59e20389e2c9 +results[894] = 0xd62271d1f04ede99 +results[895] = 0xa01f031b7f3bea26 +results[896] = 0x5a83c597ab1eb287 +results[897] = 0xd7133751ed7ae8de +results[898] = 0xda8733bbfd4f8e6b +results[899] = 0x226ff09dba50e0be +results[900] = 0x6f0acfb289e5d49a +results[901] = 0x5276fbf7cb3f1b43 +results[902] = 0x5cf581f97d331d85 +results[903] = 0xa901ec053cbc0861 +results[904] = 0xed4ff27791621c2e +results[905] = 0x218a6c5b0b2c1e5b +results[906] = 0x94e0b4bf6ce7fca9 +results[907] = 0x477f94fa55bc4bd0 +results[908] = 0x83f1ff489f6a089f +results[909] = 0x0f5cc3b2890a8a16 +results[910] = 0x537d974451499e79 +results[911] = 0x5e3e28a9d1162ade +results[912] = 0x4b149ad2812fb64a +results[913] = 0x4bd49b0576f4c9ca +results[914] = 0xc1be773216e9b834 +results[915] = 0x93b62bf904ea5cfe +results[916] = 0xe6f6bad00e4e788b +results[917] = 0x9004806b3031251e +results[918] = 0x1564d68858c525d9 +results[919] = 0x7c7d4e987307ff8d +results[920] = 0x2824b6f69f8170ba +results[921] = 0xff3a276036af05c7 +results[922] = 0x239634793cb1acc3 +results[923] = 0x521cb0950a8fc759 +results[924] = 0x198356ba68545323 +results[925] = 0x72f8fd91ae2b26b7 +results[926] = 0xe694d974a756fac0 +results[927] = 0x95f58632fb4635ed +results[928] = 0xbefa9505e2cbaa20 +results[929] = 0x82166d1463952313 +results[930] = 0xe60d54b9e928dd1e +results[931] = 0x56b62b11b5514dd3 +results[932] = 0x1bc173801ee34540 +results[933] = 0x44c03c6150e11269 +results[934] = 0xc62bcd8883866637 +results[935] = 0x70cf481a2d4cf8be +results[936] = 0xe51506bc5fed91e3 +results[937] = 0x4737e81a3424a398 +results[938] = 0xcc237e52f78873a7 +results[939] = 0x89334bdda00834d6 +results[940] = 0x2d3700e5a70df04d +results[941] = 0xd23596e15844d1ad +results[942] = 0x42bb59ffb1511046 +results[943] = 0xcdd1c47491b32ee6 +results[944] = 0x27416adf3445bd86 +results[945] = 0xc9b71c1edbb3763f +results[946] = 0xbade3326f6811761 +results[947] = 0xe7d9c7d6c746475d +results[948] = 0x3d4c6da2d53de36b +results[949] = 0x8654308a221c7ae9 +results[950] = 0x998a73d4aa29557a +results[951] = 0xc67ec5832e4f85fe +results[952] = 0x682780df561e9c1c +results[953] = 0x5447e7f80a3a974d +results[954] = 0x5eaed87c46b30a5a +results[955] = 0x4a6b3a46ca47fd65 +results[956] = 0xd76c1e09aebc5cab +results[957] = 0xb9ad16ef564d2863 +results[958] = 0xe052503e8dde48ee +results[959] = 0x1fef7cc8929ca7f1 +results[960] = 0x4fb10c7670be8c0e +results[961] = 0x2f58855046c13f0c +results[962] = 0x6e8546c6701b80e8 +results[963] = 0x29b4124f4a2c32bf +results[964] = 0x492890a5f2189bcb +results[965] = 0xa2c34dce699e86d9 +results[966] = 0x22722b1fde23c3e1 +results[967] = 0xfa717d99d8ffa00d +results[968] = 0x4a5f1f1d062cf628 +results[969] = 0xb6bb19724fb1b620 +results[970] = 0x7bb512183259befb +results[971] = 0x5d667f975a08843a +results[972] = 0xebdd7d19b0e9a078 +results[973] = 0xe32a19161515bb5f +results[974] = 0x4e8bdee9d7c62b44 +results[975] = 0x70941fb4d0efc9d4 +results[976] = 0x38c605f25b92d53a +results[977] = 0x2662dd69d6348df8 +results[978] = 0xf315371b75acc0e0 +results[979] = 0xdc7d42836b5e6542 +results[980] = 0x32d6018eddfb9466 +results[981] = 0x1f14de28e423baee +results[982] = 0x5788b5566ce5b003 +results[983] = 0xe05abc84e8101176 +results[984] = 0xe3f91de694403ce0 +results[985] = 0x79b01ccb9d2eb9ad +results[986] = 0x12145f81cb50c9e9 +results[987] = 0x2330d0a66d17b3cf +results[988] = 0xea4786b7eb7b9285 +results[989] = 0xd89e41b59a389ac3 +results[990] = 0xe4819d61ec1578fc +results[991] = 0xc475133395d8d89d +results[992] = 0x17d7cd0b6f33d717 +results[993] = 0xbbd5e290bf68e503 +results[994] = 0x002c4cf4a33853aa +results[995] = 0x23eab3967979cc9f +results[996] = 0xeca9da44de9309e0 +results[997] = 0x832f380e9195b003 +results[998] = 0x58d433dcc28fa2b7 +results[999] = 0x67602167e28698d4 +results[1000] = 0xd573c6b5f8a7f241 +results[1001] = 0x706db6b9d1496bf5 +results[1002] = 0xb0b21a76e47c4c59 +results[1003] = 0x4f7e287f9e3690aa +results[1004] = 0x500dd4c4f0a4c3dc +results[1005] = 0xf4918060655512ca +results[1006] = 0x6c66c367c37b266b +results[1007] = 0xcff53f4f1b7cb4d8 +results[1008] = 0x0435ea098243f4ec +results[1009] = 0x99c3ba40eacca7e5 +results[1010] = 0x733be71e86526b77 +results[1011] = 0xa6754304576ba277 +results[1012] = 0x7dc4efc79bef4927 +results[1013] = 0x20e6b2edfcf4b14b +results[1014] = 0x17780bd2a5009547 +results[1015] = 0x2d9f7fa171d5f525 +results[1016] = 0xd49cb7497f5953a3 +results[1017] = 0x7eb6f23c0238f2f5 +results[1018] = 0x650200c45e6fe0ec +results[1019] = 0x45eaaaf71fbaf468 +results[1020] = 0x25c1f2c3408e5217 +results[1021] = 0xe29c4a8e474444bd +results[1022] = 0x7c02ada387755086 +results[1023] = 0xb0dc8f5c98e33fab +results[1024] = 0x5862f4a08b5cc36a +results[1025] = 0x2aca861139fa8a7b +results[1026] = 0x4a446f52832b6c72 +results[1027] = 0x654801781d8ad51f +results[1028] = 0x33ef1ccbb6dafc40 +results[1029] = 0x2a440c42a196d897 +results[1030] = 0x989b935bca648e52 +results[1031] = 0x9a089f5d528ebd30 +results[1032] = 0xdf478a9d12855e89 +results[1033] = 0x2cdc30dc86733e7b +results[1034] = 0x8fcb79f36c49a6d8 +results[1035] = 0xba611de50b9bc94e +results[1036] = 0x4111d551f554ca03 +results[1037] = 0xcfe52009d558104d +results[1038] = 0xced7e3e814e518aa +results[1039] = 0xaa1c3f06b313dab6 +results[1040] = 0x4e688273d750f6e9 +results[1041] = 0x6d032eaf63a1a395 +results[1042] = 0x27e78a9f145d62e3 +results[1043] = 0x21c858e501cc6af1 +results[1044] = 0xdec9d7051d4c70ab +results[1045] = 0xf98fff5c49263749 +results[1046] = 0x2c253822e221bde4 +results[1047] = 0x3037ffdfa4202cc0 +results[1048] = 0x666e8d7d10111798 +results[1049] = 0x8a2919c851b0a204 +results[1050] = 0xa960d0b0fa7ed7f5 +results[1051] = 0x1392fed771f0bcd5 +results[1052] = 0x98f6a32802dba2d2 +results[1053] = 0x7b4ffbe5f5b4a6e8 +results[1054] = 0x817c3a8b20019370 +results[1055] = 0x6d5c487ccf1a928b +results[1056] = 0x5337f78ebc6651f3 +results[1057] = 0xa2c4f6f0b516d671 +results[1058] = 0x6bbbcc46d0547d73 +results[1059] = 0x5665e1b68fe66468 +results[1060] = 0x2a41ab98407d6ccc +results[1061] = 0xc5a290d8c388f7d3 +results[1062] = 0xb7fa2bd528a8f888 +results[1063] = 0xf53204ad5893ae37 +results[1064] = 0x350845c365645a88 +results[1065] = 0xefa44c7a6def1089 +results[1066] = 0x2bf12337d453ca04 +results[1067] = 0x93a63131b0e9a985 +results[1068] = 0x88b8f053dddd8cc2 +results[1069] = 0xd04400954b11a0dc +results[1070] = 0x57449f218fb6deb0 +results[1071] = 0xdb99e7b36fb9e543 +results[1072] = 0x3613093f98384a38 +results[1073] = 0x79c9bbf108de1604 +results[1074] = 0xcde1c28faa2f3346 +results[1075] = 0x34134e2437862323 +results[1076] = 0xcda42bc384e6df77 +results[1077] = 0x5794ce99e3077dc3 +results[1078] = 0x7163f7e27cf3c0e6 +results[1079] = 0x88cf9348f2d49e80 +results[1080] = 0xfa1036dcac4203bd +results[1081] = 0x4432031c226ed97b +results[1082] = 0x3930714d8dfb2ed2 +results[1083] = 0xcadc046aaf446bee +results[1084] = 0x3bed5a33184e43a7 +results[1085] = 0xee6079918ad09117 +results[1086] = 0x7f94c4c0f7722e70 +results[1087] = 0xef0f09152d3b10c9 +results[1088] = 0x713ea83f90e862b7 +results[1089] = 0x4d5ad51ac1fc0285 +results[1090] = 0x972181dd322668de +results[1091] = 0x3e28f50fb6af656a +results[1092] = 0x3bfca7fec273e766 +results[1093] = 0xe4767cc82d802e60 +results[1094] = 0xa0e3a7a60b6b0fdb +results[1095] = 0xb15ddff04fdea383 +results[1096] = 0x7d7c94d669df5000 +results[1097] = 0x2574c64147044809 +results[1098] = 0x14ba5e737c91e682 +results[1099] = 0xf4bf2c9ebc42ee9f +results[1100] = 0xbc0f1f58f31b7351 +results[1101] = 0x74c987d7b3c5da27 +results[1102] = 0xa2998791c352eee0 +results[1103] = 0x7b77f9996642832b +results[1104] = 0xbbdefc62b845c7da +results[1105] = 0xaafb2d90db308150 +results[1106] = 0x7063ba1caad6cd13 +results[1107] = 0x4e0ac6ec86ab5a3b +results[1108] = 0x25239c82d90a8c59 +results[1109] = 0x6b7d17c9de73092a +results[1110] = 0xb1fe471266c44024 +results[1111] = 0x7ca5a77b75c6ff92 +results[1112] = 0x07f1a98706202288 +results[1113] = 0xc9a420d45a691296 +results[1114] = 0xca92da99acbdaf2b +results[1115] = 0xe3d2a1e48a774b29 +results[1116] = 0xc5fff8be99240805 +results[1117] = 0x9779b2a179117650 +results[1118] = 0xf717b736281cf785 +results[1119] = 0xa7386fd42dfc4103 +results[1120] = 0x1c2e5c4477226a79 +results[1121] = 0x3edf9ee46512ae90 +results[1122] = 0x0f65248d419f8ed3 +results[1123] = 0x0d403d9d5ec5624b +results[1124] = 0xd5182d7133826a04 +results[1125] = 0xb53a6df61071a468 +results[1126] = 0xc34fd0d45e6f4486 +results[1127] = 0xb99d4cf8ff0fb85a +results[1128] = 0x4658887a39c203ee +results[1129] = 0x5954b184012dc153 +results[1130] = 0xc1347de74f9be8e0 +results[1131] = 0xe1247efb2e084f13 +results[1132] = 0x6850703f7a048dac +results[1133] = 0x3483a853c01e582b +results[1134] = 0xdb8d7384864a1e62 +results[1135] = 0xdbc2f589c095539c +results[1136] = 0xe3d8acf420d88910 +results[1137] = 0xac9d12c13d06c890 +results[1138] = 0xb85fe8418088b5e7 +results[1139] = 0x3f9b07fbbe55a74e +results[1140] = 0xcfa07252fe80ebec +results[1141] = 0xe61c6f7b643f13d8 +results[1142] = 0x105dec7a86f2e628 +results[1143] = 0x11afb96f561cbb67 +results[1144] = 0xbc500cd3c84a16ca +results[1145] = 0xdeb3b0ccb172e245 +results[1146] = 0x589c2dbc603622dc +results[1147] = 0xb1d1a1c66264a885 +results[1148] = 0xa40d89af061df79c +results[1149] = 0x4b3c104994ee81bb +results[1150] = 0x9310ea6eac91d1a0 +results[1151] = 0x69476b575a0cd040 +results[1152] = 0x9f83c3262bddf288 +results[1153] = 0x1cba28c51e93c4ef +results[1154] = 0xce1f6347295af17b +results[1155] = 0x7fd1b1b62069bc40 +results[1156] = 0x6895ff09b8278bda +results[1157] = 0xdb94b7e97a0d5f34 +results[1158] = 0x49c5d7e6eff1d585 +results[1159] = 0xe1f8cf6b133e6541 +results[1160] = 0xc8bac7cdd3b4bb52 +results[1161] = 0x8781992ca78544ca +results[1162] = 0x6c39bf7717f1dd3e +results[1163] = 0x5673cac38b88e3df +results[1164] = 0x9e57062416c4d292 +results[1165] = 0xf9d223f300f278bd +results[1166] = 0xe3d5e6e5d26e1fcc +results[1167] = 0x7a8b357503efc1f0 +results[1168] = 0x9c898bb7c83dbf13 +results[1169] = 0xdd16d9216cc2851a +results[1170] = 0xc37873debf0d7975 +results[1171] = 0xcd38499399a4d959 +results[1172] = 0x600e96ec2a4b41c6 +results[1173] = 0x6b9dd55a7c2b4d0a +results[1174] = 0x266d8b5cf6e66fb5 +results[1175] = 0x5c4e01685795bea7 +results[1176] = 0x626080f866034212 +results[1177] = 0x09cecf0ef22ea7ee +results[1178] = 0x1e0499660bd8d9cc +results[1179] = 0x605d3946bbc1979f +results[1180] = 0x21c1ad66c689ae52 +results[1181] = 0xbb197912a9352640 +results[1182] = 0x4092f610d9b15fe1 +results[1183] = 0x254f3c821bfccdc8 +results[1184] = 0xf4e21e3d09555853 +results[1185] = 0xbd073ff5f3d92473 +results[1186] = 0x86fa9d2cab7ec007 +results[1187] = 0x58f5509835797bd8 +results[1188] = 0x424f39e931293f81 +results[1189] = 0x2696e64827af9b80 +results[1190] = 0x3750e99786d8edaa +results[1191] = 0xd6a7bca34f852673 +results[1192] = 0x655f1b2abb08c2b6 +results[1193] = 0x000e0f971b075d2c +results[1194] = 0xc3693708e07ce984 +results[1195] = 0x27804f1d1295482f +results[1196] = 0xadd5660f1943b756 +results[1197] = 0x7579cd18588f9627 +results[1198] = 0x8247ea995c3904d2 +results[1199] = 0xb9fe0713357ad511 +results[1200] = 0xd7d6d8b68e1de19c +results[1201] = 0x517a5f356543fc17 +results[1202] = 0xc622f51d72da38e9 +results[1203] = 0x718ca6fef9c3b26d +results[1204] = 0xabc6f6ef53c9962b +results[1205] = 0x9caa676b6bbe3935 +results[1206] = 0xf8ea335d0c50210c +results[1207] = 0x3ad84b6c6480a06a +results[1208] = 0xb3664d7a7413a6a5 +results[1209] = 0xb6f43eec00d97272 +results[1210] = 0x553d37ec30f9e7c5 +results[1211] = 0xa943ddd5e8108ef6 +results[1212] = 0xaec8fb4f4a2839ff +results[1213] = 0xb83f82943f8d200c +results[1214] = 0x3b0e90fefb51ecf1 +results[1215] = 0x887c623e2b480e5b +results[1216] = 0x756e6c243d9b13ea +results[1217] = 0x89cdaf5ea8930eb5 +results[1218] = 0x6200bbc99f4202aa +results[1219] = 0x4393d409c80d8ef3 +results[1220] = 0x7cfebc6a41ad81f1 +results[1221] = 0xd5268a1157d18fca +results[1222] = 0xa7c7f05fbaf8f124 +results[1223] = 0x1a95961fc304bc66 +results[1224] = 0x78e243b67e3b7589 +results[1225] = 0x8b29d9f8a62a8694 +results[1226] = 0xb7632a15d2996774 +results[1227] = 0x62652f43f397cef0 +results[1228] = 0x6e9aef311ca302c0 +results[1229] = 0x3433c8f85b3db80f +results[1230] = 0x82f67343338b47f4 +results[1231] = 0x52466349198c07d7 +results[1232] = 0xc259fc1147d7808f +results[1233] = 0xacbaacc11fee8c95 +results[1234] = 0x1182bdc06250ca1f +results[1235] = 0xfe75a9a0f3416e0f +results[1236] = 0x35763a178f70d3c3 +results[1237] = 0xd255acdf38d236bb +results[1238] = 0x7cedf7916444a832 +results[1239] = 0x322ecb24383af2e9 +results[1240] = 0x37e602fb6260a688 +results[1241] = 0xf3029e21f32f6ece +results[1242] = 0xbaf92f6d7de3037d +results[1243] = 0x83554e3a8dee53d6 +results[1244] = 0xb3d86bd497bc7787 +results[1245] = 0x204956e84ca5f19b +results[1246] = 0x26c9a9560c2ea91c +results[1247] = 0x53f7f67e5b9c81a2 +results[1248] = 0x08e040cd2169ad06 +results[1249] = 0x80ba8b30c099243e +results[1250] = 0xa7e1a4ab70c919d9 +results[1251] = 0x785ea3a04b447677 +results[1252] = 0x71cd16a9440cacda +results[1253] = 0xd1ed667a247de8db +results[1254] = 0x9a8099e8c2cb5dcc +results[1255] = 0xcb8930db4cb9606c +results[1256] = 0xbbbab3e231238b45 +results[1257] = 0xcd4d724a6c36dfa8 +results[1258] = 0x9a198e4a5d8603dd +results[1259] = 0xd250c6f3b0bad1a0 +results[1260] = 0x211db93b9c150085 +results[1261] = 0x1a4855862f69b167 +results[1262] = 0x97100cc48c37bd08 +results[1263] = 0xb53d10cac7d2b9b2 +results[1264] = 0x29f3b02d0112e507 +results[1265] = 0x1b558aa78266e9de +results[1266] = 0x277f1f3e494f7a19 +results[1267] = 0x92e327db2824aa39 +results[1268] = 0xf7c05627cd501bdd +results[1269] = 0x6aac1a1251a71837 +results[1270] = 0x271f5c6c5d7fd424 +results[1271] = 0xff1239d3db95f826 +results[1272] = 0xcd5f13275be9de89 +results[1273] = 0x8ef7965be7ae1a6e +results[1274] = 0x8d1b56e53498b8df +results[1275] = 0x7bc8090e76c2f968 +results[1276] = 0xdd01c9133e3d9689 +results[1277] = 0x5b97369559b537b3 +results[1278] = 0x79484032808b1614 +results[1279] = 0x84d73490da6d88e9 +results[1280] = 0xb13321fbd9362e73 +results[1281] = 0xf0d87fd6bcd44eaa +results[1282] = 0x80b76ffeb29a9ea3 +results[1283] = 0x27182b0a0f5ab3ae +results[1284] = 0xc3b6d091c8fbf206 +results[1285] = 0xe6951acc60249ed8 +results[1286] = 0xd7c8fd9d416ae1b2 +results[1287] = 0x551a71a0ae9f23db +results[1288] = 0xe35f48c03d52e5bd +results[1289] = 0x5fb870106cd7964e +results[1290] = 0xd6516cf8c625224a +results[1291] = 0x0c3603b4c17c9614 +results[1292] = 0x635ad25fc4bbb236 +results[1293] = 0xfaafc68f1052e77b +results[1294] = 0x465bc3f5b6031532 +results[1295] = 0x0f4e95b06ba1f0ec +results[1296] = 0x1b30a9eff01df5e8 +results[1297] = 0xa12f588f782bb922 +results[1298] = 0x49ba69853dcaf3d3 +results[1299] = 0x5b9b651446d46f19 +results[1300] = 0x088d86415be27eb0 +results[1301] = 0xaeed1c5e1b0f37b8 +results[1302] = 0x33a38a9167d26f4e +results[1303] = 0x0548bdb0a944315d +results[1304] = 0x29c6c50e79167179 +results[1305] = 0x205fee4e5f9c8664 +results[1306] = 0xac7be0354774cc92 +results[1307] = 0x07cac96cd6eebfca +results[1308] = 0x789cc16234596e4c +results[1309] = 0xd596398ed97b8d30 +results[1310] = 0x1aea5afccfd7e64d +results[1311] = 0x63decb43b9b28f65 +results[1312] = 0x758546d92a337193 +results[1313] = 0xa0c8370b3ebf27f6 +results[1314] = 0xdaaca80d4305433b +results[1315] = 0x003805e07e25abaf +results[1316] = 0x10ccf8f3c9d23bdd +results[1317] = 0x43aa6f73ecb3ccd1 +results[1318] = 0xd631b90ff45beb78 +results[1319] = 0x9eeafd082784c8b0 +results[1320] = 0x2aa3c9fd2a22878d +results[1321] = 0xc21848a9e6f9c8bb +results[1322] = 0x694b4fb94517a23a +results[1323] = 0x451a9930bd9ac8e6 +results[1324] = 0x8d1d2593fcab4547 +results[1325] = 0x6d44e940e83d1400 +results[1326] = 0x08860b2265ba6b6e +results[1327] = 0x7e93cb980f584e20 +results[1328] = 0x7a62e847df67d472 +results[1329] = 0xccab5ca9934d50cd +results[1330] = 0xe3b1d256422ddb14 +results[1331] = 0x7b746f95191d2084 +results[1332] = 0x0e9b14c837f148b9 +results[1333] = 0xbd2ab214ec49df05 +results[1334] = 0xed2434502666b6a6 +results[1335] = 0x99b33e66e111f505 +results[1336] = 0x6d27812b0f93c402 +results[1337] = 0x03571551b1cc51e5 +results[1338] = 0xbca8023941ab8935 +results[1339] = 0x99e549cc10dbfe99 +results[1340] = 0xf32c4c2a131cea02 +results[1341] = 0x8fdbbd4e10ead9f5 +results[1342] = 0x1bb5b8984b4bbae3 +results[1343] = 0x07901a2b8e8f41ad +results[1344] = 0x9bcac2200cdaf150 +results[1345] = 0x4a05bfe1a36b4352 +results[1346] = 0xfdcb30411a05116e +results[1347] = 0xdbf161c2877c5c7d +results[1348] = 0x587f666ab2368acc +results[1349] = 0x6b1f242ae3d6341d +results[1350] = 0x4fb120a5c32f6859 +results[1351] = 0x35979329bdbe7989 +results[1352] = 0x649039237338c133 +results[1353] = 0xef9c85c4b48e1d61 +results[1354] = 0xc33c3cfcfbc79ba2 +results[1355] = 0x1bf25d334af825a2 +results[1356] = 0x7b459845501f73b5 +results[1357] = 0xc033108e1a150f67 +results[1358] = 0x00d4bdc1246409d2 +results[1359] = 0xb3825100fd31b5e6 +results[1360] = 0x295f7fd448dd71a0 +results[1361] = 0x7b8dc383a1434acb +results[1362] = 0x6516991a78d9d202 +results[1363] = 0xd50929d18af6aa4f +results[1364] = 0x1a511a7ccbc0b855 +results[1365] = 0x14d5698fc2ff3fd3 +results[1366] = 0x9bbfd17e06893870 +results[1367] = 0x9c796697bc346bac +results[1368] = 0x6b4b3900f106487c +results[1369] = 0xd3f66dcf45cf98c8 +results[1370] = 0xd91c40584963e7a2 +results[1371] = 0x05ce2f6ea33693ef +results[1372] = 0x8e1a506c1914da1e +results[1373] = 0xfccc7d6bb81277ca +results[1374] = 0xb7ce8100af6b87e8 +results[1375] = 0x415fe0115ccbf67a +results[1376] = 0x75d40983ba5df8fa +results[1377] = 0xcc1c23d43e87776a +results[1378] = 0x8b18a57d2a51f04d +results[1379] = 0x160e65710e16dfeb +results[1380] = 0x5b9e5968be5408ef +results[1381] = 0x93abf609754e72ed +results[1382] = 0x96cd9d4b81a98e1c +results[1383] = 0x3a90b59d4e094e1a +results[1384] = 0xb764b2f020502d06 +results[1385] = 0xf5b2127a60b31da4 +results[1386] = 0xdef28e19ef070b73 +results[1387] = 0x95539e5972c7af86 +results[1388] = 0xb6ae407d7c0c5f1b +results[1389] = 0x6c03277fe029b3b3 +results[1390] = 0x05ea008e6469a7ea +results[1391] = 0xaeae283e4a2a7cce +results[1392] = 0x4b1442da8d4b693b +results[1393] = 0x144d7f890bd4ab75 +results[1394] = 0xbd08fc9cb345dd04 +results[1395] = 0x9d1421f7f35a271f +results[1396] = 0x6ffd3da7a469a612 +results[1397] = 0x1135d4c01f9c3f9d +results[1398] = 0xa79481c42b3935ab +results[1399] = 0x7f422bfcc8bd4aca +results[1400] = 0xdcc1daea549c6dc0 +results[1401] = 0xc030bd9b380ce8b8 +results[1402] = 0x2030c0b1dc3a1cf9 +results[1403] = 0xd440ba80d4fa9f54 +results[1404] = 0xf481fd2d716bdf19 +results[1405] = 0xbc53ab6064573193 +results[1406] = 0xb4ffc4d500d25894 +results[1407] = 0xc3748c5628f503a9 +results[1408] = 0xf9ebde5d5114b4db +results[1409] = 0x191d49c7fb510645 +results[1410] = 0x572f06b98912083b +results[1411] = 0x86816edbe48d50f6 +results[1412] = 0xee06dfa658002aa2 +results[1413] = 0x44c429dc72cd409b +results[1414] = 0xeed71bd2c308d768 +results[1415] = 0xbcb9af7d3e9c87b6 +results[1416] = 0xf537c515e7b16e45 +results[1417] = 0x52df1bb59a6bd701 +results[1418] = 0x8da044970ae81914 +results[1419] = 0xcbde0001c691d5f5 +results[1420] = 0x69a8d0483d893aff +results[1421] = 0xb3f591776f85d3ef +results[1422] = 0xe9279487d4dc6025 +results[1423] = 0x3498c4dd97adaee7 +results[1424] = 0x4ee8c1a02c99349d +results[1425] = 0x8c53dd23f3d054c0 +results[1426] = 0xf70866fb72de1cc0 +results[1427] = 0x2ed796550df62793 +results[1428] = 0xf48c9368c79aeef6 +results[1429] = 0x9e508da83110b86b +results[1430] = 0xf91258d13b91f486 +results[1431] = 0xc3eb422810ce6510 +results[1432] = 0xb51b61dbae2d596e +results[1433] = 0xcd69ec172a471f00 +results[1434] = 0x2d3d56f0de853ebe +results[1435] = 0xdf15eb77fbda6385 +results[1436] = 0x092569243e971c07 +results[1437] = 0x2dfc60161fca04ae +results[1438] = 0x9c3cd65db6a7b8a0 +results[1439] = 0xa518caac283edc5a +results[1440] = 0x27e086ce03e56d06 +results[1441] = 0x3ba803730255d7d8 +results[1442] = 0xad1ece034a8c415e +results[1443] = 0xf2efe2d7ca0a5b62 +results[1444] = 0x6ea9d8f10793acbb +results[1445] = 0x2847851807e0ee5d +results[1446] = 0xe3e1a3c9ad533944 +results[1447] = 0xe26539b1c81e8a7f +results[1448] = 0x5928aa746fdf3414 +results[1449] = 0x38f81efe31172225 +results[1450] = 0x0605be34cd33d496 +results[1451] = 0xc75335ac6a73f067 +results[1452] = 0x4a91b735b5d9c63b +results[1453] = 0x2daa2d2b764f37f0 +results[1454] = 0x665954187f2d374d +results[1455] = 0x1a72d761e837de4d +results[1456] = 0x0bc115e5a4764d41 +results[1457] = 0xde2c5a40865ec310 +results[1458] = 0x09c7851eefa38211 +results[1459] = 0x63a90230eb535f9b +results[1460] = 0x4e6957d75dcfcd7e +results[1461] = 0x047a638895f2e149 +results[1462] = 0xaec28592bf2b0e45 +results[1463] = 0x0a2836973f9dcef2 +results[1464] = 0x2fcc93598b2eb9a7 +results[1465] = 0xbd15ead6b98f2147 +results[1466] = 0x5a6c2f6311b0d957 +results[1467] = 0x43aa4e41912328ae +results[1468] = 0xf87c98b97a32c538 +results[1469] = 0x9cac9d9c35bcc280 +results[1470] = 0x159c6f21f6cab478 +results[1471] = 0xb0c42088e5038e6c +results[1472] = 0xe7f18a67fe89cbc6 +results[1473] = 0xa49cbb84671b36a1 +results[1474] = 0xdc5f0ffc5c69f613 +results[1475] = 0xe0eecd9208fc4c98 +results[1476] = 0x636a2500266f960d +results[1477] = 0x0eb46f15296fe641 +results[1478] = 0xd24bb88f427c2bdf +results[1479] = 0x6c17109dee89d653 +results[1480] = 0x5ae62cc6f0581e14 +results[1481] = 0x02488c7760912aa7 +results[1482] = 0x093485e98a21f0ea +results[1483] = 0x66e9b8150cd512a8 +results[1484] = 0x2da4f265740fe6f5 +results[1485] = 0x404e7ea1034ea76b +results[1486] = 0xa10acb109bf3a402 +results[1487] = 0xffe94cb8b9d8ed1b +results[1488] = 0x0c2ebe2e3f593577 +results[1489] = 0x1e628c54ef82e589 +results[1490] = 0x4de90a08ae615903 +results[1491] = 0x1b56a9c4b4a3dd23 +results[1492] = 0xa4ae9446db8009d7 +results[1493] = 0xbdcf1f54393ade4b +results[1494] = 0xebb2f919a6cbc508 +results[1495] = 0x546ec87cc6ff1192 +results[1496] = 0x1ab9a34dc6855f3e +results[1497] = 0x587a18973179e128 +results[1498] = 0x5d8eb95d63b14beb +results[1499] = 0x3bc355dcc906a326 +results[1500] = 0x538f0dafbdb3f284 +results[1501] = 0x0aef3e1cbccc6182 +results[1502] = 0xa13448f8307bc797 +results[1503] = 0xbd83608e10ce9800 +results[1504] = 0x0f2bdc8f51ae708e +results[1505] = 0x7709befc7d41f847 +results[1506] = 0x4c5d86af3b299ddd +results[1507] = 0xce7e4a961f6c3d4d +results[1508] = 0xbf153b956a01f532 +results[1509] = 0x75d3319e0105ce99 +results[1510] = 0x398354073ae92fff +results[1511] = 0xd2327dc716687417 +results[1512] = 0x653ced8fe17f8a2f +results[1513] = 0xf25be6af920a02f4 +results[1514] = 0xf0754494c5dd7735 +results[1515] = 0x8e9d75c1131a89df +results[1516] = 0x99d0256c98685040 +results[1517] = 0xa09d10790ceb85a6 +results[1518] = 0xbe9bc234c7ad87b4 +results[1519] = 0x2e7ac2a80655a734 +results[1520] = 0x1a2a2b2512901e05 +results[1521] = 0x643096d9b8b2a62d +results[1522] = 0xded1086c26ae6adb +results[1523] = 0x14a0fc5b46d0355e +results[1524] = 0x87cd274b8c8dc4ba +results[1525] = 0x64f4bbb7f95e4fdc +results[1526] = 0xab2322a615f4b78b +results[1527] = 0x4b9cb9f3532227c6 +results[1528] = 0xd7bba0c34fe790d0 +results[1529] = 0x4c065e506330cdbf +results[1530] = 0x2d996cd49bca7572 +results[1531] = 0x8cde530704b81e8e +results[1532] = 0x0859e9778f905f21 +results[1533] = 0x49ce106350c62b93 +results[1534] = 0x5d8a1144d908daf1 +results[1535] = 0xbf840645fcbd1f6d +results[1536] = 0x22440ee131e200a9 +results[1537] = 0x90043142b600fbe2 +results[1538] = 0x7f529560f43c255e +results[1539] = 0xdab0699376cf1c62 +results[1540] = 0x2b4ddc0509f567a4 +results[1541] = 0x16032903eadc2fbd +results[1542] = 0x73295f8246e133c9 +results[1543] = 0x27efa279c8b66c78 +results[1544] = 0x7ffe0045e2c651e2 +results[1545] = 0x4c1afc7e8d792c27 +results[1546] = 0x027f8347ce0e8a0b +results[1547] = 0x4a15f8e5fa8655f4 +results[1548] = 0x8e493154285b5ea6 +results[1549] = 0xdc461451dbb839aa +results[1550] = 0x08d4203032be8584 +results[1551] = 0xd90a889b3a2d8db7 +results[1552] = 0x7076c1ccc2f2c5ab +results[1553] = 0x1b89ffd0864fcb13 +results[1554] = 0x28cdf99b36e7716d +results[1555] = 0xa4e1f1af42c31724 +results[1556] = 0x633c17a61f8fa8ac +results[1557] = 0xd57e0f5c94966582 +results[1558] = 0x2701df27eef31c6b +results[1559] = 0x8152f1b084be994b +results[1560] = 0x7498f90f600970ff +results[1561] = 0xdd76e18fc6cf278f +results[1562] = 0xa0b137207a1281ac +results[1563] = 0x003ace8de60d3a4d +results[1564] = 0x9bda23f87858effb +results[1565] = 0x987ab04e8aa8777e +results[1566] = 0xdb290dafe7e015fe +results[1567] = 0xf96cde331161b173 +results[1568] = 0xc609fdc7690e85d9 +results[1569] = 0xd9f72f41b4f0c319 +results[1570] = 0xbbbb4fe59912c031 +results[1571] = 0x51bf919f48de54e7 +results[1572] = 0xeedacea7905de7ca +results[1573] = 0xd6de3db0de488e21 +results[1574] = 0xf40222f233fc8feb +results[1575] = 0xd8919beec00ba53d +results[1576] = 0x7a2d5f1a1fe75414 +results[1577] = 0xc4ee9cfe7449bcf1 +results[1578] = 0xcb41d96540f13246 +results[1579] = 0xe2d7207185f593f6 +results[1580] = 0x8b8be46ea3de04ca +results[1581] = 0x5cbfe339d79bccd1 +results[1582] = 0x6bc975ba3d247bb4 +results[1583] = 0xcc81852679d6cc57 +results[1584] = 0xca785a584535ec84 +results[1585] = 0x39dda891edf64ef0 +results[1586] = 0x27557488237cb6f4 +results[1587] = 0x908788dfe5bc49e5 +results[1588] = 0x1c25fe97dfe8cf64 +results[1589] = 0xfdb85a2938d2455e +results[1590] = 0xc903cd198745434e +results[1591] = 0x0b6d3990bd3e299f +results[1592] = 0xb4b769c7e1a5d409 +results[1593] = 0xf65e01be7058193f +results[1594] = 0x9dfaf608128ed1db +results[1595] = 0xd9d0745997975309 +results[1596] = 0x0f9058286cc47d6b +results[1597] = 0xf3a73ac0db63ccc6 +results[1598] = 0xfe74a011cec5242f +results[1599] = 0x27ea4fe604576ae8 +results[1600] = 0x664527ceab244aa4 +results[1601] = 0x962101f0a27657e6 +results[1602] = 0xaa0ae5e2dace1d8d +results[1603] = 0x8678a9bcdc82681b +results[1604] = 0x4dd767d9c620404c +results[1605] = 0xb51f23f584387f61 +results[1606] = 0xdb8fb6971573ebd6 +results[1607] = 0xffef29c32289f139 +results[1608] = 0xc3bffcf7f8b0adcd +results[1609] = 0x17a3577de2b203fc +results[1610] = 0x73e9c3ae29f26fe6 +results[1611] = 0x7ab64b443582d979 +results[1612] = 0xd24fb131cdf4443d +results[1613] = 0x26142bbf1627f92b +results[1614] = 0xcb01b696aac6d4a6 +results[1615] = 0x40e456b791e29b10 +results[1616] = 0x3f1dbdf2566a1ec9 +results[1617] = 0xb9af73f043bddaec +results[1618] = 0xad4b423a5766162d +results[1619] = 0xc425e294a887236a +results[1620] = 0xd5c56cf153e0f0f1 +results[1621] = 0x621bfbdfc8b8f865 +results[1622] = 0x0840ae7bf6844337 +results[1623] = 0x6156f37ce132cabb +results[1624] = 0x77d96191060c1569 +results[1625] = 0x9e0c7f784e085abd +results[1626] = 0xa045d9de2c4258cb +results[1627] = 0x4a4e59576cfa16e1 +results[1628] = 0xa543865d0d73c2d8 +results[1629] = 0xf79fdaa78eeff86d +results[1630] = 0xc152c28122fd6cf0 +results[1631] = 0xfa5861acdf085d83 +results[1632] = 0x7ff0eb6238a2011e +results[1633] = 0x0153856a13a32ad6 +results[1634] = 0x6692cb3ef12debad +results[1635] = 0x1d26ac7bf4feee25 +results[1636] = 0x7e42b485f0759165 +results[1637] = 0x4d2d8388cd28a23e +results[1638] = 0xe872929429997a93 +results[1639] = 0xf7ff419ca71cc95f +results[1640] = 0xaf2561921d758bde +results[1641] = 0x95a203f6662b3b08 +results[1642] = 0x91d898efce30d02a +results[1643] = 0x0e83cabca36b4af9 +results[1644] = 0x1a794d1285d51f7a +results[1645] = 0xe9f41b508cf85c41 +results[1646] = 0x32613e63cc00000f +results[1647] = 0x7c9a3506bcd47584 +results[1648] = 0xefcb6781d49c78c4 +results[1649] = 0xea202acba1c66364 +results[1650] = 0x7ddb41017eeaa4ba +results[1651] = 0x8486aa1d90ac6ab6 +results[1652] = 0xeaa9b93abfa75faf +results[1653] = 0x45f71152359aa7fe +results[1654] = 0x593b647cba9f2821 +results[1655] = 0x62509296945f5a3f +results[1656] = 0xecc159dc175bfc44 +results[1657] = 0x5fb8c77235162aee +results[1658] = 0x49c0f98349f5a19a +results[1659] = 0x8701c47c0bef5fa6 +results[1660] = 0xebbeca75e70273bf +results[1661] = 0xcc12b79a2cf33811 +results[1662] = 0x0664a90c5d1927c4 +results[1663] = 0x6c055a632ae6939a +results[1664] = 0x15469962a56a06ce +results[1665] = 0x23d51521436520d5 +results[1666] = 0xbb89ceae441168cb +results[1667] = 0x47f77c8c729897f3 +results[1668] = 0x8e220259f966e36e +results[1669] = 0x58b3213a9d7a672f +results[1670] = 0x3cc2e230a4d531d2 +results[1671] = 0xee8785d4aca044c5 +results[1672] = 0x36c2408e6ff1a388 +results[1673] = 0xfcc301e17fa63eb1 +results[1674] = 0xf0c778f60ebea532 +results[1675] = 0x1c705be9b080cf79 +results[1676] = 0xd76e50d8d911a2c2 +results[1677] = 0x95cc42b3e70cfea3 +results[1678] = 0xc8153634e7d43d17 +results[1679] = 0x78800122a074a743 +results[1680] = 0xd4266214fe04752a +results[1681] = 0xbed798d983b8fc3e +results[1682] = 0xcaf849f29fc2bd64 +results[1683] = 0xfd47ef5e10c65fe1 +results[1684] = 0xadff116de75a824d +results[1685] = 0x184287540366de08 +results[1686] = 0xa334ef1c21fee60a +results[1687] = 0xe35f97707c0331f7 +results[1688] = 0x120e921705f64bde +results[1689] = 0xc5c40658c17511e6 +results[1690] = 0x03ddc3f98ac0f78c +results[1691] = 0xdad1d9484c1fe62b +results[1692] = 0x05b0760d358dce2d +results[1693] = 0x04065036688b76a8 +results[1694] = 0x9f08a88802bfd180 +results[1695] = 0xfb38d56e49b8b394 +results[1696] = 0x94ef0b297157b592 +results[1697] = 0x3970b1aa7533a0f7 +results[1698] = 0x5fcc025c84a437ea +results[1699] = 0x02c03109ca98b0cc +results[1700] = 0xc34f901df2e1fbfd +results[1701] = 0x9313f11906f49039 +results[1702] = 0xdbc69eb647aa598c +results[1703] = 0x86ebbae0a2c7162f +results[1704] = 0x9f36e22211dbe385 +results[1705] = 0x62e5f6b2da3b7a99 +results[1706] = 0xdd92970c3f38dfdd +results[1707] = 0x2ff425564048fd35 +results[1708] = 0xd32166dba8a4ad5e +results[1709] = 0x0a36aa53066f9f8c +results[1710] = 0xa65751b7a27f7ed9 +results[1711] = 0xe263b11488801eba +results[1712] = 0x276714a0acd5429e +results[1713] = 0xee8d96fbd1b2b181 +results[1714] = 0xdcaafea5cf317bef +results[1715] = 0xdee75eba7ce1e30a +results[1716] = 0x5f0c8d4f366d1ba9 +results[1717] = 0x4c175fb4390ec587 +results[1718] = 0x05caa9e58d18b9a1 +results[1719] = 0x44fceac4f699a582 +results[1720] = 0xfb6956d204e77b08 +results[1721] = 0x94c71bbc6d433c9e +results[1722] = 0x0a87dd54fd12b8f7 +results[1723] = 0x2b415b7349b9e75f +results[1724] = 0x70382540103078a9 +results[1725] = 0x3de66fc35aab155d +results[1726] = 0xa565d8b99aa4a71b +results[1727] = 0xef331d9476a5c7ab +results[1728] = 0x09bd526dcfa40854 +results[1729] = 0x61484a9c707c34b6 +results[1730] = 0x429900a59ce7bb45 +results[1731] = 0xc3b90e3c1b7f510a +results[1732] = 0x4009a045c684c870 +results[1733] = 0xdd60df703267b4d6 +results[1734] = 0x7ad7cdd761f9c371 +results[1735] = 0xfc9e121963b39793 +results[1736] = 0xf9a1794161c8d2c1 +results[1737] = 0x5cc634f010a2c381 +results[1738] = 0xf3814a1785ca5b7f +results[1739] = 0x4e662fd6a0c067f2 +results[1740] = 0x19f31e2cfcbdc34e +results[1741] = 0x82c940a2f6d53cbf +results[1742] = 0x6a7aefa8c3e589df +results[1743] = 0xa8f89d6976c29937 +results[1744] = 0x2e34d72ac2305a9f +results[1745] = 0x7da9973e0c8a6fd8 +results[1746] = 0x49e6b606690472ef +results[1747] = 0x2ec8fd4ce7ab2e12 +results[1748] = 0xdf752e833f5487ee +results[1749] = 0xc66911e4e441fd10 +results[1750] = 0x2123184a2ac33ebc +results[1751] = 0x129b47e292060004 +results[1752] = 0x86cffac2a4ae7165 +results[1753] = 0x346c15a2637180c3 +results[1754] = 0xb7b4b70da3cd884d +results[1755] = 0x3438fbc82792e5b6 +results[1756] = 0x546e00844af0ad7c +results[1757] = 0x9e9c61b839bf0f0e +results[1758] = 0x9a00c62bc74ec0f2 +results[1759] = 0x2066fd6541bb6391 +results[1760] = 0xb1b69de9c2b394a7 +results[1761] = 0x45a5ff77af9a4366 +results[1762] = 0x7b44827d5c79b615 +results[1763] = 0x689c30d7335d77a3 +results[1764] = 0x8c4686368c1086e7 +results[1765] = 0xe6859127d498d491 +results[1766] = 0x9b9650e7761023d6 +results[1767] = 0x7243389329d6ae6d +results[1768] = 0x8ed06c737b57a694 +results[1769] = 0xf33e7985acb369b1 +results[1770] = 0xff104e77d077aace +results[1771] = 0x2bba473e832515f6 +results[1772] = 0x036d00c9fbc9ab23 +results[1773] = 0x6042be8a4928818f +results[1774] = 0xaf99facf0ecfc17e +results[1775] = 0xdd19b742dd8b982e +results[1776] = 0xb13db2802561602e +results[1777] = 0x935532364a8e623e +results[1778] = 0x457dad4769454b22 +results[1779] = 0x300b189a107a2520 +results[1780] = 0x24604f0c2e68bf40 +results[1781] = 0x6ba0a5aea526d0df +results[1782] = 0xba07640c7963f9c2 +results[1783] = 0x70c19e557825ac63 +results[1784] = 0xf845a6ce47b5fba4 +results[1785] = 0x75eed3836447de06 +results[1786] = 0xeaa62088743122f5 +results[1787] = 0x163a56f623addf7f +results[1788] = 0x11637510bc216b70 +results[1789] = 0xf1fa58dfef5809f8 +results[1790] = 0x7b85ed25f8845efd +results[1791] = 0xa0696aa72a689ed6 +results[1792] = 0x3085c92efdad9bf2 +results[1793] = 0xf306588df44864df +results[1794] = 0x7863b25d5b2f3e6c +results[1795] = 0x486eac3922da3511 +results[1796] = 0x2a3f030d903071d2 +results[1797] = 0xcb04f43f4182b452 +results[1798] = 0xf1ee7daf38f1e1d5 +results[1799] = 0x52fd1fc41faf550d +results[1800] = 0x02b54b1450b6dddc +results[1801] = 0xabb7704b15367cc3 +results[1802] = 0x266a80a0a286c130 +results[1803] = 0xefc842588028041d +results[1804] = 0xa26182dcdfbd9afb +results[1805] = 0x03eb925aa9e5e537 +results[1806] = 0x7ae29e7d111bfaec +results[1807] = 0x33ffdbc86aea6083 +results[1808] = 0x8cc1f0a22b15b963 +results[1809] = 0xfc146aff4c1b8345 +results[1810] = 0x751b4ba8097a5217 +results[1811] = 0xa8da5e034c1cc7f5 +results[1812] = 0x1ce8263161228538 +results[1813] = 0xc3331b8dc27dc026 +results[1814] = 0xd821793cc1745d6e +results[1815] = 0x896c01d834b0462c +results[1816] = 0xd2d50861c93e9849 +results[1817] = 0xe790e199d0b68aaa +results[1818] = 0x6029f363fa687083 +results[1819] = 0x6eee8974b6bd8ecf +results[1820] = 0xaef6e98316f4b476 +results[1821] = 0x2cd808e9ec7acae3 +results[1822] = 0x8d519ff470a5d834 +results[1823] = 0xf2b8ce06e510cdd3 +results[1824] = 0x6efaa85d9e09e277 +results[1825] = 0xb2ee2167b2790790 +results[1826] = 0xaddc34dda96a1313 +results[1827] = 0xbfbf42626f4795b0 +results[1828] = 0x8020acb7a90f4b30 +results[1829] = 0x9e2f1606b5bef03c +results[1830] = 0x1f842dcfc900bfab +results[1831] = 0x8c0ba4027404a808 +results[1832] = 0x8c695c5a13bc6f7b +results[1833] = 0xe5c9824f682f9ddb +results[1834] = 0xfa7996feea081ad8 +results[1835] = 0x67a94b804424b05e +results[1836] = 0x6d0639e92992f533 +results[1837] = 0xe8df7ed15b4aa837 +results[1838] = 0x286d5e7902ec6040 +results[1839] = 0x379960cc853da926 +results[1840] = 0xef3988e88693682d +results[1841] = 0x118523b4ab71891b +results[1842] = 0x05eef21650934ef6 +results[1843] = 0xb8db73c1d4950c01 +results[1844] = 0x57acb3ae2c057d55 +results[1845] = 0x57abe3ac6755233b +results[1846] = 0x89b3e6cbef4784a8 +results[1847] = 0x60ae1b086f2879c3 +results[1848] = 0x4822c07dd3803f07 +results[1849] = 0xb03008acdbe04118 +results[1850] = 0xf113e9a11df1555a +results[1851] = 0x7bfbf5b70be2390c +results[1852] = 0x76f0468417ffa62f +results[1853] = 0x912e27e9312efd01 +results[1854] = 0xf02d0631648999cd +results[1855] = 0xb0cfea07ad04416d +results[1856] = 0xd0c5ceae1981c1df +results[1857] = 0x2c2c39e66f57f848 +results[1858] = 0x6a6513d8be72809f +results[1859] = 0x65c84111aa407475 +results[1860] = 0x8d907ced50d58d65 +results[1861] = 0x9f2f8b3f939864c3 +results[1862] = 0x74abb74a0f128108 +results[1863] = 0x3d1199cd2791ba61 +results[1864] = 0xc548392f3a0c7ec9 +results[1865] = 0x6ec47dabd52b8984 +results[1866] = 0xe77e48dc0f5f2a56 +results[1867] = 0xda6b253a7fc1c023 +results[1868] = 0x25fa66b2ee655ab8 +results[1869] = 0x70dbb2906033f23f +results[1870] = 0x775619ce839b68c9 +results[1871] = 0x66165173a89d1dad +results[1872] = 0x899f885ff745dd8a +results[1873] = 0xb90ab52a54405f27 +results[1874] = 0xa2b498eeca889e5e +results[1875] = 0xd55876937d810da2 +results[1876] = 0xd84c3bfd27a89fd8 +results[1877] = 0x438f25e0c5eab077 +results[1878] = 0x779c3cf253416e0a +results[1879] = 0xf196eff6b5c4d666 +results[1880] = 0xd3e25b5f66b39fba +results[1881] = 0x4b7b7f07b4fe0a76 +results[1882] = 0xe0c0afca0a32b099 +results[1883] = 0x81cd598c149eb442 +results[1884] = 0xfc00adbbef4749eb +results[1885] = 0x98acdbf3d24e1aa2 +results[1886] = 0x37d07e9388c8d9b1 +results[1887] = 0x84c79ba73626d560 +results[1888] = 0x1e8d0e026965262c +results[1889] = 0xeb8e249e18e67354 +results[1890] = 0xf933736f84e6cfd5 +results[1891] = 0x0b5d211ced3aef2a +results[1892] = 0x1c123d9ba3a96d64 +results[1893] = 0x4aeb5f3bf7a84ae3 +results[1894] = 0x4bdd2ed31fd26833 +results[1895] = 0xa6d58b8ba712ef61 +results[1896] = 0x655c0a883ee255d2 +results[1897] = 0x5089e2fa31c8ae5b +results[1898] = 0x2d5d59d16602efb9 +results[1899] = 0xac10e5385b9fb761 +results[1900] = 0xde45ba61b1942691 +results[1901] = 0x0e02613bfa429130 +results[1902] = 0x0c20e891d0d67b00 +results[1903] = 0xde7623c3fe56e6cf +results[1904] = 0x828bada27cbb7152 +results[1905] = 0xa521ef0a43a703b4 +results[1906] = 0x0eda26b2d15b5394 +results[1907] = 0xf0d415512745ef8e +results[1908] = 0x7662b38d97b1af1f +results[1909] = 0xd1b9755560bb5f82 +results[1910] = 0x7658341b7d0a5b2b +results[1911] = 0x8fecfd22a894e960 +results[1912] = 0x3ad6f7b172fb25ce +results[1913] = 0x552191cadac1e2be +results[1914] = 0x3dee2c7992a0eed8 +results[1915] = 0x956df868511e8124 +results[1916] = 0x18fc4de9a886c157 +results[1917] = 0x4af452cef11779cc +results[1918] = 0x4bf773aef2381192 +results[1919] = 0x384898a0437be075 +results[1920] = 0x390315e826f93e5a +results[1921] = 0xed513a96e529f237 +results[1922] = 0x18211b901468234e +results[1923] = 0xf7e021db030736ae +results[1924] = 0x95ceb03ac5d10050 +results[1925] = 0x1b32781f4a0ed9e4 +results[1926] = 0xba7bb931543f7a59 +results[1927] = 0xb51c432ef1c4c342 +results[1928] = 0x58c88c7ba516cbe6 +results[1929] = 0x5b56d79d1b47e1d4 +results[1930] = 0xb53d10c02d0e9d5f +results[1931] = 0xd5b9d3467b73c99e +results[1932] = 0xe928555a2070b426 +results[1933] = 0xdc1ea980e4c2733c +results[1934] = 0x1a40567279ae77f2 +results[1935] = 0xe8059b1569b154d5 +results[1936] = 0x8eef483253ceffbe +results[1937] = 0xbfe2ccf34c1d0f75 +results[1938] = 0xd0fdfe7183c26854 +results[1939] = 0xdc5d9b179d1460ef +results[1940] = 0x6a5a67009c39d3b3 +results[1941] = 0x26bfd29a050e7f51 +results[1942] = 0xf83de1e6bcee2357 +results[1943] = 0xf0a0ca897685ec7c +results[1944] = 0xf8c53690e2aa3d15 +results[1945] = 0x85f1f5d38724ea86 +results[1946] = 0x6b323498e2683b54 +results[1947] = 0x570a78c41ed7de88 +results[1948] = 0xcd11c151444b75d1 +results[1949] = 0x8adcbf3cf7303988 +results[1950] = 0x9de047ffec283412 +results[1951] = 0x91e8edd650d066e3 +results[1952] = 0xe67303e2026bc6e2 +results[1953] = 0xb305e07119d6eeae +results[1954] = 0xbabc57d62af6b853 +results[1955] = 0x4ca44f2d115d1ce3 +results[1956] = 0xcd9dd312533cc48d +results[1957] = 0xeee2f1d8a31ca11f +results[1958] = 0xfeb6616ae972f5a7 +results[1959] = 0x116ed5a98c56b8c9 +results[1960] = 0x2527eab335af3ca1 +results[1961] = 0xf8d8d2680efd4768 +results[1962] = 0x2d97a5cdc193d827 +results[1963] = 0x7d17ca541a511bba +results[1964] = 0xf67f111e2d2f31f3 +results[1965] = 0xe3e9f16a8b16c598 +results[1966] = 0xf73ccc350aab78ad +results[1967] = 0x77c63de4cd36c47a +results[1968] = 0xe4b43368939f91f3 +results[1969] = 0x8e25872c90870507 +results[1970] = 0x3e24bd15433777af +results[1971] = 0xe5eebbd15e443b93 +results[1972] = 0xbf9438b14638456f +results[1973] = 0x7019121abcfe3a6b +results[1974] = 0x77c43369e4e2c6f8 +results[1975] = 0xeb86d92b78b975f3 +results[1976] = 0xb32883710def52f8 +results[1977] = 0xabb22641a7eb3f1b +results[1978] = 0xc5e61bf2c55fd3a8 +results[1979] = 0x6253339169426bdc +results[1980] = 0x2f0049caa30616a4 +results[1981] = 0xdadaac045f3265e9 +results[1982] = 0x5a5c94c3df493fd1 +results[1983] = 0x0c4d9113e1929c1d +results[1984] = 0xd86884d43193f257 +results[1985] = 0x617cf200497dab89 +results[1986] = 0x0ef08fcf251dfc3f +results[1987] = 0xce8048c472f90707 +results[1988] = 0xae7510726542d5c3 +results[1989] = 0xdb827e99c2b7a6ac +results[1990] = 0x2d6bf371d4bdf75d +results[1991] = 0x78a7b3a0d34238b5 +results[1992] = 0x2f05365093f90e4e +results[1993] = 0x3e657355fa6927fa +results[1994] = 0xb626376136de61ae +results[1995] = 0x18c3d32c662d5035 +results[1996] = 0x62b033984b93e7c0 +results[1997] = 0x79a7fbfc6eeacf5d +results[1998] = 0x08fd9e6f0014f8cc +results[1999] = 0x773aa1f17c0849a3 +results[2000] = 0xbb1eeef7a01899e4 +results[2001] = 0xbe897c53a337ba8b +results[2002] = 0xe95d81be52971fb0 +results[2003] = 0x363dd31364f96c7c +results[2004] = 0x48195322a6ec7254 +results[2005] = 0x68eb55bd670fbebe +results[2006] = 0x57a8ccbc94d9c668 +results[2007] = 0x536e6b5a6ba2f04e +results[2008] = 0x2901d73c01e65791 +results[2009] = 0xcbd022934482ff6b +results[2010] = 0x3540a7662846b79e +results[2011] = 0x22e0e2ee4312f34a +results[2012] = 0xed453dbb56002241 +results[2013] = 0x1a5f3001c8390c7e +results[2014] = 0x8dfed07a3b776f21 +results[2015] = 0xf484974aa4f13d01 +results[2016] = 0x3cfdef35f643215d +results[2017] = 0x84028b8025755cc9 +results[2018] = 0xb602418470e69f9c +results[2019] = 0x643a33af3f788d80 +results[2020] = 0x6adfe66b483654e6 +results[2021] = 0x22581a905cda1b0f +results[2022] = 0x15fa4c53ba4c33cf +results[2023] = 0x0db467bd5b9c60ab +results[2024] = 0x14504c70f8280541 +results[2025] = 0xf23c7d7b38837ae7 +results[2026] = 0x8db642834495dc6f +results[2027] = 0xbade6eb91296c39b +results[2028] = 0xca8a1da2a786d2b7 +results[2029] = 0x2fff7f007697be34 +results[2030] = 0x9f890b63e9446fc0 +results[2031] = 0x116fba0e191a503d +results[2032] = 0xd11979b9fe070516 +results[2033] = 0x9d3c63494604c4c2 +results[2034] = 0x130b07cfe80cfbca +results[2035] = 0xa3b009cbd0113bc1 +results[2036] = 0xc1b726766ab6a2c4 +results[2037] = 0xa043c78e001a040a +results[2038] = 0x5522206db8b43b10 +results[2039] = 0x3ea6f9f42278c415 +results[2040] = 0xe6a013aabf017b42 +results[2041] = 0x5e2437eb77e4b38d +results[2042] = 0x6389e990e4d78774 +results[2043] = 0x140af61046e8cac1 +results[2044] = 0xbdfef7442f66010d +results[2045] = 0xb02803f149384ffd +results[2046] = 0x0126a8848735a6e0 +results[2047] = 0xbb4e873e9720984f +results[2048] = 0x84267bd6925f03d9 +results[2049] = 0xe389ab98a4ca7ad0 +results[2050] = 0xb1acd053d9cfeab1 +results[2051] = 0xd2595eb029f6bc0e +results[2052] = 0x66822b120dd3652d +results[2053] = 0x045558ea5168ec34 +results[2054] = 0xab0ef0230414679b +results[2055] = 0x04fbab640f0f56f8 +results[2056] = 0xd3b82f6c883e404d +results[2057] = 0xeb2c8918ee01f66c +results[2058] = 0xd9c60f12930c9835 +results[2059] = 0x87a4c4fef022f696 +results[2060] = 0x2a8ce54ca846e392 +results[2061] = 0x389097a6a02648bf +results[2062] = 0xd0c729da3b4a41f6 +results[2063] = 0x0feb496c13493e4a +results[2064] = 0xa98dfe6576c0a97d +results[2065] = 0x0f31a9057887fe3c +results[2066] = 0x3d02ee42fde5ca48 +results[2067] = 0x406cca1764ee3bdd +results[2068] = 0x4d8e6738da49644d +results[2069] = 0x3ada253f053ab2ec +results[2070] = 0xa41e74117ccaad44 +results[2071] = 0x01d4a3b9ccabb1d0 +results[2072] = 0x8381830b92003193 +results[2073] = 0x94820ed581d162c9 +results[2074] = 0x29ab178f2a26837a +results[2075] = 0xa61300358802e3d3 +results[2076] = 0xccf4665bf7814fbe +results[2077] = 0xd8fce59e0a8e8a75 +results[2078] = 0xd031d0bfc381aac2 +results[2079] = 0x785a2a60ae8ed685 +results[2080] = 0x8e0a6e94bb0611bc +results[2081] = 0x707911d2d90c4bfa +results[2082] = 0xa3909059d05c84b9 +results[2083] = 0x3d744671b856491c +results[2084] = 0xe15946abfbeaea93 +results[2085] = 0xcc94e73772c18761 +results[2086] = 0xcd4bb43ddada1c48 +results[2087] = 0xba8d9a8617a67aed +results[2088] = 0xacef3e059757a78e +results[2089] = 0xa06fe0efc1300b0b +results[2090] = 0xb4111dba8fb70ef5 +results[2091] = 0x23e70fbfa27bba60 +results[2092] = 0x6d8a5efac6277d2d +results[2093] = 0x49592bec080d5581 +results[2094] = 0x1b8c52cb314a83c3 +results[2095] = 0xaa9811ecce372fec +results[2096] = 0xc1e6ad01314f46cd +results[2097] = 0xb74e364c9fbbde69 +results[2098] = 0x164915531fdae5d9 +results[2099] = 0x46e86b1dc8966557 +results[2100] = 0x2d711ce19372cbb7 +results[2101] = 0xe93135a9ec643f87 +results[2102] = 0x789595357ac1043e +results[2103] = 0x8e08fd8344483f03 +results[2104] = 0xf288c959b80310f9 +results[2105] = 0x8fd98094740159f4 +results[2106] = 0x171a89b32caf786d +results[2107] = 0x349b8dedd2cc6214 +results[2108] = 0x81c9d042f15a4829 +results[2109] = 0x853d9b9df758a5ae +results[2110] = 0x75f41fbe4d3d063d +results[2111] = 0xebea8a3655e568de +results[2112] = 0xe2117a16e08c99c0 +results[2113] = 0xff5bd7040901fcc4 +results[2114] = 0x8e49b44a66471280 +results[2115] = 0x5447f944376e24fb +results[2116] = 0x4d872aaa6502d90f +results[2117] = 0x38cfd29c3056db33 +results[2118] = 0x79a69482f16504b3 +results[2119] = 0x867ff918fb9d3c5d +results[2120] = 0x0768f3c1909a4796 +results[2121] = 0x9985168e88f857e1 +results[2122] = 0xede097ea7119ac29 +results[2123] = 0x80ec4faf9115efcc +results[2124] = 0x7fb68a8ef042a3fa +results[2125] = 0xfa89fa769aaa5d19 +results[2126] = 0x330bc94e7dc21d77 +results[2127] = 0x43dd17f7b491ee1c +results[2128] = 0x39568535d7044527 +results[2129] = 0xa127ae04880677a0 +results[2130] = 0x667927cc44a5ae64 +results[2131] = 0x082fc058cc4ad877 +results[2132] = 0x45e5ece711d48ec3 +results[2133] = 0xc2df67a30e439076 +results[2134] = 0x9ce992f1558929fe +results[2135] = 0x603f0ab712c17cfd +results[2136] = 0x3489320811970bf0 +results[2137] = 0x73aa7cdf0e605cfb +results[2138] = 0xe88e2e4c8c19723d +results[2139] = 0x69d0db44c6eabdfc +results[2140] = 0xdcafd7ac594bc753 +results[2141] = 0xb82a0f0acb77c90e +results[2142] = 0xd448235c5aecf588 +results[2143] = 0x317f5c40876df187 +results[2144] = 0x87ba4469f9f7f59a +results[2145] = 0x68993801531c934f +results[2146] = 0xb535abc20b78ceb0 +results[2147] = 0xe268d75fa1d9839d +results[2148] = 0xe53473dc225de626 +results[2149] = 0x44170835ece22a6c +results[2150] = 0xe0f6b6b3ef9664a4 +results[2151] = 0xf2f886c7303bc92f +results[2152] = 0x503d2b6372bcbfa0 +results[2153] = 0xbdc655fd9945ec28 +results[2154] = 0x151e8424b72e58f2 +results[2155] = 0x094a05fba361194a +results[2156] = 0x58d56f452862c61f +results[2157] = 0xe3f8fcd4db4bb303 +results[2158] = 0x984fbfba3d1fc913 +results[2159] = 0x2b21c512c9dbb00e +results[2160] = 0x0da07bb5f5596f6d +results[2161] = 0x42f7460c53440aa3 +results[2162] = 0x2f18eef13f101760 +results[2163] = 0xd54fcf1cb3ef00f9 +results[2164] = 0x6a79ff183d826af4 +results[2165] = 0xedb43a19e98736d2 +results[2166] = 0x86af5d856d92ecb4 +results[2167] = 0x9031d9402ffaae7a +results[2168] = 0x70258d8549bd5ffa +results[2169] = 0xca66827462c8f9f2 +results[2170] = 0x4b0602b8691f0146 +results[2171] = 0x7c579690768b6b39 +results[2172] = 0x4bbaac5707ebe43f +results[2173] = 0x26286706b548b424 +results[2174] = 0xb275c1bc1962f43f +results[2175] = 0xbf34cc229c18f25f +results[2176] = 0x57902dce620f2b38 +results[2177] = 0x7c4b0b7bc0434662 +results[2178] = 0xeab95dd4fed8ca14 +results[2179] = 0x25919e26d8fec6fa +results[2180] = 0x7f24b973da3e948c +results[2181] = 0x736fe9ab0db69183 +results[2182] = 0x5cc699c4dab6ab52 +results[2183] = 0x1106bc3e48ff9a64 +results[2184] = 0x42e8fe94635cfc34 +results[2185] = 0x803f35f81463c323 +results[2186] = 0x6a7ebe1ffabc97fd +results[2187] = 0xa86592729a7f8786 +results[2188] = 0xfa9c59f26a2684be +results[2189] = 0xcf3f0e492ee9b8d9 +results[2190] = 0x09903513ab3aa213 +results[2191] = 0x9fa067f28be856f4 +results[2192] = 0xea521d44c533f388 +results[2193] = 0x59efd89762a36bed +results[2194] = 0x772b8f57e7ee5fc2 +results[2195] = 0xf13e2211a1994e5c +results[2196] = 0x4b9172d03753604c +results[2197] = 0xb86fcb47d0379b75 +results[2198] = 0x2882975b3994d5b2 +results[2199] = 0x6b3a86cb139818b4 +results[2200] = 0x193c67b661caf7be +results[2201] = 0x2b7664aa3949bb63 +results[2202] = 0xdfb823adac92c9f0 +results[2203] = 0x5fe3d5696f5d1d06 +results[2204] = 0x5b09aee970ef54a2 +results[2205] = 0x6a892bf3c156a8cf +results[2206] = 0x30a217c79f8b3092 +results[2207] = 0x381e12606a53d873 +results[2208] = 0xae9d95c0ef2f0bec +results[2209] = 0x44231b948969a513 +results[2210] = 0x699761660a19bd11 +results[2211] = 0x50c5741a3330d598 +results[2212] = 0xa7f6cbd9366db64b +results[2213] = 0x3d62a63a1cf40726 +results[2214] = 0x58bb42ace651570d +results[2215] = 0x8d54f2c3da6f42e9 +results[2216] = 0xb8fd930a823a2393 +results[2217] = 0x36b1bddf1087fc26 +results[2218] = 0x4df7058f693ebb9b +results[2219] = 0xcf78fd9142733355 +results[2220] = 0x6a145be299affaf3 +results[2221] = 0x867341079e922c9f +results[2222] = 0xcd5a70a3801ef393 +results[2223] = 0x32fad828cc3d9203 +results[2224] = 0x119c1cba13836a6a +results[2225] = 0xeb850113fd2eb4f9 +results[2226] = 0xf55b6aa751618974 +results[2227] = 0x802d134070385ef5 +results[2228] = 0x65609745effd7e8f +results[2229] = 0xb5a961d924aae1da +results[2230] = 0x70aca2797745e081 +results[2231] = 0x10fb79c47b86920c +results[2232] = 0x37fa3b35c2d23f25 +results[2233] = 0xafa4ebdc745a5b4c +results[2234] = 0x9fec9d336c290cb7 +results[2235] = 0x9e39f715e8d13e73 +results[2236] = 0xdca4f3bf3f79b293 +results[2237] = 0x87187bb57ea4120b +results[2238] = 0xbc22174f2b381bc7 +results[2239] = 0x8df2ad5627e299e6 +results[2240] = 0xc9a3da8464f308e3 +results[2241] = 0x39d356956f870e1f +results[2242] = 0xa3418b6e63f10267 +results[2243] = 0xc2c74ad274040e38 +results[2244] = 0xd69aae1d01175fa6 +results[2245] = 0x8363560c35fc5925 +results[2246] = 0x87fee9361baf7eb9 +results[2247] = 0xb27d120eb26e0561 +results[2248] = 0xaf15f50f1dd88004 +results[2249] = 0x9c30e82708ae8df9 +results[2250] = 0x2f8d0d43c75d1e48 +results[2251] = 0xe608874ef5ebfcb5 +results[2252] = 0x8d14afd07615179e +results[2253] = 0x49c0734b95d25bfc +results[2254] = 0xfcb508fefe8a53e6 +results[2255] = 0x9f1dfa4eed5eb073 +results[2256] = 0x09877e46741587cb +results[2257] = 0x5795d19619e53dcf +results[2258] = 0x0f7362ac71d4d83b +results[2259] = 0x5e1502655d143dbc +results[2260] = 0xbb9ccce09766e55d +results[2261] = 0xa18f7f6b7805e5ca +results[2262] = 0xce5f0cea0d4082a4 +results[2263] = 0xb343518b55fe781e +results[2264] = 0x1da18b05db207e37 +results[2265] = 0x56ebf7da0d314ca2 +results[2266] = 0x230166f00a91bbd9 +results[2267] = 0xba190dcb8fd43f20 +results[2268] = 0x1a336a8ae5f4516c +results[2269] = 0xb2f65c7d74289e78 +results[2270] = 0x3e6240078b3d94c8 +results[2271] = 0x6d22d22f297aef75 +results[2272] = 0x33dd1da3d451e22f +results[2273] = 0xf2badaf0d31b54b5 +results[2274] = 0x4155d9e370b3a705 +results[2275] = 0xa3f0d1a16a3b1999 +results[2276] = 0xb36c45e1367c9828 +results[2277] = 0xe1fa3736e7ffa78b +results[2278] = 0x2e6e05df97562106 +results[2279] = 0xbf78545361b16140 +results[2280] = 0x0305dbdf0eef1169 +results[2281] = 0xaebef5e3cfa37c3c +results[2282] = 0x2c2fc1f908f8ab01 +results[2283] = 0xba783c58dc7b389b +results[2284] = 0x6b9761348bf5a927 +results[2285] = 0x20929094e199cffb +results[2286] = 0x59c64dd97b1fc8bd +results[2287] = 0x7b31818b621a3269 +results[2288] = 0x4da70d6d37398692 +results[2289] = 0x82931a0b2c4dfd67 +results[2290] = 0x71d0bf084a6acab1 +results[2291] = 0x4fd47b030bf9b12e +results[2292] = 0x87713d19e4362021 +results[2293] = 0x2fe9194dc2bc93d9 +results[2294] = 0xd48b1f662abf5a9a +results[2295] = 0x7652b84bbd2e55e7 +results[2296] = 0x24534a1aa7a27cdb +results[2297] = 0xd51439ae20cd8cd6 +results[2298] = 0x7b677a80d54da625 +results[2299] = 0xbd417791b0c3af7f +results[2300] = 0x68568ab738115ed2 +results[2301] = 0xc71b710e27053ff6 +results[2302] = 0x529137cdba619af0 +results[2303] = 0x9c76566a78dd6a35 +results[2304] = 0x2c6b0579dcb35f80 +results[2305] = 0x393fc177467b775a +results[2306] = 0x91295a94fc2d5597 +results[2307] = 0x8689bcb5e79afb61 +results[2308] = 0xd94335b712211e65 +results[2309] = 0x00a7fd1c17f0faa3 +results[2310] = 0xcd5fbffaf47aec3b +results[2311] = 0x80253f78be5dc014 +results[2312] = 0x65792d8833db2a35 +results[2313] = 0x90c3a0ad506bd3bc +results[2314] = 0x1737442a3a82bd79 +results[2315] = 0x23115359e8c2c44f +results[2316] = 0xea48ac99aea3dd87 +results[2317] = 0xec56cda15967b270 +results[2318] = 0x227e3c5e4697de7e +results[2319] = 0xf355dd4942d39bcf +results[2320] = 0xb95d9cfb630db861 +results[2321] = 0xcd9c3e68b7527ba7 +results[2322] = 0xd642ca085fea9817 +results[2323] = 0x0ff99597ae63ff43 +results[2324] = 0x0ad39f208be01da3 +results[2325] = 0x1276fc5eda061528 +results[2326] = 0x2563d958e45bd303 +results[2327] = 0x908e44f89f56ddcd +results[2328] = 0x9b32bbdfda93ced2 +results[2329] = 0xb62d0537ac39c256 +results[2330] = 0x562afe9dabe9ab99 +results[2331] = 0x840fc55f9a3fd0ba +results[2332] = 0xc399152b85a1be16 +results[2333] = 0x1e919ee137c5306f +results[2334] = 0x09b53e70eb5cf38a +results[2335] = 0x0773eb3ca9eab679 +results[2336] = 0xdf8b50754099eddf +results[2337] = 0x2a58617b39d6afe3 +results[2338] = 0x8340fe00a221bffc +results[2339] = 0x03d4397073236a1e +results[2340] = 0x337010d5666772f9 +results[2341] = 0x54317b322ff7959f +results[2342] = 0x0cc3c91c6e5026da +results[2343] = 0x5257fb42e9c4a5aa +results[2344] = 0xc1a2fc2d21223e14 +results[2345] = 0x5f136bc11cd4d080 +results[2346] = 0x5ecb9a54d4966d0d +results[2347] = 0x671f8d4033718efa +results[2348] = 0x8e809831ef7d553f +results[2349] = 0x25e69278053472c2 +results[2350] = 0x3dd23a82cdb3dcb1 +results[2351] = 0xfa104eabe633b3b0 +results[2352] = 0x244c63279a60d736 +results[2353] = 0x9c94b8488babb0bd +results[2354] = 0xdd8ee4263c36b9d9 +results[2355] = 0x8511d7346660de02 +results[2356] = 0x5130b004211b72f1 +results[2357] = 0x1482b951e07c5d17 +results[2358] = 0xa2094477eea4e5c6 +results[2359] = 0xc4ae54b134c6c20a +results[2360] = 0xc37ac80504d87717 +results[2361] = 0x6a7c0ad418bbb6bf +results[2362] = 0x046c7486cd5b4a57 +results[2363] = 0x57ab4ceb95757b71 +results[2364] = 0x1d3cb4fad634010b +results[2365] = 0x89cc4e5a0733d168 +results[2366] = 0x2a585575e2382bd6 +results[2367] = 0xe5737176156c128b +results[2368] = 0xfb715cb56f24d3f3 +results[2369] = 0xc08ce23aa6fddb5b +results[2370] = 0x2eb510622bab71de +results[2371] = 0x770864e24fa48457 +results[2372] = 0xc8a16b1fbe5b3d63 +results[2373] = 0x84176683818596f0 +results[2374] = 0x1426e0b2b2610c72 +results[2375] = 0x8cf01a4ed7f157af +results[2376] = 0xf21c89b8d3807cc3 +results[2377] = 0x2ee9deed22efe43b +results[2378] = 0x68c2ede2ef4318db +results[2379] = 0xd16a9d93a8606175 +results[2380] = 0xcf0879a2fd2ada8e +results[2381] = 0x6295d47b561f0492 +results[2382] = 0x0003fcd0166865b9 +results[2383] = 0x988b5967554ef067 +results[2384] = 0x5d12c72014dec9e2 +results[2385] = 0x6f8024dca214b40c +results[2386] = 0x6b103296946f0a8d +results[2387] = 0x4f3cac13f3543f84 +results[2388] = 0x23394172d37695aa +results[2389] = 0x3d4f21c5eb33024c +results[2390] = 0x5860d7fd36de63e1 +results[2391] = 0xe94acbf3525a355e +results[2392] = 0x7865e17b5f1315c3 +results[2393] = 0xe733931139bec5ce +results[2394] = 0x70bffdb41ae47ee3 +results[2395] = 0xd496b7abb41b90ae +results[2396] = 0x50e30e3c571d4375 +results[2397] = 0x2965cf6df0ce85e8 +results[2398] = 0xce9b13f1820af065 +results[2399] = 0xcc7359b113dfa735 +results[2400] = 0xdd4ac5afdce85dcb +results[2401] = 0x743dc230140e8bc2 +results[2402] = 0x17a05b0be5b596b3 +results[2403] = 0x157e8d411d46becf +results[2404] = 0xbfdf08b7360226af +results[2405] = 0x4605420afc9e6b8b +results[2406] = 0xbd8d3909fc846932 +results[2407] = 0xf5100a1729e2229b +results[2408] = 0xf100c964cbb33533 +results[2409] = 0x5009cd4a3ba9b5d2 +results[2410] = 0xe4fa4e294b15feb1 +results[2411] = 0xc6061b4bb8ed7524 +results[2412] = 0x26cba9731aa64e99 +results[2413] = 0x20ec97926a77b5bc +results[2414] = 0x3fc2031974433475 +results[2415] = 0x7fefbb8a4b6e6093 +results[2416] = 0x6f80f8fe30186a1c +results[2417] = 0x03fc08f0d9cda850 +results[2418] = 0x4144237adeac30e9 +results[2419] = 0x40313bb187805fcb +results[2420] = 0x0bfd85716096bc55 +results[2421] = 0xe38a4fa8782df1a3 +results[2422] = 0xecb71cb8c249c66c +results[2423] = 0x3c833648158ee1b1 +results[2424] = 0x349d0321037e6bad +results[2425] = 0xf3510e9aa9672469 +results[2426] = 0x385658b1d4bda72d +results[2427] = 0x92f49e039d8286da +results[2428] = 0x46c13457c2ebded6 +results[2429] = 0x7e7b2a0dcbf9c805 +results[2430] = 0x192a1eb90d254d95 +results[2431] = 0x73562b6f82829243 +results[2432] = 0x2556074c2183f6b6 +results[2433] = 0x943dfd3b88f76e14 +results[2434] = 0x830e85d526a727c9 +results[2435] = 0xa8dc6ac57f4132f8 +results[2436] = 0xfd386994fe39c662 +results[2437] = 0x59f65399424b0c1d +results[2438] = 0x31ca3c9d29668f5d +results[2439] = 0x78c5020fd2efed2f +results[2440] = 0x635a91b578457611 +results[2441] = 0x67456a1a43662235 +results[2442] = 0xdf766f2a05775500 +results[2443] = 0xf079598a0a55e986 +results[2444] = 0xa0635cb014f5c750 +results[2445] = 0xc609af22bdc36247 +results[2446] = 0x9beb6e7860ea0aa3 +results[2447] = 0x6fde0e425c1eaa7a +results[2448] = 0x77b21b57e7d92cca +results[2449] = 0x2a3b36fc9ec137c8 +results[2450] = 0x9a1eb59e49ed0942 +results[2451] = 0x476b3c6a099078b2 +results[2452] = 0xd4b4c239c9adbd02 +results[2453] = 0x8ef09eaf35ef67a8 +results[2454] = 0x321ea61bc9432a71 +results[2455] = 0x7d515c8041eb294d +results[2456] = 0xabea2a1847d97abb +results[2457] = 0x4b0b52ba005d1cef +results[2458] = 0xebdc655df7cdb0ad +results[2459] = 0xf8bdabad8943eee7 +results[2460] = 0x92f75e44a3336aa0 +results[2461] = 0x4441b6263309452b +results[2462] = 0xf464ad0228fbab0a +results[2463] = 0x5cbc290e9a9c54f9 +results[2464] = 0x113ea3d28ce355e3 +results[2465] = 0xe6a604e19f344e3a +results[2466] = 0xcbd0ed8b17d99253 +results[2467] = 0x49b0f4568bfbd30d +results[2468] = 0x5fa3d5a8cb042691 +results[2469] = 0xc9b9fb9f35f6efc3 +results[2470] = 0x8ef14324099930a1 +results[2471] = 0x980059303c8a604e +results[2472] = 0x0cc7d661bf45327f +results[2473] = 0x2bcebef0f9a69fff +results[2474] = 0x6224c91136ea1216 +results[2475] = 0x1650f978c3481515 +results[2476] = 0x79c1a5ec0492937f +results[2477] = 0x300a875a9369353e +results[2478] = 0x0473f3619268870e +results[2479] = 0xbc795b69cc702c47 +results[2480] = 0x374cb4fb4d258dde +results[2481] = 0x4f4d5f608dd613d9 +results[2482] = 0x47194bfcae6053a0 +results[2483] = 0xcd2a30c6fd2ec159 +results[2484] = 0x390319b1c05c758d +results[2485] = 0xe29ec6fadd3cfb11 +results[2486] = 0xbf5b3e51c66915d4 +results[2487] = 0xea1c14cd26d0c357 +results[2488] = 0x08f77a5d60a64220 +results[2489] = 0x5d13b19d2bf5d018 +results[2490] = 0xa73d7fba1b904dae +results[2491] = 0x6d028bae028f05c8 +results[2492] = 0xb46cd3c3abafa42b +results[2493] = 0x6e7fa87ff98d47ba +results[2494] = 0x143b31b52e47921c +results[2495] = 0xb7880116fa392fed +results[2496] = 0x3ab2cbec4028482c +results[2497] = 0xbd9fb7b008483615 +results[2498] = 0x6193954205ab4d66 +results[2499] = 0xd4b0d24aa8674c12 +results[2500] = 0xc3954d6b3026c7b1 +results[2501] = 0x9dd7af5984b08cb8 +results[2502] = 0xab33f5ae19084368 +results[2503] = 0x09592aa1644d9070 +results[2504] = 0xd00da32fd1a71b4d +results[2505] = 0x3d0c4a2e688a68b5 +results[2506] = 0xba39d347d0370fb8 +results[2507] = 0x06a95902a5106621 +results[2508] = 0xe5816e778f82b27f +results[2509] = 0x290faf71f8eb1248 +results[2510] = 0x56ee797d1c65d2a7 +results[2511] = 0xc4ecc3dac37ba1c4 +results[2512] = 0x0a51d0e90b3621c3 +results[2513] = 0x9326ea39a9773727 +results[2514] = 0x371cf1ae1387046a +results[2515] = 0xc5961803afe9049e +results[2516] = 0xd3a9148ca07ad9b0 +results[2517] = 0x858870a4e66f56bc +results[2518] = 0x79f192dae98559f3 +results[2519] = 0xd4a6e23133081184 +results[2520] = 0xd1ab6714757679e2 +results[2521] = 0x5f86a98bf62ebe94 +results[2522] = 0x46c9e905a395c2b2 +results[2523] = 0xb8ec171c10f5b77d +results[2524] = 0x83d5a02ffb24503f +results[2525] = 0xabff665a166729d8 +results[2526] = 0x46b08e0707ce6033 +results[2527] = 0x56c9ce8f83daa616 +results[2528] = 0x8a8915c0f051c6cd +results[2529] = 0x8d3ff12b6d2c2bd2 +results[2530] = 0x36f1345c994803ce +results[2531] = 0x08291c87e5b57bea +results[2532] = 0xaaa2a5ffdafe8c95 +results[2533] = 0xd3eff61ecec8c266 +results[2534] = 0x5b164fdef7e93403 +results[2535] = 0x226871d530c96e2d +results[2536] = 0xcb5823054cf7a7a8 +results[2537] = 0x028e0c1939d09bd3 +results[2538] = 0x7a22866dbd067dca +results[2539] = 0xf800db74c0d1b6bc +results[2540] = 0x6672e194745405dd +results[2541] = 0xbaf485358c7e9842 +results[2542] = 0x47816f7241022dd4 +results[2543] = 0x21da7f45ef4415df +results[2544] = 0xc86fb7ee30ba08c3 +results[2545] = 0x8ae5a62855cc41da +results[2546] = 0x1fb071e744335783 +results[2547] = 0x2e62595678a9f6cd +results[2548] = 0x0c3c5649e37a8325 +results[2549] = 0xc7894af7d429aedb +results[2550] = 0xf699138a8b5bf604 +results[2551] = 0xf129049421f0364d +results[2552] = 0x8fa6738104075c51 +results[2553] = 0x1804a68877208a1b +results[2554] = 0x01fcf8b3ec6d78b0 +results[2555] = 0xd1376ece40c0a538 +results[2556] = 0xc09f34c96528d2a5 +results[2557] = 0x1f33e397811bd97f +results[2558] = 0x19708a5842a3dea2 +results[2559] = 0x3ed845dec18c6769 +results[2560] = 0x823d492cc1468eec +results[2561] = 0xb0b849ebcdc88487 +results[2562] = 0xe525a6a7db89c9c3 +results[2563] = 0xe2b1293b629d6297 +results[2564] = 0x947e73df1936ce70 +results[2565] = 0xac7d88858dc00a14 +results[2566] = 0x5625012690fc27d4 +results[2567] = 0x1fa246dfcada76fa +results[2568] = 0x3633601a8c066f8f +results[2569] = 0x7f06975d8a2a788f +results[2570] = 0xd743696c99477553 +results[2571] = 0x49ffe422c5da11cd +results[2572] = 0x67861e9dfeffb138 +results[2573] = 0x8da52347239bafd2 +results[2574] = 0xa05c485b89928427 +results[2575] = 0x9e15fc989fed6978 +results[2576] = 0x827c887b1ee62831 +results[2577] = 0x97cc5d42b316858a +results[2578] = 0xbbe0178153fad38c +results[2579] = 0xebb9bc3e070754da +results[2580] = 0xf754eb0f5c3f1b0c +results[2581] = 0xaa55bf36150c7452 +results[2582] = 0x5c3d921b841b1863 +results[2583] = 0x06a4af61f795c8fb +results[2584] = 0x55be5de065f98524 +results[2585] = 0xaea6b7eab7a33cc7 +results[2586] = 0xeeea754a89835be1 +results[2587] = 0x5d44f1ab12213299 +results[2588] = 0x0cebf3b2e2bc2eb8 +results[2589] = 0xc6dcb500e9e60d9e +results[2590] = 0x48b72e27815411e1 +results[2591] = 0x9ebb2a738b070539 +results[2592] = 0x69de0ad7e330389b +results[2593] = 0x87f24785a7db1cd6 +results[2594] = 0xcc6a1f01ce5f7d99 +results[2595] = 0x890d48a4887faf87 +results[2596] = 0x97519ce2a242bb16 +results[2597] = 0xc4f973ae6b614af1 +results[2598] = 0x0c55599764c0d197 +results[2599] = 0xff994ed78ae27e07 +results[2600] = 0x27d8a58a267199b9 +results[2601] = 0x3fad9086a45d2b5e +results[2602] = 0x40088d2d8eea515e +results[2603] = 0xe90878838bf8c82c +results[2604] = 0xca61af34d8945d7d +results[2605] = 0x3e7bfad3e4bedd87 +results[2606] = 0x33564d7968ef3c50 +results[2607] = 0x56a3430fdbbd2777 +results[2608] = 0x844ae326cca74766 +results[2609] = 0xa731682d9cd7ee99 +results[2610] = 0xe754a52a5c975e94 +results[2611] = 0x2adcc62b933433d2 +results[2612] = 0x5626e2a2478bf480 +results[2613] = 0x67e78773ede18266 +results[2614] = 0x1ed7dbc82bbd855a +results[2615] = 0x413fa5c671c38db3 +results[2616] = 0x951f59a8cb40e25a +results[2617] = 0xe8f230d9dd1425cd +results[2618] = 0xc52084340e322eda +results[2619] = 0x8d41b1b035feb23c +results[2620] = 0x3080b9f3855cf713 +results[2621] = 0x18e533995350d826 +results[2622] = 0x9dc7da4047ef690d +results[2623] = 0x3e8a4a69e83b2fce +results[2624] = 0x42998248205dd91c +results[2625] = 0x17e215e56c77f4f0 +results[2626] = 0xd1c0029a540e21a2 +results[2627] = 0x602c4f8c0e4ccc76 +results[2628] = 0x71e67eb23e263942 +results[2629] = 0xc49f3c7d89141ce8 +results[2630] = 0x0c21224f7f2c8a38 +results[2631] = 0xcf1ef5fa416c8fec +results[2632] = 0xb285901c80074365 +results[2633] = 0xe817144b7ae40389 +results[2634] = 0xeac97a810fdab253 +results[2635] = 0x4e53943dcbdb0fc6 +results[2636] = 0x0404e7e31f4eb270 +results[2637] = 0x5d3db09f03378292 +results[2638] = 0x066a6a5049324db6 +results[2639] = 0xe2f0cf95d27f37f0 +results[2640] = 0xb0bb1b48acb9f88c +results[2641] = 0x21e6e625bab2dba2 +results[2642] = 0xfdbe295ae39d815f +results[2643] = 0x7c2452bdf5532ad0 +results[2644] = 0x358c526b587acc7d +results[2645] = 0x062b6b725ba0d42b +results[2646] = 0x85b071da385dbe05 +results[2647] = 0xdfeefc52088ccd74 +results[2648] = 0x97deb48d1592fb9f +results[2649] = 0xc559c2a88b86b097 +results[2650] = 0xbd002cf580ce12d1 +results[2651] = 0x0528246225cfbf5a +results[2652] = 0xe0341d01f27d7169 +results[2653] = 0xe7498441202dbd26 +results[2654] = 0x87743bb5e7dfb04a +results[2655] = 0xf72c1f5838c9685f +results[2656] = 0x858499af23f168ec +results[2657] = 0x47c6b5a170f7d14e +results[2658] = 0x6e8eccd2df6de027 +results[2659] = 0x9331d6b909e29143 +results[2660] = 0x9e5ee849a2ab6855 +results[2661] = 0x86f2355f8d8294f9 +results[2662] = 0xc829d837d565f6ec +results[2663] = 0xdd4ce565dba351ae +results[2664] = 0x4ab1157885c6e11c +results[2665] = 0x4706575f568cf149 +results[2666] = 0x36c3b3e74caafcca +results[2667] = 0x587ad8d52223e7ec +results[2668] = 0xfc9f357bc8097942 +results[2669] = 0xacc1dbd1e86cce0e +results[2670] = 0x06825f53e88d4f48 +results[2671] = 0xe8a114b02da4f74f +results[2672] = 0xb91dc519da249e0f +results[2673] = 0xb06cff6455a7d007 +results[2674] = 0xfa56c20b894708e1 +results[2675] = 0xa1ecfac11bb061d9 +results[2676] = 0x54d022fa553f9c1a +results[2677] = 0x8adbc3f528e38eeb +results[2678] = 0x4319f4f1e19401e4 +results[2679] = 0x1bf3219fb106ba99 +results[2680] = 0xbff80d003c2fcd98 +results[2681] = 0xce613af4c8ac5296 +results[2682] = 0xb7f49a21354410b2 +results[2683] = 0x3052028ef03b4b48 +results[2684] = 0xd802be3127f6c074 +results[2685] = 0x99b7ad4223c0e2d3 +results[2686] = 0xf1709a85907e23eb +results[2687] = 0x55c6b0b399b8ed6d +results[2688] = 0x2419bd2afb6bcccd +results[2689] = 0xf230a3aa45c5bd88 +results[2690] = 0xba46441fce247c66 +results[2691] = 0x55585837a9bda0c9 +results[2692] = 0x7196e29207f63abd +results[2693] = 0x21fd21f6c3087a4c +results[2694] = 0x3bc434cb35ecf0c1 +results[2695] = 0xdafe5574c0f15532 +results[2696] = 0xe7239651ac39cfb7 +results[2697] = 0x96d331cee3683eb9 +results[2698] = 0xb62515efaa43dd13 +results[2699] = 0x7b28915f0d491224 +results[2700] = 0xcaf28669a12d0bbf +results[2701] = 0x19e1e6e0947b9e3a +results[2702] = 0x6a7103279e2489cb +results[2703] = 0xeaa4d89cc4ff5fbb +results[2704] = 0x15e72266c6ca3d55 +results[2705] = 0x49db3e3c2c23829d +results[2706] = 0x1db7b8e1770aeb4c +results[2707] = 0x4323b18b36162a09 +results[2708] = 0x72537ab535c12f3c +results[2709] = 0xbf1ac90fb52471e2 +results[2710] = 0xff5cb49ee94dcdc0 +results[2711] = 0xf855fc05b540a9f7 +results[2712] = 0x4cba455c6baa25bf +results[2713] = 0x9b1e36ad66f074d1 +results[2714] = 0xf47ea38f5acde30d +results[2715] = 0x2a1de77127513b48 +results[2716] = 0x52853c54e863177c +results[2717] = 0xd0265180a94544dc +results[2718] = 0xbbe4376e84741d65 +results[2719] = 0xb3a2ec487600526d +results[2720] = 0x591a9e28112dfeb4 +results[2721] = 0x72b1e4d6e2cba13e +results[2722] = 0xc3d250bc7d57b403 +results[2723] = 0x58b3f05882042030 +results[2724] = 0xc8a196dc0cc6812d +results[2725] = 0xd0cf65a5f3b856d9 +results[2726] = 0x71cd9984e7aba966 +results[2727] = 0xd485a02e17f92d5f +results[2728] = 0xd7b8831a52ac0928 +results[2729] = 0x33e7f23068f54bf1 +results[2730] = 0x61ffda43114dcc6a +results[2731] = 0x5e526d693b894983 +results[2732] = 0xf0e87bf551a88bc1 +results[2733] = 0xea1ddbeeda9064ff +results[2734] = 0x8be223884784580e +results[2735] = 0xba169a7b3f4bdae9 +results[2736] = 0x32cc73dbc47f92fa +results[2737] = 0x1075fa4bcb44a122 +results[2738] = 0x713bc2f91dad1727 +results[2739] = 0xe6968822f569c299 +results[2740] = 0x1934c2f27f8518ef +results[2741] = 0x8bed5ae53285c2df +results[2742] = 0x99d2bfba87cff8c8 +results[2743] = 0x7048f2f56e93fc52 +results[2744] = 0xfbccaabc9bf8266f +results[2745] = 0x8cb71cddf0b4a74a +results[2746] = 0x6278adcdd32ac6c5 +results[2747] = 0xb80d2c917a908037 +results[2748] = 0x0a3edcd4fe2c746e +results[2749] = 0x4cc22654fd63c269 +results[2750] = 0x6bf9f35b31914d14 +results[2751] = 0x23c80f02d6d26196 +results[2752] = 0x6e04091c54e54813 +results[2753] = 0x131f2ec6ffb21163 +results[2754] = 0x3b2cde7f94384792 +results[2755] = 0xc3ec596a83491b93 +results[2756] = 0xe42e056282abd4dc +results[2757] = 0x89a7e770fb433eb0 +results[2758] = 0x90a8c483ca2c9083 +results[2759] = 0x80ae0c4ac5e4c54d +results[2760] = 0xb37a287d1564feed +results[2761] = 0xab08f19b13124602 +results[2762] = 0xb9767ec9e8ad719f +results[2763] = 0xc1df9ada12c2a524 +results[2764] = 0x6329642b7273f476 +results[2765] = 0x3f362350bc4e088a +results[2766] = 0x2e8dfe8d910b851b +results[2767] = 0x5997ab5b18e709e7 +results[2768] = 0x535cc2eced2408af +results[2769] = 0xdaa379f76b1f5246 +results[2770] = 0xf57a08a0c2d95c4f +results[2771] = 0x89db32edb6ba4b86 +results[2772] = 0xd74a93e5fbc8dac9 +results[2773] = 0xcf569b3c07af8d5b +results[2774] = 0x92b5886e0464462a +results[2775] = 0xa8dff25815a8c4d4 +results[2776] = 0x3eb67bbb1db3e4cc +results[2777] = 0xb78e3fa1f0dbca05 +results[2778] = 0xa6fad64a9e784ccc +results[2779] = 0x9553a750df962019 +results[2780] = 0x7576829435038fa7 +results[2781] = 0x28674770748cf5d2 +results[2782] = 0xbd2454fb2ecfd17b +results[2783] = 0x48abe28e135817b3 +results[2784] = 0xd61afd1e467cb849 +results[2785] = 0x3db45d84676ed32c +results[2786] = 0xfc16412e35cd24d0 +results[2787] = 0x0f9570ddf1dc2c11 +results[2788] = 0xf3518333122b704b +results[2789] = 0x9ecc409c1fe93d23 +results[2790] = 0x544dbec3522f5cf5 +results[2791] = 0x378bd73966e0d138 +results[2792] = 0x95aa31b2208e5b14 +results[2793] = 0x614569b679f49095 +results[2794] = 0x6d0eb14d0bd27100 +results[2795] = 0xc71afc13e6074484 +results[2796] = 0x2d1c86e7d181c1d8 +results[2797] = 0x1c14299c2e53d794 +results[2798] = 0xb150e99d1f84cce2 +results[2799] = 0x05adc572da7159fd +results[2800] = 0x764b412149d392e4 +results[2801] = 0xf0c61257a3afade8 +results[2802] = 0x34e533ed18466a4f +results[2803] = 0xed5fbe43dbf04a6f +results[2804] = 0x11777c61e1c810cc +results[2805] = 0x55706b25b1094332 +results[2806] = 0xeaa4d37763e979fa +results[2807] = 0xf93772d2f04ef30b +results[2808] = 0xfda7bc25d1f513af +results[2809] = 0xc30cbf6170186ee0 +results[2810] = 0xcd645bb60105f958 +results[2811] = 0xdc1df14d6d6885c3 +results[2812] = 0xd13ce0218c95cf7f +results[2813] = 0xc83492ed43a0522e +results[2814] = 0x8be80d31dfa1e4a7 +results[2815] = 0x987459a1d3b0c486 +results[2816] = 0x5be9a39e6071d7d1 +results[2817] = 0x4c7a220a0d5a7b90 +results[2818] = 0x77a54a8467e008c1 +results[2819] = 0x1d9788da64a10620 +results[2820] = 0x929af65bec00edeb +results[2821] = 0x235f4c594186cd9d +results[2822] = 0x7e07f8168384ac6b +results[2823] = 0x85b6af57d96fd4da +results[2824] = 0xb5bd26e44aebdccb +results[2825] = 0x498d8b633c23b28a +results[2826] = 0x1ea04311240db933 +results[2827] = 0xb52de397dfa631e5 +results[2828] = 0x9a04583fe8ad43a1 +results[2829] = 0xfc04f4f9c806434c +results[2830] = 0x4a5004bd9b14febf +results[2831] = 0x78efaa4715f48ef4 +results[2832] = 0x981469d608d39f5d +results[2833] = 0x2e03ab1832180654 +results[2834] = 0x24f851b893975288 +results[2835] = 0x78ee7d6f0a8f4ac8 +results[2836] = 0xcaba4f2724501ef6 +results[2837] = 0x6f13e895b579d9da +results[2838] = 0x85e81e59c511be85 +results[2839] = 0xb8a35f20e3101734 +results[2840] = 0xff68a05d7ef7c22e +results[2841] = 0x4f95623a889bac9a +results[2842] = 0xdcc8ece823b3c439 +results[2843] = 0x9f6a16d123bfe461 +results[2844] = 0xcdce53b2213b5ec6 +results[2845] = 0x526340032c368535 +results[2846] = 0x3faf7fd1dc092aa1 +results[2847] = 0xfb1cc6f6c7c62901 +results[2848] = 0xdd418dc5e8fd25ca +results[2849] = 0xb2578fdf49cbd068 +results[2850] = 0x723ae4c334a3c2f6 +results[2851] = 0x5ff32b5b4e19e7f3 +results[2852] = 0xb11fc5c3de056fcd +results[2853] = 0x8346a55af2e0c286 +results[2854] = 0x62116375d40aeec6 +results[2855] = 0x3ee5b18b89581c60 +results[2856] = 0xd6e1d80de8d940ba +results[2857] = 0x9858bd68d89cc885 +results[2858] = 0xdad4b9a5c61f06e8 +results[2859] = 0xe0edae28d13adf66 +results[2860] = 0x172dd31873e46fa3 +results[2861] = 0x1c4940d802a8057e +results[2862] = 0x9ae3202d2c86dd97 +results[2863] = 0x33b9ee715f3ac2f0 +results[2864] = 0x3ed218d4fcefde99 +results[2865] = 0xb7e17a7755e63c2d +results[2866] = 0x9f30835c5c776dda +results[2867] = 0xec539f536f8296a7 +results[2868] = 0x0c0789c36639140f +results[2869] = 0xf43ae8da88fe65fd +results[2870] = 0x3846ea3c5aec2bdd +results[2871] = 0x5ea296d730930d02 +results[2872] = 0x99518bebd6d2540c +results[2873] = 0xcf38cddba889d3bf +results[2874] = 0x43159d7bec026083 +results[2875] = 0x1ccb430b87e27013 +results[2876] = 0xa77692e5f8a5a26a +results[2877] = 0x09b0c7e25df4a41f +results[2878] = 0x6dded2a0c8432fac +results[2879] = 0x614135534dbebb26 +results[2880] = 0x1aa31009472e879e +results[2881] = 0x90d2b8811f2ee1e9 +results[2882] = 0x097c12981d8f73e0 +results[2883] = 0xf79799be6231ee6b +results[2884] = 0xc005b8e24d300bfb +results[2885] = 0x7b0ae0eecd24d54b +results[2886] = 0x1ac8e65da1da844e +results[2887] = 0x640b6da4888ce9ba +results[2888] = 0x5e00b55020b1a00c +results[2889] = 0xa71e2fcdc79ccd0d +results[2890] = 0x0dabc3d4c5ccf331 +results[2891] = 0x01895c86aa304a14 +results[2892] = 0xe5d6b07f5916c97c +results[2893] = 0xd75c16374be83913 +results[2894] = 0x250700efff8ee6fa +results[2895] = 0xec21028c9f10260e +results[2896] = 0xe07581374d0c84ec +results[2897] = 0x1c1a5e230f109bf6 +results[2898] = 0x7da4821f600aeeca +results[2899] = 0x3122a8a5eda043ab +results[2900] = 0xe56efe91b28740c9 +results[2901] = 0x56d00f69b623191e +results[2902] = 0x52d3bfc79c8fd5a2 +results[2903] = 0x1bf30001d2ff9a1d +results[2904] = 0xe9333da4b4bbe7ea +results[2905] = 0x5c282a1b689b5672 +results[2906] = 0xc08726001436b9cc +results[2907] = 0x9afa0a5a91283345 +results[2908] = 0x71ce5b751729f11f +results[2909] = 0x6f01ce5038a51cca +results[2910] = 0xa4029930075f29d8 +results[2911] = 0x8974218b7c762f8d +results[2912] = 0xb161e28bc72083ce +results[2913] = 0xc13a120651351017 +results[2914] = 0x7fec96c41f29a694 +results[2915] = 0x66c3866f476bd369 +results[2916] = 0x5dfca0d74af1f759 +results[2917] = 0x178ed0e1769c3309 +results[2918] = 0x7346c2ad6197f6fc +results[2919] = 0x46d5e4876e498761 +results[2920] = 0x8af75aeb7d104253 +results[2921] = 0x233b4ae17cf70f11 +results[2922] = 0x56ee9b5b4dea7a04 +results[2923] = 0x2db22c1f6392c725 +results[2924] = 0xecc7d34b03dc9e72 +results[2925] = 0x70cf87fd7c18ab13 +results[2926] = 0x723d652f1eb3b427 +results[2927] = 0x72bb9ec7c06a82c4 +results[2928] = 0xc428442962950e10 +results[2929] = 0x1ced6aa0a04c0f5f +results[2930] = 0x10bb7983076c5545 +results[2931] = 0x46b4fd6aa5a994bf +results[2932] = 0xbeb5d977479c9e7c +results[2933] = 0x3249f48210c90fc5 +results[2934] = 0xbaa8e1d03e634e13 +results[2935] = 0x44dfe8edf1bccfdb +results[2936] = 0x17b5132f23a25e8b +results[2937] = 0x7585251511a6426f +results[2938] = 0xb82d84cacd83bc6c +results[2939] = 0xbf5c0e6ec43af7ac +results[2940] = 0x23a92ebb68a83628 +results[2941] = 0x3057d5ab189183c5 +results[2942] = 0x1df76b7a18146aad +results[2943] = 0xfcde6ea25e2aa7c0 +results[2944] = 0xd41646287799afc6 +results[2945] = 0xcca0db8c5215dd4d +results[2946] = 0x1061afdf7871e7e7 +results[2947] = 0x054a5dead6836b99 +results[2948] = 0x33fa9228e6b30971 +results[2949] = 0x7756e261f06b62c6 +results[2950] = 0x9b782254cb8c2a24 +results[2951] = 0xf7a4b9cbe5576475 +results[2952] = 0x8ed208de40ba4c77 +results[2953] = 0x84d1000d01124210 +results[2954] = 0xca6b3b656fdfcabe +results[2955] = 0xd28c433d715064b7 +results[2956] = 0xa15642b10f861e83 +results[2957] = 0x9513c4022b3aa70f +results[2958] = 0x32edbfc339fbcb07 +results[2959] = 0xd32d22ac2668d143 +results[2960] = 0xa75840787b5203b8 +results[2961] = 0xd49c0f7d6ab5ff05 +results[2962] = 0x1a6feaf51da044d3 +results[2963] = 0x68cd3a5525d9be38 +results[2964] = 0x5dcf9d5e861063e9 +results[2965] = 0x473a5a102f708c59 +results[2966] = 0xb0347a6f6dd6a589 +results[2967] = 0x0e161542d31fbdd6 +results[2968] = 0x3a68529fe24f43bf +results[2969] = 0x94ac4603e5cc31c6 +results[2970] = 0x91776b6ebf5809e8 +results[2971] = 0x432a99b484174bd3 +results[2972] = 0x6e537e4c1760423f +results[2973] = 0x95b061f0c8f186f3 +results[2974] = 0xf5ee1ddb8df016aa +results[2975] = 0x0c854494b020a029 +results[2976] = 0x360453888496db4c +results[2977] = 0x0f106e618c0dc6a0 +results[2978] = 0x01f60a4517ec55d8 +results[2979] = 0xdb3873bb2b6f3d54 +results[2980] = 0xd62b112a827b8d3a +results[2981] = 0x48fe861c04c17df9 +results[2982] = 0xcc7a5b6b964187f6 +results[2983] = 0x62767e2eeacdedc1 +results[2984] = 0xe8145477d0fed88d +results[2985] = 0x5bfaf1e4b2394ebc +results[2986] = 0x1ef2faf117d62003 +results[2987] = 0xedd493ba79f0185e +results[2988] = 0x194015db69f8734c +results[2989] = 0x9e90539ed28688a0 +results[2990] = 0xb93a70aa3a0b28aa +results[2991] = 0xf2faa0cc28c68aca +results[2992] = 0xc02372ae97352bf8 +results[2993] = 0x55b5d29b71309629 +results[2994] = 0xaf87760dab105ea6 +results[2995] = 0xbc720c83991d8502 +results[2996] = 0x7f5ba3b9b90ffe2b +results[2997] = 0xc4fba25e65dc1f93 +results[2998] = 0x00410c8c6494a15c +results[2999] = 0x411687e6eba28e60 +results[3000] = 0x9003a7877e7e81c1 +results[3001] = 0xab51d58ed7ee4a6f +results[3002] = 0x211a2b4ccbcb6533 +results[3003] = 0x5686054b8c6d45b6 +results[3004] = 0x5336ce2e6872ffab +results[3005] = 0x7afb2fc19251ba2d +results[3006] = 0x84e609a84be8e52b +results[3007] = 0xf1c4cc25201602d6 +results[3008] = 0x8dd17b361b57df98 +results[3009] = 0x38e287c44602ab88 +results[3010] = 0x2b112e2257775f58 +results[3011] = 0x034ba6d086dec791 +results[3012] = 0x79fd823a60dede8b +results[3013] = 0x2091d50f773104f3 +results[3014] = 0x649fe0c61990f509 +results[3015] = 0xf63de38441636b57 +results[3016] = 0x6e3c7d56a509cb0d +results[3017] = 0x56115b05ceb8e54e +results[3018] = 0x21b448f9fb733abe +results[3019] = 0xad70670296e8916a +results[3020] = 0xe800ffb98b35ca11 +results[3021] = 0x1b22cee851cc3c11 +results[3022] = 0x34b99219ee18cade +results[3023] = 0x5b67a77f21f6f404 +results[3024] = 0x84a8a54188e8d5c1 +results[3025] = 0x9855f1ee8d589f57 +results[3026] = 0xccdb8511247f8f88 +results[3027] = 0xe75cffec129f7c9b +results[3028] = 0xd39f3e3ba2ec1feb +results[3029] = 0xd48726ae673d0d55 +results[3030] = 0xe0f9f8b096fa7a51 +results[3031] = 0x489525b29c669f0a +results[3032] = 0x6a138c50d9439ac3 +results[3033] = 0x57f2af7399b738fb +results[3034] = 0xa47118b5015a1ada +results[3035] = 0x0e5e160bd15eb404 +results[3036] = 0x4eb442f354343986 +results[3037] = 0xc8967152a258861b +results[3038] = 0x6ed606a760709d09 +results[3039] = 0xf177b27af36ecd32 +results[3040] = 0xb34a4da2870c5bc2 +results[3041] = 0x59266581d24035c3 +results[3042] = 0xee4bd079cef47fb5 +results[3043] = 0xaaa61c9468d417d3 +results[3044] = 0x1302d9cdb83c69b8 +results[3045] = 0x0d5cf8dcd918e667 +results[3046] = 0x1df389e085b8cbee +results[3047] = 0x31a2dccdb61747de +results[3048] = 0x4cb2641feeeb4eb5 +results[3049] = 0x5f67c4883aa8315b +results[3050] = 0x179ed27a5e8e631e +results[3051] = 0x259efd1e91db414b +results[3052] = 0xe3774959591dcfc8 +results[3053] = 0x92f59cd8985160e9 +results[3054] = 0x156afabc508359c1 +results[3055] = 0x119b00440eba44f0 +results[3056] = 0x8a2586ac9bcb46e7 +results[3057] = 0x5ddec0e6fcec1999 +results[3058] = 0xfa4b3facdaa12374 +results[3059] = 0x123da6813572a1f8 +results[3060] = 0xc5558bed4db471b8 +results[3061] = 0x1d98c676a57894ec +results[3062] = 0xa180b8f678f6d36e +results[3063] = 0xb7ac642ace878e45 +results[3064] = 0x7e7b56ae1a4d210d +results[3065] = 0xd64a770ac5c7eb25 +results[3066] = 0x49e85ddc79f8e373 +results[3067] = 0x4f48cc8842854369 +results[3068] = 0x4c871972ba796a9d +results[3069] = 0x57e60c09f5c302cd +results[3070] = 0x7d68bb09763432f1 +results[3071] = 0x3cf71a58c3034575 +results[3072] = 0xde01cd32b4a646eb +results[3073] = 0xd94e4b2e168ab18e +results[3074] = 0x8ac05ecd27854128 +results[3075] = 0x27f311197f53a04e +results[3076] = 0x7fb88626b5405cad +results[3077] = 0x0666dfa990c51a1a +results[3078] = 0x2a20e2dc872944ee +results[3079] = 0xec17bdf0c1e216b7 +results[3080] = 0x4964fc73da7cb878 +results[3081] = 0xa344b7035e9070a9 +results[3082] = 0x4d00b9dcba42ae2c +results[3083] = 0xd8b48585dab5ad6b +results[3084] = 0xf4de8a5af81af40a +results[3085] = 0xfb7a9ab73868e555 +results[3086] = 0x2d036663e06e6965 +results[3087] = 0xe64d0bf91472612a +results[3088] = 0xda2e75d23824b035 +results[3089] = 0x119b21e1f191107d +results[3090] = 0x928ac6041c0d4eb1 +results[3091] = 0xfb2eccdd0291e25e +results[3092] = 0xf957d5eede07b9cc +results[3093] = 0x8859f2fe4a2d37dd +results[3094] = 0x3e2d9fe9a1cccf95 +results[3095] = 0xc50ba5b90a6157d9 +results[3096] = 0xd4159f63551f9c5d +results[3097] = 0xea0c1180a023f8df +results[3098] = 0x1c2e6e64156e935c +results[3099] = 0x0f89298c95759228 +results[3100] = 0x222ba4f2d6d37541 +results[3101] = 0x0d2bd5e29d9db237 +results[3102] = 0x68fd1d2229cef7a0 +results[3103] = 0xf44935cff9f2a345 +results[3104] = 0xaffc247b74e7fe05 +results[3105] = 0x2f8a913a278d124c +results[3106] = 0xaccfb5f1dd052930 +results[3107] = 0x1a48ce2f752c25d2 +results[3108] = 0x31598890131b856a +results[3109] = 0x2e83ca6526269819 +results[3110] = 0xbd84cd7fd134dbac +results[3111] = 0xb5b92022ddd2b0fb +results[3112] = 0xf8cb57265821892f +results[3113] = 0x885ce313fb25c203 +results[3114] = 0x9e832c33d84e671d +results[3115] = 0xd8143181fd32fd79 +results[3116] = 0x64e4b106b37f0563 +results[3117] = 0x6b6667e911760cf8 +results[3118] = 0x7aad8e85b6b41ef3 +results[3119] = 0x3a9e1bc9ba8bd2aa +results[3120] = 0xb80e7d790646ebcf +results[3121] = 0xbf1c1c152703b550 +results[3122] = 0x244a78c0672f85a9 +results[3123] = 0x97ceaae263df0414 +results[3124] = 0x2e41aa710b8c2388 +results[3125] = 0xaa1ede9211285af6 +results[3126] = 0xaa2c0cd155eae021 +results[3127] = 0x6e79d78fdfa03798 +results[3128] = 0xdc9f7e1208c08c8d +results[3129] = 0x03bf3112432ef330 +results[3130] = 0x4149e1ccc957ae6b +results[3131] = 0xc403e15833f4f835 +results[3132] = 0xfa098bf7cd4361a4 +results[3133] = 0x56528dfcdffeb3cf +results[3134] = 0xaf6f4fc869b1f441 +results[3135] = 0xbdf26d5da7479e26 +results[3136] = 0x8cb429a69129c588 +results[3137] = 0xd680e26737833c4c +results[3138] = 0x87176350d9d10d79 +results[3139] = 0x329e4507905d7b71 +results[3140] = 0xebf322e21ad0a7b3 +results[3141] = 0xe33e8622dc418030 +results[3142] = 0xf4c7f18aaf1bbb73 +results[3143] = 0x582cf4af5c98e914 +results[3144] = 0xbd2446c76226389e +results[3145] = 0x0ce3da2e3d6b2505 +results[3146] = 0x33fc0ea83baabd5f +results[3147] = 0x6237f1e996f51fe8 +results[3148] = 0xc97b1abdf0d34ddf +results[3149] = 0xf13d6e16044d4389 +results[3150] = 0x295f0976a026f3a0 +results[3151] = 0x1193c0c811e2ee97 +results[3152] = 0x7dfc3522b24ef86c +results[3153] = 0x4333ee86ed8df5f3 +results[3154] = 0x399499c72c95700c +results[3155] = 0x12f80462d146e638 +results[3156] = 0x5f889272fe6e4686 +results[3157] = 0x1258c89312dead5b +results[3158] = 0x2eb013ea47a4d7dc +results[3159] = 0xc041bc8f53f941fb +results[3160] = 0x6fc8db58219a66cb +results[3161] = 0x497d37da38b14dd1 +results[3162] = 0x7356e1158651f1f1 +results[3163] = 0x61535038f704600a +results[3164] = 0x95e050c3210fcb48 +results[3165] = 0x09feaa5135571721 +results[3166] = 0xc178339c4b137314 +results[3167] = 0x554efb2bb9474f38 +results[3168] = 0x10071a269b826f09 +results[3169] = 0xf2d91f73e5e5cf8b +results[3170] = 0x7217e9f3a408f1cc +results[3171] = 0x055af6207a3bb59e +results[3172] = 0x451e1786a6550c33 +results[3173] = 0xc760b572af17ba77 +results[3174] = 0xf00da1cc1b518350 +results[3175] = 0x0fc784d8cb228368 +results[3176] = 0x1167f7779dbd7c83 +results[3177] = 0x10d6f9bca2e3e053 +results[3178] = 0xcdbea3ea1c7c6edd +results[3179] = 0xa3abf5cb08d81bee +results[3180] = 0x449d7d8204ac0342 +results[3181] = 0xb7339660fda70201 +results[3182] = 0xf01e0fb20a1a3ff0 +results[3183] = 0x03a7ad5f2cc816e9 +results[3184] = 0xea9618c6710fdb61 +results[3185] = 0xf72daf2866521dc9 +results[3186] = 0x59dc9cb00329eea3 +results[3187] = 0x815f931165b97d51 +results[3188] = 0xbe3d438845d3c162 +results[3189] = 0x3d56e16d34ca94f6 +results[3190] = 0x690342c47ec7c505 +results[3191] = 0x5dfa317fc572883a +results[3192] = 0x494d7ff99d1c36a8 +results[3193] = 0x4520f79deaeccafc +results[3194] = 0x607a1c7003f6df36 +results[3195] = 0x24a1f8473555602b +results[3196] = 0x6e33599826afb871 +results[3197] = 0x9c41d6be8c6bf155 +results[3198] = 0x40cf5cbe2d86df7b +results[3199] = 0xd1f89106cdd28f67 +results[3200] = 0x6b9f9a179db96e1c +results[3201] = 0x464b9e43d4efb057 +results[3202] = 0x5289d6dc31b4fa71 +results[3203] = 0x11ea3fa315519779 +results[3204] = 0xe52c2f5673f470b9 +results[3205] = 0x7e9f45ca2c483113 +results[3206] = 0x933c69d979efaa80 +results[3207] = 0x329f48ecc63b2b33 +results[3208] = 0xef3680ce910a39c3 +results[3209] = 0x1c3038fa187caf34 +results[3210] = 0x9206ab56622d4b9b +results[3211] = 0x5fb9e22acbab5244 +results[3212] = 0x4dd33b11af277522 +results[3213] = 0x7bb9e3d7ee8f203f +results[3214] = 0x2ac47bf1101d445c +results[3215] = 0x141fbcda7e9b607f +results[3216] = 0xd755a710cc920c3b +results[3217] = 0x6fcc13021292d3c5 +results[3218] = 0xe18f4f0b021b0f4e +results[3219] = 0xed27123c3f897649 +results[3220] = 0x9312f523e2e8609f +results[3221] = 0x19917cf9c7ce6810 +results[3222] = 0x00313ff800503b19 +results[3223] = 0x82341d7061481d30 +results[3224] = 0xd05e008987d58d29 +results[3225] = 0x524eb67e22f5c738 +results[3226] = 0xbe4e51f60d5a1ac8 +results[3227] = 0x204173f489f32d24 +results[3228] = 0x9eca5027f37286bb +results[3229] = 0x541cfe945b90148a +results[3230] = 0x994049c0d2b8847f +results[3231] = 0x70ca8ce2a69360d5 +results[3232] = 0x22db084e0d717f67 +results[3233] = 0x6f9691e6e26800dc +results[3234] = 0xfe9ec3de5e0c6bd2 +results[3235] = 0xd857963080e5c419 +results[3236] = 0x4878e333a39b4e90 +results[3237] = 0x46524b3149aa4a48 +results[3238] = 0x336991373f77cf97 +results[3239] = 0xdc7db4c1a983e70e +results[3240] = 0x7ae79eab218e9177 +results[3241] = 0x8004ae4c21b4ff43 +results[3242] = 0x0e0ed71a48f32e95 +results[3243] = 0xf3d904f2d8dd649c +results[3244] = 0x36b301abdbf9e5c3 +results[3245] = 0x0304ba53a4f9557a +results[3246] = 0x50247ce82ce900fc +results[3247] = 0x6e57aba98ddbc74f +results[3248] = 0x90a8ec262dac5bea +results[3249] = 0x90e13578266580dc +results[3250] = 0xe5f0f8f41efd191f +results[3251] = 0xd8b3f604b8a7a350 +results[3252] = 0x5148ea439990b4c6 +results[3253] = 0x56322b9c84914693 +results[3254] = 0xba2974c6f1bfc33a +results[3255] = 0x13159ee2c51aeb95 +results[3256] = 0x31b3ca835c8221b4 +results[3257] = 0xe7bb1db80bdf888a +results[3258] = 0x2d34cb7f81ca582c +results[3259] = 0x14531404247cb09a +results[3260] = 0x55acffbe854d628b +results[3261] = 0x79aee5ca2a462096 +results[3262] = 0xf2ea2856e0676b32 +results[3263] = 0xb9fb796d4cf673b7 +results[3264] = 0x9b7d1eee4823c622 +results[3265] = 0x89ca74eff8e0603f +results[3266] = 0xff65d0b60126fb91 +results[3267] = 0x1ea5533f28a6a97d +results[3268] = 0xb4d7c4cda652eaa6 +results[3269] = 0x584e060d0622bdf6 +results[3270] = 0x2992256afd2133b9 +results[3271] = 0x6bbff96a0293f4e1 +results[3272] = 0xff46f5fee20e1eba +results[3273] = 0x46063fc81568f279 +results[3274] = 0x344b100ff2f4b2b6 +results[3275] = 0xe1da89e30e427324 +results[3276] = 0x3608f0aa17661d39 +results[3277] = 0x350786413cc42ea1 +results[3278] = 0x70ffb7ef91658418 +results[3279] = 0x557548cdde6a0875 +results[3280] = 0xe4aa1a39514b8c79 +results[3281] = 0x6ea3d70c437795b0 +results[3282] = 0xd1f5ea3fe83637d9 +results[3283] = 0xcf5a93e7c4f60122 +results[3284] = 0x6b9f091d2e819d59 +results[3285] = 0x23528190eca65522 +results[3286] = 0xc9b270b041f24f0c +results[3287] = 0xd24beacbb18ab749 +results[3288] = 0xd58235cfb0afc0a4 +results[3289] = 0x615df028e1cd67ce +results[3290] = 0x69a807ea628149bd +results[3291] = 0xdf13663a2b81bc4d +results[3292] = 0x42e0a37184b4a364 +results[3293] = 0xd87403701bd88d34 +results[3294] = 0xece19176fbdbb502 +results[3295] = 0x968546ebab8ad2ba +results[3296] = 0xa5ed68f3a5cc7324 +results[3297] = 0x666f549c9c54bf48 +results[3298] = 0xd7fbbb083f73ae69 +results[3299] = 0xed38b796d9d65da0 +results[3300] = 0x432c8ff89f848cd0 +results[3301] = 0x2b01ba928cc9186d +results[3302] = 0x08ea9e46f39fdade +results[3303] = 0x54c6a25b146d6700 +results[3304] = 0xa56e1f6fa4c8cbbf +results[3305] = 0x7d0d73d30106220c +results[3306] = 0x7f6d77795d42dbe6 +results[3307] = 0x1a41e76e5d7ec760 +results[3308] = 0x7bfb5de01f8c213d +results[3309] = 0x6bb80c16b99080f1 +results[3310] = 0x4dd5b033a54863db +results[3311] = 0x34b1c0a6d69e874d +results[3312] = 0xbfc07da6771ab4f3 +results[3313] = 0x8c2b387bb2580aa9 +results[3314] = 0x8641c1d71fb026b3 +results[3315] = 0xc2a39f84c57e8e0c +results[3316] = 0x06f4f31f885b1122 +results[3317] = 0x97c639b61cc1c7b9 +results[3318] = 0xe5388d46268bb734 +results[3319] = 0xd479b74d81374b9e +results[3320] = 0x1c9add7537756852 +results[3321] = 0xafda3c2686ab6eb3 +results[3322] = 0x7c7250deff06f228 +results[3323] = 0x535a8eff150059ae +results[3324] = 0xa3eadbaa25c0d39f +results[3325] = 0x503ef18063bbbd0c +results[3326] = 0x8af00cea42ab1e49 +results[3327] = 0xeeac1c294634d878 +results[3328] = 0xd1a1b9d4ebc67589 +results[3329] = 0xd34b5e560a34218f +results[3330] = 0x2ff79872113ae978 +results[3331] = 0xf08d4446e1b850db +results[3332] = 0x71781d81b549a51c +results[3333] = 0x17440a380844711b +results[3334] = 0xf4dc9f6248f40473 +results[3335] = 0xf74ac389ba44d8cf +results[3336] = 0x72f36d03beb6e466 +results[3337] = 0x284f8a01ba0850ba +results[3338] = 0x41bad8c161dc77a9 +results[3339] = 0x8cfb92674cadc78e +results[3340] = 0x85bbbc5aab016ee2 +results[3341] = 0xd0d28a5d4aa0c0f4 +results[3342] = 0x8c156f870b27224c +results[3343] = 0xf861526f00350e70 +results[3344] = 0x8dc04497909bec8b +results[3345] = 0xa9032e96e43c8661 +results[3346] = 0x30d955ab6a775b01 +results[3347] = 0x789cdb5f1538728f +results[3348] = 0x64cdd68c757aa155 +results[3349] = 0x5ce9ec62e190c153 +results[3350] = 0x66bf57adaf018183 +results[3351] = 0xdf18dcca416fbb48 +results[3352] = 0x985257895f9cadf6 +results[3353] = 0x2016cc3dbee883ce +results[3354] = 0xc42f32611fb32709 +results[3355] = 0x2347ca2841153649 +results[3356] = 0xecd266ac4c71248f +results[3357] = 0xcc7acb50abdb3a66 +results[3358] = 0x3c7fbc8a3e4f3b96 +results[3359] = 0xa5c9003b248895aa +results[3360] = 0x1890413f4feb5808 +results[3361] = 0x967a5a9a54e54ffd +results[3362] = 0x608ae27dbbf42a98 +results[3363] = 0x7110731ad959f9aa +results[3364] = 0x7a3c91a33686bac7 +results[3365] = 0x4450dbca9a2031e9 +results[3366] = 0xb05301ad4c0c32ba +results[3367] = 0x70e365c6022fa60d +results[3368] = 0x6921e9792fcd6fb9 +results[3369] = 0x2dc484cb939b7bc1 +results[3370] = 0x37fd97a31f1c74b8 +results[3371] = 0xe9933870f2e2bd3d +results[3372] = 0xd05bbf3e3b081110 +results[3373] = 0x6f4112ec8effa93f +results[3374] = 0xdc5083e892b0e83c +results[3375] = 0x01df3c477c7b1e3f +results[3376] = 0x05abf78161c488fa +results[3377] = 0x4bb2d47a3eebe07a +results[3378] = 0x94b48dbe5ed42c5e +results[3379] = 0x7b422c80593d54c7 +results[3380] = 0xcce68dd99b848009 +results[3381] = 0x32137f86f85bf5af +results[3382] = 0xb926f7316dda9a2a +results[3383] = 0x6c57844b0fcf4a92 +results[3384] = 0x3a4f49eafc0ca7d3 +results[3385] = 0xb1f7823487378a6c +results[3386] = 0xe43532a7f00fe719 +results[3387] = 0x2518ea5dbc88118d +results[3388] = 0xdd04bdca8b7783f1 +results[3389] = 0x83f5c67e7f06425e +results[3390] = 0xcd3bfd3d57ddd529 +results[3391] = 0x275c6ddec06894f9 +results[3392] = 0x34e83061c79817ee +results[3393] = 0xe9cd6be459c9fa2a +results[3394] = 0xe28a586e22482ca4 +results[3395] = 0x230c9702a83ca157 +results[3396] = 0x8ad7ef65ea0dd605 +results[3397] = 0x5ef46a25ed44decd +results[3398] = 0x3742c148496a4277 +results[3399] = 0x5d1222a1ab72db2e +results[3400] = 0xa99e551691a93b88 +results[3401] = 0xe236c39f76ad85ae +results[3402] = 0x116c3c79f3592987 +results[3403] = 0xe21f18f505d530dc +results[3404] = 0x6ef441c32ac87812 +results[3405] = 0x1845989def057775 +results[3406] = 0x520c8784a69f2835 +results[3407] = 0x4cbf2f9e1ae2b27f +results[3408] = 0x003729eee68112a9 +results[3409] = 0xd3b58178ae782d67 +results[3410] = 0x806a194c1440bb2e +results[3411] = 0xd4243682ad02f4dc +results[3412] = 0x84edec35a2291b42 +results[3413] = 0x823ec63f0a202c15 +results[3414] = 0x462845a568384ee6 +results[3415] = 0x8a211b469d08608c +results[3416] = 0xe15a3ec54e49d793 +results[3417] = 0xbbcbf181f2fc032a +results[3418] = 0xd100ef9a8d07a0f5 +results[3419] = 0x5263a3ce17a1c342 +results[3420] = 0xd1ff7754ac0fe888 +results[3421] = 0x45ed1cf71082e47b +results[3422] = 0x1ebf130392ce7ca2 +results[3423] = 0x7a48de15fa42ba6d +results[3424] = 0x6cc1a518e0603820 +results[3425] = 0x7d2fe470d6c0abe8 +results[3426] = 0xecf05ed8901970f8 +results[3427] = 0xacf37ca1c38d58ba +results[3428] = 0x7c94fd0318fc712b +results[3429] = 0x8727e8928632d39d +results[3430] = 0x28d555332fb96d6a +results[3431] = 0xd707412bbad20e5d +results[3432] = 0x3e411390f0eec05b +results[3433] = 0xe328f5166de0af0f +results[3434] = 0x775cc8188824e186 +results[3435] = 0x08df63fa8d4ee622 +results[3436] = 0x648fd797fb18b763 +results[3437] = 0xef67318100e942be +results[3438] = 0xad1787d6090b7fad +results[3439] = 0x62a6ae3c085a34b4 +results[3440] = 0xbc9bf39ba1afa1d8 +results[3441] = 0x9f87c36c0dcc4550 +results[3442] = 0x957e38a5903e09e3 +results[3443] = 0xb4bdb8bee4febac5 +results[3444] = 0x22a9010fcbbecefd +results[3445] = 0x3df4b4c51dd43f79 +results[3446] = 0x49ddc7ae771c6841 +results[3447] = 0xb24c1055dd41edff +results[3448] = 0x9e39c53858aa19de +results[3449] = 0xeb5e4abd0f1d23a9 +results[3450] = 0x19ba376834b5a006 +results[3451] = 0x0ef40b5ed0b577ef +results[3452] = 0xdc3633ea0cff9e99 +results[3453] = 0x2a66762fb7177c54 +results[3454] = 0x86c08df92b459002 +results[3455] = 0x9378701ffdb06765 +results[3456] = 0x5afbac15b430d687 +results[3457] = 0x62c64a417fe41b1d +results[3458] = 0x7fc79ea5e743241f +results[3459] = 0x7f22f88221b80347 +results[3460] = 0x19ed55ff8f560341 +results[3461] = 0x8fc71cba32f762bc +results[3462] = 0x11907ceba24c43ed +results[3463] = 0xb333b647d474a59a +results[3464] = 0x3e41e4d5fb1cdb43 +results[3465] = 0xc46ed64af9ca8c6e +results[3466] = 0xcccdc8874edb8a3f +results[3467] = 0x0192a7f5c01efeae +results[3468] = 0x0b8f7723a402dcec +results[3469] = 0xb6f203a50e4b964a +results[3470] = 0xa5c7db1d362d6e81 +results[3471] = 0x5a7cda329d6e2005 +results[3472] = 0x9caed36431b563b7 +results[3473] = 0x25b92814da4bc0f1 +results[3474] = 0x9466bc647f421405 +results[3475] = 0x6806101f45f6a2e7 +results[3476] = 0x17e4c147144629b0 +results[3477] = 0xc66af8cac5940305 +results[3478] = 0xf8e27d1e0bfc2388 +results[3479] = 0xc0dd4816f2144b4f +results[3480] = 0xf90f0e886f6079d5 +results[3481] = 0x2d9b8cd19acc3179 +results[3482] = 0xe8df86de9ab23fe6 +results[3483] = 0xa6e6278850785738 +results[3484] = 0xe732814a24f79574 +results[3485] = 0x6cb0e42ea7e7778f +results[3486] = 0x1490f8412e0321dd +results[3487] = 0x7beee292ec12df18 +results[3488] = 0xd42b4e0577431118 +results[3489] = 0x18750b12fc695d0b +results[3490] = 0xeb963208002ba0d2 +results[3491] = 0x09e9af8f8f1363cd +results[3492] = 0xa754e1bd72a02c2e +results[3493] = 0x3ed1d927574b5340 +results[3494] = 0x36fadd46e184a991 +results[3495] = 0x75d678dfb57991ff +results[3496] = 0x217e47c66d991e89 +results[3497] = 0xd0c6c981c5d6945c +results[3498] = 0x6972951decf7aaa5 +results[3499] = 0xce9e4dac2669a6e1 +results[3500] = 0x345e4d590f46bf1d +results[3501] = 0xcde0d81ac5403c9c +results[3502] = 0xab9959628b5b6511 +results[3503] = 0xe16c594aadc22ac3 +results[3504] = 0xb17447c499bc3b07 +results[3505] = 0xe492907ca94dd512 +results[3506] = 0x7333f3fd06537c58 +results[3507] = 0xac6624e462aa2ca2 +results[3508] = 0x7ec056e8cff096c6 +results[3509] = 0xa7fcda60de42becb +results[3510] = 0x76b72269eaba6803 +results[3511] = 0x717ff991c7ed537d +results[3512] = 0xfe284e307a4638ec +results[3513] = 0xa54a259a60d77629 +results[3514] = 0x22201344803369db +results[3515] = 0xbda54aa4b90f26e5 +results[3516] = 0xc55c064341307dc8 +results[3517] = 0x76d0ea483ac79aea +results[3518] = 0x60e37c078ba54365 +results[3519] = 0x4870f31834efaafd +results[3520] = 0xb0b134bf051d1457 +results[3521] = 0x7ab8edcbc77f2ca8 +results[3522] = 0x9a79a736d068f367 +results[3523] = 0x06cfa79f1f9b80ac +results[3524] = 0x6f6925a2ed73f611 +results[3525] = 0x86a41cf71fb14afa +results[3526] = 0x32f930be5083bb19 +results[3527] = 0x85f5905eb1fac1fd +results[3528] = 0x156c27b26f0d9fe1 +results[3529] = 0x5235ad6cbc810910 +results[3530] = 0xe0480e4be3da1be4 +results[3531] = 0x1d08ae98fb229c8e +results[3532] = 0xffb64c9e6844ebeb +results[3533] = 0xbb3f9d0bebb23d4f +results[3534] = 0x602a548c0b7501a9 +results[3535] = 0x8bc1e375aba6dd26 +results[3536] = 0x36e58d96d08500e5 +results[3537] = 0xc766cc34c11e4464 +results[3538] = 0xcc20dac9a55c5bfb +results[3539] = 0x1f8ee4f9cc97a8f2 +results[3540] = 0xbf319e47134c72e3 +results[3541] = 0x1bfb926b880ad347 +results[3542] = 0x1aee6b323f95d43a +results[3543] = 0x0b48c34db4c8dce1 +results[3544] = 0xf8edcc3d1d99933d +results[3545] = 0x645cb985819c2161 +results[3546] = 0xe6130118a1007ce8 +results[3547] = 0x5cf778a0a1fe0f0d +results[3548] = 0xc201366bf9c584ee +results[3549] = 0xe4341fe014f68832 +results[3550] = 0x44346cc9c76917e5 +results[3551] = 0x2ee18e2c7dad04de +results[3552] = 0xee705382b7d5238a +results[3553] = 0xc43724307e4ba127 +results[3554] = 0x33875b27e38a4ce5 +results[3555] = 0x7cc3ae276a2c440d +results[3556] = 0x85207eaf05710ce9 +results[3557] = 0xbbf66d5a19447167 +results[3558] = 0xc1d20ee3584e7ccd +results[3559] = 0xecb3c98f46ea17e1 +results[3560] = 0x37070716ca84b60d +results[3561] = 0xbd0bd1577278117c +results[3562] = 0x764949a4244677f1 +results[3563] = 0x7a60ef50d0aa08b5 +results[3564] = 0x27be58eba3e1c942 +results[3565] = 0x9c4282b38eb4f67d +results[3566] = 0x7276f02808fedfa4 +results[3567] = 0x30a51a7ae9032e0a +results[3568] = 0xa4c616dbda14a38e +results[3569] = 0xb2560021e124334e +results[3570] = 0xcdb9aa18ad6d59c0 +results[3571] = 0x75487b1986106bf9 +results[3572] = 0xc1a7755414499445 +results[3573] = 0x7f1e79d8eda18f01 +results[3574] = 0x62b67c50015bf5b3 +results[3575] = 0xbc4bbb01554f8870 +results[3576] = 0xe0f4f86741d30600 +results[3577] = 0xed87d20aadc809a5 +results[3578] = 0x884d348e2dcc7982 +results[3579] = 0x3cabd7d4cfcc8c1a +results[3580] = 0xc4980cf464ee19c8 +results[3581] = 0xb89ff9bf8fab4f4d +results[3582] = 0xe070d7afd5599193 +results[3583] = 0x820e9470e57a7791 +results[3584] = 0x280f3fe7f263c47e +results[3585] = 0x1bb3817c636f59ee +results[3586] = 0x2bc15d1c4e3a93e3 +results[3587] = 0xbe727b5c79caead9 +results[3588] = 0x4864d5d0dd0f7a6e +results[3589] = 0xd02914230561719d +results[3590] = 0x4926e00f01be395d +results[3591] = 0x6e66819387ad79f5 +results[3592] = 0x89b028236c5a5e3e +results[3593] = 0x88c007b24d46dd4d +results[3594] = 0x0ccf12574791f4de +results[3595] = 0xe48540a09ab0b4a6 +results[3596] = 0x5a4619b98d43017d +results[3597] = 0xd1fd056fcf5669e2 +results[3598] = 0x6cace4b57e5375cb +results[3599] = 0x641e5c1dbb6fbf67 +results[3600] = 0x2e4a63de55444214 +results[3601] = 0xd088ee7f06c7aa10 +results[3602] = 0xdb4a18db7c66a24d +results[3603] = 0x9e745f7a224e41fb +results[3604] = 0x6cde4ff5ae53c13c +results[3605] = 0xfda043cabad987a8 +results[3606] = 0xf7924297494fe19b +results[3607] = 0xd6bf0831d1b2290b +results[3608] = 0x41ddc9b479590e12 +results[3609] = 0xba7969190946848a +results[3610] = 0xe6613318e4ac9feb +results[3611] = 0x8d47a7cb6cd9c4b7 +results[3612] = 0x3c64683dc5890258 +results[3613] = 0x7fe06da8495c775f +results[3614] = 0xc98a2e5f08efc85d +results[3615] = 0x162eb18912695aa5 +results[3616] = 0x02739059ff2ed0ff +results[3617] = 0x9e14deae23800dbd +results[3618] = 0x2f9a30da1f206702 +results[3619] = 0xcf371b3ad9caf05f +results[3620] = 0xe0356cc1f42e846d +results[3621] = 0x8042775c8666a883 +results[3622] = 0x312d0d12504140d8 +results[3623] = 0x809d6e1c5129b25f +results[3624] = 0xbfe213e6b521acb6 +results[3625] = 0xb82a7532485a9174 +results[3626] = 0x37b323347b118a51 +results[3627] = 0xabf569d718e92a30 +results[3628] = 0x53b1b8d74529daad +results[3629] = 0xed96254a28c0d880 +results[3630] = 0xf265ff7dec301f5b +results[3631] = 0x373aa468ffbfadd8 +results[3632] = 0xcb9954d27ee2e91b +results[3633] = 0x70324be20820e9db +results[3634] = 0x32aa1deab96f80bc +results[3635] = 0xfa9eea04ab4c4934 +results[3636] = 0xdbcc69535beb8a58 +results[3637] = 0xb919aded449dbbfe +results[3638] = 0xfcb5a105cab37f0b +results[3639] = 0xe5d70fd02316ffbe +results[3640] = 0xf115c4bdc76b4fb8 +results[3641] = 0x82d96253c78083b8 +results[3642] = 0x122614e66f7700de +results[3643] = 0x116059df2f309854 +results[3644] = 0x9a4ca0a083bdbe8d +results[3645] = 0x0855622617a068e5 +results[3646] = 0x607697828f48185d +results[3647] = 0x4631d8bf70589141 +results[3648] = 0x94cf47d016c0b2fb +results[3649] = 0x85a0f17ea58fa4c9 +results[3650] = 0x5373c7f515659410 +results[3651] = 0xa2101f7c39c54dab +results[3652] = 0xc1f2a6382f59c603 +results[3653] = 0x2671d19934843e6b +results[3654] = 0x4355dbbc28ff5f02 +results[3655] = 0xb2f7df4bf8c85746 +results[3656] = 0xfc2520e8197f853b +results[3657] = 0x704f4f7e553f2497 +results[3658] = 0x1d3215d8b7280473 +results[3659] = 0x8ed23a321bf6c32e +results[3660] = 0x006b5ad7322f91ce +results[3661] = 0x530a7c3a5120b8b6 +results[3662] = 0xd62a68bb4cb11e3c +results[3663] = 0x300930608d730c8a +results[3664] = 0xb26545825dd1e51e +results[3665] = 0x627bc2ded6912b43 +results[3666] = 0xd0044586bb6a66b9 +results[3667] = 0x9e313e2f9b0665dd +results[3668] = 0x069ca5f3ad1d0f7a +results[3669] = 0x7d1fb2b96aa8b095 +results[3670] = 0xca8c5b6c62425cff +results[3671] = 0xf305c09aa104faba +results[3672] = 0x62bb2b31db99e54b +results[3673] = 0xc7c3359732a28c07 +results[3674] = 0x704d217e67384073 +results[3675] = 0x873d03ee3413fca5 +results[3676] = 0x9eec1d41648122e3 +results[3677] = 0x9d7d9aa8de4d250e +results[3678] = 0xfc7623a2c7c74337 +results[3679] = 0x0824ef27c51930c2 +results[3680] = 0x47a588e85e4d45ef +results[3681] = 0xd6361efd3c0e331c +results[3682] = 0xb0f083986fa14633 +results[3683] = 0xfaf47be78f73438d +results[3684] = 0x441bfca310eea8e2 +results[3685] = 0x928537e42a1483ee +results[3686] = 0x8bf7ea1e129d16f4 +results[3687] = 0x689f2e36591cd52f +results[3688] = 0x6574989080a18a0b +results[3689] = 0x8697ddb78b1f5aca +results[3690] = 0x1342dc4721f5bdef +results[3691] = 0x42062e67306fdfee +results[3692] = 0x4f92a9b2b5503d64 +results[3693] = 0x54a5e93fb3912830 +results[3694] = 0x35053d5221f56a6f +results[3695] = 0xa165bfeec42bdf1b +results[3696] = 0x80fe6d6aec130b5f +results[3697] = 0xbf5fa0726cc2ba84 +results[3698] = 0x9daf726be1dfe833 +results[3699] = 0x15152f7ad988dee7 +results[3700] = 0x16c5d19b166021a8 +results[3701] = 0xdf2b4b9cf8ac2cd9 +results[3702] = 0x53a860e658d08db9 +results[3703] = 0x455d3f8ed8dedb91 +results[3704] = 0xa280631b31d44034 +results[3705] = 0xfd86ca5cc80d7e5e +results[3706] = 0x90e2c124c6c321d8 +results[3707] = 0x23130dc298509a9c +results[3708] = 0x8eb6727cb9b3ccb6 +results[3709] = 0xbea35e94a5ee00ab +results[3710] = 0x9fc4e68f4e3f75dd +results[3711] = 0x56e6281af3ea4486 +results[3712] = 0x4df0163c34407a8b +results[3713] = 0xaafa67be3f7b6ad5 +results[3714] = 0xeba230e82f721b1a +results[3715] = 0xab0e1d4d6bfaaf4e +results[3716] = 0xbf2f1acb97ebb9cf +results[3717] = 0x86a0b1d5a48c8afc +results[3718] = 0xd12c6438bfe39f9c +results[3719] = 0x9194d21d67aaea17 +results[3720] = 0x2e3910e88aa79855 +results[3721] = 0xd2b56590f4fde543 +results[3722] = 0x88437df051d4ddc3 +results[3723] = 0x9fe16edf5184fa35 +results[3724] = 0x04e235fb0fff1e87 +results[3725] = 0x5ac8061764435656 +results[3726] = 0x535ca15adbdb7e2d +results[3727] = 0xb976249333295f0b +results[3728] = 0x7f9dca9c4705d98e +results[3729] = 0xabe84e9a2e5b095f +results[3730] = 0xed2c42ed13381bdd +results[3731] = 0xd4cb6507c8603cd3 +results[3732] = 0x0b65a8cfd16b4891 +results[3733] = 0xe95971b290e26e43 +results[3734] = 0x5d833ba42e5bc45b +results[3735] = 0x855b864b6b8d40a0 +results[3736] = 0x5624cdb6eba27ac9 +results[3737] = 0x8b83d177d441f734 +results[3738] = 0xb0dfcc5662a08e65 +results[3739] = 0xaff2c944ab0756e0 +results[3740] = 0x1dd4bab7e668523f +results[3741] = 0x67bed711a88777c3 +results[3742] = 0x79c647843edbff9b +results[3743] = 0xac973e3ceb01d862 +results[3744] = 0xe61393185ddc0160 +results[3745] = 0x933a719b2c4a4129 +results[3746] = 0xaa7f7a5622c0397a +results[3747] = 0xa074d400fd8cce99 +results[3748] = 0x9b1d96c53cc5d4dd +results[3749] = 0x46a10a6eea4a0bef +results[3750] = 0xb0b0a356a0c42d10 +results[3751] = 0x36d0542bed972684 +results[3752] = 0x427f30ea2f0c90c0 +results[3753] = 0x997d38663bdd0452 +results[3754] = 0x95bd11c77496f4d4 +results[3755] = 0xdee30bed407394e0 +results[3756] = 0x1186184a6ef6d177 +results[3757] = 0xe25aa1352525cc14 +results[3758] = 0x3b5db8d5005d1e16 +results[3759] = 0x4be67c28be6ff31c +results[3760] = 0x5b091ded8fe51283 +results[3761] = 0xf12448863e661fca +results[3762] = 0xd53c40d1f3387878 +results[3763] = 0x80253fb31ec900bc +results[3764] = 0xe8819de3fd296f39 +results[3765] = 0xba5cc5ef30225da9 +results[3766] = 0xf8067349cda8914b +results[3767] = 0x86ed4b8b1085b326 +results[3768] = 0xabea94b43abec6b0 +results[3769] = 0x9162ba6eff98c646 +results[3770] = 0xb361ebfb49e03115 +results[3771] = 0x616dc82a393e4026 +results[3772] = 0x5461bf4a8a57a3cb +results[3773] = 0x90a5be51123760d7 +results[3774] = 0x26eb47eea01f58f1 +results[3775] = 0xe4f1e155d7688727 +results[3776] = 0xe80e2c87ddb4abaf +results[3777] = 0x6aa5e1ed4123e6b1 +results[3778] = 0xa9a238575d2f9ca0 +results[3779] = 0x426c502207bfbc91 +results[3780] = 0x30025d2851bc7093 +results[3781] = 0x8170c9c8d4a0a774 +results[3782] = 0x537f0d0d626d9ef2 +results[3783] = 0x7101e9cd67f5b9ca +results[3784] = 0x82d73e210593a1b5 +results[3785] = 0xaee01133d12d1432 +results[3786] = 0x1a42dfb8c87858d7 +results[3787] = 0x06a8c9b2b593a6e2 +results[3788] = 0x8081ccfc591a97e0 +results[3789] = 0x938ea966fc98b58c +results[3790] = 0x5bb7df917b54b0d4 +results[3791] = 0xdeb5087491fb9900 +results[3792] = 0xae67f073d8002d19 +results[3793] = 0x3317fd03573f03ef +results[3794] = 0x53f0284a1d1900b5 +results[3795] = 0x968b0371961293e4 +results[3796] = 0xfbfd28d7fea51418 +results[3797] = 0xb286551129511471 +results[3798] = 0x018d025402c8159c +results[3799] = 0xc51858c4b4c449b2 +results[3800] = 0x03b846bbdf8f4bd4 +results[3801] = 0x7d6fa3883c541a4e +results[3802] = 0x532a783906594806 +results[3803] = 0xcf0f3dbed067b7c0 +results[3804] = 0x4a4af346c8a60e3d +results[3805] = 0xa90eda8cb4a3f9f0 +results[3806] = 0xa0941d8d6d06ea45 +results[3807] = 0xcb0495b486d34b78 +results[3808] = 0x5955fd74f6a0ac0b +results[3809] = 0x7ede90605711822e +results[3810] = 0x217de0431eca1c1d +results[3811] = 0x2074a94332f5ddfa +results[3812] = 0xb6440da3e6d3d3e7 +results[3813] = 0x5122210be5c3ee85 +results[3814] = 0xa914cba0e7c98369 +results[3815] = 0x2c6e378e774f162e +results[3816] = 0x0ca0fbd68ec22aef +results[3817] = 0x9ea14e583507dd65 +results[3818] = 0xa992ab4fb76027ba +results[3819] = 0x9fbe868330743834 +results[3820] = 0x05c0293db2dd98bb +results[3821] = 0xe2417c7c3480a994 +results[3822] = 0x1c4ff082cd98e10c +results[3823] = 0xa5d707a7bae3636a +results[3824] = 0xd9645ad5aa950b91 +results[3825] = 0x9a612759fbe703cc +results[3826] = 0xdda02eb512598dcb +results[3827] = 0x60abca126ea504b2 +results[3828] = 0x087067aefc8d0de0 +results[3829] = 0x2422145476174f09 +results[3830] = 0x2bc90ea20cd60f1b +results[3831] = 0x114e82a41b78b1bb +results[3832] = 0x851c17d936b6c60d +results[3833] = 0x779db60bd699a257 +results[3834] = 0x82ed3f9f388e4933 +results[3835] = 0xc01b5dc43fc79b38 +results[3836] = 0x08fcb75d5d3fd8c0 +results[3837] = 0x1f570e2a52731b80 +results[3838] = 0xc989e36597150869 +results[3839] = 0x22f4ea8d18b0e103 +results[3840] = 0x7e8398a6bf3ac227 +results[3841] = 0x609627e47ab7866d +results[3842] = 0xc203d0ab41d3a858 +results[3843] = 0x492caf86080059e6 +results[3844] = 0x3b573416e9c80d71 +results[3845] = 0x9d5ef8cd51714e17 +results[3846] = 0x1f29c49b05a71b8a +results[3847] = 0x4a4307529dbd3963 +results[3848] = 0x3dbe908fff7ac328 +results[3849] = 0xded6c04ac26745c6 +results[3850] = 0x2027e14ae8e75f7f +results[3851] = 0xb6caaa958ee23559 +results[3852] = 0xc63dbd71cc98a0af +results[3853] = 0xf5a0966951d7c556 +results[3854] = 0x7479b96022ad56f4 +results[3855] = 0x3f6eef8854f2b768 +results[3856] = 0x500389e941e46a80 +results[3857] = 0x507096f7ff58070a +results[3858] = 0x9d36f6a5d26bd9b0 +results[3859] = 0xdc9b31ada59a5442 +results[3860] = 0x54d597c1a0e22897 +results[3861] = 0xac9c34d6b18286cd +results[3862] = 0x3ab37d8300805209 +results[3863] = 0x2e857f529d41ca25 +results[3864] = 0x1ac6b7c8dc108991 +results[3865] = 0xf60d82b3cd34b186 +results[3866] = 0x3a170fb69443873b +results[3867] = 0xb04d76f7bb1d7cd9 +results[3868] = 0xcaa0fd84f9e82b39 +results[3869] = 0x75b90a6492723e1f +results[3870] = 0xcf158cf6abadd623 +results[3871] = 0x6543ce12116826c2 +results[3872] = 0xd4c333c68a5f7cef +results[3873] = 0x49f0350461bc3b92 +results[3874] = 0xbb14ceb99750cdf6 +results[3875] = 0xaad91cdf9aae0b64 +results[3876] = 0xaa97ffb0fe53d5e2 +results[3877] = 0xe752d40175e70903 +results[3878] = 0xf77ccbc93fe1fe71 +results[3879] = 0x4743f43906e7a33b +results[3880] = 0xa8bbf53dd8e2e983 +results[3881] = 0xa84a07b8c324863b +results[3882] = 0x5be2228a5f8e641b +results[3883] = 0xb5cc677899265ef8 +results[3884] = 0xafb1650ed9725330 +results[3885] = 0x4f63bd4bd05c5407 +results[3886] = 0x0bdee3f2a119cb9b +results[3887] = 0x3580e29b246f24ad +results[3888] = 0x35bdf3716463f57f +results[3889] = 0x6e767eff5c38497e +results[3890] = 0x5784826d0ad37c89 +results[3891] = 0xc130b0eaefc794f4 +results[3892] = 0x31993b7d784c64ef +results[3893] = 0x5d52b553d172d814 +results[3894] = 0x2d0d64e246fe6f87 +results[3895] = 0x28553e1d6726497e +results[3896] = 0x4dd8be3f20f73b91 +results[3897] = 0x0a4cd6bba5c89e17 +results[3898] = 0x0a9bfe6a3aae0abf +results[3899] = 0xf6052ef8b68dca8c +results[3900] = 0xcabeac8ff737a16b +results[3901] = 0x8b911b5a56b9fd57 +results[3902] = 0xfda3568b5c88939f +results[3903] = 0x0d996e48b9a5edd2 +results[3904] = 0xfc37c1cfda4fc3e6 +results[3905] = 0x7e5a868b8ac9e4f8 +results[3906] = 0x243b52cce77f4cc2 +results[3907] = 0x2777fe0e7f383e99 +results[3908] = 0x0aa2924c0f3a9f17 +results[3909] = 0x5e14eb53731400f7 +results[3910] = 0x59683ab8211dc7e2 +results[3911] = 0xb714623e4336285f +results[3912] = 0x8cd0bd91ef9e05e6 +results[3913] = 0x9e2509fce9ec25d8 +results[3914] = 0xa252b676919e5daf +results[3915] = 0x14b38081a40f2e2c +results[3916] = 0xef6b75cd437a9e00 +results[3917] = 0x040d2f9c14c97118 +results[3918] = 0x28a04d7fa3d359be +results[3919] = 0x121c07a4b394a187 +results[3920] = 0x4aa0d467e9cda90d +results[3921] = 0xa1d99bcf0e5c0b7e +results[3922] = 0xe481b82f9c964a40 +results[3923] = 0x27a5b750acd415b8 +results[3924] = 0x5248f9ed24cee4f3 +results[3925] = 0x2a06d57cac2cb335 +results[3926] = 0x4de54176420b962c +results[3927] = 0x7acff84bbca343b5 +results[3928] = 0x611b561cd36269ae +results[3929] = 0xf3ef7e055ab57fce +results[3930] = 0xe1118893b7d368d1 +results[3931] = 0x509391edff3e6ed1 +results[3932] = 0xfafc637d39cad28f +results[3933] = 0x0efb99471b688d3c +results[3934] = 0x1798bb988617d925 +results[3935] = 0xf44ae53c0433d41b +results[3936] = 0x9359d3d74cffcd3d +results[3937] = 0xa79882ee1f29a640 +results[3938] = 0x160aadac563c43d5 +results[3939] = 0x34b02ad0c4357c74 +results[3940] = 0x7f4785e472436722 +results[3941] = 0xa3c73390ef697e2a +results[3942] = 0xdc94ead1b4823c3a +results[3943] = 0x9eab493cf9d83e34 +results[3944] = 0xa58bbfb573e6e9ed +results[3945] = 0x1e00a112b21a08c2 +results[3946] = 0x7a727842ead72f55 +results[3947] = 0xecf4bbb85e2d4cd3 +results[3948] = 0xc52a41c9597d80ab +results[3949] = 0xf8ee5c77623d87a4 +results[3950] = 0xa39594859db8cdea +results[3951] = 0x3dde3d764b628b8b +results[3952] = 0x8df9eb595828db49 +results[3953] = 0x4af19ad6469d2999 +results[3954] = 0xe98865bd4a05c683 +results[3955] = 0x719e3c187fa99632 +results[3956] = 0x15724db9e9d10794 +results[3957] = 0xf5a7e0bb68a629b3 +results[3958] = 0x83e2efaa78e1c190 +results[3959] = 0xa0c8d4155f444fd8 +results[3960] = 0xec8340ded8a65fe6 +results[3961] = 0xafd6c5299c12e4d8 +results[3962] = 0x51ff6f62d32d8b06 +results[3963] = 0xf8554536118ebdc4 +results[3964] = 0x7322f59b2ee220f9 +results[3965] = 0xac8173367f07c804 +results[3966] = 0x266dcc4d6b0f4f35 +results[3967] = 0xc6cdbe25950ab718 +results[3968] = 0xab9f13ed9beedf99 +results[3969] = 0x6855cc72e26d6d51 +results[3970] = 0x6276fdf2d43ab689 +results[3971] = 0xbb92490fbed3b390 +results[3972] = 0xca1e7ea60fa737ce +results[3973] = 0x9dab632705459cab +results[3974] = 0xe6e055e84eefee37 +results[3975] = 0xcc375d5fbc685dea +results[3976] = 0x799e950d1cf1f2bb +results[3977] = 0xdeaf467caae436a7 +results[3978] = 0x92cc384a1c4d1306 +results[3979] = 0x73dd5d4c8058644e +results[3980] = 0x8efccd46d2890a62 +results[3981] = 0x68af8f39b1cc2053 +results[3982] = 0xf89fe3309eea39f2 +results[3983] = 0x004adc138f489338 +results[3984] = 0x12059c72de2d1dfd +results[3985] = 0xd8e553925ac934bb +results[3986] = 0x6dc4351cdcde1477 +results[3987] = 0xf7fec0f46159acfa +results[3988] = 0x827f8320119de680 +results[3989] = 0x46bf0ebc182f5240 +results[3990] = 0x847d1b0029e91b4f +results[3991] = 0x119c98f53986620d +results[3992] = 0x104d8f15dfaa59ab +results[3993] = 0x052a6faf23e603e2 +results[3994] = 0x3474c353eff494a5 +results[3995] = 0x45945f9643a6c3dc +results[3996] = 0x31d3ae46bbae985a +results[3997] = 0x3acebc956ad4e63c +results[3998] = 0x2b5f0a9e1e5ccbff +results[3999] = 0xbc62f85699c2b491 +results[4000] = 0x235769a3cca1bed1 +results[4001] = 0xbfc2251527b773fb +results[4002] = 0x6d1f9143cbdc0376 +results[4003] = 0x44f867f2a0229d32 +results[4004] = 0xe6d2e2736cc8bd35 +results[4005] = 0xa464978ac605eb23 +results[4006] = 0x4199f8c5a5ef6622 +results[4007] = 0x565c17016c0ec616 +results[4008] = 0x06c0cf59ea7a1a33 +results[4009] = 0xba5be1a17b3a2a39 +results[4010] = 0x45c2c9dd43365bd6 +results[4011] = 0xc34d5d96b00e860f +results[4012] = 0xe59f745da85d4c0a +results[4013] = 0xd9520f1fd9381d4e +results[4014] = 0x36891d2b7565176b +results[4015] = 0x39e0aa9ae7f4dc1c +results[4016] = 0x8d43cc7ed0c64957 +results[4017] = 0xd988645987fb491d +results[4018] = 0x5de74765acc5b3b1 +results[4019] = 0x65a4acd7d8dc3f8d +results[4020] = 0x1148f30bf17ab8a6 +results[4021] = 0xecd7c29ef115e367 +results[4022] = 0x1f2b657149391456 +results[4023] = 0x97bb7be64f70f5b8 +results[4024] = 0xe83b7b772a378993 +results[4025] = 0x00288589d8d03c00 +results[4026] = 0xd1570c195657fabe +results[4027] = 0x303cdb1be6aedc51 +results[4028] = 0x0b91e403bca3b542 +results[4029] = 0xb5bd79cdc5413ccf +results[4030] = 0x1e7359bb4ee7cae8 +results[4031] = 0xb708edaa4d20396f +results[4032] = 0x2ca5ba638bf6ab72 +results[4033] = 0xcd5165d16e9f4603 +results[4034] = 0x7bc9a3a13c7db055 +results[4035] = 0xfb77ad80debf5832 +results[4036] = 0x19ddfbf222934eaa +results[4037] = 0x8548d1424f2dc183 +results[4038] = 0xbd2a8a042857fd97 +results[4039] = 0x99fb6e4679d497d1 +results[4040] = 0xbfcce7b51a837477 +results[4041] = 0xcc3cacd3a50b721a +results[4042] = 0x90171e9c531ca2b3 +results[4043] = 0x33b5255c0d9e2f81 +results[4044] = 0x4abbbdd8d085fdea +results[4045] = 0xce73269cc0875035 +results[4046] = 0x104993dde4f7f5f8 +results[4047] = 0xa3c338bf8eb35e96 +results[4048] = 0x910bb79624f0f089 +results[4049] = 0x2ab8a19f18841862 +results[4050] = 0xb127244cddcdca50 +results[4051] = 0xd8bbb8c0fec71e40 +results[4052] = 0xd5880d17032419a2 +results[4053] = 0xdac91bddf48bb76c +results[4054] = 0x67fcf691eba1ed45 +results[4055] = 0x04fd79bffadca08e +results[4056] = 0xd0b60e2cbb967540 +results[4057] = 0x17a419ca215d5e20 +results[4058] = 0xef899ca554acdf1f +results[4059] = 0x265b07a2f92bcf5f +results[4060] = 0x8b2c65d17f8bccf2 +results[4061] = 0x2de6c5167c457708 +results[4062] = 0xf65d63982c8bf790 +results[4063] = 0x35b21ab4297f3337 +results[4064] = 0xbecf21f5ba3bead9 +results[4065] = 0xb2a275b7829b4192 +results[4066] = 0x0d34a11f897f0f32 +results[4067] = 0x8bdbcb482f3deb1b +results[4068] = 0x5fe9dee151431f67 +results[4069] = 0x6aafc238ee896dba +results[4070] = 0x08e6e95a54008dbb +results[4071] = 0x0e532f4dc4573236 +results[4072] = 0x9ef6dadd75e1384f +results[4073] = 0xaffa3d8e2b19fb11 +results[4074] = 0x615ab54078175373 +results[4075] = 0xd2d68c432405ec18 +results[4076] = 0xabb145490e36b122 +results[4077] = 0xd471aa75ad318c72 +results[4078] = 0xebb6740d8d4de7b7 +results[4079] = 0x003806b201c26c01 +results[4080] = 0x296daedc22ed4aa4 +results[4081] = 0x1080006533e4b081 +results[4082] = 0x1a746acc5e5416dd +results[4083] = 0xacb2d90de9ae7557 +results[4084] = 0x157a31be80180eff +results[4085] = 0x26cd30a5eeeedff7 +results[4086] = 0x6371f1d38ad841bc +results[4087] = 0x48655cec862acfa6 +results[4088] = 0x07a7e3c54a149ba3 +results[4089] = 0x54ccd6c79d1b7e21 +results[4090] = 0x083c97e39896df5c +results[4091] = 0x02585841087cd86f +results[4092] = 0x3b6e069e3ddef6f4 +results[4093] = 0x7a6698cc6c6a6be7 +results[4094] = 0x83b27259512a934e +results[4095] = 0x2baae5edd273af1d +Total time: 321929.656250 ms, 289927.728516 spent crunching diff --git a/A5.1/CUDA/demorun_quadrofx570m_0000_0000_0000_0000 b/A5.1/CUDA/demorun_quadrofx570m_0000_0000_0000_0000 new file mode 100644 index 0000000..4010191 --- /dev/null +++ b/A5.1/CUDA/demorun_quadrofx570m_0000_0000_0000_0000 @@ -0,0 +1,1091 @@ +Computing 1024 chains divided into 32 blocks of 32 threads, starting at 0x0000000000000000 +Will execute 64 runs of 32768 steps each. +Run 001/064, starting at index 0x1fffff... 5761.795898 ms. +Run 002/064, starting at index 0x1f7fff... 5760.457031 ms. +Run 003/064, starting at index 0x1effff... 5757.565918 ms. +Run 004/064, starting at index 0x1e7fff... 5768.548828 ms. +Run 005/064, starting at index 0x1dffff... 5764.833984 ms. +Run 006/064, starting at index 0x1d7fff... 5770.363770 ms. +Run 007/064, starting at index 0x1cffff... 5761.941895 ms. +Run 008/064, starting at index 0x1c7fff... 5765.357910 ms. +Run 009/064, starting at index 0x1bffff... 5761.180176 ms. +Run 010/064, starting at index 0x1b7fff... 5765.354980 ms. +Run 011/064, starting at index 0x1affff... 5762.342773 ms. +Run 012/064, starting at index 0x1a7fff... 5771.208984 ms. +Run 013/064, starting at index 0x19ffff... 5763.216797 ms. +Run 014/064, starting at index 0x197fff... 5759.354004 ms. +Run 015/064, starting at index 0x18ffff... 5766.996094 ms. +Run 016/064, starting at index 0x187fff... 5762.162109 ms. +Run 017/064, starting at index 0x17ffff... 5771.199219 ms. +Run 018/064, starting at index 0x177fff... 5762.557129 ms. +Run 019/064, starting at index 0x16ffff... 5761.815918 ms. +Run 020/064, starting at index 0x167fff... 5770.132812 ms. +Run 021/064, starting at index 0x15ffff... 5764.833984 ms. +Run 022/064, starting at index 0x157fff... 5769.107910 ms. +Run 023/064, starting at index 0x14ffff... 5761.516113 ms. +Run 024/064, starting at index 0x147fff... 5769.672852 ms. +Run 025/064, starting at index 0x13ffff... 5766.380859 ms. +Run 026/064, starting at index 0x137fff... 5770.129883 ms. +Run 027/064, starting at index 0x12ffff... 5762.857910 ms. +Run 028/064, starting at index 0x127fff... 5764.833008 ms. +Run 029/064, starting at index 0x11ffff... 5770.136230 ms. +Run 030/064, starting at index 0x117fff... 5762.799805 ms. +Run 031/064, starting at index 0x10ffff... 5762.914062 ms. +Run 032/064, starting at index 0x107fff... 5766.204102 ms. +Run 033/064, starting at index 0x0fffff... 5760.144043 ms. +Run 034/064, starting at index 0x0f7fff... 5762.826172 ms. +Run 035/064, starting at index 0x0effff... 5763.123047 ms. +Run 036/064, starting at index 0x0e7fff... 5760.256836 ms. +Run 037/064, starting at index 0x0dffff... 5760.416016 ms. +Run 038/064, starting at index 0x0d7fff... 5762.953125 ms. +Run 039/064, starting at index 0x0cffff... 5761.784180 ms. +Run 040/064, starting at index 0x0c7fff... 5760.820801 ms. +Run 041/064, starting at index 0x0bffff... 5758.791016 ms. +Run 042/064, starting at index 0x0b7fff... 5766.380859 ms. +Run 043/064, starting at index 0x0affff... 5761.658203 ms. +Run 044/064, starting at index 0x0a7fff... 5773.694824 ms. +Run 045/064, starting at index 0x09ffff... 5762.318848 ms. +Run 046/064, starting at index 0x097fff... 5766.118164 ms. +Run 047/064, starting at index 0x08ffff... 5764.426758 ms. +Run 048/064, starting at index 0x087fff... 5765.529785 ms. +Run 049/064, starting at index 0x07ffff... 5764.834961 ms. +Run 050/064, starting at index 0x077fff... 5764.341797 ms. +Run 051/064, starting at index 0x06ffff... 5760.092773 ms. +Run 052/064, starting at index 0x067fff... 5774.994141 ms. +Run 053/064, starting at index 0x05ffff... 5770.137207 ms. +Run 054/064, starting at index 0x057fff... 5762.974121 ms. +Run 055/064, starting at index 0x04ffff... 5763.951172 ms. +Run 056/064, starting at index 0x047fff... 5772.530762 ms. +Run 057/064, starting at index 0x03ffff... 5776.428223 ms. +Run 058/064, starting at index 0x037fff... 5765.644043 ms. +Run 059/064, starting at index 0x02ffff... 5766.724121 ms. +Run 060/064, starting at index 0x027fff... 5763.217773 ms. +Run 061/064, starting at index 0x01ffff... 5769.807129 ms. +Run 062/064, starting at index 0x017fff... 5765.654785 ms. +Run 063/064, starting at index 0x00ffff... 5766.163086 ms. +Run 064/064, starting at index 0x007fff... 5763.092773 ms. +results[0] = 0x6d14a53d7fe0574c +results[1] = 0x635809b0850c5594 +results[2] = 0x55085ccd8357a140 +results[3] = 0x808608202d55b473 +results[4] = 0x905ddf13110ca25a +results[5] = 0xcbbe903d8847444e +results[6] = 0xb32dcd0ee320992f +results[7] = 0x38087d640fea5c81 +results[8] = 0xdbd57f6ee98bb3ad +results[9] = 0xd688814759e2afec +results[10] = 0xc6544dcb35b0662c +results[11] = 0xaa412cb2ee69a252 +results[12] = 0xb81bc666d899e7b2 +results[13] = 0x17c7f536f8ed71ad +results[14] = 0xca96ee565f91a065 +results[15] = 0x7d3ad8fa8fd1592f +results[16] = 0x54dac55590718d8b +results[17] = 0xb40a7b47844b1a45 +results[18] = 0xd7fca4d986f21d50 +results[19] = 0x7caed26f67b95da9 +results[20] = 0xb4959d0385ede6ba +results[21] = 0xd331067eb96588a0 +results[22] = 0xba018003fc1a615f +results[23] = 0x4f9793de6a64e2ae +results[24] = 0x0908f1e250b2cc4b +results[25] = 0xf934542afa2090e2 +results[26] = 0x9a35d808b4876606 +results[27] = 0xce300c008809c67a +results[28] = 0x8064b9299b48bbdb +results[29] = 0x5fdc5d28b326482a +results[30] = 0xc7abc499c9ea64b4 +results[31] = 0xb6940626c78a7282 +results[32] = 0x084c95b71cec57aa +results[33] = 0x8b5b4ceafa392859 +results[34] = 0x7ee4a05b3e94f9cf +results[35] = 0x46d3283cf8fe0f16 +results[36] = 0x117e303f21335eaf +results[37] = 0xbe4395045eca2d1b +results[38] = 0xf0bee73601967d87 +results[39] = 0xbaf8c91d1773505d +results[40] = 0x6e2431517df580aa +results[41] = 0xafd417bc45bdf857 +results[42] = 0xe12245e0a97abfd0 +results[43] = 0x168966fc179664dd +results[44] = 0x12b26b9c1470800f +results[45] = 0x40061cb2130cc20a +results[46] = 0x6de3eda57996d5d2 +results[47] = 0xcc858c9362e57136 +results[48] = 0x9f70ef2e9b2fdcf3 +results[49] = 0x6726efd6d3b052b0 +results[50] = 0x93c0a82cfc8513e0 +results[51] = 0x1a4895aa29fd46c1 +results[52] = 0x51500bbdf8264f28 +results[53] = 0xaabd1418d1c15897 +results[54] = 0x4793bc05d85dfe5f +results[55] = 0x846e5dacde619498 +results[56] = 0x7ad5c746e49292a3 +results[57] = 0x277570f191b13e3f +results[58] = 0x220909d1b8af5291 +results[59] = 0xb925eefe0d8e6282 +results[60] = 0x394ae931e61c2501 +results[61] = 0xa05a576939a6b171 +results[62] = 0x5766fa32b07b3a23 +results[63] = 0xdf132753bccce175 +results[64] = 0x981d30ccd74f0b33 +results[65] = 0x996326910f10f7ad +results[66] = 0x007dfe6d63cd294d +results[67] = 0xbc4c6a9b85eb6306 +results[68] = 0xdb0170f16533cfcf +results[69] = 0x4a46229e764951d6 +results[70] = 0x99f9a461e39c6714 +results[71] = 0x71b44bcb4dafece4 +results[72] = 0x3254e61a5dc13531 +results[73] = 0xf93aacc76b52669c +results[74] = 0x4b0bcfe6e74e18c0 +results[75] = 0x9fd2688ffca19491 +results[76] = 0xee3f5b23eca2f6ec +results[77] = 0x8e5dd0fb4e99a493 +results[78] = 0x93bdc4b0d78c1202 +results[79] = 0x03c56c39d840be03 +results[80] = 0x22200a85ca952455 +results[81] = 0x4cb6d5d853b1e6d9 +results[82] = 0x36cded8207d4fe22 +results[83] = 0x078fad74194e2cf7 +results[84] = 0xd15a1134d82466c0 +results[85] = 0x74c7f05c524b5bd0 +results[86] = 0xdc0681590a2e7a49 +results[87] = 0x2d82c1467bc2010c +results[88] = 0x7ffd37315cc0698b +results[89] = 0x21155049dd1bab55 +results[90] = 0x3241f3db60941abc +results[91] = 0xb0d2a7a66965b595 +results[92] = 0xef4696d7758bffa6 +results[93] = 0xd2a4b0b1bc5ac6f1 +results[94] = 0xb51cd3897b1db885 +results[95] = 0xce4cc912b7b99eea +results[96] = 0x592c60b8a0cc8caf +results[97] = 0x936e5ab76bfb36a3 +results[98] = 0x587ebe213161b80f +results[99] = 0xa33ba2717d3ec085 +results[100] = 0xaa4d5cf576eda748 +results[101] = 0x050a5d8f62717e32 +results[102] = 0x4bb9553a4539da78 +results[103] = 0xc8f7e1aa0c8b454c +results[104] = 0xd180afc5c3cf7710 +results[105] = 0x9009a5b0ded8f742 +results[106] = 0xc67376779552ae17 +results[107] = 0xde4ff4fda752be26 +results[108] = 0x98b3573f0069f967 +results[109] = 0x33543db4d2a687e1 +results[110] = 0xb60df09650b000db +results[111] = 0xfeed30dc328902b2 +results[112] = 0xc082f7484ffc2f24 +results[113] = 0xe5e9c530b420a605 +results[114] = 0x7008a5c9c2b3d7f0 +results[115] = 0x2f00e701b9985ca5 +results[116] = 0x9380f8c6e320b6a8 +results[117] = 0x5beb78279c6d72e7 +results[118] = 0xec50944bb9f2986b +results[119] = 0xaf00a8fadce7ddfc +results[120] = 0xbacbbe6838cf9071 +results[121] = 0x77af8db8c2989fe6 +results[122] = 0x5659aeb2f64e6cf6 +results[123] = 0x5ca33f9374bca2a1 +results[124] = 0x5dae5ad3173c21e1 +results[125] = 0xf204cd37fda76144 +results[126] = 0x83fd5b47876779f2 +results[127] = 0xa68e807b715ac1b6 +results[128] = 0xd65c37f3b72fa0f3 +results[129] = 0xd20542aa09b7d9b0 +results[130] = 0x02a8fe11bb73f552 +results[131] = 0x533f2ed0718a69c5 +results[132] = 0x2374856bc1c5b347 +results[133] = 0x5f16b55459910405 +results[134] = 0xa70f7aa639ec66e5 +results[135] = 0x72c87254b9be8e34 +results[136] = 0x00a4457291d198a2 +results[137] = 0xb7f5816b88f6b7d5 +results[138] = 0x9101d53ac93b0a94 +results[139] = 0xc2847d8cd0959446 +results[140] = 0xdc9d0b6a2eaa5fc5 +results[141] = 0x4ce9969b3339d3f9 +results[142] = 0xa0aa52c4ae30d2e7 +results[143] = 0x7df19fb7fadaad9c +results[144] = 0xbf90a4b6381f553b +results[145] = 0x3e30aeadcf7f55f9 +results[146] = 0x5a4337688ebd87a6 +results[147] = 0x7df4712a3f8b877b +results[148] = 0x49412cb81c6ace13 +results[149] = 0xb124ab8b5d09a229 +results[150] = 0xb9611e36d130a666 +results[151] = 0x8a7121f493725a12 +results[152] = 0x392b6a8915401b0c +results[153] = 0x4ce685fc0f085ad7 +results[154] = 0xe960f6f076aacfae +results[155] = 0xa81ea00a77d58aab +results[156] = 0xcf4db41629064327 +results[157] = 0x9b5a7e72f5f5a9a5 +results[158] = 0x796f0471536603ee +results[159] = 0x999b694085195303 +results[160] = 0x786c4813534c4f7c +results[161] = 0xf5734d8c5fab8d6b +results[162] = 0x2de391cfb5779de0 +results[163] = 0x2e3f7fa3ba9eb56f +results[164] = 0xdead5a9a4df0dfb3 +results[165] = 0x1b8f4a4dfdd80e70 +results[166] = 0x7609e2f868f18404 +results[167] = 0x68b361ba0a70313a +results[168] = 0x76ce87165c528f7f +results[169] = 0x0dc10772a8ea9c4e +results[170] = 0xd2e5fa25a72ab09e +results[171] = 0xad809fb3939cd777 +results[172] = 0x16352adf9d6a3a9c +results[173] = 0x9bdeb820279213dc +results[174] = 0x80b6a1e6866b12fd +results[175] = 0x7f527dc3ac0d1694 +results[176] = 0x17496b42c5dbe6db +results[177] = 0xc24dc19c7ca79e34 +results[178] = 0xa64831e836c8a034 +results[179] = 0x24682d6a512f6826 +results[180] = 0x176275478bb34dd6 +results[181] = 0x15d14340add1bed8 +results[182] = 0xde6b230f4d4c3296 +results[183] = 0x7293ce6defb240c2 +results[184] = 0x423af83e8d97b26b +results[185] = 0xabe4514bb0e55c3d +results[186] = 0x652e9a64cf11ec25 +results[187] = 0x982b98dc8db3d487 +results[188] = 0x091135485f55e699 +results[189] = 0x695918ddefbd52f1 +results[190] = 0x0a7dc80e9a5b0a40 +results[191] = 0xca9d15f34c1ba45b +results[192] = 0x6c935d64d3b7302d +results[193] = 0x5234bbb90aaa70de +results[194] = 0x0ef1958a2296aa29 +results[195] = 0x25d3620809eecd2c +results[196] = 0x16f134b0d34b5bb1 +results[197] = 0xf82a969dd4881442 +results[198] = 0x49d2814bd89ef6c2 +results[199] = 0x6e7fb38294a01fbf +results[200] = 0x164d9d9b1da6d494 +results[201] = 0xbb5dfb096c35abc4 +results[202] = 0xcabae90257fa224c +results[203] = 0x9ab6a559c87cab80 +results[204] = 0x380d68e8e49b7e9f +results[205] = 0xf79c083adc0d37e8 +results[206] = 0xba64d909bdc4ba53 +results[207] = 0x0dc6667b572cc789 +results[208] = 0x55ee24aabb30861c +results[209] = 0xc502f73ecb1c4a20 +results[210] = 0x38b1456fcde93918 +results[211] = 0x2141ee9a3c77b6b0 +results[212] = 0xe69f51236ca3fb66 +results[213] = 0xc5f37aaa9b1ce932 +results[214] = 0xd68679f9d4b8a081 +results[215] = 0xed66941007951c78 +results[216] = 0xb0e4474a859787e7 +results[217] = 0xcfeaf39ded99a0f2 +results[218] = 0xe5631fff49814ab2 +results[219] = 0x16b261b42c457050 +results[220] = 0xbe5f102c724f3351 +results[221] = 0x1e79c2df84a854d8 +results[222] = 0x6a769cef03911ee4 +results[223] = 0x1718cec6b1a1f709 +results[224] = 0x5d7a257882fe9f1c +results[225] = 0xa54287b1675753a1 +results[226] = 0x74918d83c5878bdf +results[227] = 0x29db1bc986985790 +results[228] = 0x1c5ea996a8f42b38 +results[229] = 0x222fef0ba2c0197e +results[230] = 0xad7673fb29cdcc53 +results[231] = 0x21bd8144e4b084a4 +results[232] = 0x9b8693ee41b9b617 +results[233] = 0xbbe1eb9cc0bcbb9f +results[234] = 0x71c986eea66ec29e +results[235] = 0xbf24c98d5628acfb +results[236] = 0x8f5d11e30f781f40 +results[237] = 0x747f7e448812a84e +results[238] = 0x399abfb26d43fb42 +results[239] = 0xe6ba704e0e7b2363 +results[240] = 0xd5112f74ecf7f6a9 +results[241] = 0xd8668344c60e3250 +results[242] = 0x2620109986090869 +results[243] = 0xdcf66d7cf1397126 +results[244] = 0x8376756bff04e460 +results[245] = 0x838ff1d568bedd7d +results[246] = 0xa23f150b7bfca521 +results[247] = 0x0fb944ce24389485 +results[248] = 0x5e575860c8bfaf7d +results[249] = 0x080b316340206fa8 +results[250] = 0x91b7437d3e530e25 +results[251] = 0xf2097c1377db6ec5 +results[252] = 0xcd384a436421570f +results[253] = 0x7775a69042f4f0c7 +results[254] = 0x14ec6147300fea3e +results[255] = 0xd1f309f6409d2573 +results[256] = 0x677746d469287ae3 +results[257] = 0xcb5aca7829ed4c57 +results[258] = 0x02991e295bc48c8c +results[259] = 0x4632379c55af2b00 +results[260] = 0xabd0f789496a3644 +results[261] = 0x451c09536e9d3050 +results[262] = 0x9005b9d93161c21b +results[263] = 0x4e59bae5392dca20 +results[264] = 0x706444f94b0f414f +results[265] = 0xc3dcebd0183398a2 +results[266] = 0xbe5474a1a1e1cf96 +results[267] = 0x94be1d03b5e4eac2 +results[268] = 0xa3de1ec15d871eb8 +results[269] = 0x8ae244cb80486941 +results[270] = 0xca97adc6282ac16e +results[271] = 0xc8fdb250684927c5 +results[272] = 0x6872dd21bd535ae5 +results[273] = 0xb51228d01050e096 +results[274] = 0x859df64e0fd8c7cc +results[275] = 0x5d05e27f276b7e4f +results[276] = 0x0584540e31d1b9e5 +results[277] = 0xc337f4a0e21552fd +results[278] = 0x95ea3db92e6f032b +results[279] = 0x4a6b37effdde29b0 +results[280] = 0x7914115791ad2ae1 +results[281] = 0x5b47cb34cf864b7f +results[282] = 0x7edd07c2698ff07d +results[283] = 0x395fdd0cc3bc2cc3 +results[284] = 0xcd1ce6b7765de4d2 +results[285] = 0xf16e7025f1efe4af +results[286] = 0xc3a29cc74b73ef20 +results[287] = 0x3031a3d3380d6177 +results[288] = 0xc7ee08f5c1702bf9 +results[289] = 0x5e0cedba33bdb27b +results[290] = 0xcdb3950db1e49147 +results[291] = 0xcca6d14bc8fc50ef +results[292] = 0xaca626852b8fe7d2 +results[293] = 0xc5a40c61e15a80d7 +results[294] = 0x49c4528d698cc559 +results[295] = 0x3708db09df0d0f3e +results[296] = 0x6b733f779d27040f +results[297] = 0x26d84922327ad9f1 +results[298] = 0xeda39686465f96d2 +results[299] = 0xe5b5c42876946b34 +results[300] = 0xa6cb87c957ec83dc +results[301] = 0x6b44a89533045ddc +results[302] = 0x3f35de10c3e26064 +results[303] = 0xc59f6afa5679972e +results[304] = 0x8626be715f04d86c +results[305] = 0x286e08ccd80737ec +results[306] = 0xdeda5761d66c84cc +results[307] = 0x31dd7d556a544cf4 +results[308] = 0xba44448041b1cd16 +results[309] = 0x2555a56568a7eb49 +results[310] = 0x0b420f719026cd80 +results[311] = 0xd073dacd8c3db70b +results[312] = 0xc9cc5c5476dd8db4 +results[313] = 0xedf29198ccf146f9 +results[314] = 0x586b211c632850e9 +results[315] = 0x01b9e8e3015fc8be +results[316] = 0x3a4462c3c7fa47ad +results[317] = 0xb1380492f9c73546 +results[318] = 0xcff353156ffac399 +results[319] = 0xada757a7af7642df +results[320] = 0xa8b80eb5936555a1 +results[321] = 0xa7238b14f09620cc +results[322] = 0x4eb7decac3868de6 +results[323] = 0x0f14a28f0b3d1095 +results[324] = 0x4808e5e0057a004a +results[325] = 0x95bb21af452bbf48 +results[326] = 0xac187f2b85d75dc8 +results[327] = 0x812d607cb42e5804 +results[328] = 0xe58996930dde8cc9 +results[329] = 0x8bec4343dd7a138f +results[330] = 0x6ffd94370aa81f89 +results[331] = 0x5722c29feb5637af +results[332] = 0xe0f3b6e3ab68e74e +results[333] = 0x99064ae7d1afb3b2 +results[334] = 0xa632681d337a8f7a +results[335] = 0x9a9be73081878b50 +results[336] = 0xd7c7cf29ee906120 +results[337] = 0x40ad8d85d47614f0 +results[338] = 0x50034f9a76a277c7 +results[339] = 0xb340384cd6141cde +results[340] = 0xed813af3456cfe1f +results[341] = 0xfef8d0d7dc644864 +results[342] = 0x193fd150466768d2 +results[343] = 0x69ad1b9fe283faa3 +results[344] = 0x5c3b777a3e9e032f +results[345] = 0xd716722b08f92a48 +results[346] = 0x22b291b41667022b +results[347] = 0x02600a7dab453030 +results[348] = 0x75e50af8853c17f8 +results[349] = 0xd41e62e8dae9a150 +results[350] = 0x384790fde2a27283 +results[351] = 0x0681a60d921e369b +results[352] = 0x1f3491b1bcfc52da +results[353] = 0x8fd85d83d83c27b2 +results[354] = 0xb1eecc9d0675dcf6 +results[355] = 0x8350a8c2c74fb5c8 +results[356] = 0x20dee52010b21949 +results[357] = 0x894220cf22e1e916 +results[358] = 0x9ce3fe83da4ee327 +results[359] = 0x2f6c4a3707b7e5d0 +results[360] = 0x3e863c0281fc0d42 +results[361] = 0x830a5b785ea0f837 +results[362] = 0x0a6c8b7e54093d49 +results[363] = 0xd60956b3d4b19643 +results[364] = 0xcea7e4315589110d +results[365] = 0xb04464c8d6098390 +results[366] = 0x29db2e4a0d4e76c0 +results[367] = 0xea0ad0ef0634e1b6 +results[368] = 0x396d3ffd94a81164 +results[369] = 0x8a47e19f30a90895 +results[370] = 0xb0885c909b229a17 +results[371] = 0x1daf57397efc5b9c +results[372] = 0x18be9508ce34a4aa +results[373] = 0xb495058aba0e6be2 +results[374] = 0xf75a13a381d9ad98 +results[375] = 0xa9fdd73a3de17e5f +results[376] = 0xb62793f40fdc783f +results[377] = 0xe2828ed112467e1f +results[378] = 0x94ee71b1e07fbed6 +results[379] = 0xdad47f8930c0520a +results[380] = 0xe7990492b9b789a2 +results[381] = 0x9bc816c5dd87fb85 +results[382] = 0xf54a61f921d446fe +results[383] = 0x7b653dfd479bafd3 +results[384] = 0x552e97881a0c374a +results[385] = 0x9b016fbd9bf67c77 +results[386] = 0x7915059d93cf468f +results[387] = 0xd455c888838afcc6 +results[388] = 0x5cc8e81bf7bb9e3a +results[389] = 0xed0d7e95c0c483e7 +results[390] = 0x708aa3760f9be348 +results[391] = 0x0ab7579085a2f989 +results[392] = 0x8fb4331524c2c7d1 +results[393] = 0xe6981e11428e6022 +results[394] = 0x4d3e3bbd36d5681a +results[395] = 0xdf291fca0b7632fa +results[396] = 0x0bebb53361e08268 +results[397] = 0x1e476a43fa89d45a +results[398] = 0x2bfadc82eb9e6dd2 +results[399] = 0x5420a16dde02daa8 +results[400] = 0x17fdc9cbcf0f540e +results[401] = 0xca3af4066ab2f0e5 +results[402] = 0xcfa9ed369f0f00f5 +results[403] = 0x364851a637af9896 +results[404] = 0x79392e9d5f482118 +results[405] = 0xcf522c550c5a711d +results[406] = 0x51e48bb11c6259e5 +results[407] = 0x7d93e5c45073ec9f +results[408] = 0x7eb99bfd5ea1764c +results[409] = 0xdbbea01082f97af1 +results[410] = 0x28cf2d04ed4d515d +results[411] = 0xb52b8d946c189445 +results[412] = 0x07fb1890367d1952 +results[413] = 0xecb45ee942c8dd7e +results[414] = 0xbc70696cfd008362 +results[415] = 0x16ae0ff3438a746c +results[416] = 0x5673f4ffbcb7cdd4 +results[417] = 0xd26a07d773276056 +results[418] = 0xdbbe2875550f0e65 +results[419] = 0x05772545f8896464 +results[420] = 0x0db46442abf7c050 +results[421] = 0x6c13666ac77df703 +results[422] = 0xfe7c49f6a125b85c +results[423] = 0xc8afa681bae7ac64 +results[424] = 0xd5d43449a724f52f +results[425] = 0x7e59b6641341c468 +results[426] = 0x8cd5f7a926dd9026 +results[427] = 0xfc5c664d71af9e5d +results[428] = 0x28a833be194f59cd +results[429] = 0x23bde71eff584608 +results[430] = 0xa1c080185a8f8162 +results[431] = 0x1ee92f1f2e0f98d2 +results[432] = 0x52934207f27a4686 +results[433] = 0xe847e4b196201cca +results[434] = 0x57ac5b29cd5a0317 +results[435] = 0xcf9be064aac13c00 +results[436] = 0x0e19b366d1f6c4cb +results[437] = 0x94bea7ab64ad0b58 +results[438] = 0x5931ab92f6b3a625 +results[439] = 0x81fe316587f27eda +results[440] = 0x232e73c25f27f907 +results[441] = 0x88ba39167ce51fb1 +results[442] = 0xcf2e418dbe568b8a +results[443] = 0x7152a5d2946a380e +results[444] = 0x4fe9be9e32e74995 +results[445] = 0x87663b2dc218a5ba +results[446] = 0x34e40f0b1dfafbd3 +results[447] = 0xe6d2f64e20f2723e +results[448] = 0x57954b5830b63f0c +results[449] = 0x8a3acc12d33c5cf0 +results[450] = 0xfcf5a0a02fa62a46 +results[451] = 0xd1ab723b316f588e +results[452] = 0xbeac0a360fda06a9 +results[453] = 0x6ccf47c23ac018e7 +results[454] = 0xf35a4ca458278eb7 +results[455] = 0x801e80e3dbb3b19c +results[456] = 0x972833538af422e9 +results[457] = 0xee969257af072a74 +results[458] = 0x11ca642e24d3ac72 +results[459] = 0xbecc81f959f3a752 +results[460] = 0xa1dd21222e6aaeb8 +results[461] = 0x812d6099dfbf9a97 +results[462] = 0x0e40134ca941e2dc +results[463] = 0x0faa1149a4a2af70 +results[464] = 0x1da4054a9d9bd399 +results[465] = 0x182659c92e6f2e5a +results[466] = 0xc97536881cd775cb +results[467] = 0xc225441fd50ea311 +results[468] = 0x4ef21a9e620a2bd0 +results[469] = 0xc1118fa90b680650 +results[470] = 0xbd0181826a554c5d +results[471] = 0xdf02221a9352d7dd +results[472] = 0xf08548af7cc09a43 +results[473] = 0x25f1c22b4e3c1780 +results[474] = 0x9b3e81c03db8b6aa +results[475] = 0xf7ccaabd32178402 +results[476] = 0x8a407f23fe367580 +results[477] = 0x9e2dbaf5b0420afb +results[478] = 0x091d5835709a4520 +results[479] = 0x954d7b8a3e023eb2 +results[480] = 0xf8f8908db26b8954 +results[481] = 0x4140e828e71513aa +results[482] = 0x655537cfb083bbb4 +results[483] = 0x4003e4209ae22086 +results[484] = 0xb9a0a2a45b6006fa +results[485] = 0x94b2ff0cfd252ca4 +results[486] = 0x7cb6221e9a0d22c6 +results[487] = 0xb16e881aed23ba33 +results[488] = 0x5eae96ae6161e7df +results[489] = 0xffdf4fbaee88f309 +results[490] = 0x91c9af0dbb1e9046 +results[491] = 0x08abc6c4fc6dcbf0 +results[492] = 0xf29639ddf6d8e95a +results[493] = 0x6950ab53cb401e40 +results[494] = 0x91a899d45e522d50 +results[495] = 0x15238972e62feb6f +results[496] = 0x9f79e434045fdcdc +results[497] = 0xcb54bacaccd45eb6 +results[498] = 0x74975b281eca06e7 +results[499] = 0xa20e1718fa978588 +results[500] = 0xebd2af98b3780b6d +results[501] = 0xb5974db2a730e0ac +results[502] = 0x3dca212289344329 +results[503] = 0x428034f0b6a97456 +results[504] = 0x55a0e24931d95cde +results[505] = 0x4c40d566f5ce5f0a +results[506] = 0x70d2eec638a872de +results[507] = 0x763e632ff5173fce +results[508] = 0x1255522da2fe3ed7 +results[509] = 0x9c88fe0b9b18387a +results[510] = 0xa3da5f6f9b66fb39 +results[511] = 0x6a097736d72b3ef9 +results[512] = 0x8a3e0a2bcf4a7d36 +results[513] = 0xf155568fa815b0db +results[514] = 0x58ddde97c653b126 +results[515] = 0x81565b2f9c80a5cc +results[516] = 0x0cd4315cd80ab9a3 +results[517] = 0x3335be6e2d2458c5 +results[518] = 0x6d083ef49d9220d5 +results[519] = 0xe927d7c72e1ab01d +results[520] = 0xcfdcec0318a94e07 +results[521] = 0xbf08fe5ff6916c7a +results[522] = 0x5b4a5961bba50562 +results[523] = 0xcd697bfe961542d0 +results[524] = 0x7d3554c2291bfb51 +results[525] = 0xff5c793b3345819e +results[526] = 0x018bb0a93dae2888 +results[527] = 0xa3a21e74f071a749 +results[528] = 0x0e046d38fd804789 +results[529] = 0x8f85ea67d9538257 +results[530] = 0x8fa642b7b23c0988 +results[531] = 0xd97e5efbe493a3db +results[532] = 0xca91b47cfe973cd3 +results[533] = 0x4e156e82b12a8a7c +results[534] = 0x670bc9ddbdc136b9 +results[535] = 0xd3f2209662283f5e +results[536] = 0x56f00dabcf852c4c +results[537] = 0xa5daa56cc57609d6 +results[538] = 0x62dfbea04411ff59 +results[539] = 0x8113a93376332070 +results[540] = 0xd4313affadb3b050 +results[541] = 0x3d9c21f5f4c195d2 +results[542] = 0x2b9e32dcfa219241 +results[543] = 0x421077c18e7ab7e3 +results[544] = 0xa7634c395d32f69a +results[545] = 0x5b25af2205bf4edc +results[546] = 0x69be1d91a66b7506 +results[547] = 0x7e7d42e5f3f67f79 +results[548] = 0x58f848b24fe18de2 +results[549] = 0x91925a527107175b +results[550] = 0xca2257a7aa7f3115 +results[551] = 0x767f18993ea820bf +results[552] = 0xd9df057dee20f976 +results[553] = 0x37f258469f5edcee +results[554] = 0xa82530c013415730 +results[555] = 0xecb8b69ed3aaa6e7 +results[556] = 0x4ee0a2c874e22e63 +results[557] = 0x88cb367234f35bc2 +results[558] = 0x35c03f74efa977c7 +results[559] = 0x6ac47e77ff516844 +results[560] = 0xf47b04d73a158a9a +results[561] = 0x29f66b0663b93b7e +results[562] = 0x4cbeec6480b90ea9 +results[563] = 0x9fdf9b365790b68b +results[564] = 0x1aff965258f5a425 +results[565] = 0x87bd6d5afe0dd2e4 +results[566] = 0x7bf4d5263302e953 +results[567] = 0x1642e54546bb1075 +results[568] = 0x1849460523881335 +results[569] = 0xddbad0a84f8b7a2a +results[570] = 0xe5762be4ff3ee80f +results[571] = 0x65631ca58a4d95f9 +results[572] = 0x69545550c47bdc6e +results[573] = 0x4841dd1f657814da +results[574] = 0x0ae6680ad895da48 +results[575] = 0xa60a52472cd93e92 +results[576] = 0x3be98a28a2876f36 +results[577] = 0x907f81ccbc1f80b7 +results[578] = 0x40076f72137647f3 +results[579] = 0x07f03d49ac31f62a +results[580] = 0x7db4263df59cd21f +results[581] = 0x737b0c709f0e64e1 +results[582] = 0xd92c6512808fda03 +results[583] = 0x644c21a051268800 +results[584] = 0xf34b573d5b9ba5de +results[585] = 0x829305077e77fa44 +results[586] = 0x64b211a76a75b7e8 +results[587] = 0xb570469ecd9684a0 +results[588] = 0xe6f748a6b27d8062 +results[589] = 0x6ec4c26562f52b05 +results[590] = 0x1304f79102cad5ac +results[591] = 0xce6ea3d6facba2a9 +results[592] = 0xf1ad07f0cacc9bfb +results[593] = 0x4eb01d80c1f56ce6 +results[594] = 0x999b81aa0c07ff0a +results[595] = 0x7c7ae19beb2f5c6e +results[596] = 0x58c74dee1c40c7c6 +results[597] = 0x92ca325f7910e1a7 +results[598] = 0x4dd112b8c5229066 +results[599] = 0x0a693d77880a27a9 +results[600] = 0x332533a54ebc8731 +results[601] = 0xf2e9ae37c925c07f +results[602] = 0xdd09e9863779dfd5 +results[603] = 0xf0596ace78e70807 +results[604] = 0x088463e8e80dfac4 +results[605] = 0x2412bf71fd2dea21 +results[606] = 0xda0fc390e9a8e66a +results[607] = 0xb24aad47da8ac4c2 +results[608] = 0x4b7be929b65f5d5e +results[609] = 0x2273a2ca9026e405 +results[610] = 0x5b7b35392fcc50b8 +results[611] = 0x3c5611e6cae996f8 +results[612] = 0xb915534b35e5aaba +results[613] = 0xc0bb6e706c2b185d +results[614] = 0xd9c5e4f94c04e48c +results[615] = 0xc03a1122b956f606 +results[616] = 0x8391f84955485609 +results[617] = 0xd6bd34362dd1b985 +results[618] = 0xf3c43155f396303e +results[619] = 0x11a24d5c8d5a9d0b +results[620] = 0x10eecca92241de9a +results[621] = 0xfa8c67052e884cc4 +results[622] = 0xba31add190c20349 +results[623] = 0xda5961ed12e1ad56 +results[624] = 0x75e101640d16d8cb +results[625] = 0xf40afd244e2c5548 +results[626] = 0x837120b4da158a9f +results[627] = 0xd19adbdebda3002d +results[628] = 0xbc99a3bb8b681f61 +results[629] = 0x730993fe4d054964 +results[630] = 0x20ad5f663edcb184 +results[631] = 0xbbee978a742d1698 +results[632] = 0xa5d7cf05f695081e +results[633] = 0x59c9e1326092c686 +results[634] = 0x51a7a9c5734ecb97 +results[635] = 0x9d267db8a6523efd +results[636] = 0xeee7ef607bfb4b5a +results[637] = 0x13ec3e62fff91090 +results[638] = 0xfcdc993a4ba2e158 +results[639] = 0x3a94189b174dc0d0 +results[640] = 0x8aa43474e3941295 +results[641] = 0xf98c916d13e83ebe +results[642] = 0x2008f9d27959f9f1 +results[643] = 0x618c501fbacea917 +results[644] = 0xa3c681154874aa41 +results[645] = 0xde78a3053c5c879b +results[646] = 0xd2575f6d088ad202 +results[647] = 0x68a8db73accd3fd2 +results[648] = 0xbf753841363c57c5 +results[649] = 0xf21e80ed129ff33c +results[650] = 0x4b01d17b415faeff +results[651] = 0x774e46ab5a688933 +results[652] = 0x961fd279b36a8cfe +results[653] = 0x239b9e79531cf50c +results[654] = 0x4355c6465ca54755 +results[655] = 0x8651f8c215df68b7 +results[656] = 0x7085accb497f789d +results[657] = 0xe71850cdcd4b0f8d +results[658] = 0xbde81a6e83e45666 +results[659] = 0x4089693a675b86d4 +results[660] = 0x84b4891f8b1b3a35 +results[661] = 0xf02fc79f3dd81dab +results[662] = 0x2443d93a066e5cc2 +results[663] = 0x7abeb2bac8fd2fb4 +results[664] = 0x1756726cd00f7aa9 +results[665] = 0x066f1e072c449408 +results[666] = 0xc1527f97f37f3ec9 +results[667] = 0x5558aa7cf01f268d +results[668] = 0x8c263a395f47caa0 +results[669] = 0x768cbc7d2d36d20a +results[670] = 0x387917bfb2befc2a +results[671] = 0x52f58fb464f2aa09 +results[672] = 0xe1b3c4f752763193 +results[673] = 0xa2ae07db2e068672 +results[674] = 0xa05e986ef7fd9fc9 +results[675] = 0x4474984630af6726 +results[676] = 0x34b7ad282c9a270d +results[677] = 0xffebc23f2279798f +results[678] = 0xef9b8fc490d8b3df +results[679] = 0xb8ba31cadb383d30 +results[680] = 0xf46ad8ccd6ccb968 +results[681] = 0xfbc60e36f8f95a0a +results[682] = 0x4048a9c6e24e39f8 +results[683] = 0xa599e623029d9136 +results[684] = 0xff4ecca509c4c299 +results[685] = 0x99394c3741971251 +results[686] = 0x681f0d0578b33a80 +results[687] = 0xb896f1dcb4fdf75c +results[688] = 0x024d2999634b95dd +results[689] = 0x181f43111dc72da0 +results[690] = 0x4246a9b6e0b8f9e4 +results[691] = 0x93ba84c20c53ff2d +results[692] = 0x5d1fb1636c27ca8a +results[693] = 0x3d42be332ff2e060 +results[694] = 0xe378dbf61ecc6687 +results[695] = 0x6a159e364bc6531e +results[696] = 0x71c66b0e082bf07d +results[697] = 0x59a09b04f52f512a +results[698] = 0x7a0d46be04a0604c +results[699] = 0x74e101b250b14361 +results[700] = 0xc896e37746a05e46 +results[701] = 0x4796a8b24d45e6a2 +results[702] = 0xeb82569ea7cf731b +results[703] = 0xc9119a950c8113cd +results[704] = 0x735031d7e7ccfb18 +results[705] = 0x9f77683db43c51e7 +results[706] = 0x2f59450e2b725ca1 +results[707] = 0xd5882fecc028135d +results[708] = 0xfe6cd4e3b764e4c6 +results[709] = 0x49a08526101dd386 +results[710] = 0x22a9eb7f5189af92 +results[711] = 0x4f34d58a7167cf97 +results[712] = 0x99835bbb2e9d1836 +results[713] = 0xce791fc932e6c974 +results[714] = 0x93711ccd77ea40ca +results[715] = 0xf1cf81803b5687cf +results[716] = 0x7b3ed9f479ed806a +results[717] = 0xf7b0fdf2f06777f5 +results[718] = 0x820f408b748af14a +results[719] = 0x7d8a138024bb8dd5 +results[720] = 0xf46712468ac164f5 +results[721] = 0x305623432da20595 +results[722] = 0x5b208b5198e746e6 +results[723] = 0x60c6292f45ebaa97 +results[724] = 0x0a10e633e2941ed0 +results[725] = 0xe6bf138626a78c05 +results[726] = 0x057a7e5333e751df +results[727] = 0x65f79205b57bff3a +results[728] = 0xca2d1a4aca9fbd04 +results[729] = 0x8d32cca8e3182c8d +results[730] = 0xd18e8b26931eb799 +results[731] = 0xa3dc3485a8bf7b5d +results[732] = 0xbcc16ad6816fad76 +results[733] = 0x21b4c8988dd1474a +results[734] = 0xfb862e8475d1c153 +results[735] = 0x91ab3b6e49505493 +results[736] = 0xce5e5fccb7fd08e2 +results[737] = 0x079ac7be2974ea07 +results[738] = 0x69f4bc540ce5062c +results[739] = 0x471cb77bbdee417e +results[740] = 0x568be73d3232edd5 +results[741] = 0x84e367231428e196 +results[742] = 0x403c774c43b0aa30 +results[743] = 0xf8a4048b3230b6bc +results[744] = 0x6442363986f0259d +results[745] = 0xa20d34b39fbf7142 +results[746] = 0x8a0f26508da61073 +results[747] = 0xa4a44a3ae3bebd57 +results[748] = 0xe137f5826cc2d443 +results[749] = 0x6786e92c374c7630 +results[750] = 0x63a509c0c7b57f8d +results[751] = 0xf22544598a9b64f6 +results[752] = 0xce0b11a6640717f5 +results[753] = 0x2d2dde6bd7c8b3d9 +results[754] = 0x97ca53a2724377d9 +results[755] = 0x9b7837d1c8b1075a +results[756] = 0xd56b80945b1428bd +results[757] = 0x3c38726d81fa9336 +results[758] = 0xa2f521c225320fb7 +results[759] = 0x9304abf547ca25d3 +results[760] = 0xb964d5fded91d25a +results[761] = 0x76d451f2760ba394 +results[762] = 0xe5bc37603a765eab +results[763] = 0x7e806c5b8a948b05 +results[764] = 0x3fd79614e3556873 +results[765] = 0xf14ceadc72c639e0 +results[766] = 0xbd7a5531be3b465c +results[767] = 0x4451e0144c499527 +results[768] = 0xe193d509afd65235 +results[769] = 0x4f52c1c539f097a2 +results[770] = 0x3933efa2f7e80191 +results[771] = 0x33233864ce2e3763 +results[772] = 0xd83f40c2e1753e7b +results[773] = 0x8fbeb3484aaa52db +results[774] = 0xcf1e95e3cd78d100 +results[775] = 0x326be561c26d6087 +results[776] = 0x0b2bd72911dd5346 +results[777] = 0x127d356657db50b3 +results[778] = 0x8a0a09937a52343e +results[779] = 0xa748e26a8e3d61a0 +results[780] = 0x428393bdf30feaed +results[781] = 0xd70b4f69c5f24b65 +results[782] = 0xc6730ffc40613c64 +results[783] = 0xb1635dd0e4e9bac3 +results[784] = 0x91f6b23afd340dc7 +results[785] = 0xc8da28b1ca1b1bda +results[786] = 0x0bba33ff35edc52d +results[787] = 0x4c2e4aee7203740c +results[788] = 0x0c397663a1eb678a +results[789] = 0x1962c2a24f5445cb +results[790] = 0x952c5e48849fde76 +results[791] = 0x3fac78955ef6bc4e +results[792] = 0x482f74569ba0caf2 +results[793] = 0x8343887340c9142a +results[794] = 0x346807ef9e14170c +results[795] = 0x35d60eff968f8250 +results[796] = 0xa7e8f17e5c24805e +results[797] = 0x6d97d93575d64b8b +results[798] = 0xe8c20505e5d51394 +results[799] = 0xb14d64addfe39f3d +results[800] = 0x4c7bc8a520b4729f +results[801] = 0x70b72d3acc828651 +results[802] = 0xf7a8a7a3923bc3df +results[803] = 0x96fe9fb38435fb7a +results[804] = 0xb350b04b7d8c8c58 +results[805] = 0xed3c28d69c79cd0f +results[806] = 0x4cb6f7877d62e0f0 +results[807] = 0x7135e14ea73dd5d3 +results[808] = 0x3d3ccdf44aefbb15 +results[809] = 0x96f86b3860e024ab +results[810] = 0xb0c7dfa854250683 +results[811] = 0x45e0ffd6cddda764 +results[812] = 0xe07913a41d430d57 +results[813] = 0x6597b2c4e8f69cbc +results[814] = 0x4996ea439f392f45 +results[815] = 0x4c01cfc56a79785e +results[816] = 0xec84128dda47defe +results[817] = 0x78b8c16de40a6f18 +results[818] = 0x37a1ea14cfcce431 +results[819] = 0x75a4aa49c892fbd0 +results[820] = 0xfb8ea38c48ac6a8c +results[821] = 0x4d3fe650a0b8b5ea +results[822] = 0xc2fcdc32bcb10a0c +results[823] = 0xf925a9bdc6b9f749 +results[824] = 0x892ed1c4f8f31c12 +results[825] = 0x3294f07be9a9e9c1 +results[826] = 0x0a942375bba0f0c7 +results[827] = 0x605a4c4da4d8a255 +results[828] = 0xf8bd4fb081504f37 +results[829] = 0xcd28df9547bbeead +results[830] = 0x0812ff7487bfc0f8 +results[831] = 0x43ec58656d43419e +results[832] = 0xe9368941b44cc5ed +results[833] = 0x7347ac4cf7f8daac +results[834] = 0xdd9ca403626d4b47 +results[835] = 0xcd18aa38abba295b +results[836] = 0xaf56dadcf52b2a45 +results[837] = 0x8f50f41dcf8c0f85 +results[838] = 0xa4aef8e4191d1a45 +results[839] = 0xd061b83d1498bafb +results[840] = 0x8d7e382c1830c113 +results[841] = 0xbdea6c6dec3814cc +results[842] = 0x547991819dd50189 +results[843] = 0x456ad501fd6f9850 +results[844] = 0x58c60e3ae1aeda71 +results[845] = 0x668a950a277dd26f +results[846] = 0xa6e5367192a8eee7 +results[847] = 0x5a39c21167f7db87 +results[848] = 0xc0c1f211a98ab2ea +results[849] = 0x2e5a323a71fd213a +results[850] = 0x2067eadb64d2c43c +results[851] = 0x35a228fd107e2348 +results[852] = 0x4453268c39f06d99 +results[853] = 0x741221f15d5c37ab +results[854] = 0xbd1c6ead9ac5326d +results[855] = 0x4718f86cb54f1b91 +results[856] = 0xd9d103ac84cf4d56 +results[857] = 0x803194945d0f0fda +results[858] = 0xa8967716f9406485 +results[859] = 0xcc1a58e22747accf +results[860] = 0xdd2eae48772f3a9b +results[861] = 0x0c90cdcde376bb98 +results[862] = 0x521ec0424bf76261 +results[863] = 0x7d3c26e630230e7c +results[864] = 0xaba28352229955c1 +results[865] = 0xf18a4fab9f03ae8f +results[866] = 0x2f444364304776d5 +results[867] = 0x82472e72730def56 +results[868] = 0x4c2bac170df4384b +results[869] = 0xd4a69991fbc2a26e +results[870] = 0xd78d7d4ad7691348 +results[871] = 0xb588f43aa08c643e +results[872] = 0xd86a58e477cce73c +results[873] = 0xdc1b777462bddb88 +results[874] = 0x890e325ed58f7cf5 +results[875] = 0xd213f5e207ce034c +results[876] = 0xd60e9f25ae934863 +results[877] = 0xb4332d289b803ad8 +results[878] = 0xe6aaf577e860ce87 +results[879] = 0x39f5f441b279c687 +results[880] = 0x8b8b502b78aa24b1 +results[881] = 0x37f0e2221b92bf51 +results[882] = 0x5aadae8c52f5737b +results[883] = 0xfb42836bd285fe49 +results[884] = 0x657b084fa7e52576 +results[885] = 0xcd2a47a7c6759800 +results[886] = 0x5589b34d42a65f14 +results[887] = 0xe2fd3b9582f58c5e +results[888] = 0x7349953c446236ed +results[889] = 0x0deee402d8ea320e +results[890] = 0xbac0b88a7d2dc244 +results[891] = 0x56e9c38b2334a879 +results[892] = 0xb2d93997fd640a25 +results[893] = 0x056d59e20389e2c9 +results[894] = 0xd62271d1f04ede99 +results[895] = 0xa01f031b7f3bea26 +results[896] = 0x5a83c597ab1eb287 +results[897] = 0xd7133751ed7ae8de +results[898] = 0xda8733bbfd4f8e6b +results[899] = 0x226ff09dba50e0be +results[900] = 0x6f0acfb289e5d49a +results[901] = 0x5276fbf7cb3f1b43 +results[902] = 0x5cf581f97d331d85 +results[903] = 0xa901ec053cbc0861 +results[904] = 0xed4ff27791621c2e +results[905] = 0x218a6c5b0b2c1e5b +results[906] = 0x94e0b4bf6ce7fca9 +results[907] = 0x477f94fa55bc4bd0 +results[908] = 0x83f1ff489f6a089f +results[909] = 0x0f5cc3b2890a8a16 +results[910] = 0x537d974451499e79 +results[911] = 0x5e3e28a9d1162ade +results[912] = 0x4b149ad2812fb64a +results[913] = 0x4bd49b0576f4c9ca +results[914] = 0xc1be773216e9b834 +results[915] = 0x93b62bf904ea5cfe +results[916] = 0xe6f6bad00e4e788b +results[917] = 0x9004806b3031251e +results[918] = 0x1564d68858c525d9 +results[919] = 0x7c7d4e987307ff8d +results[920] = 0x2824b6f69f8170ba +results[921] = 0xff3a276036af05c7 +results[922] = 0x239634793cb1acc3 +results[923] = 0x521cb0950a8fc759 +results[924] = 0x198356ba68545323 +results[925] = 0x72f8fd91ae2b26b7 +results[926] = 0xe694d974a756fac0 +results[927] = 0x95f58632fb4635ed +results[928] = 0xbefa9505e2cbaa20 +results[929] = 0x82166d1463952313 +results[930] = 0xe60d54b9e928dd1e +results[931] = 0x56b62b11b5514dd3 +results[932] = 0x1bc173801ee34540 +results[933] = 0x44c03c6150e11269 +results[934] = 0xc62bcd8883866637 +results[935] = 0x70cf481a2d4cf8be +results[936] = 0xe51506bc5fed91e3 +results[937] = 0x4737e81a3424a398 +results[938] = 0xcc237e52f78873a7 +results[939] = 0x89334bdda00834d6 +results[940] = 0x2d3700e5a70df04d +results[941] = 0xd23596e15844d1ad +results[942] = 0x42bb59ffb1511046 +results[943] = 0xcdd1c47491b32ee6 +results[944] = 0x27416adf3445bd86 +results[945] = 0xc9b71c1edbb3763f +results[946] = 0xbade3326f6811761 +results[947] = 0xe7d9c7d6c746475d +results[948] = 0x3d4c6da2d53de36b +results[949] = 0x8654308a221c7ae9 +results[950] = 0x998a73d4aa29557a +results[951] = 0xc67ec5832e4f85fe +results[952] = 0x682780df561e9c1c +results[953] = 0x5447e7f80a3a974d +results[954] = 0x5eaed87c46b30a5a +results[955] = 0x4a6b3a46ca47fd65 +results[956] = 0xd76c1e09aebc5cab +results[957] = 0xb9ad16ef564d2863 +results[958] = 0xe052503e8dde48ee +results[959] = 0x1fef7cc8929ca7f1 +results[960] = 0x4fb10c7670be8c0e +results[961] = 0x2f58855046c13f0c +results[962] = 0x6e8546c6701b80e8 +results[963] = 0x29b4124f4a2c32bf +results[964] = 0x492890a5f2189bcb +results[965] = 0xa2c34dce699e86d9 +results[966] = 0x22722b1fde23c3e1 +results[967] = 0xfa717d99d8ffa00d +results[968] = 0x4a5f1f1d062cf628 +results[969] = 0xb6bb19724fb1b620 +results[970] = 0x7bb512183259befb +results[971] = 0x5d667f975a08843a +results[972] = 0xebdd7d19b0e9a078 +results[973] = 0xe32a19161515bb5f +results[974] = 0x4e8bdee9d7c62b44 +results[975] = 0x70941fb4d0efc9d4 +results[976] = 0x38c605f25b92d53a +results[977] = 0x2662dd69d6348df8 +results[978] = 0xf315371b75acc0e0 +results[979] = 0xdc7d42836b5e6542 +results[980] = 0x32d6018eddfb9466 +results[981] = 0x1f14de28e423baee +results[982] = 0x5788b5566ce5b003 +results[983] = 0xe05abc84e8101176 +results[984] = 0xe3f91de694403ce0 +results[985] = 0x79b01ccb9d2eb9ad +results[986] = 0x12145f81cb50c9e9 +results[987] = 0x2330d0a66d17b3cf +results[988] = 0xea4786b7eb7b9285 +results[989] = 0xd89e41b59a389ac3 +results[990] = 0xe4819d61ec1578fc +results[991] = 0xc475133395d8d89d +results[992] = 0x17d7cd0b6f33d717 +results[993] = 0xbbd5e290bf68e503 +results[994] = 0x002c4cf4a33853aa +results[995] = 0x23eab3967979cc9f +results[996] = 0xeca9da44de9309e0 +results[997] = 0x832f380e9195b003 +results[998] = 0x58d433dcc28fa2b7 +results[999] = 0x67602167e28698d4 +results[1000] = 0xd573c6b5f8a7f241 +results[1001] = 0x706db6b9d1496bf5 +results[1002] = 0xb0b21a76e47c4c59 +results[1003] = 0x4f7e287f9e3690aa +results[1004] = 0x500dd4c4f0a4c3dc +results[1005] = 0xf4918060655512ca +results[1006] = 0x6c66c367c37b266b +results[1007] = 0xcff53f4f1b7cb4d8 +results[1008] = 0x0435ea098243f4ec +results[1009] = 0x99c3ba40eacca7e5 +results[1010] = 0x733be71e86526b77 +results[1011] = 0xa6754304576ba277 +results[1012] = 0x7dc4efc79bef4927 +results[1013] = 0x20e6b2edfcf4b14b +results[1014] = 0x17780bd2a5009547 +results[1015] = 0x2d9f7fa171d5f525 +results[1016] = 0xd49cb7497f5953a3 +results[1017] = 0x7eb6f23c0238f2f5 +results[1018] = 0x650200c45e6fe0ec +results[1019] = 0x45eaaaf71fbaf468 +results[1020] = 0x25c1f2c3408e5217 +results[1021] = 0xe29c4a8e474444bd +results[1022] = 0x7c02ada387755086 +results[1023] = 0xb0dc8f5c98e33fab +Total time: 400968.187500 ms, 368961.604492 spent crunching diff --git a/A5.1/CUDA/demorun_quadrofx570m_0000_0000_0000_0000.divergent b/A5.1/CUDA/demorun_quadrofx570m_0000_0000_0000_0000.divergent new file mode 100644 index 0000000..4f235ec --- /dev/null +++ b/A5.1/CUDA/demorun_quadrofx570m_0000_0000_0000_0000.divergent @@ -0,0 +1,1091 @@ +Computing 1024 chains divided into 32 blocks of 32 threads, starting at 0x0000000000000000 +Will execute 64 runs of 32768 steps each. +Run 001/064, starting at index 0x1fffff... 6037.768066 ms. +Run 002/064, starting at index 0x1f7fff... 6037.411133 ms. +Run 003/064, starting at index 0x1effff... 6038.666016 ms. +Run 004/064, starting at index 0x1e7fff... 6037.028809 ms. +Run 005/064, starting at index 0x1dffff... 6038.917969 ms. +Run 006/064, starting at index 0x1d7fff... 6036.770020 ms. +Run 007/064, starting at index 0x1cffff... 6038.205078 ms. +Run 008/064, starting at index 0x1c7fff... 6036.848145 ms. +Run 009/064, starting at index 0x1bffff... 6035.267090 ms. +Run 010/064, starting at index 0x1b7fff... 6042.598145 ms. +Run 011/064, starting at index 0x1affff... 6039.005859 ms. +Run 012/064, starting at index 0x1a7fff... 6035.996094 ms. +Run 013/064, starting at index 0x19ffff... 6038.198242 ms. +Run 014/064, starting at index 0x197fff... 6040.106934 ms. +Run 015/064, starting at index 0x18ffff... 6037.026855 ms. +Run 016/064, starting at index 0x187fff... 6038.116211 ms. +Run 017/064, starting at index 0x17ffff... 6036.172852 ms. +Run 018/064, starting at index 0x177fff... 6035.915039 ms. +Run 019/064, starting at index 0x16ffff... 6037.880859 ms. +Run 020/064, starting at index 0x167fff... 6036.029785 ms. +Run 021/064, starting at index 0x15ffff... 6037.264160 ms. +Run 022/064, starting at index 0x157fff... 6038.553223 ms. +Run 023/064, starting at index 0x14ffff... 6037.145020 ms. +Run 024/064, starting at index 0x147fff... 6037.606934 ms. +Run 025/064, starting at index 0x13ffff... 6033.444824 ms. +Run 026/064, starting at index 0x137fff... 6039.455078 ms. +Run 027/064, starting at index 0x12ffff... 6038.554199 ms. +Run 028/064, starting at index 0x127fff... 6035.266113 ms. +Run 029/064, starting at index 0x11ffff... 6038.082031 ms. +Run 030/064, starting at index 0x117fff... 6038.958008 ms. +Run 031/064, starting at index 0x10ffff... 6037.788086 ms. +Run 032/064, starting at index 0x107fff... 6041.295898 ms. +Run 033/064, starting at index 0x0fffff... 6038.426758 ms. +Run 034/064, starting at index 0x0f7fff... 6036.000977 ms. +Run 035/064, starting at index 0x0effff... 6040.701172 ms. +Run 036/064, starting at index 0x0e7fff... 6034.370117 ms. +Run 037/064, starting at index 0x0dffff... 6037.330078 ms. +Run 038/064, starting at index 0x0d7fff... 6038.161133 ms. +Run 039/064, starting at index 0x0cffff... 6037.805176 ms. +Run 040/064, starting at index 0x0c7fff... 6037.294922 ms. +Run 041/064, starting at index 0x0bffff... 6036.848145 ms. +Run 042/064, starting at index 0x0b7fff... 6037.225098 ms. +Run 043/064, starting at index 0x0affff... 6037.464844 ms. +Run 044/064, starting at index 0x0a7fff... 6038.009766 ms. +Run 045/064, starting at index 0x09ffff... 6038.238770 ms. +Run 046/064, starting at index 0x097fff... 6039.528809 ms. +Run 047/064, starting at index 0x08ffff... 6037.883789 ms. +Run 048/064, starting at index 0x087fff... 6038.420898 ms. +Run 049/064, starting at index 0x07ffff... 6037.770020 ms. +Run 050/064, starting at index 0x077fff... 6037.272949 ms. +Run 051/064, starting at index 0x06ffff... 6039.850098 ms. +Run 052/064, starting at index 0x067fff... 6038.624023 ms. +Run 053/064, starting at index 0x05ffff... 6037.640137 ms. +Run 054/064, starting at index 0x057fff... 6040.437012 ms. +Run 055/064, starting at index 0x04ffff... 6036.588867 ms. +Run 056/064, starting at index 0x047fff... 6039.389160 ms. +Run 057/064, starting at index 0x03ffff... 6037.024902 ms. +Run 058/064, starting at index 0x037fff... 6036.002930 ms. +Run 059/064, starting at index 0x02ffff... 6038.806152 ms. +Run 060/064, starting at index 0x027fff... 6036.800781 ms. +Run 061/064, starting at index 0x01ffff... 6034.452148 ms. +Run 062/064, starting at index 0x017fff... 6037.757812 ms. +Run 063/064, starting at index 0x00ffff... 6040.509766 ms. +Run 064/064, starting at index 0x007fff... 6038.237793 ms. +results[0] = 0x6d14a53d7fe0574c +results[1] = 0x635809b0850c5594 +results[2] = 0x55085ccd8357a140 +results[3] = 0x808608202d55b473 +results[4] = 0x905ddf13110ca25a +results[5] = 0xcbbe903d8847444e +results[6] = 0xb32dcd0ee320992f +results[7] = 0x38087d640fea5c81 +results[8] = 0xdbd57f6ee98bb3ad +results[9] = 0xd688814759e2afec +results[10] = 0xc6544dcb35b0662c +results[11] = 0xaa412cb2ee69a252 +results[12] = 0xb81bc666d899e7b2 +results[13] = 0x17c7f536f8ed71ad +results[14] = 0xca96ee565f91a065 +results[15] = 0x7d3ad8fa8fd1592f +results[16] = 0x54dac55590718d8b +results[17] = 0xb40a7b47844b1a45 +results[18] = 0xd7fca4d986f21d50 +results[19] = 0x7caed26f67b95da9 +results[20] = 0xb4959d0385ede6ba +results[21] = 0xd331067eb96588a0 +results[22] = 0xba018003fc1a615f +results[23] = 0x4f9793de6a64e2ae +results[24] = 0x0908f1e250b2cc4b +results[25] = 0xf934542afa2090e2 +results[26] = 0x9a35d808b4876606 +results[27] = 0xce300c008809c67a +results[28] = 0x8064b9299b48bbdb +results[29] = 0x5fdc5d28b326482a +results[30] = 0xc7abc499c9ea64b4 +results[31] = 0xb6940626c78a7282 +results[32] = 0x084c95b71cec57aa +results[33] = 0x8b5b4ceafa392859 +results[34] = 0x7ee4a05b3e94f9cf +results[35] = 0x46d3283cf8fe0f16 +results[36] = 0x117e303f21335eaf +results[37] = 0xbe4395045eca2d1b +results[38] = 0xf0bee73601967d87 +results[39] = 0xbaf8c91d1773505d +results[40] = 0x6e2431517df580aa +results[41] = 0xafd417bc45bdf857 +results[42] = 0xe12245e0a97abfd0 +results[43] = 0x168966fc179664dd +results[44] = 0x12b26b9c1470800f +results[45] = 0x40061cb2130cc20a +results[46] = 0x6de3eda57996d5d2 +results[47] = 0xcc858c9362e57136 +results[48] = 0x9f70ef2e9b2fdcf3 +results[49] = 0x6726efd6d3b052b0 +results[50] = 0x93c0a82cfc8513e0 +results[51] = 0x1a4895aa29fd46c1 +results[52] = 0x51500bbdf8264f28 +results[53] = 0xaabd1418d1c15897 +results[54] = 0x4793bc05d85dfe5f +results[55] = 0x846e5dacde619498 +results[56] = 0x7ad5c746e49292a3 +results[57] = 0x277570f191b13e3f +results[58] = 0x220909d1b8af5291 +results[59] = 0xb925eefe0d8e6282 +results[60] = 0x394ae931e61c2501 +results[61] = 0xa05a576939a6b171 +results[62] = 0x5766fa32b07b3a23 +results[63] = 0xdf132753bccce175 +results[64] = 0x981d30ccd74f0b33 +results[65] = 0x996326910f10f7ad +results[66] = 0x007dfe6d63cd294d +results[67] = 0xbc4c6a9b85eb6306 +results[68] = 0xdb0170f16533cfcf +results[69] = 0x4a46229e764951d6 +results[70] = 0x99f9a461e39c6714 +results[71] = 0x71b44bcb4dafece4 +results[72] = 0x3254e61a5dc13531 +results[73] = 0xf93aacc76b52669c +results[74] = 0x4b0bcfe6e74e18c0 +results[75] = 0x9fd2688ffca19491 +results[76] = 0xee3f5b23eca2f6ec +results[77] = 0x8e5dd0fb4e99a493 +results[78] = 0x93bdc4b0d78c1202 +results[79] = 0x03c56c39d840be03 +results[80] = 0x22200a85ca952455 +results[81] = 0x4cb6d5d853b1e6d9 +results[82] = 0x36cded8207d4fe22 +results[83] = 0x078fad74194e2cf7 +results[84] = 0xd15a1134d82466c0 +results[85] = 0x74c7f05c524b5bd0 +results[86] = 0xdc0681590a2e7a49 +results[87] = 0x2d82c1467bc2010c +results[88] = 0x7ffd37315cc0698b +results[89] = 0x21155049dd1bab55 +results[90] = 0x3241f3db60941abc +results[91] = 0xb0d2a7a66965b595 +results[92] = 0xef4696d7758bffa6 +results[93] = 0xd2a4b0b1bc5ac6f1 +results[94] = 0xb51cd3897b1db885 +results[95] = 0xce4cc912b7b99eea +results[96] = 0x592c60b8a0cc8caf +results[97] = 0x936e5ab76bfb36a3 +results[98] = 0x587ebe213161b80f +results[99] = 0xa33ba2717d3ec085 +results[100] = 0xaa4d5cf576eda748 +results[101] = 0x050a5d8f62717e32 +results[102] = 0x4bb9553a4539da78 +results[103] = 0xc8f7e1aa0c8b454c +results[104] = 0xd180afc5c3cf7710 +results[105] = 0x9009a5b0ded8f742 +results[106] = 0xc67376779552ae17 +results[107] = 0xde4ff4fda752be26 +results[108] = 0x98b3573f0069f967 +results[109] = 0x33543db4d2a687e1 +results[110] = 0xb60df09650b000db +results[111] = 0xfeed30dc328902b2 +results[112] = 0xc082f7484ffc2f24 +results[113] = 0xe5e9c530b420a605 +results[114] = 0x7008a5c9c2b3d7f0 +results[115] = 0x2f00e701b9985ca5 +results[116] = 0x9380f8c6e320b6a8 +results[117] = 0x5beb78279c6d72e7 +results[118] = 0xec50944bb9f2986b +results[119] = 0xaf00a8fadce7ddfc +results[120] = 0xbacbbe6838cf9071 +results[121] = 0x77af8db8c2989fe6 +results[122] = 0x5659aeb2f64e6cf6 +results[123] = 0x5ca33f9374bca2a1 +results[124] = 0x5dae5ad3173c21e1 +results[125] = 0xf204cd37fda76144 +results[126] = 0x83fd5b47876779f2 +results[127] = 0xa68e807b715ac1b6 +results[128] = 0xd65c37f3b72fa0f3 +results[129] = 0xd20542aa09b7d9b0 +results[130] = 0x02a8fe11bb73f552 +results[131] = 0x533f2ed0718a69c5 +results[132] = 0x2374856bc1c5b347 +results[133] = 0x5f16b55459910405 +results[134] = 0xa70f7aa639ec66e5 +results[135] = 0x72c87254b9be8e34 +results[136] = 0x00a4457291d198a2 +results[137] = 0xb7f5816b88f6b7d5 +results[138] = 0x9101d53ac93b0a94 +results[139] = 0xc2847d8cd0959446 +results[140] = 0xdc9d0b6a2eaa5fc5 +results[141] = 0x4ce9969b3339d3f9 +results[142] = 0xa0aa52c4ae30d2e7 +results[143] = 0x7df19fb7fadaad9c +results[144] = 0xbf90a4b6381f553b +results[145] = 0x3e30aeadcf7f55f9 +results[146] = 0x5a4337688ebd87a6 +results[147] = 0x7df4712a3f8b877b +results[148] = 0x49412cb81c6ace13 +results[149] = 0xb124ab8b5d09a229 +results[150] = 0xb9611e36d130a666 +results[151] = 0x8a7121f493725a12 +results[152] = 0x392b6a8915401b0c +results[153] = 0x4ce685fc0f085ad7 +results[154] = 0xe960f6f076aacfae +results[155] = 0xa81ea00a77d58aab +results[156] = 0xcf4db41629064327 +results[157] = 0x9b5a7e72f5f5a9a5 +results[158] = 0x796f0471536603ee +results[159] = 0x999b694085195303 +results[160] = 0x786c4813534c4f7c +results[161] = 0xf5734d8c5fab8d6b +results[162] = 0x2de391cfb5779de0 +results[163] = 0x2e3f7fa3ba9eb56f +results[164] = 0xdead5a9a4df0dfb3 +results[165] = 0x1b8f4a4dfdd80e70 +results[166] = 0x7609e2f868f18404 +results[167] = 0x68b361ba0a70313a +results[168] = 0x76ce87165c528f7f +results[169] = 0x0dc10772a8ea9c4e +results[170] = 0xd2e5fa25a72ab09e +results[171] = 0xad809fb3939cd777 +results[172] = 0x16352adf9d6a3a9c +results[173] = 0x9bdeb820279213dc +results[174] = 0x80b6a1e6866b12fd +results[175] = 0x7f527dc3ac0d1694 +results[176] = 0x17496b42c5dbe6db +results[177] = 0xc24dc19c7ca79e34 +results[178] = 0xa64831e836c8a034 +results[179] = 0x24682d6a512f6826 +results[180] = 0x176275478bb34dd6 +results[181] = 0x15d14340add1bed8 +results[182] = 0xde6b230f4d4c3296 +results[183] = 0x7293ce6defb240c2 +results[184] = 0x423af83e8d97b26b +results[185] = 0xabe4514bb0e55c3d +results[186] = 0x652e9a64cf11ec25 +results[187] = 0x982b98dc8db3d487 +results[188] = 0x091135485f55e699 +results[189] = 0x695918ddefbd52f1 +results[190] = 0x0a7dc80e9a5b0a40 +results[191] = 0xca9d15f34c1ba45b +results[192] = 0x6c935d64d3b7302d +results[193] = 0x5234bbb90aaa70de +results[194] = 0x0ef1958a2296aa29 +results[195] = 0x25d3620809eecd2c +results[196] = 0x16f134b0d34b5bb1 +results[197] = 0xf82a969dd4881442 +results[198] = 0x49d2814bd89ef6c2 +results[199] = 0x6e7fb38294a01fbf +results[200] = 0x164d9d9b1da6d494 +results[201] = 0xbb5dfb096c35abc4 +results[202] = 0xcabae90257fa224c +results[203] = 0x9ab6a559c87cab80 +results[204] = 0x380d68e8e49b7e9f +results[205] = 0xf79c083adc0d37e8 +results[206] = 0xba64d909bdc4ba53 +results[207] = 0x0dc6667b572cc789 +results[208] = 0x55ee24aabb30861c +results[209] = 0xc502f73ecb1c4a20 +results[210] = 0x38b1456fcde93918 +results[211] = 0x2141ee9a3c77b6b0 +results[212] = 0xe69f51236ca3fb66 +results[213] = 0xc5f37aaa9b1ce932 +results[214] = 0xd68679f9d4b8a081 +results[215] = 0xed66941007951c78 +results[216] = 0xb0e4474a859787e7 +results[217] = 0xcfeaf39ded99a0f2 +results[218] = 0xe5631fff49814ab2 +results[219] = 0x16b261b42c457050 +results[220] = 0xbe5f102c724f3351 +results[221] = 0x1e79c2df84a854d8 +results[222] = 0x6a769cef03911ee4 +results[223] = 0x1718cec6b1a1f709 +results[224] = 0x5d7a257882fe9f1c +results[225] = 0xa54287b1675753a1 +results[226] = 0x74918d83c5878bdf +results[227] = 0x29db1bc986985790 +results[228] = 0x1c5ea996a8f42b38 +results[229] = 0x222fef0ba2c0197e +results[230] = 0xad7673fb29cdcc53 +results[231] = 0x21bd8144e4b084a4 +results[232] = 0x9b8693ee41b9b617 +results[233] = 0xbbe1eb9cc0bcbb9f +results[234] = 0x71c986eea66ec29e +results[235] = 0xbf24c98d5628acfb +results[236] = 0x8f5d11e30f781f40 +results[237] = 0x747f7e448812a84e +results[238] = 0x399abfb26d43fb42 +results[239] = 0xe6ba704e0e7b2363 +results[240] = 0xd5112f74ecf7f6a9 +results[241] = 0xd8668344c60e3250 +results[242] = 0x2620109986090869 +results[243] = 0xdcf66d7cf1397126 +results[244] = 0x8376756bff04e460 +results[245] = 0x838ff1d568bedd7d +results[246] = 0xa23f150b7bfca521 +results[247] = 0x0fb944ce24389485 +results[248] = 0x5e575860c8bfaf7d +results[249] = 0x080b316340206fa8 +results[250] = 0x91b7437d3e530e25 +results[251] = 0xf2097c1377db6ec5 +results[252] = 0xcd384a436421570f +results[253] = 0x7775a69042f4f0c7 +results[254] = 0x14ec6147300fea3e +results[255] = 0xd1f309f6409d2573 +results[256] = 0x677746d469287ae3 +results[257] = 0xcb5aca7829ed4c57 +results[258] = 0x02991e295bc48c8c +results[259] = 0x4632379c55af2b00 +results[260] = 0xabd0f789496a3644 +results[261] = 0x451c09536e9d3050 +results[262] = 0x9005b9d93161c21b +results[263] = 0x4e59bae5392dca20 +results[264] = 0x706444f94b0f414f +results[265] = 0xc3dcebd0183398a2 +results[266] = 0xbe5474a1a1e1cf96 +results[267] = 0x94be1d03b5e4eac2 +results[268] = 0xa3de1ec15d871eb8 +results[269] = 0x8ae244cb80486941 +results[270] = 0xca97adc6282ac16e +results[271] = 0xc8fdb250684927c5 +results[272] = 0x6872dd21bd535ae5 +results[273] = 0xb51228d01050e096 +results[274] = 0x859df64e0fd8c7cc +results[275] = 0x5d05e27f276b7e4f +results[276] = 0x0584540e31d1b9e5 +results[277] = 0xc337f4a0e21552fd +results[278] = 0x95ea3db92e6f032b +results[279] = 0x4a6b37effdde29b0 +results[280] = 0x7914115791ad2ae1 +results[281] = 0x5b47cb34cf864b7f +results[282] = 0x7edd07c2698ff07d +results[283] = 0x395fdd0cc3bc2cc3 +results[284] = 0xcd1ce6b7765de4d2 +results[285] = 0xf16e7025f1efe4af +results[286] = 0xc3a29cc74b73ef20 +results[287] = 0x3031a3d3380d6177 +results[288] = 0xc7ee08f5c1702bf9 +results[289] = 0x5e0cedba33bdb27b +results[290] = 0xcdb3950db1e49147 +results[291] = 0xcca6d14bc8fc50ef +results[292] = 0xaca626852b8fe7d2 +results[293] = 0xc5a40c61e15a80d7 +results[294] = 0x49c4528d698cc559 +results[295] = 0x3708db09df0d0f3e +results[296] = 0x6b733f779d27040f +results[297] = 0x26d84922327ad9f1 +results[298] = 0xeda39686465f96d2 +results[299] = 0xe5b5c42876946b34 +results[300] = 0xa6cb87c957ec83dc +results[301] = 0x6b44a89533045ddc +results[302] = 0x3f35de10c3e26064 +results[303] = 0xc59f6afa5679972e +results[304] = 0x8626be715f04d86c +results[305] = 0x286e08ccd80737ec +results[306] = 0xdeda5761d66c84cc +results[307] = 0x31dd7d556a544cf4 +results[308] = 0xba44448041b1cd16 +results[309] = 0x2555a56568a7eb49 +results[310] = 0x0b420f719026cd80 +results[311] = 0xd073dacd8c3db70b +results[312] = 0xc9cc5c5476dd8db4 +results[313] = 0xedf29198ccf146f9 +results[314] = 0x586b211c632850e9 +results[315] = 0x01b9e8e3015fc8be +results[316] = 0x3a4462c3c7fa47ad +results[317] = 0xb1380492f9c73546 +results[318] = 0xcff353156ffac399 +results[319] = 0xada757a7af7642df +results[320] = 0xa8b80eb5936555a1 +results[321] = 0xa7238b14f09620cc +results[322] = 0x4eb7decac3868de6 +results[323] = 0x0f14a28f0b3d1095 +results[324] = 0x4808e5e0057a004a +results[325] = 0x95bb21af452bbf48 +results[326] = 0xac187f2b85d75dc8 +results[327] = 0x812d607cb42e5804 +results[328] = 0xe58996930dde8cc9 +results[329] = 0x8bec4343dd7a138f +results[330] = 0x6ffd94370aa81f89 +results[331] = 0x5722c29feb5637af +results[332] = 0xe0f3b6e3ab68e74e +results[333] = 0x99064ae7d1afb3b2 +results[334] = 0xa632681d337a8f7a +results[335] = 0x9a9be73081878b50 +results[336] = 0xd7c7cf29ee906120 +results[337] = 0x40ad8d85d47614f0 +results[338] = 0x50034f9a76a277c7 +results[339] = 0xb340384cd6141cde +results[340] = 0xed813af3456cfe1f +results[341] = 0xfef8d0d7dc644864 +results[342] = 0x193fd150466768d2 +results[343] = 0x69ad1b9fe283faa3 +results[344] = 0x5c3b777a3e9e032f +results[345] = 0xd716722b08f92a48 +results[346] = 0x22b291b41667022b +results[347] = 0x02600a7dab453030 +results[348] = 0x75e50af8853c17f8 +results[349] = 0xd41e62e8dae9a150 +results[350] = 0x384790fde2a27283 +results[351] = 0x0681a60d921e369b +results[352] = 0x1f3491b1bcfc52da +results[353] = 0x8fd85d83d83c27b2 +results[354] = 0xb1eecc9d0675dcf6 +results[355] = 0x8350a8c2c74fb5c8 +results[356] = 0x20dee52010b21949 +results[357] = 0x894220cf22e1e916 +results[358] = 0x9ce3fe83da4ee327 +results[359] = 0x2f6c4a3707b7e5d0 +results[360] = 0x3e863c0281fc0d42 +results[361] = 0x830a5b785ea0f837 +results[362] = 0x0a6c8b7e54093d49 +results[363] = 0xd60956b3d4b19643 +results[364] = 0xcea7e4315589110d +results[365] = 0xb04464c8d6098390 +results[366] = 0x29db2e4a0d4e76c0 +results[367] = 0xea0ad0ef0634e1b6 +results[368] = 0x396d3ffd94a81164 +results[369] = 0x8a47e19f30a90895 +results[370] = 0xb0885c909b229a17 +results[371] = 0x1daf57397efc5b9c +results[372] = 0x18be9508ce34a4aa +results[373] = 0xb495058aba0e6be2 +results[374] = 0xf75a13a381d9ad98 +results[375] = 0xa9fdd73a3de17e5f +results[376] = 0xb62793f40fdc783f +results[377] = 0xe2828ed112467e1f +results[378] = 0x94ee71b1e07fbed6 +results[379] = 0xdad47f8930c0520a +results[380] = 0xe7990492b9b789a2 +results[381] = 0x9bc816c5dd87fb85 +results[382] = 0xf54a61f921d446fe +results[383] = 0x7b653dfd479bafd3 +results[384] = 0x552e97881a0c374a +results[385] = 0x9b016fbd9bf67c77 +results[386] = 0x7915059d93cf468f +results[387] = 0xd455c888838afcc6 +results[388] = 0x5cc8e81bf7bb9e3a +results[389] = 0xed0d7e95c0c483e7 +results[390] = 0x708aa3760f9be348 +results[391] = 0x0ab7579085a2f989 +results[392] = 0x8fb4331524c2c7d1 +results[393] = 0xe6981e11428e6022 +results[394] = 0x4d3e3bbd36d5681a +results[395] = 0xdf291fca0b7632fa +results[396] = 0x0bebb53361e08268 +results[397] = 0x1e476a43fa89d45a +results[398] = 0x2bfadc82eb9e6dd2 +results[399] = 0x5420a16dde02daa8 +results[400] = 0x17fdc9cbcf0f540e +results[401] = 0xca3af4066ab2f0e5 +results[402] = 0xcfa9ed369f0f00f5 +results[403] = 0x364851a637af9896 +results[404] = 0x79392e9d5f482118 +results[405] = 0xcf522c550c5a711d +results[406] = 0x51e48bb11c6259e5 +results[407] = 0x7d93e5c45073ec9f +results[408] = 0x7eb99bfd5ea1764c +results[409] = 0xdbbea01082f97af1 +results[410] = 0x28cf2d04ed4d515d +results[411] = 0xb52b8d946c189445 +results[412] = 0x07fb1890367d1952 +results[413] = 0xecb45ee942c8dd7e +results[414] = 0xbc70696cfd008362 +results[415] = 0x16ae0ff3438a746c +results[416] = 0x5673f4ffbcb7cdd4 +results[417] = 0xd26a07d773276056 +results[418] = 0xdbbe2875550f0e65 +results[419] = 0x05772545f8896464 +results[420] = 0x0db46442abf7c050 +results[421] = 0x6c13666ac77df703 +results[422] = 0xfe7c49f6a125b85c +results[423] = 0xc8afa681bae7ac64 +results[424] = 0xd5d43449a724f52f +results[425] = 0x7e59b6641341c468 +results[426] = 0x8cd5f7a926dd9026 +results[427] = 0xfc5c664d71af9e5d +results[428] = 0x28a833be194f59cd +results[429] = 0x23bde71eff584608 +results[430] = 0xa1c080185a8f8162 +results[431] = 0x1ee92f1f2e0f98d2 +results[432] = 0x52934207f27a4686 +results[433] = 0xe847e4b196201cca +results[434] = 0x57ac5b29cd5a0317 +results[435] = 0xcf9be064aac13c00 +results[436] = 0x0e19b366d1f6c4cb +results[437] = 0x94bea7ab64ad0b58 +results[438] = 0x5931ab92f6b3a625 +results[439] = 0x81fe316587f27eda +results[440] = 0x232e73c25f27f907 +results[441] = 0x88ba39167ce51fb1 +results[442] = 0xcf2e418dbe568b8a +results[443] = 0x7152a5d2946a380e +results[444] = 0x4fe9be9e32e74995 +results[445] = 0x87663b2dc218a5ba +results[446] = 0x34e40f0b1dfafbd3 +results[447] = 0xe6d2f64e20f2723e +results[448] = 0x57954b5830b63f0c +results[449] = 0x8a3acc12d33c5cf0 +results[450] = 0xfcf5a0a02fa62a46 +results[451] = 0xd1ab723b316f588e +results[452] = 0xbeac0a360fda06a9 +results[453] = 0x6ccf47c23ac018e7 +results[454] = 0xf35a4ca458278eb7 +results[455] = 0x801e80e3dbb3b19c +results[456] = 0x972833538af422e9 +results[457] = 0xee969257af072a74 +results[458] = 0x11ca642e24d3ac72 +results[459] = 0xbecc81f959f3a752 +results[460] = 0xa1dd21222e6aaeb8 +results[461] = 0x812d6099dfbf9a97 +results[462] = 0x0e40134ca941e2dc +results[463] = 0x0faa1149a4a2af70 +results[464] = 0x1da4054a9d9bd399 +results[465] = 0x182659c92e6f2e5a +results[466] = 0xc97536881cd775cb +results[467] = 0xc225441fd50ea311 +results[468] = 0x4ef21a9e620a2bd0 +results[469] = 0xc1118fa90b680650 +results[470] = 0xbd0181826a554c5d +results[471] = 0xdf02221a9352d7dd +results[472] = 0xf08548af7cc09a43 +results[473] = 0x25f1c22b4e3c1780 +results[474] = 0x9b3e81c03db8b6aa +results[475] = 0xf7ccaabd32178402 +results[476] = 0x8a407f23fe367580 +results[477] = 0x9e2dbaf5b0420afb +results[478] = 0x091d5835709a4520 +results[479] = 0x954d7b8a3e023eb2 +results[480] = 0xf8f8908db26b8954 +results[481] = 0x4140e828e71513aa +results[482] = 0x655537cfb083bbb4 +results[483] = 0x4003e4209ae22086 +results[484] = 0xb9a0a2a45b6006fa +results[485] = 0x94b2ff0cfd252ca4 +results[486] = 0x7cb6221e9a0d22c6 +results[487] = 0xb16e881aed23ba33 +results[488] = 0x5eae96ae6161e7df +results[489] = 0xffdf4fbaee88f309 +results[490] = 0x91c9af0dbb1e9046 +results[491] = 0x08abc6c4fc6dcbf0 +results[492] = 0xf29639ddf6d8e95a +results[493] = 0x6950ab53cb401e40 +results[494] = 0x91a899d45e522d50 +results[495] = 0x15238972e62feb6f +results[496] = 0x9f79e434045fdcdc +results[497] = 0xcb54bacaccd45eb6 +results[498] = 0x74975b281eca06e7 +results[499] = 0xa20e1718fa978588 +results[500] = 0xebd2af98b3780b6d +results[501] = 0xb5974db2a730e0ac +results[502] = 0x3dca212289344329 +results[503] = 0x428034f0b6a97456 +results[504] = 0x55a0e24931d95cde +results[505] = 0x4c40d566f5ce5f0a +results[506] = 0x70d2eec638a872de +results[507] = 0x763e632ff5173fce +results[508] = 0x1255522da2fe3ed7 +results[509] = 0x9c88fe0b9b18387a +results[510] = 0xa3da5f6f9b66fb39 +results[511] = 0x6a097736d72b3ef9 +results[512] = 0x8a3e0a2bcf4a7d36 +results[513] = 0xf155568fa815b0db +results[514] = 0x58ddde97c653b126 +results[515] = 0x81565b2f9c80a5cc +results[516] = 0x0cd4315cd80ab9a3 +results[517] = 0x3335be6e2d2458c5 +results[518] = 0x6d083ef49d9220d5 +results[519] = 0xe927d7c72e1ab01d +results[520] = 0xcfdcec0318a94e07 +results[521] = 0xbf08fe5ff6916c7a +results[522] = 0x5b4a5961bba50562 +results[523] = 0xcd697bfe961542d0 +results[524] = 0x7d3554c2291bfb51 +results[525] = 0xff5c793b3345819e +results[526] = 0x018bb0a93dae2888 +results[527] = 0xa3a21e74f071a749 +results[528] = 0x0e046d38fd804789 +results[529] = 0x8f85ea67d9538257 +results[530] = 0x8fa642b7b23c0988 +results[531] = 0xd97e5efbe493a3db +results[532] = 0xca91b47cfe973cd3 +results[533] = 0x4e156e82b12a8a7c +results[534] = 0x670bc9ddbdc136b9 +results[535] = 0xd3f2209662283f5e +results[536] = 0x56f00dabcf852c4c +results[537] = 0xa5daa56cc57609d6 +results[538] = 0x62dfbea04411ff59 +results[539] = 0x8113a93376332070 +results[540] = 0xd4313affadb3b050 +results[541] = 0x3d9c21f5f4c195d2 +results[542] = 0x2b9e32dcfa219241 +results[543] = 0x421077c18e7ab7e3 +results[544] = 0xa7634c395d32f69a +results[545] = 0x5b25af2205bf4edc +results[546] = 0x69be1d91a66b7506 +results[547] = 0x7e7d42e5f3f67f79 +results[548] = 0x58f848b24fe18de2 +results[549] = 0x91925a527107175b +results[550] = 0xca2257a7aa7f3115 +results[551] = 0x767f18993ea820bf +results[552] = 0xd9df057dee20f976 +results[553] = 0x37f258469f5edcee +results[554] = 0xa82530c013415730 +results[555] = 0xecb8b69ed3aaa6e7 +results[556] = 0x4ee0a2c874e22e63 +results[557] = 0x88cb367234f35bc2 +results[558] = 0x35c03f74efa977c7 +results[559] = 0x6ac47e77ff516844 +results[560] = 0xf47b04d73a158a9a +results[561] = 0x29f66b0663b93b7e +results[562] = 0x4cbeec6480b90ea9 +results[563] = 0x9fdf9b365790b68b +results[564] = 0x1aff965258f5a425 +results[565] = 0x87bd6d5afe0dd2e4 +results[566] = 0x7bf4d5263302e953 +results[567] = 0x1642e54546bb1075 +results[568] = 0x1849460523881335 +results[569] = 0xddbad0a84f8b7a2a +results[570] = 0xe5762be4ff3ee80f +results[571] = 0x65631ca58a4d95f9 +results[572] = 0x69545550c47bdc6e +results[573] = 0x4841dd1f657814da +results[574] = 0x0ae6680ad895da48 +results[575] = 0xa60a52472cd93e92 +results[576] = 0x3be98a28a2876f36 +results[577] = 0x907f81ccbc1f80b7 +results[578] = 0x40076f72137647f3 +results[579] = 0x07f03d49ac31f62a +results[580] = 0x7db4263df59cd21f +results[581] = 0x737b0c709f0e64e1 +results[582] = 0xd92c6512808fda03 +results[583] = 0x644c21a051268800 +results[584] = 0xf34b573d5b9ba5de +results[585] = 0x829305077e77fa44 +results[586] = 0x64b211a76a75b7e8 +results[587] = 0xb570469ecd9684a0 +results[588] = 0xe6f748a6b27d8062 +results[589] = 0x6ec4c26562f52b05 +results[590] = 0x1304f79102cad5ac +results[591] = 0xce6ea3d6facba2a9 +results[592] = 0xf1ad07f0cacc9bfb +results[593] = 0x4eb01d80c1f56ce6 +results[594] = 0x999b81aa0c07ff0a +results[595] = 0x7c7ae19beb2f5c6e +results[596] = 0x58c74dee1c40c7c6 +results[597] = 0x92ca325f7910e1a7 +results[598] = 0x4dd112b8c5229066 +results[599] = 0x0a693d77880a27a9 +results[600] = 0x332533a54ebc8731 +results[601] = 0xf2e9ae37c925c07f +results[602] = 0xdd09e9863779dfd5 +results[603] = 0xf0596ace78e70807 +results[604] = 0x088463e8e80dfac4 +results[605] = 0x2412bf71fd2dea21 +results[606] = 0xda0fc390e9a8e66a +results[607] = 0xb24aad47da8ac4c2 +results[608] = 0x4b7be929b65f5d5e +results[609] = 0x2273a2ca9026e405 +results[610] = 0x5b7b35392fcc50b8 +results[611] = 0x3c5611e6cae996f8 +results[612] = 0xb915534b35e5aaba +results[613] = 0xc0bb6e706c2b185d +results[614] = 0xd9c5e4f94c04e48c +results[615] = 0xc03a1122b956f606 +results[616] = 0x8391f84955485609 +results[617] = 0xd6bd34362dd1b985 +results[618] = 0xf3c43155f396303e +results[619] = 0x11a24d5c8d5a9d0b +results[620] = 0x10eecca92241de9a +results[621] = 0xfa8c67052e884cc4 +results[622] = 0xba31add190c20349 +results[623] = 0xda5961ed12e1ad56 +results[624] = 0x75e101640d16d8cb +results[625] = 0xf40afd244e2c5548 +results[626] = 0x837120b4da158a9f +results[627] = 0xd19adbdebda3002d +results[628] = 0xbc99a3bb8b681f61 +results[629] = 0x730993fe4d054964 +results[630] = 0x20ad5f663edcb184 +results[631] = 0xbbee978a742d1698 +results[632] = 0xa5d7cf05f695081e +results[633] = 0x59c9e1326092c686 +results[634] = 0x51a7a9c5734ecb97 +results[635] = 0x9d267db8a6523efd +results[636] = 0xeee7ef607bfb4b5a +results[637] = 0x13ec3e62fff91090 +results[638] = 0xfcdc993a4ba2e158 +results[639] = 0x3a94189b174dc0d0 +results[640] = 0x8aa43474e3941295 +results[641] = 0xf98c916d13e83ebe +results[642] = 0x2008f9d27959f9f1 +results[643] = 0x618c501fbacea917 +results[644] = 0xa3c681154874aa41 +results[645] = 0xde78a3053c5c879b +results[646] = 0xd2575f6d088ad202 +results[647] = 0x68a8db73accd3fd2 +results[648] = 0xbf753841363c57c5 +results[649] = 0xf21e80ed129ff33c +results[650] = 0x4b01d17b415faeff +results[651] = 0x774e46ab5a688933 +results[652] = 0x961fd279b36a8cfe +results[653] = 0x239b9e79531cf50c +results[654] = 0x4355c6465ca54755 +results[655] = 0x8651f8c215df68b7 +results[656] = 0x7085accb497f789d +results[657] = 0xe71850cdcd4b0f8d +results[658] = 0xbde81a6e83e45666 +results[659] = 0x4089693a675b86d4 +results[660] = 0x84b4891f8b1b3a35 +results[661] = 0xf02fc79f3dd81dab +results[662] = 0x2443d93a066e5cc2 +results[663] = 0x7abeb2bac8fd2fb4 +results[664] = 0x1756726cd00f7aa9 +results[665] = 0x066f1e072c449408 +results[666] = 0xc1527f97f37f3ec9 +results[667] = 0x5558aa7cf01f268d +results[668] = 0x8c263a395f47caa0 +results[669] = 0x768cbc7d2d36d20a +results[670] = 0x387917bfb2befc2a +results[671] = 0x52f58fb464f2aa09 +results[672] = 0xe1b3c4f752763193 +results[673] = 0xa2ae07db2e068672 +results[674] = 0xa05e986ef7fd9fc9 +results[675] = 0x4474984630af6726 +results[676] = 0x34b7ad282c9a270d +results[677] = 0xffebc23f2279798f +results[678] = 0xef9b8fc490d8b3df +results[679] = 0xb8ba31cadb383d30 +results[680] = 0xf46ad8ccd6ccb968 +results[681] = 0xfbc60e36f8f95a0a +results[682] = 0x4048a9c6e24e39f8 +results[683] = 0xa599e623029d9136 +results[684] = 0xff4ecca509c4c299 +results[685] = 0x99394c3741971251 +results[686] = 0x681f0d0578b33a80 +results[687] = 0xb896f1dcb4fdf75c +results[688] = 0x024d2999634b95dd +results[689] = 0x181f43111dc72da0 +results[690] = 0x4246a9b6e0b8f9e4 +results[691] = 0x93ba84c20c53ff2d +results[692] = 0x5d1fb1636c27ca8a +results[693] = 0x3d42be332ff2e060 +results[694] = 0xe378dbf61ecc6687 +results[695] = 0x6a159e364bc6531e +results[696] = 0x71c66b0e082bf07d +results[697] = 0x59a09b04f52f512a +results[698] = 0x7a0d46be04a0604c +results[699] = 0x74e101b250b14361 +results[700] = 0xc896e37746a05e46 +results[701] = 0x4796a8b24d45e6a2 +results[702] = 0xeb82569ea7cf731b +results[703] = 0xc9119a950c8113cd +results[704] = 0x735031d7e7ccfb18 +results[705] = 0x9f77683db43c51e7 +results[706] = 0x2f59450e2b725ca1 +results[707] = 0xd5882fecc028135d +results[708] = 0xfe6cd4e3b764e4c6 +results[709] = 0x49a08526101dd386 +results[710] = 0x22a9eb7f5189af92 +results[711] = 0x4f34d58a7167cf97 +results[712] = 0x99835bbb2e9d1836 +results[713] = 0xce791fc932e6c974 +results[714] = 0x93711ccd77ea40ca +results[715] = 0xf1cf81803b5687cf +results[716] = 0x7b3ed9f479ed806a +results[717] = 0xf7b0fdf2f06777f5 +results[718] = 0x820f408b748af14a +results[719] = 0x7d8a138024bb8dd5 +results[720] = 0xf46712468ac164f5 +results[721] = 0x305623432da20595 +results[722] = 0x5b208b5198e746e6 +results[723] = 0x60c6292f45ebaa97 +results[724] = 0x0a10e633e2941ed0 +results[725] = 0xe6bf138626a78c05 +results[726] = 0x057a7e5333e751df +results[727] = 0x65f79205b57bff3a +results[728] = 0xca2d1a4aca9fbd04 +results[729] = 0x8d32cca8e3182c8d +results[730] = 0xd18e8b26931eb799 +results[731] = 0xa3dc3485a8bf7b5d +results[732] = 0xbcc16ad6816fad76 +results[733] = 0x21b4c8988dd1474a +results[734] = 0xfb862e8475d1c153 +results[735] = 0x91ab3b6e49505493 +results[736] = 0xce5e5fccb7fd08e2 +results[737] = 0x079ac7be2974ea07 +results[738] = 0x69f4bc540ce5062c +results[739] = 0x471cb77bbdee417e +results[740] = 0x568be73d3232edd5 +results[741] = 0x84e367231428e196 +results[742] = 0x403c774c43b0aa30 +results[743] = 0xf8a4048b3230b6bc +results[744] = 0x6442363986f0259d +results[745] = 0xa20d34b39fbf7142 +results[746] = 0x8a0f26508da61073 +results[747] = 0xa4a44a3ae3bebd57 +results[748] = 0xe137f5826cc2d443 +results[749] = 0x6786e92c374c7630 +results[750] = 0x63a509c0c7b57f8d +results[751] = 0xf22544598a9b64f6 +results[752] = 0xce0b11a6640717f5 +results[753] = 0x2d2dde6bd7c8b3d9 +results[754] = 0x97ca53a2724377d9 +results[755] = 0x9b7837d1c8b1075a +results[756] = 0xd56b80945b1428bd +results[757] = 0x3c38726d81fa9336 +results[758] = 0xa2f521c225320fb7 +results[759] = 0x9304abf547ca25d3 +results[760] = 0xb964d5fded91d25a +results[761] = 0x76d451f2760ba394 +results[762] = 0xe5bc37603a765eab +results[763] = 0x7e806c5b8a948b05 +results[764] = 0x3fd79614e3556873 +results[765] = 0xf14ceadc72c639e0 +results[766] = 0xbd7a5531be3b465c +results[767] = 0x4451e0144c499527 +results[768] = 0xe193d509afd65235 +results[769] = 0x4f52c1c539f097a2 +results[770] = 0x3933efa2f7e80191 +results[771] = 0x33233864ce2e3763 +results[772] = 0xd83f40c2e1753e7b +results[773] = 0x8fbeb3484aaa52db +results[774] = 0xcf1e95e3cd78d100 +results[775] = 0x326be561c26d6087 +results[776] = 0x0b2bd72911dd5346 +results[777] = 0x127d356657db50b3 +results[778] = 0x8a0a09937a52343e +results[779] = 0xa748e26a8e3d61a0 +results[780] = 0x428393bdf30feaed +results[781] = 0xd70b4f69c5f24b65 +results[782] = 0xc6730ffc40613c64 +results[783] = 0xb1635dd0e4e9bac3 +results[784] = 0x91f6b23afd340dc7 +results[785] = 0xc8da28b1ca1b1bda +results[786] = 0x0bba33ff35edc52d +results[787] = 0x4c2e4aee7203740c +results[788] = 0x0c397663a1eb678a +results[789] = 0x1962c2a24f5445cb +results[790] = 0x952c5e48849fde76 +results[791] = 0x3fac78955ef6bc4e +results[792] = 0x482f74569ba0caf2 +results[793] = 0x8343887340c9142a +results[794] = 0x346807ef9e14170c +results[795] = 0x35d60eff968f8250 +results[796] = 0xa7e8f17e5c24805e +results[797] = 0x6d97d93575d64b8b +results[798] = 0xe8c20505e5d51394 +results[799] = 0xb14d64addfe39f3d +results[800] = 0x4c7bc8a520b4729f +results[801] = 0x70b72d3acc828651 +results[802] = 0xf7a8a7a3923bc3df +results[803] = 0x96fe9fb38435fb7a +results[804] = 0xb350b04b7d8c8c58 +results[805] = 0xed3c28d69c79cd0f +results[806] = 0x4cb6f7877d62e0f0 +results[807] = 0x7135e14ea73dd5d3 +results[808] = 0x3d3ccdf44aefbb15 +results[809] = 0x96f86b3860e024ab +results[810] = 0xb0c7dfa854250683 +results[811] = 0x45e0ffd6cddda764 +results[812] = 0xe07913a41d430d57 +results[813] = 0x6597b2c4e8f69cbc +results[814] = 0x4996ea439f392f45 +results[815] = 0x4c01cfc56a79785e +results[816] = 0xec84128dda47defe +results[817] = 0x78b8c16de40a6f18 +results[818] = 0x37a1ea14cfcce431 +results[819] = 0x75a4aa49c892fbd0 +results[820] = 0xfb8ea38c48ac6a8c +results[821] = 0x4d3fe650a0b8b5ea +results[822] = 0xc2fcdc32bcb10a0c +results[823] = 0xf925a9bdc6b9f749 +results[824] = 0x892ed1c4f8f31c12 +results[825] = 0x3294f07be9a9e9c1 +results[826] = 0x0a942375bba0f0c7 +results[827] = 0x605a4c4da4d8a255 +results[828] = 0xf8bd4fb081504f37 +results[829] = 0xcd28df9547bbeead +results[830] = 0x0812ff7487bfc0f8 +results[831] = 0x43ec58656d43419e +results[832] = 0xe9368941b44cc5ed +results[833] = 0x7347ac4cf7f8daac +results[834] = 0xdd9ca403626d4b47 +results[835] = 0xcd18aa38abba295b +results[836] = 0xaf56dadcf52b2a45 +results[837] = 0x8f50f41dcf8c0f85 +results[838] = 0xa4aef8e4191d1a45 +results[839] = 0xd061b83d1498bafb +results[840] = 0x8d7e382c1830c113 +results[841] = 0xbdea6c6dec3814cc +results[842] = 0x547991819dd50189 +results[843] = 0x456ad501fd6f9850 +results[844] = 0x58c60e3ae1aeda71 +results[845] = 0x668a950a277dd26f +results[846] = 0xa6e5367192a8eee7 +results[847] = 0x5a39c21167f7db87 +results[848] = 0xc0c1f211a98ab2ea +results[849] = 0x2e5a323a71fd213a +results[850] = 0x2067eadb64d2c43c +results[851] = 0x35a228fd107e2348 +results[852] = 0x4453268c39f06d99 +results[853] = 0x741221f15d5c37ab +results[854] = 0xbd1c6ead9ac5326d +results[855] = 0x4718f86cb54f1b91 +results[856] = 0xd9d103ac84cf4d56 +results[857] = 0x803194945d0f0fda +results[858] = 0xa8967716f9406485 +results[859] = 0xcc1a58e22747accf +results[860] = 0xdd2eae48772f3a9b +results[861] = 0x0c90cdcde376bb98 +results[862] = 0x521ec0424bf76261 +results[863] = 0x7d3c26e630230e7c +results[864] = 0xaba28352229955c1 +results[865] = 0xf18a4fab9f03ae8f +results[866] = 0x2f444364304776d5 +results[867] = 0x82472e72730def56 +results[868] = 0x4c2bac170df4384b +results[869] = 0xd4a69991fbc2a26e +results[870] = 0xd78d7d4ad7691348 +results[871] = 0xb588f43aa08c643e +results[872] = 0xd86a58e477cce73c +results[873] = 0xdc1b777462bddb88 +results[874] = 0x890e325ed58f7cf5 +results[875] = 0xd213f5e207ce034c +results[876] = 0xd60e9f25ae934863 +results[877] = 0xb4332d289b803ad8 +results[878] = 0xe6aaf577e860ce87 +results[879] = 0x39f5f441b279c687 +results[880] = 0x8b8b502b78aa24b1 +results[881] = 0x37f0e2221b92bf51 +results[882] = 0x5aadae8c52f5737b +results[883] = 0xfb42836bd285fe49 +results[884] = 0x657b084fa7e52576 +results[885] = 0xcd2a47a7c6759800 +results[886] = 0x5589b34d42a65f14 +results[887] = 0xe2fd3b9582f58c5e +results[888] = 0x7349953c446236ed +results[889] = 0x0deee402d8ea320e +results[890] = 0xbac0b88a7d2dc244 +results[891] = 0x56e9c38b2334a879 +results[892] = 0xb2d93997fd640a25 +results[893] = 0x056d59e20389e2c9 +results[894] = 0xd62271d1f04ede99 +results[895] = 0xa01f031b7f3bea26 +results[896] = 0x5a83c597ab1eb287 +results[897] = 0xd7133751ed7ae8de +results[898] = 0xda8733bbfd4f8e6b +results[899] = 0x226ff09dba50e0be +results[900] = 0x6f0acfb289e5d49a +results[901] = 0x5276fbf7cb3f1b43 +results[902] = 0x5cf581f97d331d85 +results[903] = 0xa901ec053cbc0861 +results[904] = 0xed4ff27791621c2e +results[905] = 0x218a6c5b0b2c1e5b +results[906] = 0x94e0b4bf6ce7fca9 +results[907] = 0x477f94fa55bc4bd0 +results[908] = 0x83f1ff489f6a089f +results[909] = 0x0f5cc3b2890a8a16 +results[910] = 0x537d974451499e79 +results[911] = 0x5e3e28a9d1162ade +results[912] = 0x4b149ad2812fb64a +results[913] = 0x4bd49b0576f4c9ca +results[914] = 0xc1be773216e9b834 +results[915] = 0x93b62bf904ea5cfe +results[916] = 0xe6f6bad00e4e788b +results[917] = 0x9004806b3031251e +results[918] = 0x1564d68858c525d9 +results[919] = 0x7c7d4e987307ff8d +results[920] = 0x2824b6f69f8170ba +results[921] = 0xff3a276036af05c7 +results[922] = 0x239634793cb1acc3 +results[923] = 0x521cb0950a8fc759 +results[924] = 0x198356ba68545323 +results[925] = 0x72f8fd91ae2b26b7 +results[926] = 0xe694d974a756fac0 +results[927] = 0x95f58632fb4635ed +results[928] = 0xbefa9505e2cbaa20 +results[929] = 0x82166d1463952313 +results[930] = 0xe60d54b9e928dd1e +results[931] = 0x56b62b11b5514dd3 +results[932] = 0x1bc173801ee34540 +results[933] = 0x44c03c6150e11269 +results[934] = 0xc62bcd8883866637 +results[935] = 0x70cf481a2d4cf8be +results[936] = 0xe51506bc5fed91e3 +results[937] = 0x4737e81a3424a398 +results[938] = 0xcc237e52f78873a7 +results[939] = 0x89334bdda00834d6 +results[940] = 0x2d3700e5a70df04d +results[941] = 0xd23596e15844d1ad +results[942] = 0x42bb59ffb1511046 +results[943] = 0xcdd1c47491b32ee6 +results[944] = 0x27416adf3445bd86 +results[945] = 0xc9b71c1edbb3763f +results[946] = 0xbade3326f6811761 +results[947] = 0xe7d9c7d6c746475d +results[948] = 0x3d4c6da2d53de36b +results[949] = 0x8654308a221c7ae9 +results[950] = 0x998a73d4aa29557a +results[951] = 0xc67ec5832e4f85fe +results[952] = 0x682780df561e9c1c +results[953] = 0x5447e7f80a3a974d +results[954] = 0x5eaed87c46b30a5a +results[955] = 0x4a6b3a46ca47fd65 +results[956] = 0xd76c1e09aebc5cab +results[957] = 0xb9ad16ef564d2863 +results[958] = 0xe052503e8dde48ee +results[959] = 0x1fef7cc8929ca7f1 +results[960] = 0x4fb10c7670be8c0e +results[961] = 0x2f58855046c13f0c +results[962] = 0x6e8546c6701b80e8 +results[963] = 0x29b4124f4a2c32bf +results[964] = 0x492890a5f2189bcb +results[965] = 0xa2c34dce699e86d9 +results[966] = 0x22722b1fde23c3e1 +results[967] = 0xfa717d99d8ffa00d +results[968] = 0x4a5f1f1d062cf628 +results[969] = 0xb6bb19724fb1b620 +results[970] = 0x7bb512183259befb +results[971] = 0x5d667f975a08843a +results[972] = 0xebdd7d19b0e9a078 +results[973] = 0xe32a19161515bb5f +results[974] = 0x4e8bdee9d7c62b44 +results[975] = 0x70941fb4d0efc9d4 +results[976] = 0x38c605f25b92d53a +results[977] = 0x2662dd69d6348df8 +results[978] = 0xf315371b75acc0e0 +results[979] = 0xdc7d42836b5e6542 +results[980] = 0x32d6018eddfb9466 +results[981] = 0x1f14de28e423baee +results[982] = 0x5788b5566ce5b003 +results[983] = 0xe05abc84e8101176 +results[984] = 0xe3f91de694403ce0 +results[985] = 0x79b01ccb9d2eb9ad +results[986] = 0x12145f81cb50c9e9 +results[987] = 0x2330d0a66d17b3cf +results[988] = 0xea4786b7eb7b9285 +results[989] = 0xd89e41b59a389ac3 +results[990] = 0xe4819d61ec1578fc +results[991] = 0xc475133395d8d89d +results[992] = 0x17d7cd0b6f33d717 +results[993] = 0xbbd5e290bf68e503 +results[994] = 0x002c4cf4a33853aa +results[995] = 0x23eab3967979cc9f +results[996] = 0xeca9da44de9309e0 +results[997] = 0x832f380e9195b003 +results[998] = 0x58d433dcc28fa2b7 +results[999] = 0x67602167e28698d4 +results[1000] = 0xd573c6b5f8a7f241 +results[1001] = 0x706db6b9d1496bf5 +results[1002] = 0xb0b21a76e47c4c59 +results[1003] = 0x4f7e287f9e3690aa +results[1004] = 0x500dd4c4f0a4c3dc +results[1005] = 0xf4918060655512ca +results[1006] = 0x6c66c367c37b266b +results[1007] = 0xcff53f4f1b7cb4d8 +results[1008] = 0x0435ea098243f4ec +results[1009] = 0x99c3ba40eacca7e5 +results[1010] = 0x733be71e86526b77 +results[1011] = 0xa6754304576ba277 +results[1012] = 0x7dc4efc79bef4927 +results[1013] = 0x20e6b2edfcf4b14b +results[1014] = 0x17780bd2a5009547 +results[1015] = 0x2d9f7fa171d5f525 +results[1016] = 0xd49cb7497f5953a3 +results[1017] = 0x7eb6f23c0238f2f5 +results[1018] = 0x650200c45e6fe0ec +results[1019] = 0x45eaaaf71fbaf468 +results[1020] = 0x25c1f2c3408e5217 +results[1021] = 0xe29c4a8e474444bd +results[1022] = 0x7c02ada387755086 +results[1023] = 0xb0dc8f5c98e33fab +Total time: 418429.406250 ms, 386418.217773 spent crunching diff --git a/A5.1/MyHDL/A5.py b/A5.1/MyHDL/A5.py new file mode 100644 index 0000000..6530357 --- /dev/null +++ b/A5.1/MyHDL/A5.py @@ -0,0 +1,127 @@ +from myhdl import * + +def Lfsr(clk, reset, enable, reg, taps): + + @always(clk.posedge) + def shiftRegister(): + if enable: + output = 0 + + for tap in taps: + output ^= reg[tap] + + reg.next = ((reg << 1) + (output & 1)) % reg.max + + return shiftRegister + +def printLfsr(clk, reg): + + @always(clk.negedge) + def doPrint(): + print "LFSR value %s" % bin(reg, len(reg)) + + return doPrint + +def ClkDriver(clk, period=20): + + lowTime = int(period/2) + highTime = period - lowTime + + @instance + def driveClk(): + while True: + yield delay(lowTime) + clk.next = 1 + yield delay(highTime) + clk.next = 0 + + return driveClk + +def ResetGen(reset, time): + @instance + def driveReset(): + reset.next = 0 + yield delay(time) + reset.next = 1 + + return driveReset + +def Lfsr_tb(): + clk = Signal(0) + reset = Signal(0) + oscillator = ClkDriver(clk) + reg = Signal(intbv(23)[19:]) + lfsr = Lfsr(clk, reg, [13, 16, 17, 18], reset) + printer = printLfsr(clk, reg) + return instances() + +def muxReg(clk, reset, reg, R1, R2, R3): + return loadReg + +def a5(clk, reset, reg): + + R1 = Signal(intbv(0)[19:]) + R2 = Signal(intbv(0)[22:]) + R3 = Signal(intbv(0)[23:]) + + en1 = Signal(intbv(1)[1:]) + en2 = Signal(intbv(1)[1:]) + en3 = Signal(intbv(1)[1:]) + + @always(clk.posedge, reset.negedge) + def loadReg(): + if reset == 0: + print "Reset" + R1.next = reg[64:45] + R2.next = reg[45:23] + R3.next = reg[23:0] + else: + reg.next[64:45] = R1 + reg.next[45:23] = R2 + reg.next[23:0] = R3 + + lfsr1 = Lfsr(clk, reset, en1, R1, [13, 16, 17, 18]) + lfsr2 = Lfsr(clk, reset, en2, R2, [20, 21]) + lfsr3 = Lfsr(clk, reset, en3, R3, [7, 20, 21, 22]) + + @always_comb + def clock(): + if R1[8] + R2[10] + R3[10] > 2: + en1.next = R1[8] + en2.next = R2[10] + en3.next = R3[10] + else: + en1.next = not R1[8] + en2.next = not R2[10] + en3.next = not R3[10] + + + return instances() + +def a5_tb(): + clk = Signal(intbv(0)[1:]) + reset = Signal(intbv(0)[1:]) + oscillator = ClkDriver(clk) + resetgen = ResetGen(reset, 35) + reg = Signal(intbv(0xdeadbeefcafebabe)[64:]) + lfsr = a5(clk, reset, reg) + printer = printLfsr(clk, reg) + return instances() + + + + + +def sayhello(): + clk = Signal(0) + + oscillator = ClkDriver(clk) + + hello = Hello(clk) + + return instances() + +#inst = a5_tb() +#sim = Simulation(inst) +#sim.run() +a5_inst = toVHDL(a5_tb) diff --git a/A5.1/MyHDL/a5_homelien.py b/A5.1/MyHDL/a5_homelien.py new file mode 100644 index 0000000..72aa8da --- /dev/null +++ b/A5.1/MyHDL/a5_homelien.py @@ -0,0 +1,147 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# v2, oystein@homelien.no, 2009 + +AVOID_CHAINING = True # hack + +SIMULATE = False +SIMULATE = True # comment out this line to generate verilog + +from myhdl import * + +def chain_xor(out, signals): + # build chain for taps (this is a typical myhdl hack..) + chain = [] + def xor(o, i1, i2, pos): + @always_comb + def c(): + o.next = i1 ^ i2[pos] + return c + inp = Signal(bool(0)) + for sig, pos in signals: + s = Signal(bool(0)) + x2 = xor(s, inp, sig, pos) + chain += [x2] + inp = s + + @always_comb + def output(): + out.next = s + + return chain, output + + +def lfsr_hw(clk, i, majority, length, taps, clockbit, name=""): + print "lfsr %s: len %s taps %s, clockbit %s" % (name, length, taps, clockbit) + + lfsr = Signal(intbv(0)[length:]) + + bit = Signal(bool(0)) + if not AVOID_CHAINING: + # this stopped working in some myhdl version. need to complain on the mailing list + chain = chain_xor(bit, [(i, 0)] + [(lfsr, tap) for tap in taps]); + else: + chain = () + + @always(clk.posedge) + def shift(): + if i[2]: + # reset + lfsr.next = 0 + elif i[1] or (majority == lfsr[clockbit]): # i[1] set if clocking forced (for init) + # calculate tap bits + lfsr.next = concat(lfsr[length-1:0], bit) + #print "shift, contents: %08x, bit %d" % (lfsr, bit) + + clockreg = Signal(bool(0)) + outputreg = Signal(bool(0)) + + @always_comb + def extract_bits(): + clockreg.next = lfsr[clockbit] + outputreg.next = lfsr[length-1] + + return (chain, shift, extract_bits), lfsr, clockreg, outputreg, bit + +def a5_homelien(clk, i, o): + """ + input[0] is initialization data + input[1] is True to force clocking (while initializing) + input[2] is reset (clocked, active high) + """ + + majority = Signal(bool(0)) + r1, r1_reg, r1_clk, r1_out, r1_bit = lfsr_hw(clk, i, majority, 19, [13, 16, 17, 18], 8, "R1") + r2, r2_reg, r2_clk, r2_out, r2_bit = lfsr_hw(clk, i, majority, 22, [20, 21], 10, "R2") + r3, r3_reg, r3_clk, r3_out, r3_bit = lfsr_hw(clk, i, majority, 23, [7, 20, 21, 22], 10, "R3") + @always_comb + def xors(): + # this should be done automatically with the chain function from the lists above + # but perhaps need to complain on myhdl list to get it working again + r1_bit.next = i[0] ^ r1_reg[13] ^ r1_reg[16] ^ r1_reg[17] ^ r1_reg[18] + r2_bit.next = i[0] ^ r2_reg[20] ^ r2_reg[21] + r3_bit.next = i[0] ^ r3_reg[7] ^ r3_reg[20] ^ r3_reg[21] ^ r3_reg[22] + + @always_comb + def calc_stuff(): + majority.next = (r1_clk + r2_clk + r3_clk) >= 2 + o.next = r1_out ^ r2_out ^ r3_out + + return (r1, r2, r3, calc_stuff, xors) + +def test(): + clk = Signal(bool(0)) + input = Signal(intbv(0)[3:]) # for initialization + output = Signal(bool(0)) + + algorithm = a5_homelien(clk, input, output) + + @instance + def test(): + key = 0xEFCDAB8967452312 #== 0x48C4A2E691D5B3F7 from A5/1 pedagogical implementation in C + fn = 0x000134 + known_good_AtoB = 0x14D3AA960BFA0546ADB861569CA30# == 0x534EAA582FE8151AB6E1855A728C00 from A5/1 pedagogical implementation in C + known_good_BtoA = 0x093F4D68D757ED949B4CBE41B7C6B#== 0x24FD35A35D5FB6526D32F906DF1AC0 from A5/1 pedagogical implementation in C + + phases = ( + ("clock in dummy key %s" % hex(key), 2, intbv(key)[64:]), + ("reset", 4, intbv(key)[1:]), + ("clock in key %s" % hex(key), 2, intbv(key)[64:]), + ("clock in fn %s" % hex(fn), 2, intbv(fn)[22:]), + ("100 fuzzing clocks", 0, intbv(0)[100:]), + ("A->B (expected: %s)" % hex(known_good_AtoB), 0, intbv(0)[114:]), + ("B->A (expected: %s)" % hex(known_good_BtoA), 0, intbv(0)[114:]), + ) + + for description, inputor, data in phases: + print "- %s" % description + result = intbv(0)[len(data):] + + for count in range(len(data)): + input.next = inputor + data[count] + + yield delay(10) + clk.next = not clk + yield delay(10) + clk.next = not clk + + #print "time %8d: r1 %08x r2 %08x r3 %08x maj %d input %x out %d%d%d" % (count, r1_reg, r2_reg, r3_reg, majority, input, r1_out, r2_out, r3_out) + count += 1 + + result = (result << 1) + output + print " result: %s" % hex(result) + + + return test, algorithm + +if SIMULATE: + Simulation(test()).run() +else: + clk = Signal(bool(0)) + input = Signal(intbv(0)[3:]) + output = Signal(bool(0)) + + toVerilog(a5_homelien, clk, input, output) + + print ".v file generated" + diff --git a/A5.1/MyHDL/a5_homelien.v b/A5.1/MyHDL/a5_homelien.v new file mode 100644 index 0000000..9e07a55 --- /dev/null +++ b/A5.1/MyHDL/a5_homelien.v @@ -0,0 +1,82 @@ +// File: a5_homelien.v +// Generated by MyHDL 0.6 +// Date: Sun Jan 18 02:22:21 2009 + +`timescale 1ns/10ps + +module a5_homelien ( + clk, + i, + o +); + +input clk; +input [2:0] i; +output o; +wire o; + +wire r1_out; +reg [18:0] r1_reg; +wire r1_bit; +wire r3_out; +wire r2_clk; +reg [21:0] r2_reg; +wire r3_bit; +wire majority; +wire r3_clk; +reg [22:0] r3_reg; +wire r2_bit; +wire r2_out; +wire r1_clk; + + + +always @(posedge clk) begin: A5_HOMELIEN_R1_1 + if (i[2]) begin + r1_reg <= 0; + end + else if ((i[1] || (majority == r1_reg[8]))) begin + r1_reg <= {r1_reg[(19 - 1)-1:0], r1_bit}; + end +end + + +assign r1_clk = r1_reg[8]; +assign r1_out = r1_reg[(19 - 1)]; + +always @(posedge clk) begin: A5_HOMELIEN_R2_1 + if (i[2]) begin + r2_reg <= 0; + end + else if ((i[1] || (majority == r2_reg[10]))) begin + r2_reg <= {r2_reg[(22 - 1)-1:0], r2_bit}; + end +end + + +assign r2_clk = r2_reg[10]; +assign r2_out = r2_reg[(22 - 1)]; + +always @(posedge clk) begin: A5_HOMELIEN_R3_1 + if (i[2]) begin + r3_reg <= 0; + end + else if ((i[1] || (majority == r3_reg[10]))) begin + r3_reg <= {r3_reg[(23 - 1)-1:0], r3_bit}; + end +end + + +assign r3_clk = r3_reg[10]; +assign r3_out = r3_reg[(23 - 1)]; + + +assign majority = (((r1_clk + r2_clk) + r3_clk) >= 2); +assign o = (r1_out ^ r2_out ^ r3_out); + + +assign r1_bit = (i[0] ^ r1_reg[13] ^ r1_reg[16] ^ r1_reg[17] ^ r1_reg[18]); +assign r2_bit = (i[0] ^ r2_reg[20] ^ r2_reg[21]); +assign r3_bit = (i[0] ^ r3_reg[7] ^ r3_reg[20] ^ r3_reg[21] ^ r3_reg[22]); + +endmodule diff --git a/A5.1/Verilog/Piotr/Documentation/a51.odg b/A5.1/Verilog/Piotr/Documentation/a51.odg Binary files differnew file mode 100644 index 0000000..816b897 --- /dev/null +++ b/A5.1/Verilog/Piotr/Documentation/a51.odg diff --git a/A5.1/Verilog/Piotr/Documentation/a51.png b/A5.1/Verilog/Piotr/Documentation/a51.png Binary files differnew file mode 100644 index 0000000..bc8bdc7 --- /dev/null +++ b/A5.1/Verilog/Piotr/Documentation/a51.png diff --git a/A5.1/Verilog/Piotr/Documentation/steps.odg b/A5.1/Verilog/Piotr/Documentation/steps.odg Binary files differnew file mode 100644 index 0000000..f581010 --- /dev/null +++ b/A5.1/Verilog/Piotr/Documentation/steps.odg diff --git a/A5.1/Verilog/Piotr/Documentation/steps.png b/A5.1/Verilog/Piotr/Documentation/steps.png Binary files differnew file mode 100644 index 0000000..7acd37f --- /dev/null +++ b/A5.1/Verilog/Piotr/Documentation/steps.png diff --git a/A5.1/Verilog/Piotr/Makefile b/A5.1/Verilog/Piotr/Makefile new file mode 100644 index 0000000..7f074a7 --- /dev/null +++ b/A5.1/Verilog/Piotr/Makefile @@ -0,0 +1,49 @@ +T = one_step +TGT = ${T}_tb + +LIB="./" + +INCLUDE_DIR=./ + +VERILOG_SOURCES = ${TGT}.v \ +${T}.v + +SIMFILE = ${TGT}.vvp +VCDFILE = ${TGT}.vcd + +WAVERC = gtkwaverc +WAVECFG = ${TGT}.sav + +ICARUS = iverilog +IFLAGS = -v + +VVP = vvp +VFLAGS = -v +VFLAGSEXTRA = + +GTKWAVE = gtkwave +GFLAGS = --save=${WAVECFG} --rcfile=${WAVERC} + +all: compile simulate gtkwave + +${TGT}.vvp: ${VERILOG_SOURCES} + @ echo Compiling verilog files... + @ ${ICARUS} ${IFLAGS} -s ${TGT} -o ${SIMFILE} -y ${LIB} ${VERILOG_SOURCES} -I${INCLUDE_DIR} + +compile : ${TGT}.vvp + +${TGT}.vcd: compile + @ echo Simulating design... + @ ${VVP} ${VFLAGS} ${SIMFILE} ${VFLAGSEXTRA} + +simulate : ${TGT}.vcd + +gtkwave : compile simulate + @ echo Viewing waveforms in gtkwave... + @ ${GTKWAVE} ${GFLAGS} ${VCDFILE} + +clean: + @ echo Cleaning up... + @rm -f *.vvp *.vcd *~ *.log + + diff --git a/A5.1/Verilog/Piotr/a51.v b/A5.1/Verilog/Piotr/a51.v new file mode 100644 index 0000000..e6b23f0 --- /dev/null +++ b/A5.1/Verilog/Piotr/a51.v @@ -0,0 +1,327 @@ +// -*- Mode: Verilog -*- +// Filename : a51.v +// Description : A5/1 algorithm (without mixing of the Kc and Fn) +// Author : piotr +// Created On : Mon Jan 19 20:55:38 2009 +// Last Modified By: . +// Last Modified On: . +// Update Count : 0 +// Status : Unknown, Use with caution! + + +module a51( + clk, + enable, + in_state, + keystream + ); + + parameter StateWidth = 64; + + input clk, enable; + input [StateWidth:1] in_state; + output [StateWidth:1] keystream; + + + wire [StateWidth:1] step1_out; + one_step step1(.clk(clk), .enable(enable), .in_state(in_state), .out_state(step1_out)); + + wire [StateWidth:1] step2_out; + one_step step2(.clk(clk), .enable(enable), .in_state(step1_out), .out_state(step2_out)); + + wire [StateWidth:1] step3_out; + one_step step3(.clk(clk), .enable(enable), .in_state(step2_out), .out_state(step3_out)); + + wire [StateWidth:1] step4_out; + one_step step4(.clk(clk), .enable(enable), .in_state(step3_out), .out_state(step4_out)); + + wire [StateWidth:1] step5_out; + one_step step5(.clk(clk), .enable(enable), .in_state(step4_out), .out_state(step5_out)); + + wire [StateWidth:1] step6_out; + one_step step6(.clk(clk), .enable(enable), .in_state(step5_out), .out_state(step6_out)); + + wire [StateWidth:1] step7_out; + one_step step7(.clk(clk), .enable(enable), .in_state(step6_out), .out_state(step7_out)); + + wire [StateWidth:1] step8_out; + one_step step8(.clk(clk), .enable(enable), .in_state(step7_out), .out_state(step8_out)); + + wire [StateWidth:1] step9_out; + one_step step9(.clk(clk), .enable(enable), .in_state(step8_out), .out_state(step9_out)); + + wire [StateWidth:1] step10_out; + one_step step10(.clk(clk), .enable(enable), .in_state(step9_out), .out_state(step10_out)); + + wire [StateWidth:1] step11_out; + one_step step11(.clk(clk), .enable(enable), .in_state(step10_out), .out_state(step11_out)); + + wire [StateWidth:1] step12_out; + one_step step12(.clk(clk), .enable(enable), .in_state(step11_out), .out_state(step12_out)); + + wire [StateWidth:1] step13_out; + one_step step13(.clk(clk), .enable(enable), .in_state(step12_out), .out_state(step13_out)); + + wire [StateWidth:1] step14_out; + one_step step14(.clk(clk), .enable(enable), .in_state(step13_out), .out_state(step14_out)); + + wire [StateWidth:1] step15_out; + one_step step15(.clk(clk), .enable(enable), .in_state(step14_out), .out_state(step15_out)); + + wire [StateWidth:1] step16_out; + one_step step16(.clk(clk), .enable(enable), .in_state(step15_out), .out_state(step16_out)); + + wire [StateWidth:1] step17_out; + one_step step17(.clk(clk), .enable(enable), .in_state(step16_out), .out_state(step17_out)); + + wire [StateWidth:1] step18_out; + one_step step18(.clk(clk), .enable(enable), .in_state(step17_out), .out_state(step18_out)); + + wire [StateWidth:1] step19_out; + one_step step19(.clk(clk), .enable(enable), .in_state(step18_out), .out_state(step19_out)); + + wire [StateWidth:1] step20_out; + one_step step20(.clk(clk), .enable(enable), .in_state(step19_out), .out_state(step20_out)); + + wire [StateWidth:1] step21_out; + one_step step21(.clk(clk), .enable(enable), .in_state(step20_out), .out_state(step21_out)); + + wire [StateWidth:1] step22_out; + one_step step22(.clk(clk), .enable(enable), .in_state(step21_out), .out_state(step22_out)); + + wire [StateWidth:1] step23_out; + one_step step23(.clk(clk), .enable(enable), .in_state(step22_out), .out_state(step23_out)); + + wire [StateWidth:1] step24_out; + one_step step24(.clk(clk), .enable(enable), .in_state(step23_out), .out_state(step24_out)); + + wire [StateWidth:1] step25_out; + one_step step25(.clk(clk), .enable(enable), .in_state(step24_out), .out_state(step25_out)); + + wire [StateWidth:1] step26_out; + one_step step26(.clk(clk), .enable(enable), .in_state(step25_out), .out_state(step26_out)); + + wire [StateWidth:1] step27_out; + one_step step27(.clk(clk), .enable(enable), .in_state(step26_out), .out_state(step27_out)); + + wire [StateWidth:1] step28_out; + one_step step28(.clk(clk), .enable(enable), .in_state(step27_out), .out_state(step28_out)); + + wire [StateWidth:1] step29_out; + one_step step29(.clk(clk), .enable(enable), .in_state(step28_out), .out_state(step29_out)); + + wire [StateWidth:1] step30_out; + one_step step30(.clk(clk), .enable(enable), .in_state(step29_out), .out_state(step30_out)); + + wire [StateWidth:1] step31_out; + one_step step31(.clk(clk), .enable(enable), .in_state(step30_out), .out_state(step31_out)); + + wire [StateWidth:1] step32_out; + one_step step32(.clk(clk), .enable(enable), .in_state(step31_out), .out_state(step32_out)); + + wire [StateWidth:1] step33_out; + one_step step33(.clk(clk), .enable(enable), .in_state(step32_out), .out_state(step33_out)); + + wire [StateWidth:1] step34_out; + one_step step34(.clk(clk), .enable(enable), .in_state(step33_out), .out_state(step34_out)); + + wire [StateWidth:1] step35_out; + one_step step35(.clk(clk), .enable(enable), .in_state(step34_out), .out_state(step35_out)); + + wire [StateWidth:1] step36_out; + one_step step36(.clk(clk), .enable(enable), .in_state(step35_out), .out_state(step36_out)); + + wire [StateWidth:1] step37_out; + one_step step37(.clk(clk), .enable(enable), .in_state(step36_out), .out_state(step37_out)); + + wire [StateWidth:1] step38_out; + one_step step38(.clk(clk), .enable(enable), .in_state(step37_out), .out_state(step38_out)); + + wire [StateWidth:1] step39_out; + one_step step39(.clk(clk), .enable(enable), .in_state(step38_out), .out_state(step39_out)); + + wire [StateWidth:1] step40_out; + one_step step40(.clk(clk), .enable(enable), .in_state(step39_out), .out_state(step40_out)); + + wire [StateWidth:1] step41_out; + one_step step41(.clk(clk), .enable(enable), .in_state(step40_out), .out_state(step41_out)); + + wire [StateWidth:1] step42_out; + one_step step42(.clk(clk), .enable(enable), .in_state(step41_out), .out_state(step42_out)); + + wire [StateWidth:1] step43_out; + one_step step43(.clk(clk), .enable(enable), .in_state(step42_out), .out_state(step43_out)); + + wire [StateWidth:1] step44_out; + one_step step44(.clk(clk), .enable(enable), .in_state(step43_out), .out_state(step44_out)); + + wire [StateWidth:1] step45_out; + one_step step45(.clk(clk), .enable(enable), .in_state(step44_out), .out_state(step45_out)); + + wire [StateWidth:1] step46_out; + one_step step46(.clk(clk), .enable(enable), .in_state(step45_out), .out_state(step46_out)); + + wire [StateWidth:1] step47_out; + one_step step47(.clk(clk), .enable(enable), .in_state(step46_out), .out_state(step47_out)); + + wire [StateWidth:1] step48_out; + one_step step48(.clk(clk), .enable(enable), .in_state(step47_out), .out_state(step48_out)); + + wire [StateWidth:1] step49_out; + one_step step49(.clk(clk), .enable(enable), .in_state(step48_out), .out_state(step49_out)); + + wire [StateWidth:1] step50_out; + one_step step50(.clk(clk), .enable(enable), .in_state(step49_out), .out_state(step50_out)); + + wire [StateWidth:1] step51_out; + one_step step51(.clk(clk), .enable(enable), .in_state(step50_out), .out_state(step51_out)); + + wire [StateWidth:1] step52_out; + one_step step52(.clk(clk), .enable(enable), .in_state(step51_out), .out_state(step52_out)); + + wire [StateWidth:1] step53_out; + one_step step53(.clk(clk), .enable(enable), .in_state(step52_out), .out_state(step53_out)); + + wire [StateWidth:1] step54_out; + one_step step54(.clk(clk), .enable(enable), .in_state(step53_out), .out_state(step54_out)); + + wire [StateWidth:1] step55_out; + one_step step55(.clk(clk), .enable(enable), .in_state(step54_out), .out_state(step55_out)); + + wire [StateWidth:1] step56_out; + one_step step56(.clk(clk), .enable(enable), .in_state(step55_out), .out_state(step56_out)); + + wire [StateWidth:1] step57_out; + one_step step57(.clk(clk), .enable(enable), .in_state(step56_out), .out_state(step57_out)); + + wire [StateWidth:1] step58_out; + one_step step58(.clk(clk), .enable(enable), .in_state(step57_out), .out_state(step58_out)); + + wire [StateWidth:1] step59_out; + one_step step59(.clk(clk), .enable(enable), .in_state(step58_out), .out_state(step59_out)); + + wire [StateWidth:1] step60_out; + one_step step60(.clk(clk), .enable(enable), .in_state(step59_out), .out_state(step60_out)); + + wire [StateWidth:1] step61_out; + one_step step61(.clk(clk), .enable(enable), .in_state(step60_out), .out_state(step61_out)); + + wire [StateWidth:1] step62_out; + one_step step62(.clk(clk), .enable(enable), .in_state(step61_out), .out_state(step62_out)); + + wire [StateWidth:1] step63_out; + one_step step63(.clk(clk), .enable(enable), .in_state(step62_out), .out_state(step63_out)); + + wire [StateWidth:1] step64_out; + one_step step64(.clk(clk), .enable(enable), .in_state(step63_out), .out_state(step64_out)); + + wire [StateWidth:1] step65_out; + one_step step65(.clk(clk), .enable(enable), .in_state(step64_out), .out_state(step65_out)); + + wire [StateWidth:1] step66_out; + one_step step66(.clk(clk), .enable(enable), .in_state(step65_out), .out_state(step66_out)); + + wire [StateWidth:1] step67_out; + one_step step67(.clk(clk), .enable(enable), .in_state(step66_out), .out_state(step67_out)); + + wire [StateWidth:1] step68_out; + one_step step68(.clk(clk), .enable(enable), .in_state(step67_out), .out_state(step68_out)); + + wire [StateWidth:1] step69_out; + one_step step69(.clk(clk), .enable(enable), .in_state(step68_out), .out_state(step69_out)); + + wire [StateWidth:1] step70_out; + one_step step70(.clk(clk), .enable(enable), .in_state(step69_out), .out_state(step70_out)); + + wire [StateWidth:1] step71_out; + one_step step71(.clk(clk), .enable(enable), .in_state(step70_out), .out_state(step71_out)); + + wire [StateWidth:1] step72_out; + one_step step72(.clk(clk), .enable(enable), .in_state(step71_out), .out_state(step72_out)); + + wire [StateWidth:1] step73_out; + one_step step73(.clk(clk), .enable(enable), .in_state(step72_out), .out_state(step73_out)); + + wire [StateWidth:1] step74_out; + one_step step74(.clk(clk), .enable(enable), .in_state(step73_out), .out_state(step74_out)); + + wire [StateWidth:1] step75_out; + one_step step75(.clk(clk), .enable(enable), .in_state(step74_out), .out_state(step75_out)); + + wire [StateWidth:1] step76_out; + one_step step76(.clk(clk), .enable(enable), .in_state(step75_out), .out_state(step76_out)); + + wire [StateWidth:1] step77_out; + one_step step77(.clk(clk), .enable(enable), .in_state(step76_out), .out_state(step77_out)); + + wire [StateWidth:1] step78_out; + one_step step78(.clk(clk), .enable(enable), .in_state(step77_out), .out_state(step78_out)); + + wire [StateWidth:1] step79_out; + one_step step79(.clk(clk), .enable(enable), .in_state(step78_out), .out_state(step79_out)); + + wire [StateWidth:1] step80_out; + one_step step80(.clk(clk), .enable(enable), .in_state(step79_out), .out_state(step80_out)); + + wire [StateWidth:1] step81_out; + one_step step81(.clk(clk), .enable(enable), .in_state(step80_out), .out_state(step81_out)); + + wire [StateWidth:1] step82_out; + one_step step82(.clk(clk), .enable(enable), .in_state(step81_out), .out_state(step82_out)); + + wire [StateWidth:1] step83_out; + one_step step83(.clk(clk), .enable(enable), .in_state(step82_out), .out_state(step83_out)); + + wire [StateWidth:1] step84_out; + one_step step84(.clk(clk), .enable(enable), .in_state(step83_out), .out_state(step84_out)); + + wire [StateWidth:1] step85_out; + one_step step85(.clk(clk), .enable(enable), .in_state(step84_out), .out_state(step85_out)); + + wire [StateWidth:1] step86_out; + one_step step86(.clk(clk), .enable(enable), .in_state(step85_out), .out_state(step86_out)); + + wire [StateWidth:1] step87_out; + one_step step87(.clk(clk), .enable(enable), .in_state(step86_out), .out_state(step87_out)); + + wire [StateWidth:1] step88_out; + one_step step88(.clk(clk), .enable(enable), .in_state(step87_out), .out_state(step88_out)); + + wire [StateWidth:1] step89_out; + one_step step89(.clk(clk), .enable(enable), .in_state(step88_out), .out_state(step89_out)); + + wire [StateWidth:1] step90_out; + one_step step90(.clk(clk), .enable(enable), .in_state(step89_out), .out_state(step90_out)); + + wire [StateWidth:1] step91_out; + one_step step91(.clk(clk), .enable(enable), .in_state(step90_out), .out_state(step91_out)); + + wire [StateWidth:1] step92_out; + one_step step92(.clk(clk), .enable(enable), .in_state(step91_out), .out_state(step92_out)); + + wire [StateWidth:1] step93_out; + one_step step93(.clk(clk), .enable(enable), .in_state(step92_out), .out_state(step93_out)); + + wire [StateWidth:1] step94_out; + one_step step94(.clk(clk), .enable(enable), .in_state(step93_out), .out_state(step94_out)); + + wire [StateWidth:1] step95_out; + one_step step95(.clk(clk), .enable(enable), .in_state(step94_out), .out_state(step95_out)); + + wire [StateWidth:1] step96_out; + one_step step96(.clk(clk), .enable(enable), .in_state(step95_out), .out_state(step96_out)); + + wire [StateWidth:1] step97_out; + one_step step97(.clk(clk), .enable(enable), .in_state(step96_out), .out_state(step97_out)); + + wire [StateWidth:1] step98_out; + one_step step98(.clk(clk), .enable(enable), .in_state(step97_out), .out_state(step98_out)); + + wire [StateWidth:1] step99_out; + one_step step99(.clk(clk), .enable(enable), .in_state(step98_out), .out_state(step99_out)); + + wire [StateWidth:1] step100_out; + one_step step100(.clk(clk), .enable(enable), .in_state(step99_out), .out_state(step100_out)); + + +endmodule
\ No newline at end of file diff --git a/A5.1/Verilog/Piotr/gen_a51.py b/A5.1/Verilog/Piotr/gen_a51.py new file mode 100644 index 0000000..77c54da --- /dev/null +++ b/A5.1/Verilog/Piotr/gen_a51.py @@ -0,0 +1,17 @@ +def gen_a51(): + first_100_steps= [] + first_100_steps.append(" wire [StateWidth:1] step1_out;") + first_100_steps.append(" one_step step1(.clk(clk), .enable(enable), .in_state(in_state), .out_state(step1_out));\n") + + for i in xrange(2,101): + first_100_steps.append(" wire [StateWidth:1] step%d_out;"%(i)) + first_100_steps.append(" one_step step%d(.clk(clk), .enable(enable), .in_state(step%d_out), .out_state(step%d_out));\n"%(i,(i-1),i)) + + + for line in first_100_steps: + print line + + +gen_a51() + + diff --git a/A5.1/Verilog/Piotr/majority.v b/A5.1/Verilog/Piotr/majority.v new file mode 100644 index 0000000..c957d93 --- /dev/null +++ b/A5.1/Verilog/Piotr/majority.v @@ -0,0 +1,35 @@ +// -*- Mode: Verilog -*- +// Filename : majority.v +// Description : Majority function +// Author : piotr +// Created On : Sun Jan 18 23:16:04 2009 +// Last Modified By: . +// Last Modified On: . +// Update Count : 0 +// Status : Unknown, Use with caution! + +module majority( + R1_clk_bit, + R2_clk_bit, + R3_clk_bit, + R1_clk_out, + R2_clk_out, + R3_clk_out, + ); + + input R1_clk_bit; + input R2_clk_bit; + input R3_clk_bit; + output R1_clk_out; + output R2_clk_out; + output R3_clk_out; + + wire majority_bit; + + assign majority_bit = ( R1_clk_bit & R2_clk_bit ) ^ ( R2_clk_bit & R3_clk_bit ) ^ ( R1_clk_bit & R3_clk_bit ); + + assign R1_clk_out = ! majority_bit ^ R1_clk_bit; + assign R2_clk_out = ! majority_bit ^ R2_clk_bit; + assign R3_clk_out = ! majority_bit ^ R3_clk_bit; + +endmodule
\ No newline at end of file diff --git a/A5.1/Verilog/Piotr/majority_tb.sav b/A5.1/Verilog/Piotr/majority_tb.sav new file mode 100644 index 0000000..7af49a8 --- /dev/null +++ b/A5.1/Verilog/Piotr/majority_tb.sav @@ -0,0 +1,11 @@ +[size] 1279 725 +[pos] -1 -1 +*-4.381813 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 +@29 +majority_tb.majority_inst.R1_clk_bit +majority_tb.majority_inst.R2_clk_bit +majority_tb.majority_inst.R3_clk_bit +majority_tb.majority_inst.majority_bit +majority_tb.majority_inst.R1_clk_out +majority_tb.majority_inst.R2_clk_out +majority_tb.majority_inst.R3_clk_out diff --git a/A5.1/Verilog/Piotr/majority_tb.v b/A5.1/Verilog/Piotr/majority_tb.v new file mode 100644 index 0000000..3d19a06 --- /dev/null +++ b/A5.1/Verilog/Piotr/majority_tb.v @@ -0,0 +1,67 @@ +// -*- Mode: Verilog -*- +// Filename : majority_tb.v +// Description : +// Author : piotr +// Created On : Mon Jan 19 16:41:43 2009 +// Last Modified By: . +// Last Modified On: . +// Update Count : 0 +// Status : Unknown, Use with caution! + +module majority_tb(); + reg R1_clk_bit, R2_clk_bit, R3_clk_bit; + wire R1_clk_out, R2_clk_out, R3_clk_out; + + majority majority_inst( + .R1_clk_bit(R1_clk_bit), + .R2_clk_bit(R2_clk_bit), + .R3_clk_bit(R3_clk_bit), + .R1_clk_out(R1_clk_out), + .R2_clk_out(R2_clk_out), + .R3_clk_out(R3_clk_out) + ); + + initial + begin + R1_clk_bit = 0; + R2_clk_bit = 0; + R3_clk_bit = 0; + + #10 R1_clk_bit = 1; + R2_clk_bit = 0; + R3_clk_bit = 0; + + #10 R1_clk_bit = 0; + R2_clk_bit = 1; + R3_clk_bit = 0; + + #10 R1_clk_bit = 1; + R2_clk_bit = 1; + R3_clk_bit = 0; + + #10 R1_clk_bit = 0; + R2_clk_bit = 0; + R3_clk_bit = 1; + + #10 R1_clk_bit = 1; + R2_clk_bit = 0; + R3_clk_bit = 1; + + #10 R1_clk_bit = 0; + R2_clk_bit = 1; + R3_clk_bit = 1; + + #10 R1_clk_bit = 1; + R2_clk_bit = 1; + R3_clk_bit = 1; + end + + initial + begin + $dumpvars; + $dumpfile("majority_tb.vcd"); + $dumpon; + #90 $dumpoff; + end + +endmodule
\ No newline at end of file diff --git a/A5.1/Verilog/Piotr/one_step.v b/A5.1/Verilog/Piotr/one_step.v new file mode 100644 index 0000000..df0605e --- /dev/null +++ b/A5.1/Verilog/Piotr/one_step.v @@ -0,0 +1,86 @@ +// -*- Mode: Verilog -*- +// Filename : one_step.v +// Description : One step of the pipelined A5/1 algorithm +// Author : piotr +// Created On : Fri Jan 16 19:21:34 2009 +// Last Modified By: . +// Last Modified On: . +// Update Count : 0 +// Status : Work in progress + +module one_step( + clk, + enable, + in_state, + out_state, + keystream_bit + ); + + parameter StateWidth = 64; + parameter R1Width = 19; + parameter R2Width = 22; + parameter R3Width = 23; + + input clk, enable; + input [StateWidth:1] in_state; + output keystream_bit; + output [StateWidth:1] out_state; + + wire [R1Width:1] R1in; + wire [R2Width:1] R2in; + wire [R3Width:1] R3in; + + wire R1_feedback; + wire R2_feedback; + wire R3_feedback; + + wire R1_clk_out; + wire R2_clk_out; + wire R3_clk_out; + + reg [R1Width:1] R1; + reg [R2Width:1] R2; + reg [R3Width:1] R3; + + assign R1in = in_state[R1Width:1]; + assign R2in = in_state[R2Width+R1Width:R1Width+1]; + assign R3in = in_state[StateWidth:R1Width+R2Width+1]; + + assign R1_feedback = R1in[19] ^ R1in[18] ^ R1in[17] ^ R1in[14]; + assign R2_feedback = R2in[22] ^ R2in[21]; + assign R3_feedback = R3in[23] ^ R3in[22] ^ R3in[21] ^ R3in[7]; + + assign out_state = {R3,R2,R1}; + + assign keystream_bit = R1[R1Width] ^ R2[R2Width] ^ R3[R3Width]; + + majority majority_instance( + .R1_clk_bit(R1in[9]), + .R2_clk_bit(R2in[11]), + .R3_clk_bit(R3in[11]), + .R1_clk_out(R1_clk_out), + .R2_clk_out(R2_clk_out), + .R3_clk_out(R3_clk_out) + ); + + always @(posedge clk) + begin + if(enable == 1'b1) + begin + if(R1_clk_out == 1'b1) + R1 <= {R1in[R1Width-1:1], R1_feedback}; + else + R1 <= R1in; + + if(R2_clk_out == 1'b1) + R2 <= {R2in[R2Width-1:1], R2_feedback}; + else + R2 <= R2in; + + if(R3_clk_out == 1'b1) + R3 <= {R3in[R3Width-1:1], R3_feedback}; + else + R3 <= R3in; + end + end +endmodule diff --git a/A5.1/Verilog/Piotr/one_step_tb.sav b/A5.1/Verilog/Piotr/one_step_tb.sav new file mode 100644 index 0000000..947a334 --- /dev/null +++ b/A5.1/Verilog/Piotr/one_step_tb.sav @@ -0,0 +1,32 @@ +[size] 1270 532 +[pos] 0 188 +*-2.928085 21 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 +@28 +one_step_tb.one_step_inst.R1_feedback +one_step_tb.one_step_inst.R2_feedback +one_step_tb.one_step_inst.R3_feedback +one_step_tb.one_step_inst.clk +@22 +one_step_tb.one_step_inst.in_state[64:1] +one_step_tb.one_step_inst.out_state[64:1] +@28 +one_step_tb.one_step_inst.R1_clk_out +one_step_tb.one_step_inst.R2_clk_out +one_step_tb.one_step_inst.R3_clk_out +@22 +one_step_tb.one_step_inst.R1in[19:1] +one_step_tb.one_step_inst.R1[19:1] +one_step_tb.one_step_inst.R2in[22:1] +one_step_tb.one_step_inst.R2[22:1] +one_step_tb.one_step_inst.R3in[23:1] +one_step_tb.one_step_inst.R3[23:1] +@28 +one_step_tb.one_step_inst.majority_instance.R1_clk_bit +one_step_tb.one_step_inst.majority_instance.R2_clk_bit +one_step_tb.one_step_inst.majority_instance.R3_clk_bit +@29 +one_step_tb.one_step_inst.majority_instance.majority_bit +@28 +one_step_tb.one_step_inst.majority_instance.R1_clk_out +one_step_tb.one_step_inst.majority_instance.R2_clk_out +one_step_tb.one_step_inst.majority_instance.R3_clk_out diff --git a/A5.1/Verilog/Piotr/one_step_tb.v b/A5.1/Verilog/Piotr/one_step_tb.v new file mode 100644 index 0000000..7ca6e86 --- /dev/null +++ b/A5.1/Verilog/Piotr/one_step_tb.v @@ -0,0 +1,51 @@ +// -*- Mode: Verilog -*- +// Filename : one_step_tb.v +// Description : Testbench for one step of A5/1 module +// Author : piotr +// Created On : Mon Jan 19 15:16:40 2009 +// Last Modified By: . +// Last Modified On: . +// Update Count : 0 +// Status : Unknown, Use with caution! +`define InternalStateWidth 64 + +module one_step_tb(); + reg clk, enable; + reg [`InternalStateWidth:1] in_state; + wire[`InternalStateWidth:1] out_state; + + one_step one_step_inst( + .clk(clk), + .enable(enable), + .in_state(in_state), + .out_state(out_state) + ); + always + begin + #5 clk = !clk; + end + + initial + begin + clk = 1'b1; + enable = 1'b1; + in_state = `InternalStateWidth'd1; + #5 in_state = `InternalStateWidth'b1110010110111111000110110101111000000111001010000110010010100010; + #10 in_state = `InternalStateWidth'b1110010110111111000110101011110000001110010110001100100101000101; + #10 in_state = `InternalStateWidth'b1100101101111110001101001011110000001110010110011001001010001010; + #10 in_state = `InternalStateWidth'b1100101101111110001101010111100000011100101110110010010100010101; + #10 in_state = `InternalStateWidth'b1001011011111100011010010111100000011100101111100100101000101011; + #10 in_state = `InternalStateWidth'b1001011011111100011010001111000000111001011111001001010001010110; + #10 in_state = `InternalStateWidth'b0010110111111000110100111110000001110010111111001001010001010110; + + #20 $finish; + end + + initial + begin + $dumpvars; + $dumpfile("one_step_tb.vcd"); + $dumpon; + #90 $dumpoff; + end +endmodule
\ No newline at end of file diff --git a/A5.1/Verilog/a5.v b/A5.1/Verilog/a5.v new file mode 100644 index 0000000..297dc2c --- /dev/null +++ b/A5.1/Verilog/a5.v @@ -0,0 +1,354 @@ +A5/1 Circuit, expressed in Verilog + +The following is equivalent to the purported A5/1 +pedagogical C earlier published. + +For non-commercial, non-governmental use only. + +It comes with a testbench and sample output. + +/* +a5.v +Purported A5/1 circuit, expressed in Verilog. +13 May 99 +David Honig +honig@sprynet.com + +Derived from Briceno, Goldberg, Wagner's Pedagogical C Code +of May 99. + +To load key: assert Startloading, load data starting on next clock, +bitwise (1 delay + 64 key + 22 frame clocks). + +Then wait for Doneloading to be asserted (100 more clocks). Then +harvest your bits. + +A testbench and sample output is appended as comments. + +This synthesizes to about 150 LCs and runs at 80 Mhz on +the smaller Altera CPLDs e.g., 10K30. + +*/ + + + +module a5(Clk, Reset_n, + Bitout, + Keybit, + Startloading, + Doneloading); + + +input Clk, Reset_n; +output Bitout; // output keystream + reg Bitout; +input Keybit; // input keybits 64 + 22 +input Startloading; // initial keyload +output Doneloading; // signal done of keyloading + reg Doneloading; + + +// internal state; lsb is leftmost +reg [18:0] lfsr_1; +reg [21:0] lfsr_2; +reg [22:0] lfsr_3; + +reg [1:0] State; // FSM control +reg [6:0] Counter; // for counting steps +reg [2:0] Phase; // for sequencing phases + +wire hi_1, hi_2, hi_3; +assign hi_1 = lfsr_1[18]; +assign hi_2 = lfsr_2[21]; +assign hi_3 = lfsr_3[22]; + + +wire mid1, mid2, mid3; +assign mid1=lfsr_1[8]; +assign mid2=lfsr_2[10]; +assign mid3=lfsr_3[10]; + + +wire maj; +assign maj=majority(mid1, mid2, mid3); + +wire newbit1, newbit2, newbit3; +assign newbit1= ( lfsr_1[13] ^ lfsr_1[16] ^ lfsr_1[17] ^ lfsr_1[18] ); +assign newbit2= ( lfsr_2[20] ^ lfsr_2[21] ) ; +assign newbit3= ( lfsr_3[7] ^ lfsr_3[20] ^ lfsr_3[21] ^ lfsr_3[22] ); + + +parameter IDLE=0; +parameter KEYING=1; +parameter RUNNING=2; + + +always @(posedge Clk or negedge Reset_n) begin +if (!Reset_n) begin: resetting + + $display("a5 reset"); + Doneloading <=0; + Bitout <=0; + {lfsr_1, lfsr_2, lfsr_3} <= 64'h 0; + {State, Counter, Phase} <=0; + + end // reset +else begin + case (State) + + IDLE: begin: reset_but_no_key + + if (Startloading) begin: startloadingkey + // $display("Loading key starts at %0d ", $time); + State <= KEYING; + {lfsr_1, lfsr_2, lfsr_3} <= 64'h 0; + Phase <=0; Counter<=0; + end // if + end // idle + + KEYING: begin + + case (Phase) + + 0: begin: load64andclock + + clockallwithkey; + + // $display("Loading key bit %0b %0d at %0d %0x", Keybit, Counter, $time, lfsr_1); + if (Counter==63) begin + Counter <=0; + Phase <= Phase +1; + $display(" "); + + end + else Counter <=Counter+1; + end + + 1: begin: load22andclock + + // $display("Loading frame bit %0b at %0d %0d %0x", Keybit, Counter, $time, lfsr_1); + clockallwithkey; + + if (Counter==21) begin + Counter <=0; + Phase <= Phase +1; + end + else Counter <=Counter+1; + end + + 2: begin: clock100 + + majclock; + + if (Counter ==100) begin + $display("Done keying, now running %0d\n", $time); + State <= RUNNING; + end + else Counter <= Counter+1; + end + endcase // Phase + end // keying + + RUNNING: begin + + Doneloading <=1; // when done loading + Bitout <= hi_1 ^ hi_2 ^ hi_3; + majclock; + + end // running + endcase // State + end // else not resetting +end // always + + + + + + + + + + + +function majority; +input a,b,c; + +begin + case({a,b,c}) // synopsys parallel_case + 3'b 000: majority=0; + 3'b 001: majority=0; + 3'b 010: majority=0; + 3'b 011: majority=1; + + 3'b 100: majority=0; + 3'b 101: majority=1; + 3'b 110: majority=1; + 3'b 111: majority=1; + endcase +end +endfunction + + +task clock1; +begin + lfsr_1 <= ( lfsr_1 << 1 ) | newbit1; +end +endtask + +task clock2; +begin + lfsr_2 <= (lfsr_2 << 1) | newbit2; +end +endtask + +task clock3; +begin + lfsr_3 <= (lfsr_3 << 1) | newbit3; +end +endtask + +task clockall; +begin + clock1; + clock2; + clock3; +end +endtask + +task clockallwithkey; +begin + lfsr_1 <= ( lfsr_1 << 1 ) | newbit1 ^ Keybit; + lfsr_2 <= ( lfsr_2 << 1 ) | newbit2 ^ Keybit; + lfsr_3 <= ( lfsr_3 << 1 ) | newbit3 ^ Keybit; +end +endtask + +task majclock; +begin + if (mid1 == maj) clock1; + if (mid2 == maj) clock2; + if (mid3 == maj) clock3; +end +endtask + + +endmodule + + + + + + + + + + + + + + +/**************** CUT HERE FOR TESTBENCH test_a5.v ************************** + +module test_a5; + + +reg Clk, Reset_n; +wire Bitout; // output keystream + +reg Keybit; // input keybits 64 + 22 +reg Startloading; // initial keyload +wire Doneloading; // signal done of keyloading + + +reg [0:7] key [7:0]; +reg [22:0] frame; + + + +a5 dut(Clk, Reset_n, + Bitout, + Keybit, + Startloading, + Doneloading); + + +always @(Clk) #5 Clk <= ~Clk; + +integer i,j; + + +initial begin + #5 + key[0]= 8'h 12; + key[1]= 8'h 23; + key[2]= 8'h 45; + key[3]= 8'h 67; + + key[4]= 8'h 89; + key[5]= 8'h AB; + key[6]= 8'h CD; + key[7]= 8'h EF; + + frame <= 22'h 134; + Clk <=0; + Reset_n <=1; + Startloading <=0; + Keybit <=0; + + #10 Reset_n <=0; + #10 Reset_n <=1; + + // key setup + + #100 + Startloading <=1; $display("Starting to key %0d", $time); + for (i=0; i<8; i=i+1) begin + for (j=0; j<8; j=j+1) begin + #10 Startloading <=0; + Keybit <= key[i] >> j; + end // j + end // i + + for (i=0; i<22; i=i+1) begin + #10 Keybit <= frame[i]; + end + + wait(Doneloading); $display("Done keying %0d", $time); + + $write("\nBits out: \n"); + repeat (32) #10 $write("%b", Bitout); + + + $display("\nknown good=\n%b", 32'h 534EAA58); + + #1000 $display("\nSim done."); $finish; +end // init + +endmodule + + + +************************* END OF TESTBENCH ************************************/ + + +/**** SAMPLE OUTPUT + +a5 reset +a5 reset +Starting to key 125 + +Done keying, now running 2000 + +Done keying 2010 + +Bits out: +01010011010011101010101001011000 +known good= +01010011010011101010101001011000 + +Sim done. +*********/ + + +// eof + diff --git a/A5.1/python/A51_Tables/a51.py b/A5.1/python/A51_Tables/a51.py new file mode 100644 index 0000000..b118287 --- /dev/null +++ b/A5.1/python/A51_Tables/a51.py @@ -0,0 +1,167 @@ +from BitVector import BitVector +""" +Module with implementations of: +lsfr - Linear Feedback Shift Register +a51 - algorithm A5/1 +""" + +class lsfr: + def __init__(self, length, taps, middle_bit, name=""): + """ + length - length of the register in bits + taps - feedback taps, for clocking the shift register. + These correspond to the primitive polynomial + Example polynomials from A5/1: + x**19 + x**5 + x**2 + x + 1, x**22 + x + 1, + or x**23 + x**15 + x**2 + x + 1 + middle_bit - middle bit of each of the three shift registers, for clock control + name - name of LSFR - for print() + """ + self.taps = taps + self.length = length + self.name = name + self.value = BitVector(size = length); + self.clk_bit_nr = length-middle_bit-1 + + def mix(self, liczba): + """Read value from LSB to MSB and add each bit to LSFR's feedback""" + for key_bit in reversed(liczba): + bit = key_bit + self.clock(bit) + + def clock(self, bit=False): + """Clock LSFR. Can add value of bit to feedback.""" + for tap in self.taps: + bit_nr = self.length - tap - 1 + bit = bit ^ self.value[bit_nr] + self.value << 1 + self.value[self.length-1] = bit + + def out(self): + """Clock LSFR. Can add value of bit to loopback.""" + return self.value[0] + + def clk_bit(self): + """Return clocking bit.""" + return self.value[self.clk_bit_nr] + + def set_value(self, value): + """Set internal state of LSFR.""" + self.value = BitVector(size=self.length, intVal=value) + + def __str__(self): + return "%s:%X" % (self.name, self.value.intValue()) + + +class a51: + def __init__(self): + self.key_size = 64 + self.fn_size = 22 + self.r1 = lsfr(19, [13, 16, 17, 18], 8, "R1") + self.r2 = lsfr(22, [20, 21], 10, "R2") + self.r3 = lsfr(23, [7, 20, 21, 22], 10, "R3") + self.r1_state_mask = ((1 << self.r1.length) -1 ) + self.r2_state_mask = ((1 << self.r2.length) -1 ) + self.r3_state_mask = ((1 << self.r3.length) -1 ) + + def initialize(self, key, fn): + """ + Initialize algorithm with: + + key - value of Kc - integer value of 64 bits + fn - fame number - integer value of 22 bits + """ + key_vect = BitVector(size=self.key_size, intVal=key) + fn_vect = BitVector(size=self.fn_size, intVal=fn) + + self.r1.mix(key_vect) + self.r2.mix(key_vect) + self.r3.mix(key_vect) + + self.r1.mix(fn_vect) + self.r2.mix(fn_vect) + self.r3.mix(fn_vect) + + for i in xrange(0, 100): + self._clock_regs() + + def _clock_regs(self): + """Clock all LSFR's according to majority rule.""" + maj = self._majority() + if self.r1.clk_bit() == maj: + self.r1.clock() + if self.r2.clk_bit() == maj: + self.r2.clock() + if self.r3.clk_bit() == maj: + self.r3.clock() + + def get_output(self): + """ + Generate 228 keystream bits: + + AtoB - 114 bits of keystream for the A->B direction. Store it, MSB first + BtoA - 114 bits of keystream for the B->A direction. Store it, MSB first + """ + AtoB = self.gen_block(114) + BtoA = self.gen_block(114) + return (AtoB, BtoA) + + def _out_bit(self): + out_bit = self.r1.out() ^ self.r2.out() ^ self.r3.out() + return out_bit + + def gen_block(self,size): + out = BitVector(size=0) + for i in xrange(0, size): + self._clock_regs() + out = out + BitVector(intVal = int(self._out_bit())) + return out.intValue() + + def _majority(self): + sum = self.r1.clk_bit()+self.r2.clk_bit()+self.r3.clk_bit() + if sum >= 2: + return True + else: + return False + + def get_state(self): + state = self.r3.value + self.r2.value + self.r1.value + return state.intValue() + + def set_state(self,state): + r1_value = state & self.r1_state_mask + state = state >> self.r1.length + r2_value = state & self.r2_state_mask + state = state >> self.r2.length + r3_value = state & self.r3_state_mask + state = state >> self.r3.length + self.r1.set_value(r1_value) + self.r2.set_value(r2_value) + self.r3.set_value(r3_value) + +def test(): + key = 0xEFCDAB8967452312 #== 0x48C4A2E691D5B3F7 from A5/1 pedagogical implementation in C + fn = 0x000134 + known_good_AtoB = 0x14D3AA960BFA0546ADB861569CA30# == 0x534EAA582FE8151AB6E1855A728C00 from A5/1 pedagogical implementation in C + known_good_BtoA = 0x093F4D68D757ED949B4CBE41B7C6B#== 0x24FD35A35D5FB6526D32F906DF1AC0 from A5/1 pedagogical implementation in C + alg = a51() + alg.initialize(key, fn) + alg.set_state(alg.get_state()) + (AtoB, BtoA) = alg.get_output() + failed = False + if (AtoB != known_good_AtoB) or (BtoA != known_good_BtoA): + failed = True + + print "Key: %x" % key + print "Fame number: %x" % fn + print "Known good keystream from A to B: 0x%029x" % known_good_AtoB + print "Observed keystream from A to B : 0x%029x" % AtoB + print "Known good keystream from B to A: 0x%029x" % known_good_BtoA + print "Observed keystream from B to A : 0x%029x" % BtoA + if failed != True: + print "\nResult: everything looks ok." + else: + print "\nResult: test failed!" + +if __name__ == '__main__': + test()
\ No newline at end of file diff --git a/A5.1/python/A51_Tables/table_gen.py b/A5.1/python/A51_Tables/table_gen.py new file mode 100644 index 0000000..0e22db3 --- /dev/null +++ b/A5.1/python/A51_Tables/table_gen.py @@ -0,0 +1,62 @@ +from a51 import * + +class table_gen: + def __init__(self, end_point_bit, max_chain_len, max_number_chains): + self.end_point_mask = (1 << end_point_bit) - 1 + self.max_number_chains = max_number_chains + self.max_chain_len = max_chain_len + self.reduction_function = 0 + + def gen(self, reduction_function): + self.reduction_function = reduction_function + for chain_number in xrange(0,self.max_number_chains): + start_point = self._gen_start_point(chain_number) + (max_chain_len_exceed, end_point, chain_length) = self._gen_chain(start_point) + + if max_chain_len_exceed == False: #max_chain_len_exceed is looping + print (start_point, end_point, chain_length) + + def _gen_start_point(self, chain_number): + start_point = ((chain_number+1) << (18+22))+((chain_number+1) << (18))+(chain_number+1) + return start_point #TODO: find better method to generate start_points of chains + + def _gen_chain(self, start_point): #a5_until_endpoint + alg = a51() + state = start_point + alg.set_state(state) + + print "Generating a chain" + + for chain_links in xrange(0, max_chain_len): + output = alg.gen_block(64) + print "State:%x -> Output:%x" % (state, output) + if self._is_endpoint(output): + return (False, output, chain_links) + + state = self._reduction(output) + alg.set_state(state) + + return (True, None, None) + + def _is_endpoint(self, output): + if (output & self.end_point_mask) == 0: + return True + else: + return False + + def _reduction(self, output): + return output ^ self.reduction_function + +def gen_tables(max_tables, end_point_bit, max_chain_len, max_number_chains): + generator = table_gen(end_point_bit, max_chain_len, max_number_chains) + for table_nr in xrange(1,max_tables): + reduction_function = table_nr + generator.gen(reduction_function) + +if __name__ == '__main__': + max_tables = 156 + max_number_chains = 2000 + end_point_bit = 27 + max_chain_len = 2000 + + gen_tables(max_tables, end_point_bit, max_chain_len, max_number_chains) diff --git a/gsm-tvoid/AUTHORS b/gsm-tvoid/AUTHORS new file mode 100644 index 0000000..689714c --- /dev/null +++ b/gsm-tvoid/AUTHORS @@ -0,0 +1,3 @@ +Eric Blossom <eb@comsec.com> - Original Block Template +Eric Schneider <eric@schneider-group.com> - GSM Burst Classes + diff --git a/gsm-tvoid/COPYING b/gsm-tvoid/COPYING new file mode 100644 index 0000000..9f1e730 --- /dev/null +++ b/gsm-tvoid/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> + + 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., 51 Franklin Street, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/gsm-tvoid/ChangeLog b/gsm-tvoid/ChangeLog new file mode 100644 index 0000000..3bf55f3 --- /dev/null +++ b/gsm-tvoid/ChangeLog @@ -0,0 +1,46 @@ +2006-07-21 Eric Blossom <eb@comsec.com> + + * doc/howto-write-a-block.xml: clarified 1:1 i/o relationship + versus size of input and output items. Thanks Jens! + +2005-07-02 Eric Blossom <eb@comsec.com> + + * config/gr_no_undefined.m4, config/gr_x86_64.m4: new, x86_64 support. + * config/gr_python.m4: backed out search for libpython, making + x86_64 work and breaking Cygwin/MinGW. + * configure.ac, src/lib/Makefile.am: mods for x86_64, $(NO_UNDEFINED) + +2005-05-09 Stephane Fillod <f8cfe@free.fr> + + * config/gr_sysv_shm.m4: SysV shared memory not mandatory + * config/gr_pwin32.m4, config/gr_python.m4, config/lf_cxx.m4: + fixes for Cygwin, MinGW + +2005-01-29 Eric Blossom <eb@comsec.com> + + * src/lib/Makefile.am: mods for SWIG 1.3.24 + +2005-01-20 Eric Blossom <eb@comsec.com> + + * doc/howto-write-a-block.xml: made release 0.1 + +# +# Copyright 2005 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# diff --git a/gsm-tvoid/INSTALL b/gsm-tvoid/INSTALL new file mode 100644 index 0000000..23e5f25 --- /dev/null +++ b/gsm-tvoid/INSTALL @@ -0,0 +1,236 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free +Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + +These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. + +Installation Names +================== + +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + +Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). Here is a another example: + + /bin/bash ./configure CONFIG_SHELL=/bin/bash + +Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent +configuration-related scripts to be executed by `/bin/bash'. + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/gsm-tvoid/Makefile.am b/gsm-tvoid/Makefile.am new file mode 100644 index 0000000..c566f22 --- /dev/null +++ b/gsm-tvoid/Makefile.am @@ -0,0 +1,8 @@ +include $(top_srcdir)/Makefile.common +VERSION=0.0.2 +EXTRA_DIST = configure config.h.in +SUBDIRS = config src +DIST_SUBDIRS = config src + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = diff --git a/gsm-tvoid/Makefile.common b/gsm-tvoid/Makefile.common new file mode 100644 index 0000000..31a3123 --- /dev/null +++ b/gsm-tvoid/Makefile.common @@ -0,0 +1,38 @@ +# -*- Makefile -*- +# +# Copyright 2004,2006 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +# includes +grincludedir = $(includedir)/gnuradio + +# swig includes +swigincludedir = $(grincludedir)/swig + +# Install this stuff in the appropriate subdirectory +# This usually ends up at: +# ${prefix}/lib/python${python_version}/site-packages/gnuradio + +grpythondir = $(pythondir)/gnuradio +grpyexecdir = $(pyexecdir)/gnuradio + +# swig flags +SWIGPYTHONFLAGS = -fvirtual -python -modern +SWIGGRFLAGS = -I$(GNURADIO_CORE_INCLUDEDIR)/swig -I$(GNURADIO_CORE_INCLUDEDIR) diff --git a/gsm-tvoid/NEWS b/gsm-tvoid/NEWS new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/gsm-tvoid/NEWS diff --git a/gsm-tvoid/README b/gsm-tvoid/README new file mode 100644 index 0000000..1fad111 --- /dev/null +++ b/gsm-tvoid/README @@ -0,0 +1,44 @@ +# +# Copyright 2005 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +This tarball contains a build tree with examples, Makefiles, etc that +demonstrate how to write signal processing blocks for the GNU Radio +system. + +To build the examples from the tarball use the normal recipe: + + $ ./configure + $ make + $ make check + +If you're building from CVS, you'll need to use this sequence, since +CVS doesn't contain configure or the generated Makefiles. + + $ ./bootstrap + $ ./configure + $ make + $ make check + + +The doc directory is not built by default. This is to avoid spurious +build problems on systems that don't have xmlto installed. If you +have xmlto and its dependencies installed, you can build the html +version of the howto article by cd'ing to doc and invoking make. diff --git a/gsm-tvoid/bootstrap b/gsm-tvoid/bootstrap new file mode 100755 index 0000000..f3f7d83 --- /dev/null +++ b/gsm-tvoid/bootstrap @@ -0,0 +1,36 @@ +#! /bin/bash + +#source ../resources/tools/chk_bootstrap_prg.sh + +echo Removing old files... +rm -f configure Makefile Makefile.in src/Makefile src/Makefile.in config.h config.status aclocal.m4 config.cache config.log + +mkdir config +echo "aclocal -I config" +aclocal -I config +if test $? -ne 0; then + exit 1 +fi +echo "autoconf" +autoconf +if test $? -ne 0; then + exit 1 +fi +echo "autoheader" +autoheader +if test $? -ne 0; then + exit 1 +fi +echo "libtoolize --force --automake" +libtoolize --force --automake +if test $? -ne 0; then + exit 1 +fi + +echo "automake --foreign --add-missing" +automake --foreign --add-missing +if test $? -ne 0; then + exit 1 +fi +echo "BOOTSTRAP complete" + diff --git a/gsm-tvoid/config/Makefile.am b/gsm-tvoid/config/Makefile.am new file mode 100644 index 0000000..5f336fa --- /dev/null +++ b/gsm-tvoid/config/Makefile.am @@ -0,0 +1,65 @@ +# +# Copyright 2001 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +include $(top_srcdir)/Makefile.common + +# Install m4 macros in this directory +m4datadir = $(datadir)/aclocal + +# List your m4 macros here +m4macros = \ + acx_pthread.m4 \ + bnv_have_qt.m4 \ + cppunit.m4 \ + gr_boost.m4 \ + gr_check_createfilemapping.m4 \ + gr_check_usrp.m4 \ + gr_check_mc4020.m4 \ + gr_check_shm_open.m4 \ + gr_doxygen.m4 \ + gr_gprof.m4 \ + gr_libgnuradio_core_extra_ldflags.m4 \ + gr_no_undefined.m4 \ + gr_omnithread.m4 \ + gr_pwin32.m4 \ + gr_python.m4 \ + gr_require_mc4020.m4 \ + gr_scripting.m4 \ + gr_set_md_cpu.m4 \ + gr_swig.m4 \ + gr_sysv_shm.m4 \ + gr_x86_64.m4 \ + lf_cc.m4 \ + lf_cxx.m4 \ + lf_warnings.m4 \ + lf_x11.m4 \ + mkstemp.m4 \ + onceonly.m4 \ + pkg.m4 \ + usrp_fusb_tech.m4 \ + usrp_libusb.m4 \ + usrp_sdcc.m4 + + +# Don't install m4 macros anymore +# m4data_DATA = $(m4macros) + +EXTRA_DIST = $(m4macros) diff --git a/gsm-tvoid/config/acx_pthread.m4 b/gsm-tvoid/config/acx_pthread.m4 new file mode 100644 index 0000000..d318ab0 --- /dev/null +++ b/gsm-tvoid/config/acx_pthread.m4 @@ -0,0 +1,190 @@ +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/htmldoc/acx_pthread.html +dnl +AC_DEFUN([ACX_PTHREAD], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_LANG_SAVE +AC_LANG_C +acx_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) + AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) + AC_MSG_RESULT($acx_pthread_ok) + if test x"$acx_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all. + +acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# pthread: Linux, etcetera +# --thread-safe: KAI C++ + +case "${host_cpu}-${host_os}" in + *solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthread or + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" + ;; +esac + +if test x"$acx_pthread_ok" = xno; then +for flag in $acx_pthread_flags; do + + case $flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $flag]) + PTHREAD_CFLAGS="$flag" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$flag]) + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + AC_TRY_LINK([#include <pthread.h>], + [pthread_t th; pthread_join(th, 0); + pthread_attr_init(0); pthread_cleanup_push(0, 0); + pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], + [acx_pthread_ok=yes]) + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + AC_MSG_RESULT($acx_pthread_ok) + if test "x$acx_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$acx_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: threads are created detached by default + # and the JOINABLE attribute has a nonstandard name (UNDETACHED). + AC_MSG_CHECKING([for joinable pthread attribute]) + AC_TRY_LINK([#include <pthread.h>], + [int attr=PTHREAD_CREATE_JOINABLE;], + ok=PTHREAD_CREATE_JOINABLE, ok=unknown) + if test x"$ok" = xunknown; then + AC_TRY_LINK([#include <pthread.h>], + [int attr=PTHREAD_CREATE_UNDETACHED;], + ok=PTHREAD_CREATE_UNDETACHED, ok=unknown) + fi + if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then + AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok, + [Define to the necessary symbol if this constant + uses a non-standard name on your system.]) + fi + AC_MSG_RESULT(${ok}) + if test x"$ok" = xunknown; then + AC_MSG_WARN([we do not know how to create joinable pthreads]) + fi + + AC_MSG_CHECKING([if more special flags are required for pthreads]) + flag=no + case "${host_cpu}-${host_os}" in + *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; + *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; + esac + AC_MSG_RESULT(${flag}) + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + # More AIX lossage: must compile with cc_r + AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC}) +else + PTHREAD_CC="$CC" +fi + +AC_SUBST(PTHREAD_LIBS) +AC_SUBST(PTHREAD_CFLAGS) +AC_SUBST(PTHREAD_CC) + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$acx_pthread_ok" = xyes; then + ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) + : +else + acx_pthread_ok=no + $2 +fi +AC_LANG_RESTORE +])dnl ACX_PTHREAD diff --git a/gsm-tvoid/config/bnv_have_qt.m4 b/gsm-tvoid/config/bnv_have_qt.m4 new file mode 100644 index 0000000..1469bfb --- /dev/null +++ b/gsm-tvoid/config/bnv_have_qt.m4 @@ -0,0 +1,404 @@ +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/htmldoc/bnv_have_qt.html +dnl +AC_DEFUN([BNV_HAVE_QT], +[ + dnl THANKS! This code includes bug fixes by: + dnl Tim McClarren. + + AC_REQUIRE([AC_PROG_CXX]) + AC_REQUIRE([AC_PATH_X]) + AC_REQUIRE([AC_PATH_XTRA]) + + AC_MSG_CHECKING(for Qt) + + AC_ARG_WITH([Qt-dir], + [ --with-Qt-dir=DIR DIR is equal to \$QTDIR if you have followed the + installation instructions of Trolltech. Header + files are in DIR/include, binary utilities are + in DIR/bin and the library is in DIR/lib]) + AC_ARG_WITH([Qt-include-dir], + [ --with-Qt-include-dir=DIR + Qt header files are in DIR]) + AC_ARG_WITH([Qt-bin-dir], + [ --with-Qt-bin-dir=DIR Qt utilities such as moc and uic are in DIR]) + AC_ARG_WITH([Qt-lib-dir], + [ --with-Qt-lib-dir=DIR The Qt library is in DIR]) + AC_ARG_WITH([Qt-lib], + [ --with-Qt-lib=LIB Use -lLIB to link with the Qt library]) + if test x"$with_Qt_dir" = x"no" || + test x"$with_Qt_include-dir" = x"no" || + test x"$with_Qt_bin_dir" = x"no" || + test x"$with_Qt_lib_dir" = x"no" || + test x"$with_Qt_lib" = x"no"; then + # user disabled Qt. Leave cache alone. + have_qt="User disabled Qt." + else + # "yes" is a bogus option + if test x"$with_Qt_dir" = xyes; then + with_Qt_dir= + fi + if test x"$with_Qt_include_dir" = xyes; then + with_Qt_include_dir= + fi + if test x"$with_Qt_bin_dir" = xyes; then + with_Qt_bin_dir= + fi + if test x"$with_Qt_lib_dir" = xyes; then + with_Qt_lib_dir= + fi + if test x"$with_Qt_lib" = xyes; then + with_Qt_lib= + fi + # No Qt unless we discover otherwise + have_qt=no + # Check whether we are requested to link with a specific version + if test x"$with_Qt_lib" != x; then + bnv_qt_lib="$with_Qt_lib" + fi + # Check whether we were supplied with an answer already + if test x"$with_Qt_dir" != x; then + have_qt=yes + bnv_qt_dir="$with_Qt_dir" + bnv_qt_include_dir="$with_Qt_dir/include" + bnv_qt_bin_dir="$with_Qt_dir/bin" + bnv_qt_lib_dir="$with_Qt_dir/lib" + # Only search for the lib if the user did not define one already + if test x"$bnv_qt_lib" = x; then + bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p | + sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`" + fi + bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + else + # Use cached value or do search, starting with suggestions from + # the command line + AC_CACHE_VAL(bnv_cv_have_qt, + [ + # We are not given a solution and there is no cached value. + bnv_qt_dir=NO + bnv_qt_include_dir=NO + bnv_qt_lib_dir=NO + if test x"$bnv_qt_lib" = x; then + bnv_qt_lib=NO + fi + BNV_PATH_QT_DIRECT + if test "$bnv_qt_dir" = NO || + test "$bnv_qt_include_dir" = NO || + test "$bnv_qt_lib_dir" = NO || + test "$bnv_qt_lib" = NO; then + # Problem with finding complete Qt. Cache the known absence of Qt. + bnv_cv_have_qt="have_qt=no" + else + # Record where we found Qt for the cache. + bnv_cv_have_qt="have_qt=yes \ + bnv_qt_dir=$bnv_qt_dir \ + bnv_qt_include_dir=$bnv_qt_include_dir \ + bnv_qt_bin_dir=$bnv_qt_bin_dir \ + bnv_qt_LIBS=\"$bnv_qt_LIBS\"" + fi + ])dnl + eval "$bnv_cv_have_qt" + fi # all $bnv_qt_* are set + fi # $have_qt reflects the system status + if test x"$have_qt" = xyes; then + QT_CXXFLAGS="-I$bnv_qt_include_dir" + QT_DIR="$bnv_qt_dir" + QT_LIBS="$bnv_qt_LIBS" + # If bnv_qt_dir is defined, utilities are expected to be in the + # bin subdirectory + if test x"$bnv_qt_dir" != x; then + if test -x "$bnv_qt_dir/bin/uic"; then + QT_UIC="$bnv_qt_dir/bin/uic" + else + # Old versions of Qt don't have uic + QT_UIC= + fi + QT_MOC="$bnv_qt_dir/bin/moc" + else + # Or maybe we are told where to look for the utilities + if test x"$bnv_qt_bin_dir" != x; then + if test -x "$bnv_qt_bin_dir/uic"; then + QT_UIC="$bnv_qt_bin_dir/uic" + else + # Old versions of Qt don't have uic + QT_UIC= + fi + QT_MOC="$bnv_qt_bin_dir/moc" + else + # Last possibility is that they are in $PATH + QT_UIC="`which uic`" + QT_MOC="`which moc`" + fi + fi + # All variables are defined, report the result + AC_MSG_RESULT([$have_qt: + QT_CXXFLAGS=$QT_CXXFLAGS + QT_DIR=$QT_DIR + QT_LIBS=$QT_LIBS + QT_UIC=$QT_UIC + QT_MOC=$QT_MOC]) + else + # Qt was not found + QT_CXXFLAGS= + QT_DIR= + QT_LIBS= + QT_UIC= + QT_MOC= + AC_MSG_RESULT($have_qt) + fi + AC_SUBST(QT_CXXFLAGS) + AC_SUBST(QT_DIR) + AC_SUBST(QT_LIBS) + AC_SUBST(QT_UIC) + AC_SUBST(QT_MOC) + + #### Being paranoid: + if test x"$have_qt" = xyes; then + AC_MSG_CHECKING(correct functioning of Qt installation) + AC_CACHE_VAL(bnv_cv_qt_test_result, + [ + cat > bnv_qt_test.h << EOF +#include <qobject.h> +class Test : public QObject +{ +Q_OBJECT +public: + Test() {} + ~Test() {} +public slots: + void receive() {} +signals: + void send(); +}; +EOF + + cat > bnv_qt_main.$ac_ext << EOF +#include "bnv_qt_test.h" +#include <qapplication.h> +int main( int argc, char **argv ) +{ + QApplication app( argc, argv ); + Test t; + QObject::connect( &t, SIGNAL(send()), &t, SLOT(receive()) ); +} +EOF + + bnv_cv_qt_test_result="failure" + bnv_try_1="$QT_MOC bnv_qt_test.h -o moc_bnv_qt_test.$ac_ext >/dev/null 2>bnv_qt_test_1.out" + AC_TRY_EVAL(bnv_try_1) + bnv_err_1=`grep -v '^ *+' bnv_qt_test_1.out | grep -v "^bnv_qt_test.h\$"` + if test x"$bnv_err_1" != x; then + echo "$bnv_err_1" >&AC_FD_CC + echo "configure: could not run $QT_MOC on:" >&AC_FD_CC + cat bnv_qt_test.h >&AC_FD_CC + else + bnv_try_2="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o moc_bnv_qt_test.o moc_bnv_qt_test.$ac_ext >/dev/null 2>bnv_qt_test_2.out" + AC_TRY_EVAL(bnv_try_2) + bnv_err_2=`grep -v '^ *+' bnv_qt_test_2.out | grep -v "^bnv_qt_test.{$ac_ext}\$"` + if test x"$bnv_err_2" != x; then + echo "$bnv_err_2" >&AC_FD_CC + echo "configure: could not compile:" >&AC_FD_CC + cat bnv_qt_test.$ac_ext >&AC_FD_CC + else + bnv_try_3="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o bnv_qt_main.o bnv_qt_main.$ac_ext >/dev/null 2>bnv_qt_test_3.out" + AC_TRY_EVAL(bnv_try_3) + bnv_err_3=`grep -v '^ *+' bnv_qt_test_3.out | grep -v "^bnv_qt_main.{$ac_ext}\$"` + if test x"$bnv_err_3" != x; then + echo "$bnv_err_3" >&AC_FD_CC + echo "configure: could not compile:" >&AC_FD_CC + cat bnv_qt_main.$ac_ext >&AC_FD_CC + else + bnv_try_4="$CXX $QT_LIBS $LIBS -o bnv_qt_main bnv_qt_main.o moc_bnv_qt_test.o >/dev/null 2>bnv_qt_test_4.out" + AC_TRY_EVAL(bnv_try_4) + bnv_err_4=`grep -v '^ *+' bnv_qt_test_4.out` + if test x"$bnv_err_4" != x; then + echo "$bnv_err_4" >&AC_FD_CC + else + bnv_cv_qt_test_result="success" + fi + fi + fi + fi + ])dnl AC_CACHE_VAL bnv_cv_qt_test_result + AC_MSG_RESULT([$bnv_cv_qt_test_result]); + if test x"$bnv_cv_qt_test_result" = "xfailure"; then + # working Qt was not found + QT_CXXFLAGS= + QT_DIR= + QT_LIBS= + QT_UIC= + QT_MOC= + have_qt=no + AC_MSG_WARN([Failed to find matching components of a complete + Qt installation. Try using more options, + see ./configure --help.]) + fi + + rm -f bnv_qt_test.h moc_bnv_qt_test.$ac_ext moc_bnv_qt_test.o \ + bnv_qt_main.$ac_ext bnv_qt_main.o bnv_qt_main \ + bnv_qt_test_1.out bnv_qt_test_2.out bnv_qt_test_3.out bnv_qt_test_4.out + fi +]) + +dnl Internal subroutine of BNV_HAVE_QT +dnl Set bnv_qt_dir bnv_qt_include_dir bnv_qt_bin_dir bnv_qt_lib_dir bnv_qt_lib +dnl Copyright 2001 Bastiaan N. Veelo <Bastiaan.N.Veelo@immtek.ntnu.no> +AC_DEFUN([BNV_PATH_QT_DIRECT], +[ + ## Binary utilities ## + if test x"$with_Qt_bin_dir" != x; then + bnv_qt_bin_dir=$with_Qt_bin_dir + fi + ## Look for header files ## + if test x"$with_Qt_include_dir" != x; then + bnv_qt_include_dir="$with_Qt_include_dir" + else + # The following header file is expected to define QT_VERSION. + qt_direct_test_header=qglobal.h + # Look for the header file in a standard set of common directories. + bnv_include_path_list=" + /usr/include + `ls -dr /usr/include/qt* 2>/dev/null` + `ls -dr /usr/lib/qt*/include 2>/dev/null` + `ls -dr /usr/local/qt*/include 2>/dev/null` + `ls -dr /opt/qt*/include 2>/dev/null` + " + for bnv_dir in $bnv_include_path_list; do + if test -r "$bnv_dir/$qt_direct_test_header"; then + bnv_dirs="$bnv_dirs $bnv_dir" + fi + done + # Now look for the newest in this list + bnv_prev_ver=0 + for bnv_dir in $bnv_dirs; do + bnv_this_ver=`egrep -w '#define QT_VERSION' $bnv_dir/$qt_direct_test_header | sed s/'#define QT_VERSION'//` + if expr $bnv_this_ver '>' $bnv_prev_ver > /dev/null; then + bnv_qt_include_dir=$bnv_dir + bnv_prev_ver=$bnv_this_ver + fi + done + fi dnl Found header files. + + # Are these headers located in a traditional Trolltech installation? + # That would be $bnv_qt_include_dir stripped from its last element: + bnv_possible_qt_dir=`dirname $bnv_qt_include_dir` + if test -x $bnv_possible_qt_dir/bin/moc && + ls $bnv_possible_qt_dir/lib/libqt* > /dev/null; then + # Then the rest is a piece of cake + bnv_qt_dir=$bnv_possible_qt_dir + bnv_qt_bin_dir="$bnv_qt_dir/bin" + bnv_qt_lib_dir="$bnv_qt_dir/lib" + # Only look for lib if the user did not supply it already + if test x"$bnv_qt_lib" = xNO; then + bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p | + sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`" + fi + bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + else + # There is no valid definition for $QTDIR as Trolltech likes to see it + bnv_qt_dir= + ## Look for Qt library ## + if test x"$with_Qt_lib_dir" != x; then + bnv_qt_lib_dir="$with_Qt_lib_dir" + # Only look for lib if the user did not supply it already + if test x"$bnv_qt_lib" = xNO; then + bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p | + sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`" + fi + bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + else + # Normally, when there is no traditional Trolltech installation, + # the library is installed in a place where the linker finds it + # automatically. + # If the user did not define the library name, try with qt + if test x"$bnv_qt_lib" = xNO; then + bnv_qt_lib=qt + fi + qt_direct_test_header=qapplication.h + qt_direct_test_main=" + int argc; + char ** argv; + QApplication app(argc,argv); + " + # See if we find the library without any special options. + # Don't add top $LIBS permanently yet + bnv_save_LIBS="$LIBS" + LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + bnv_qt_LIBS="$LIBS" + bnv_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="-I$bnv_qt_include_dir" + AC_TRY_LINK([#include <$qt_direct_test_header>], + $qt_direct_test_main, + [ + # Success. + # We can link with no special library directory. + bnv_qt_lib_dir= + ], [ + # That did not work. Try the multi-threaded version + echo "Non-critical error, please neglect the above." >&AC_FD_CC + bnv_qt_lib=qt-mt + LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + AC_TRY_LINK([#include <$qt_direct_test_header>], + $qt_direct_test_main, + [ + # Success. + # We can link with no special library directory. + bnv_qt_lib_dir= + ], [ + # That did not work. Try the OpenGL version + echo "Non-critical error, please neglect the above." >&AC_FD_CC + bnv_qt_lib=qt-gl + LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + AC_TRY_LINK([#include <$qt_direct_test_header>], + $qt_direct_test_main, + [ + # Succes. + # We can link with no special library directory. + bnv_qt_lib_dir= + ], [ + # That did not work. Maybe a library version I don't know about? + echo "Non-critical error, please neglect the above." >&AC_FD_CC + # Look for some Qt lib in a standard set of common directories. + bnv_dir_list=" + `echo $bnv_qt_includes | sed ss/includess` + /lib + /usr/lib + /usr/local/lib + /opt/lib + `ls -dr /usr/lib/qt* 2>/dev/null` + `ls -dr /usr/local/qt* 2>/dev/null` + `ls -dr /opt/qt* 2>/dev/null` + " + for bnv_dir in $bnv_dir_list; do + if ls $bnv_dir/libqt*; then + # Gamble that it's the first one... + bnv_qt_lib="`ls $bnv_dir/libqt* | sed -n 1p | + sed s@$bnv_dir/lib@@ | sed s/[.].*//`" + bnv_qt_lib_dir="$bnv_dir" + break + fi + done + # Try with that one + LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + AC_TRY_LINK([#include <$qt_direct_test_header>], + $qt_direct_test_main, + [ + # Succes. + # We can link with no special library directory. + bnv_qt_lib_dir= + ], [ + # Leave bnv_qt_lib_dir defined + ]) + ]) + ]) + ]) + if test x"$bnv_qt_lib_dir" != x; then + bnv_qt_LIBS="-l$bnv_qt_lib_dir $LIBS" + else + bnv_qt_LIBS="$LIBS" + fi + LIBS="$bnv_save_LIBS" + CXXFLAGS="$bnv_save_CXXFLAGS" + fi dnl $with_Qt_lib_dir was not given + fi dnl Done setting up for non-traditional Trolltech installation +]) diff --git a/gsm-tvoid/config/cppunit.m4 b/gsm-tvoid/config/cppunit.m4 new file mode 100644 index 0000000..0991d51 --- /dev/null +++ b/gsm-tvoid/config/cppunit.m4 @@ -0,0 +1,80 @@ +dnl +dnl AM_PATH_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +dnl +AC_DEFUN([AM_PATH_CPPUNIT], +[ + +AC_ARG_WITH(cppunit-prefix,[ --with-cppunit-prefix=PFX Prefix where CppUnit is installed (optional)], + cppunit_config_prefix="$withval", cppunit_config_prefix="") +AC_ARG_WITH(cppunit-exec-prefix,[ --with-cppunit-exec-prefix=PFX Exec prefix where CppUnit is installed (optional)], + cppunit_config_exec_prefix="$withval", cppunit_config_exec_prefix="") + + if test x$cppunit_config_exec_prefix != x ; then + cppunit_config_args="$cppunit_config_args --exec-prefix=$cppunit_config_exec_prefix" + if test x${CPPUNIT_CONFIG+set} != xset ; then + CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config + fi + fi + if test x$cppunit_config_prefix != x ; then + cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix" + if test x${CPPUNIT_CONFIG+set} != xset ; then + CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config + fi + fi + + AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no) + cppunit_version_min=$1 + + AC_MSG_CHECKING(for Cppunit - version >= $cppunit_version_min) + no_cppunit="" + if test "$CPPUNIT_CONFIG" = "no" ; then + no_cppunit=yes + else + CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags` + CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs` + cppunit_version=`$CPPUNIT_CONFIG --version` + + cppunit_major_version=`echo $cppunit_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + cppunit_minor_version=`echo $cppunit_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + cppunit_micro_version=`echo $cppunit_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + cppunit_major_min=`echo $cppunit_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + cppunit_minor_min=`echo $cppunit_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + cppunit_micro_min=`echo $cppunit_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + cppunit_version_proper=`expr \ + $cppunit_major_version \> $cppunit_major_min \| \ + $cppunit_major_version \= $cppunit_major_min \& \ + $cppunit_minor_version \> $cppunit_minor_min \| \ + $cppunit_major_version \= $cppunit_major_min \& \ + $cppunit_minor_version \= $cppunit_minor_min \& \ + $cppunit_micro_version \>= $cppunit_micro_min ` + + if test "$cppunit_version_proper" = "1" ; then + AC_MSG_RESULT([$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version]) + else + AC_MSG_RESULT(no) + no_cppunit=yes + fi + fi + + if test "x$no_cppunit" = x ; then + ifelse([$2], , :, [$2]) + else + CPPUNIT_CFLAGS="" + CPPUNIT_LIBS="" + ifelse([$3], , :, [$3]) + fi + + AC_SUBST(CPPUNIT_CFLAGS) + AC_SUBST(CPPUNIT_LIBS) +]) + + + diff --git a/gsm-tvoid/config/gr_as.m4 b/gsm-tvoid/config/gr_as.m4 new file mode 100644 index 0000000..08e3f93 --- /dev/null +++ b/gsm-tvoid/config/gr_as.m4 @@ -0,0 +1,34 @@ +# Figure out how to run the assembler. -*- Autoconf -*- + +# serial 2 + +# Copyright 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, 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., 51 Franklin Street, Boston, MA +# 02110-1301, USA. + +# I just copy and renamed this from automake-1.6.3 so we should work +# under both 1.4-p6 and later. -eb + +# GR_PROG_AS +# ---------- +AC_DEFUN([GR_PROG_AS], +[# By default we simply use the C compiler to build assembly code. +AC_REQUIRE([AC_PROG_CC]) +: ${CCAS='$(CC)'} +# Set ASFLAGS if not already set. +: ${CCASFLAGS='$(CFLAGS)'} +AC_SUBST(CCAS) +AC_SUBST(CCASFLAGS)]) diff --git a/gsm-tvoid/config/gr_boost.m4 b/gsm-tvoid/config/gr_boost.m4 new file mode 100644 index 0000000..7236cbb --- /dev/null +++ b/gsm-tvoid/config/gr_boost.m4 @@ -0,0 +1,111 @@ +dnl +dnl Copyright 2004,2005 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +dnl This tries to do the "right thing" to locate the boost include files. +dnl If the user explicitly specified --with-boost-include-dir=<foo> +dnl we believe them and use it. Otherwise, +dnl +dnl We look for boost/shared_ptr.hpp in the "normal places". That is, +dnl wherever AC_CHECK_HEADER looks. If the boost includes are in /usr/local/include +dnl this step will find them. +dnl +dnl Otherwise, we check to see if the boost stuff was installed in a version-specific +dnl directory under /usr/local/include. These look like: /usr/local/include/boost-1_33_1 +dnl If there's more than one version installed, we select the +dnl lexicographically greatest one. +dnl +dnl If none of these work, we bail. + +AC_DEFUN([GR_REQUIRE_BOOST_INCLUDES], +[ + AC_LANG_PUSH(C++) + gr_boost_include_dir= + AC_ARG_WITH([boost-include-dir], + AC_HELP_STRING([--with-boost-include-dir=<path>], + [path to boost c++ include files]), + [ + # "yes" and "no" are bogus answers + if test x"$with_boost_include_dir" = xyes || + test x"$with_boost_include_dir" = xno; then + gr_boost_include_dir= + else + gr_boost_include_dir=$with_boost_include_dir + fi + ]) + echo "gr_boost_include_dir = $gr_boost_include_dir" + if test x$gr_boost_include_dir != x; then + # + # If the user specified a directory, then we use it + # + OLD_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$gr_boost_include_dir" + AC_CHECK_HEADER([boost/shared_ptr.hpp], + [BOOST_CFLAGS="-I$gr_boost_include_dir"], + [AC_MSG_ERROR( + [Failed to locate boost/shared_ptr.hpp. +Try using --with-boost-include-dir=<path>, +E.g., --with-boost-include-dir=/usr/local/include/boost-1_33_1])]) + CPPFLAGS=$OLD_CPPFLAGS + else + # + # Otherwise we check in the default places + # + AC_CHECK_HEADER([boost/shared_ptr.hpp], + [BOOST_CFLAGS=""], + [ # Nope, look for latest version if any in $prefix/include/boost-* + + # Wipe out cached value. KLUDGE: AC should have API for this + unset AS_TR_SH([ac_cv_header_boost/shared_ptr.hpp]) + + boost_last_match(){ + #echo "boost_last_match: [$]*" + pattern="[$]1" + shift + if test "[$]pattern" = "[$]1" + then + LM='' + else + shift `expr [$]# - 1` + LM=[$]1 + fi + #echo "LM(1)='[$]LM'" + } + + pattern="/usr/local/include/boost-*" + boost_last_match "$pattern" $pattern + #echo "LM(2)='$LM'" + + OLD_CPPFLAGS=$CPP_FLAGS + CPPFLAGS="$CPPFLAGS -I$LM" + AC_CHECK_HEADER([boost/shared_ptr.hpp], + [BOOST_CFLAGS="-I$LM"], + [AC_MSG_ERROR( + [Failed to locate boost/shared_ptr.hpp. +Try using --with-boost-include-dir=<path>, +E.g., --with-boost-include-dir=/usr/local/include/boost-1_33_1])]) + CPPFLAGS=$OLD_CPPFLAGS + ]) + + fi + unset boost_last_match LM + AC_LANG_POP + AC_SUBST(BOOST_CFLAGS) +]) diff --git a/gsm-tvoid/config/gr_check_createfilemapping.m4 b/gsm-tvoid/config/gr_check_createfilemapping.m4 new file mode 100644 index 0000000..681847a --- /dev/null +++ b/gsm-tvoid/config/gr_check_createfilemapping.m4 @@ -0,0 +1,52 @@ +dnl +dnl Copyright 2005 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. + +dnl AC_DEFUN([GR_CHECK_CREATEFILEMAPPING], +dnl [ +dnl AC_CHECK_FUNCS([CreateFileMapping]) +dnl ]) + +AC_DEFUN([GR_CHECK_CREATEFILEMAPPING],[ + AC_MSG_CHECKING([for CreateFileMapping function]) + AC_COMPILE_IFELSE([ +#include <windows.h> +int main (int argc, char **argv) +{ + HANDLE handle; + int size; + char seg_name[[1024]]; + handle = CreateFileMapping( + INVALID_HANDLE_VALUE, // use paging file + NULL, // default security + PAGE_READWRITE, // read/write access + 0, // max. object size + size, // buffer size + seg_name); // name of mapping object + return 0; +} +],[HAVE_CREATEFILEMAPPING=yes + AC_DEFINE(HAVE_CREATEFILEMAPPING,[1],[Define if you have the CreateFilemapping function(win32).])], + [HAVE_CREATEFILEMAPPING=no]) + + AC_MSG_RESULT($HAVE_CREATEFILEMAPPING) + AM_CONDITIONAL(HAVE_CREATEFILEMAPPING, test x$HAVE_CREATEFILEMAPPING = xyes) +]) + + diff --git a/gsm-tvoid/config/gr_check_mc4020.m4 b/gsm-tvoid/config/gr_check_mc4020.m4 new file mode 100644 index 0000000..f518c3c --- /dev/null +++ b/gsm-tvoid/config/gr_check_mc4020.m4 @@ -0,0 +1,37 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +AC_DEFUN([GR_CHECK_MC4020],[ + AC_MSG_CHECKING([for mc4020 A/D driver include file]) + AC_COMPILE_IFELSE([ +#include <mc4020.h> +int main (int argc, char **argv) +{ + return 0; +} +],[HAVE_MC4020=yes + AC_DEFINE(HAVE_MC4020,[1],[Define if you have a Measurement Computing PCI-DAS4020/12 A/D])], + [HAVE_MC4020=no]) + + AC_MSG_RESULT($HAVE_MC4020) + AM_CONDITIONAL(HAVE_MC4020, test x$HAVE_MC4020 = xyes) +]) + diff --git a/gsm-tvoid/config/gr_check_shm_open.m4 b/gsm-tvoid/config/gr_check_shm_open.m4 new file mode 100644 index 0000000..71638cf --- /dev/null +++ b/gsm-tvoid/config/gr_check_shm_open.m4 @@ -0,0 +1,29 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. + +AC_DEFUN([GR_CHECK_SHM_OPEN], +[ + SHM_OPEN_LIBS="" + save_LIBS="$LIBS" + AC_SEARCH_LIBS([shm_open], [rt], [SHM_OPEN_LIBS="$LIBS"]) + AC_CHECK_FUNCS([shm_open]) + LIBS="$save_LIBS" + AC_SUBST(SHM_OPEN_LIBS) +]) diff --git a/gsm-tvoid/config/gr_check_usrp.m4 b/gsm-tvoid/config/gr_check_usrp.m4 new file mode 100644 index 0000000..79759a3 --- /dev/null +++ b/gsm-tvoid/config/gr_check_usrp.m4 @@ -0,0 +1,32 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +dnl Check for Universal Software Radio Peripheral + +AC_DEFUN([GR_CHECK_USRP],[ + PKG_CHECK_MODULES(USRP, usrp >= 0.2, + [HAVE_USRP=yes + AC_DEFINE(HAVE_USRP,[1],[Define if you have a USRP])], + [HAVE_USRP=no]) + + AM_CONDITIONAL(HAVE_USRP, test x$HAVE_USRP = xyes) +]) + diff --git a/gsm-tvoid/config/gr_doxygen.m4 b/gsm-tvoid/config/gr_doxygen.m4 new file mode 100644 index 0000000..775be89 --- /dev/null +++ b/gsm-tvoid/config/gr_doxygen.m4 @@ -0,0 +1,59 @@ +dnl +dnl Copyright 2003,2005 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +AC_DEFUN([GR_CHECK_DOXYGEN],[ + AC_ARG_ENABLE(doxygen, [ --enable-doxygen enable documentation generation with doxygen (no)]) + AC_ARG_ENABLE(dot, [ --enable-dot use 'dot' to generate graphs in doxygen (auto)]) + AC_ARG_ENABLE(html-docs, [ --enable-html-docs enable HTML generation with doxygen (yes)], [], [ enable_html_docs=yes]) + AC_ARG_ENABLE(latex-docs, [ --enable-latex-docs enable LaTeX doc generation with doxygen (no)], [], [ enable_latex_docs=no]) + + if test "x$enable_doxygen" = xyes; then + AC_PATH_PROG(DOXYGEN, doxygen, , $PATH) + if test x$DOXYGEN = x; then + if test "x$enable_doxygen" = xyes; then + AC_MSG_ERROR([could not find doxygen]) + fi + enable_doc=no + generate_docs= + else + enable_doc=yes + generate_docs=docs + AC_PATH_PROG(DOT, dot, , $PATH) + fi + else + enable_doc=no + fi + + AM_CONDITIONAL(DOC, test x$enable_doc = xyes) + + if test x$DOT = x; then + if test "x$enable_dot" = xyes; then + AC_MSG_ERROR([could not find dot]) + fi + enable_dot=no + else + enable_dot=yes + fi + AC_SUBST(enable_dot) + AC_SUBST(enable_html_docs) + AC_SUBST(enable_latex_docs) + AC_SUBST(generate_docs) +]) diff --git a/gsm-tvoid/config/gr_gprof.m4 b/gsm-tvoid/config/gr_gprof.m4 new file mode 100644 index 0000000..c03c469 --- /dev/null +++ b/gsm-tvoid/config/gr_gprof.m4 @@ -0,0 +1,72 @@ +dnl +dnl Copyright 2002 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +dnl FIXME probably need to add linker flag too... + +AC_DEFUN([GR_SET_GPROF],[ + dnl Check for --with-gprof + AC_MSG_CHECKING([whether user wants gprof]) + AC_ARG_WITH(gprof, + [ --with-gprof Turn on gprof profiling], + [], [ with_gprof=no ]) + AC_MSG_RESULT($with_gprof) + + dnl gprof profiling flags for the two main compilers + cc_profiling_flags="-pg" + cxx_profiling_flags="-pg" + ld_profiling_flags="-pg" + if test $with_gprof = yes + then + if test -n "${CC}" + then + LF_CHECK_CC_FLAG($cc_profiling_flags) + fi + if test -n "${CXX}" + then + LF_CHECK_CXX_FLAG($cxx_profiling_flags) + fi + fi +]) + +AC_DEFUN([GR_SET_PROF],[ + dnl Check for --with-prof + AC_MSG_CHECKING([whether user wants prof]) + AC_ARG_WITH(prof, + [ --with-prof Turn on prof profiling], + [], [ with_prof=no ]) + AC_MSG_RESULT($with_prof) + + dnl prof profiling flags for the two main compilers + cc_profiling_flags="-p" + cxx_profiling_flags="-p" + ld_profiling_flags="-p" + if test $with_prof = yes + then + if test -n "${CC}" + then + LF_CHECK_CC_FLAG($cc_profiling_flags) + fi + if test -n "${CXX}" + then + LF_CHECK_CXX_FLAG($cxx_profiling_flags) + fi + fi +]) diff --git a/gsm-tvoid/config/gr_libgnuradio_core_extra_ldflags.m4 b/gsm-tvoid/config/gr_libgnuradio_core_extra_ldflags.m4 new file mode 100644 index 0000000..b581d19 --- /dev/null +++ b/gsm-tvoid/config/gr_libgnuradio_core_extra_ldflags.m4 @@ -0,0 +1,40 @@ +# Check for (MinGW)win32 extra ld options. -*- Autoconf -*- + +# Copyright 2003,2004,2005 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. + +dnl +AC_DEFUN([GR_LIBGNURADIO_CORE_EXTRA_LDFLAGS], [ +AC_REQUIRE([AC_PROG_LD]) +# on Mingw32 extra LDFLAGS are required to ease global variable linking +LIBGNURADIO_CORE_EXTRA_LDFLAGS="" + +AC_MSG_CHECKING([whether $LD accepts --enable-runtime-pseudo-reloc]) +if ${LD} --enable-runtime-pseudo-reloc --version >/dev/null 2>&1 +then + # libtool requires the quotes + LIBGNURADIO_CORE_EXTRA_LDFLAGS="\"-Wl,--enable-runtime-pseudo-reloc\"" + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + +AC_SUBST(LIBGNURADIO_CORE_EXTRA_LDFLAGS) + +]) diff --git a/gsm-tvoid/config/gr_no_undefined.m4 b/gsm-tvoid/config/gr_no_undefined.m4 new file mode 100644 index 0000000..a2bb6d3 --- /dev/null +++ b/gsm-tvoid/config/gr_no_undefined.m4 @@ -0,0 +1,44 @@ +dnl +dnl Copyright 2005 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +# GR_NO_UNDEFINED() +# +# Detemine whether we need to use the -no-undefined linker flag +# when building shared libraries. +# Sets NO_UNDEFINED to "" or "-no-undefined" +# +# As far as I can tell, we need -no-undefined only when building +# windows DLLs. This occurs when using MinGW and Cygwin. +# +# For now, we stub this out. + +AC_DEFUN([GR_NO_UNDEFINED],[ + AC_REQUIRE([AC_CANONICAL_HOST]) + no_undefined="" + case "${host_os}" in + *mingw* | *cygwin*) + + # on MinGW/Cygwin extra LDFLAGS are required + no_undefined="-no-undefined" + ;; + esac + AC_SUBST(NO_UNDEFINED,[$no_undefined]) +]) diff --git a/gsm-tvoid/config/gr_omnithread.m4 b/gsm-tvoid/config/gr_omnithread.m4 new file mode 100644 index 0000000..bdf1ece --- /dev/null +++ b/gsm-tvoid/config/gr_omnithread.m4 @@ -0,0 +1,51 @@ +# Check for Omnithread (pthread/NT) thread support. -*- Autoconf -*- + +# Copyright 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, 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., 51 Franklin Street, Boston, MA +# 02110-1301, USA. + +AC_DEFUN([GR_OMNITHREAD], +[ + # Check first for POSIX + ACX_PTHREAD( + [ ot_posix="yes" + AC_DEFINE(OMNITHREAD_POSIX,[1],[Define to 1 to enable pthread]) + ],[ + # If no POSIX support found, then check for NT threads + AC_MSG_CHECKING([for NT threads]) + + AC_LINK_IFELSE([ + #include <windows.h> + #include <winbase.h> + int main() { InitializeCriticalSection(NULL); return 0; } + ], + [ + ot_nt="yes" + AC_DEFINE(OMNITHREAD_NT,[1],[Define to 1 to enable NT thread]) + ], + [AC_MSG_FAILURE([GNU Radio requires POSIX threads. pthreads not found.])] + ) + AC_MSG_RESULT(yes) + ]) + AM_CONDITIONAL(OMNITHREAD_POSIX, test "x$ot_posix" = xyes) + AM_CONDITIONAL(OMNITHREAD_NT, test "x$ot_nt" = xyes) + + save_LIBS="$LIBS" + AC_SEARCH_LIBS([clock_gettime], [rt], [PTHREAD_LIBS="$PTHREAD_LIBS $LIBS"]) + AC_CHECK_FUNCS([clock_gettime gettimeofday nanosleep]) + LIBS="$save_LIBS" +]) + diff --git a/gsm-tvoid/config/gr_pwin32.m4 b/gsm-tvoid/config/gr_pwin32.m4 new file mode 100644 index 0000000..23347e1 --- /dev/null +++ b/gsm-tvoid/config/gr_pwin32.m4 @@ -0,0 +1,146 @@ +# Check for (mingw)win32 POSIX replacements. -*- Autoconf -*- + +# Copyright 2003,2004,2005 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. + + +AC_DEFUN([GR_PWIN32], +[ +AC_REQUIRE([AC_HEADER_TIME]) +AC_CHECK_HEADERS([sys/types.h fcntl.h io.h]) +AC_CHECK_HEADERS([windows.h]) +AC_CHECK_HEADERS([winioctl.h winbase.h], [], [], [ + #if HAVE_WINDOWS_H + #include <windows.h> + #endif +]) + +AC_CHECK_FUNCS([getopt usleep gettimeofday nanosleep rand srand random srandom sleep sigaction]) +AC_CHECK_TYPES([struct timezone, struct timespec, ssize_t],[],[],[ + #if HAVE_SYS_TYPES_H + # include <sys/types.h> + #endif + #if TIME_WITH_SYS_TIME + # include <sys/time.h> + # include <time.h> + #else + # if HAVE_SYS_TIME_H + # include <sys/time.h> + # else + # include <time.h> + # endif + #endif +]) + +dnl Checks for replacements +AC_REPLACE_FUNCS([getopt usleep gettimeofday]) + + +AC_MSG_CHECKING(for Sleep) +AC_TRY_LINK([ #include <windows.h> + #include <winbase.h> + ], [ Sleep(0); ], + [AC_DEFINE(HAVE_SSLEEP,1,[Define to 1 if you have win32 Sleep]) + AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no) + ) + +dnl Under Win32, mkdir prototype in io.h has only one arg +AC_MSG_CHECKING(whether mkdir accepts only one arg) +AC_TRY_COMPILE([#include <sys/types.h> + #include <sys/stat.h> + #include <fcntl.h>], [ + mkdir("") + ], [ AC_MSG_RESULT(yes) + AC_DEFINE(MKDIR_TAKES_ONE_ARG,[],[Define if mkdir accepts only one arg]) ], + [ AC_MSG_RESULT(no) + ]) + +AH_BOTTOM( +[ +/* Define missing prototypes, implemented in replacement lib */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef HAVE_GETOPT +int getopt (int argc, char * const argv[], const char * optstring); +extern char * optarg; +extern int optind, opterr, optopt; +#endif + +#ifndef HAVE_USLEEP +int usleep(unsigned long usec); /* SUSv2 */ +#endif + +#ifndef HAVE_NANOSLEEP +#ifndef HAVE_STRUCT_TIMESPEC +#if HAVE_SYS_TYPES_H +# include <sys/types.h> /* need time_t */ +#endif +struct timespec { + time_t tv_sec; + long tv_nsec; +}; +#endif +static inline int nanosleep(const struct timespec *req, struct timespec *rem) { return usleep(req->tv_sec*1000000+req->tv_nsec/1000); } +#endif + +#if defined(HAVE_SSLEEP) && !defined(HAVE_SLEEP) +#ifdef HAVE_WINBASE_H +#include <windows.h> +#include <winbase.h> +#endif +/* TODO: what about SleepEx? */ +static inline unsigned int sleep (unsigned int nb_sec) { Sleep(nb_sec*1000); return 0; } +#endif + +#ifndef HAVE_GETTIMEOFDAY +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif +#ifndef HAVE_STRUCT_TIMEZONE +struct timezone { + int tz_minuteswest; + int tz_dsttime; +}; +#endif +int gettimeofday(struct timeval *tv, struct timezone *tz); +#endif + +#if !defined(HAVE_RANDOM) && defined(HAVE_RAND) +#include <stdlib.h> +static inline long int random (void) { return rand(); } +#endif + +#if !defined(HAVE_SRANDOM) && defined(HAVE_SRAND) +static inline void srandom (unsigned int seed) { srand(seed); } +#endif + +#ifndef HAVE_SSIZE_T +typedef size_t ssize_t; +#endif + +#ifdef __cplusplus +} +#endif +]) + + +]) diff --git a/gsm-tvoid/config/gr_python.m4 b/gsm-tvoid/config/gr_python.m4 new file mode 100644 index 0000000..b2acbbb --- /dev/null +++ b/gsm-tvoid/config/gr_python.m4 @@ -0,0 +1,116 @@ +dnl +dnl Copyright 2003,2004,2005 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +# PYTHON_DEVEL() +# +# Checks for Python and tries to get the include path to 'Python.h'. +# It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LDFLAGS) output variables. +# +AC_DEFUN([PYTHON_DEVEL],[ + AC_REQUIRE([AM_PATH_PYTHON]) + AC_REQUIRE([AC_CANONICAL_HOST]) + + # Check for Python include path + AC_MSG_CHECKING([for Python include path]) + if test -z "$PYTHON" ; then + AC_MSG_ERROR([cannot find Python path]) + fi + + # ask distutils which include path we should use + python_cmd=' +import distutils.sysconfig +import os +path = distutils.sysconfig.get_python_inc(plat_specific=False) +if os.sep == "\\": + path = path.replace("\\", "/") +print path +' + python_path=`$PYTHON -c "$python_cmd"` + AC_MSG_RESULT([$python_path]) + if test -z "$python_path" ; then + AC_MSG_ERROR([cannot find Python include path]) + fi + + AC_SUBST(PYTHON_CPPFLAGS,[-I$python_path]) + + # Check for Python headers usability + python_save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" + AC_CHECK_HEADERS([Python.h], [], + [AC_MSG_ERROR([cannot find usable Python headers])]) + CPPFLAGS="$python_save_CPPFLAGS" + + # Only set this on mingw and cygwin hosts, (only implemented + # for mingw host, for crosscompiling you need to trick this) + + PYTHON_LDFLAGS="" + case $host_os in + *mingw* | *cygwin* ) + AC_MSG_CHECKING([for Python LDFLAGS]) + + python_cmd=' +import distutils.sysconfig +import os +path = distutils.sysconfig.get_config_var("LIBPL") +if path == None: + path = distutils.sysconfig.PREFIX + "/libs" +if os.sep == "\\": + path = path.replace("\\", "/") +print path +' + python_stdlib_path=`$PYTHON -c "$python_cmd"` + + python_version_nodot=`echo $PYTHON_VERSION | sed "s,\.,,"` + libpython_name="python$PYTHON_VERSION" + + # Standard install of python for win32 has libpython24.a + # instead of libpython2.4.a so we check for the library + # without the dot in the version number. + + python_stdlib_filename=`find $python_stdlib_path -type f -name libpython$python_version_nodot.* -print | sed "1q"` + if test -n "$python_stdlib_filename" ; then + libpython_name="python$python_version_nodot" + fi + + PYTHON_LDFLAGS="-L$python_stdlib_path -l$libpython_name" + AC_MSG_RESULT($PYTHON_LDFLAGS) + # Replace all backslashes in PYTHON Paths with forward slashes + AC_MSG_CHECKING([for pythondir]) + pythondir=`echo $pythondir |sed 's,\\\\,/,g'` + AC_MSG_RESULT($pythondir) + AC_SUBST([pythondir]) + AC_MSG_CHECKING([for pkgpythondir]) + pkgpythondir=`echo $pkgpythondir |sed 's,\\\\,/,g'` + AC_MSG_RESULT($pkgpythondir) + AC_SUBST([pkgpythondir]) + AC_MSG_CHECKING([for pyexecdir]) + pyexecdir=`echo $pyexecdir |sed 's,\\\\,/,g'` + AC_MSG_RESULT($pyexecdir) + AC_SUBST([pyexecdir]) + AC_MSG_CHECKING([for pkgpyexecdir]) + pkgpyexecdir=`echo $pkgpyexecdir |sed 's,\\\\,/,g'` + AC_MSG_RESULT($pkgpyexecdir) + AC_SUBST([pkgpyexecdir]) + ;; + esac + + AC_SUBST([PYTHON_LDFLAGS]) +]) diff --git a/gsm-tvoid/config/gr_require_mc4020.m4 b/gsm-tvoid/config/gr_require_mc4020.m4 new file mode 100644 index 0000000..fa78943 --- /dev/null +++ b/gsm-tvoid/config/gr_require_mc4020.m4 @@ -0,0 +1,33 @@ +dnl +dnl Copyright 2003,2004 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +AC_DEFUN([GR_REQUIRE_MC4020],[ + AC_MSG_CHECKING([for mc4020 A/D driver include file]) + AC_COMPILE_IFELSE([ +#include <mc4020.h> +int main (int argc, char **argv) +{ + return 0; +} +],[AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([mc4020.h not found.])]) +]) diff --git a/gsm-tvoid/config/gr_scripting.m4 b/gsm-tvoid/config/gr_scripting.m4 new file mode 100644 index 0000000..a6fd114 --- /dev/null +++ b/gsm-tvoid/config/gr_scripting.m4 @@ -0,0 +1,30 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +AC_DEFUN([GR_SCRIPTING],[ + AC_REQUIRE([AC_PROG_LN_S]) + AC_REQUIRE([AC_PROG_CXX]) + AC_REQUIRE([AC_PROG_LIBTOOL]) + + SWIG_PROG(1.3.23) + SWIG_ENABLE_CXX + SWIG_PYTHON +]) diff --git a/gsm-tvoid/config/gr_set_md_cpu.m4 b/gsm-tvoid/config/gr_set_md_cpu.m4 new file mode 100644 index 0000000..b5ba2fe --- /dev/null +++ b/gsm-tvoid/config/gr_set_md_cpu.m4 @@ -0,0 +1,43 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +AC_DEFUN([GR_SET_MD_CPU],[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_ARG_WITH(md-cpu, + [ --with-md-cpu=ARCH set machine dependent speedups (auto)], + [cf_with_md_cpu="$withval"], + [cf_with_md_cpu="$host_cpu"]) + + AC_MSG_CHECKING([for machine dependent speedups]) + case "$cf_with_md_cpu" in + x86 | i[[3-7]]86) MD_CPU=x86 MD_SUBCPU=x86 ;; + x86_64) MD_CPU=x86 MD_SUBCPU=x86_64 ;; +# sparc) MD_CPU=sparc ;; + *) MD_CPU=generic ;; + esac + AC_MSG_RESULT($MD_CPU) + AC_SUBST(MD_CPU) + AC_SUBST(MD_SUBCPU) + + AM_CONDITIONAL(MD_CPU_x86, test "$MD_CPU" = "x86") + AM_CONDITIONAL(MD_SUBCPU_x86_64, test "$MD_SUBCPU" = "x86_64") + AM_CONDITIONAL(MD_CPU_generic, test "$MD_CPU" = "generic") +]) diff --git a/gsm-tvoid/config/gr_swig.m4 b/gsm-tvoid/config/gr_swig.m4 new file mode 100644 index 0000000..2f9d755 --- /dev/null +++ b/gsm-tvoid/config/gr_swig.m4 @@ -0,0 +1,85 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +# SWIG_PROG([required-version]) +# +# Checks for the SWIG program. If found you can (and should) call SWIG via $(SWIG). +# You can use the optional first argument to check if the version of the available SWIG +# is greater or equal to the value of the argument. It should have the format: +# N[.N[.N]] (N is a number between 0 and 999. Only the first N is mandatory.) +AC_DEFUN([SWIG_PROG],[ + AC_REQUIRE([AC_PROG_MAKE_SET]) + AC_CHECK_PROG(SWIG,swig,[`which swig`]) + if test -z "$SWIG" ; then + AC_MSG_ERROR([Cannot find 'swig' program. SWIG version >= $1 required]) + SWIG=false + elif test -n "$1" ; then + AC_MSG_CHECKING([for SWIG version]) + swig_version=`$SWIG -version 2>&1 | \ + awk '/^SWIG Version [[0-9]+\.[0-9]+\.[0-9]]+.*$/ { split($[3],a,"[[^.0-9]]"); print a[[1]] }'` + AC_MSG_RESULT([$swig_version]) + if test -n "$swig_version" ; then + swig_version=`echo $swig_version | \ + awk '{ split($[1],a,"\."); print [a[1]*1000000+a[2]*1000+a[3]] }' 2>/dev/null` + swig_required_version=`echo $1 | \ + awk '{ split($[1],a,"\."); print [a[1]*1000000+a[2]*1000+a[3]] }' 2>/dev/null` + if test $swig_required_version -gt $swig_version ; then + AC_MSG_ERROR([SWIG version >= $1 required]) + fi + else + AC_MSG_ERROR([cannot determine SWIG version]) + fi + fi +]) + +# SWIG_ENABLE_CXX() +# +# Enable swig C++ support. This effects all invocations of $(SWIG). +AC_DEFUN([SWIG_ENABLE_CXX],[ + AC_REQUIRE([SWIG_PROG]) + AC_REQUIRE([AC_PROG_CXX]) + if test "$SWIG" != "false" ; then + SWIG="$SWIG -c++" + fi +]) + +# SWIG_PYTHON([use-shadow-classes]) +# +# Checks for Python and provides the $(SWIG_PYTHON_CPPFLAGS), +# $(SWIG_PYTHON_LIB) and $(SWIG_PYTHON_OPT) output variables. +# $(SWIG_PYTHON_OPT) contains all necessary swig options to generate +# code for Python. If you need multi module support use +# $(SWIG_PYTHON_LIB) (provided by the SWIG_MULTI_MODULE_SUPPORT() +# macro) to link against the appropriate library. It contains the +# SWIG Python runtime library that is needed by the type check system +# for example. + +AC_DEFUN([SWIG_PYTHON],[ + AC_REQUIRE([SWIG_PROG]) + AC_REQUIRE([PYTHON_DEVEL]) + if test "$SWIG" != "false" ; then + AC_SUBST(SWIG_PYTHON_LIB,[-lswigpy]) +dnl test ! "x$1" = "xno" && swig_shadow=" -shadow" || swig_shadow="" +dnl AC_SUBST(SWIG_PYTHON_OPT,[-python$swig_shadow]) + AC_SUBST(SWIG_PYTHON_OPT,[-python]) + fi + AC_SUBST(SWIG_PYTHON_CPPFLAGS,[$PYTHON_CPPFLAGS]) +]) diff --git a/gsm-tvoid/config/gr_sysv_shm.m4 b/gsm-tvoid/config/gr_sysv_shm.m4 new file mode 100644 index 0000000..7d5d6f4 --- /dev/null +++ b/gsm-tvoid/config/gr_sysv_shm.m4 @@ -0,0 +1,36 @@ +# Check for IPC System V shm support. -*- Autoconf -*- + +# Copyright 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, 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., 51 Franklin Street, Boston, MA +# 02110-1301, USA. + +AC_DEFUN([GR_SYSV_SHM], +[ + AC_LANG_SAVE + AC_LANG_C + + AC_CHECK_HEADERS([sys/ipc.h sys/shm.h]) + + save_LIBS="$LIBS" + AC_SEARCH_LIBS(shmat, [cygipc ipc], + [ IPC_LIBS="$LIBS" ], + [ AC_MSG_WARN([SystemV IPC support not found. ]) ] + ) + LIBS="$save_LIBS" + + AC_LANG_RESTORE + AC_SUBST(IPC_LIBS) +]) diff --git a/gsm-tvoid/config/gr_x86_64.m4 b/gsm-tvoid/config/gr_x86_64.m4 new file mode 100644 index 0000000..21a5266 --- /dev/null +++ b/gsm-tvoid/config/gr_x86_64.m4 @@ -0,0 +1,39 @@ +dnl +dnl Copyright 2005 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +# GR_X86_64() +# +# Checks to see if we're on a x86_64 machine, and if so, ensure +# that libdir ends in "64" +# +AC_DEFUN([GR_X86_64],[ + AC_REQUIRE([AC_CANONICAL_HOST]) + if test "$host_cpu" = "x86_64"; then + AC_MSG_CHECKING([libdir for lib64 suffix]) + t=${libdir##*/lib} + if test "$t" != 64 && test -d /lib64 && ! test -L /lib64; then + libdir=${libdir}64 + AC_MSG_RESULT([no. Setting libdir to $libdir]) + else + AC_MSG_RESULT([yes]) + fi + fi +]) diff --git a/gsm-tvoid/config/lf_cc.m4 b/gsm-tvoid/config/lf_cc.m4 new file mode 100644 index 0000000..4f38596 --- /dev/null +++ b/gsm-tvoid/config/lf_cc.m4 @@ -0,0 +1,42 @@ +dnl Autoconf support for C++ +dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a configuration +dnl script generated by Autoconf, you may include it under the same +dnl distribution terms that you use for the rest of that program. + +# ------------------------------------------------------------------------- +# Use this macro to configure your C compiler +# When called the macro does the following things: +# 1. It finds an appropriate C compiler. +# If you passed the flag --with-cc=foo then it uses that +# particular compiler +# 2. Check whether the compiler works. +# 3. Checks whether the compiler accepts the -g +# ------------------------------------------------------------------------- + +AC_DEFUN([LF_CONFIGURE_CC],[ + dnl Sing the song + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_PROG_CPP])dnl + AC_REQUIRE([AC_AIX])dnl + AC_REQUIRE([AC_ISC_POSIX])dnl + AC_REQUIRE([AC_MINIX])dnl + AC_REQUIRE([AC_HEADER_STDC])dnl +]) + diff --git a/gsm-tvoid/config/lf_cxx.m4 b/gsm-tvoid/config/lf_cxx.m4 new file mode 100644 index 0000000..c2b3cd5 --- /dev/null +++ b/gsm-tvoid/config/lf_cxx.m4 @@ -0,0 +1,121 @@ +dnl Autoconf support for C++ +dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a configuration +dnl script generated by Autoconf, you may include it under the same +dnl distribution terms that you use for the rest of that program. + +# ----------------------------------------------------------------- +# This macro should be called to configure your C++ compiler. +# When called, the macro does the following things: +# 1. It finds an appropriate C++ compiler +# If you passed the flag --with-cxx=foo, then it uses that +# particular compiler +# 2. Checks whether the compiler accepts the -g +# ------------------------------------------------------------------ + +AC_DEFUN([LF_CONFIGURE_CXX],[ + AC_REQUIRE([AC_PROG_CXX])dnl + AC_REQUIRE([AC_PROG_CXXCPP])dnl + LF_CXX_PORTABILITY +]) + +# ----------------------------------------------------------------------- +# This macro tests the C++ compiler for various portability problem. +# 1. Defines CXX_HAS_NO_BOOL if the compiler does not support the bool +# data type +# 2. Defines CXX_HAS_BUGGY_FOR_LOOPS if the compiler has buggy +# scoping for the for-loop +# 3. Defines USE_ASSERT if the user wants to use assertions +# ----------------------------------------------------------------------- + + +AC_DEFUN([LF_CXX_PORTABILITY],[ + + dnl + dnl Check for common C++ portability problems + dnl + + dnl AC_LANG_PUSH + dnl AC_LANG_CPLUSPLUS + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + + dnl Check whether we have bool + AC_MSG_CHECKING(whether C++ has bool) + AC_TRY_RUN([main() { bool b1=true; bool b2=false; }], + [ AC_MSG_RESULT(yes) ], + [ AC_MSG_RESULT(no) + AC_DEFINE(CXX_HAS_NO_BOOL,[],[Define if C++ is missing bool type]) ], + [ AC_MSG_WARN(Don't cross-compile)] + ) + + dnl Test whether C++ has buggy for-loops + AC_MSG_CHECKING(whether C++ has buggy scoping in for-loops) + AC_TRY_COMPILE([#include <iostream.h>], [ + for (int i=0;i<10;i++) { } + for (int i=0;i<10;i++) { } +], [ AC_MSG_RESULT(no) ], + [ AC_MSG_RESULT(yes) + AC_DEFINE(CXX_HAS_BUGGY_FOR_LOOPS,[],[Define if for loop scoping is broken]) ]) + + dnl Test whether the user wants to enable assertions + AC_MSG_CHECKING(whether user wants assertions) + AC_ARG_ENABLE(assert, + [ --disable-assert don't use cpp.h assert], + [ AC_DEFINE(NDEBUG,[],[Define to disable asserts (don't doit!)]) + AC_MSG_RESULT(no) ], + [ AC_MSG_RESULT(yes) ], + ) + + dnl Test whether C++ has std::isnan + AC_MSG_CHECKING(whether C++ has std::isnan) + AC_TRY_COMPILE([#include <math.h>], [ + std::isnan(0); +], [ AC_MSG_RESULT(yes) + AC_DEFINE(CXX_HAS_STD_ISNAN,[],[Define if has std::isnan]) ], + [ AC_MSG_RESULT(no) ]) + + dnl Done with the portability checks + dnl AC_LANG_POP([C++]) + AC_LANG_RESTORE +]) + +AH_BOTTOM([// Workaround for compilers with buggy for-loop scoping +// That's quite a few compilers actually including recent versions of +// Dec Alpha cxx, HP-UX CC and SGI CC. +// The trivial "if" statement provides the correct scoping to the +// for loop + +#ifdef CXX_HAS_BUGGY_FOR_LOOPS +#undef for +#define for if(1) for +#endif +]) + +AH_BOTTOM([// If the C++ compiler we use doesn't have bool, then +// the following is a near-perfect work-around. +// You must make sure your code does not depend on "int" and "bool" +// being two different types, in overloading for instance. + +#ifdef CXX_HAS_NO_BOOL +#define bool int +#define true 1 +#define false 0 +#endif +]) diff --git a/gsm-tvoid/config/lf_warnings.m4 b/gsm-tvoid/config/lf_warnings.m4 new file mode 100644 index 0000000..a58aac1 --- /dev/null +++ b/gsm-tvoid/config/lf_warnings.m4 @@ -0,0 +1,128 @@ +dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a configuration +dnl script generated by Autoconf, you may include it under the same +dnl distribution terms that you use for the rest of that program. + +# -------------------------------------------------------------------------- +# Check whether the C++ compiler accepts a certain flag +# If it does it adds the flag to CXXFLAGS +# If it does not then it returns an error to lf_ok +# Usage: +# LF_CHECK_CXX_FLAG(-flag1 -flag2 -flag3 ...) +# ------------------------------------------------------------------------- + +AC_DEFUN([LF_CHECK_CXX_FLAG],[ + echo 'void f(){}' > conftest.cc + for i in $1 + do + AC_MSG_CHECKING([whether $CXX accepts $i]) + if test -z "`${CXX} $i -c conftest.cc 2>&1`" + then + CXXFLAGS="${CXXFLAGS} $i" + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + done + rm -f conftest.cc conftest.o +]) + +# -------------------------------------------------------------------------- +# Check whether the C compiler accepts a certain flag +# If it does it adds the flag to CFLAGS +# If it does not then it returns an error to lf_ok +# Usage: +# LF_CHECK_CC_FLAG(-flag1 -flag2 -flag3 ...) +# ------------------------------------------------------------------------- + +AC_DEFUN([LF_CHECK_CC_FLAG],[ + echo 'void f(){}' > conftest.c + for i in $1 + do + AC_MSG_CHECKING([whether $CC accepts $i]) + if test -z "`${CC} $i -c conftest.c 2>&1`" + then + CFLAGS="${CFLAGS} $i" + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + done + rm -f conftest.c conftest.o +]) + +# -------------------------------------------------------------------------- +# Check whether the Fortran compiler accepts a certain flag +# If it does it adds the flag to FFLAGS +# If it does not then it returns an error to lf_ok +# Usage: +# LF_CHECK_F77_FLAG(-flag1 -flag2 -flag3 ...) +# ------------------------------------------------------------------------- + +AC_DEFUN([LF_CHECK_F77_FLAG],[ + cat << EOF > conftest.f +c....:++++++++++++++++++++++++ + PROGRAM MAIN + PRINT*,'Hello World!' + END +EOF + for i in $1 + do + AC_MSG_CHECKING([whether $F77 accepts $i]) + if test -z "`${F77} $i -c conftest.f 2>&1`" + then + FFLAGS="${FFLAGS} $i" + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + done + rm -f conftest.f conftest.o +]) + +# ---------------------------------------------------------------------- +# Provide the configure script with an --with-warnings option that +# turns on warnings. Call this command AFTER you have configured ALL your +# compilers. +# ---------------------------------------------------------------------- + +AC_DEFUN([LF_SET_WARNINGS],[ + dnl Check for --with-warnings + AC_MSG_CHECKING([whether user wants warnings]) + AC_ARG_WITH(warnings, + [ --with-warnings Turn on warnings], + [ lf_warnings=yes ], [ lf_warnings=no ]) + lf_warnings=yes # hard code for now -eb + AC_MSG_RESULT($lf_warnings) + + dnl Warnings for the two main compilers + cc_warning_flags="-Wall" + cxx_warning_flags="-Wall -Woverloaded-virtual" + if test $lf_warnings = yes + then + if test -n "${CC}" + then + LF_CHECK_CC_FLAG($cc_warning_flags) + fi + if test -n "${CXX}" + then + LF_CHECK_CXX_FLAG($cxx_warning_flags) + fi + fi +]) diff --git a/gsm-tvoid/config/lf_x11.m4 b/gsm-tvoid/config/lf_x11.m4 new file mode 100644 index 0000000..fd548bd --- /dev/null +++ b/gsm-tvoid/config/lf_x11.m4 @@ -0,0 +1,39 @@ +dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a configuration +dnl script generated by Autoconf, you may include it under the same +dnl distribution terms that you use for the rest of that program. + + +#----------------------------------------------------------------------- +# This macro searches for Xlib and when it finds it it adds the +# appropriate flags to CXXFLAGS and export the link sequence to +# the variable XLIB. +# In your configure.in file add: +# LF_PATH_XLIB +# In your Makefile.am add +# program_LDADD = .... $(XLIB) +#------------------------------------------------------------------------ + +AC_DEFUN([LF_PATH_XLIB],[ + AC_PATH_XTRA + CXXFLAGS="$CXXFLAGS $X_CFLAGS" + XLIB="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" + AC_SUBST(XLIB) +]) + diff --git a/gsm-tvoid/config/mkstemp.m4 b/gsm-tvoid/config/mkstemp.m4 new file mode 100644 index 0000000..4af0f0a --- /dev/null +++ b/gsm-tvoid/config/mkstemp.m4 @@ -0,0 +1,89 @@ +#serial 4 + +# On some hosts (e.g., HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a +# silly limit that it can create no more than 26 files from a given template. +# Other systems lack mkstemp altogether. +# On OSF1/Tru64 V4.0F, the system-provided mkstemp function can create +# only 32 files per process. +# On systems like the above, arrange to use the replacement function. +AC_DEFUN([UTILS_FUNC_MKSTEMP], +[dnl + AC_REPLACE_FUNCS(mkstemp) + if test $ac_cv_func_mkstemp = no; then + utils_cv_func_mkstemp_limitations=yes + else + AC_CACHE_CHECK([for mkstemp limitations], + utils_cv_func_mkstemp_limitations, + [ + AC_TRY_RUN([ +# include <stdlib.h> + int main () + { + int i; + for (i = 0; i < 70; i++) + { + char template[] = "conftestXXXXXX"; + int fd = mkstemp (template); + if (fd == -1) + exit (1); + close (fd); + } + exit (0); + } + ], + utils_cv_func_mkstemp_limitations=no, + utils_cv_func_mkstemp_limitations=yes, + utils_cv_func_mkstemp_limitations=yes + ) + ] + ) + fi + + if test $utils_cv_func_mkstemp_limitations = yes; then + AC_LIBOBJ(mkstemp) + AC_LIBOBJ(tempname) + AC_DEFINE(mkstemp, rpl_mkstemp, + [Define to rpl_mkstemp if the replacement function should be used.]) + gl_PREREQ_MKSTEMP + jm_PREREQ_TEMPNAME + fi +]) + +# Prerequisites of lib/mkstemp.c. +AC_DEFUN([gl_PREREQ_MKSTEMP], +[ + AH_BOTTOM( + [ + #ifndef HAVE_MKSTEMP + #ifdef __cplusplus + extern "C" { + #endif + int rpl_mkstemp (char *templ); + #ifdef __cplusplus + } + #endif + #endif + ]) +]) + +# Prerequisites of lib/tempname.c. +AC_DEFUN([jm_PREREQ_TEMPNAME], +[ + AC_REQUIRE([AC_HEADER_STAT]) + AC_CHECK_HEADERS_ONCE(fcntl.h sys/time.h unistd.h) + AC_CHECK_HEADERS(stdint.h) + AC_CHECK_FUNCS(__secure_getenv gettimeofday lstat) + AC_CHECK_DECLS_ONCE(getenv) + # AC_REQUIRE([jm_AC_TYPE_UINTMAX_T]) + + dnl Under Win32, mkdir prototype in io.h has only one arg + AC_MSG_CHECKING(whether mkdir accepts only one arg) + AC_TRY_COMPILE([#include <sys/types.h> + #include <sys/stat.h> + #include <fcntl.h>], [ + mkdir("") + ], [ AC_MSG_RESULT(yes) + AC_DEFINE(MKDIR_TAKES_ONE_ARG,[],[Define if mkdir accepts only one arg]) ], + [ AC_MSG_RESULT(no) + ]) +]) diff --git a/gsm-tvoid/config/onceonly.m4 b/gsm-tvoid/config/onceonly.m4 new file mode 100644 index 0000000..f6fec37 --- /dev/null +++ b/gsm-tvoid/config/onceonly.m4 @@ -0,0 +1,63 @@ +# onceonly.m4 serial 3 +dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl This file defines some "once only" variants of standard autoconf macros. +dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS +dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS +dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS +dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC +dnl The advantage is that the check for each of the headers/functions/decls +dnl will be put only once into the 'configure' file. It keeps the size of +dnl the 'configure' file down, and avoids redundant output when 'configure' +dnl is run. +dnl The drawback is that the checks cannot be conditionalized. If you write +dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi +dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to +dnl empty, and the check will be inserted before the body of the AC_DEFUNed +dnl function. + +dnl Autoconf version 2.57 or newer is recommended. +AC_PREREQ(2.54) + +# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of +# AC_CHECK_HEADERS(HEADER1 HEADER2 ...). +AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ + : + AC_FOREACH([gl_HEADER_NAME], [$1], [ + AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(defn([gl_HEADER_NAME]), + [-./], [___])), [ + AC_CHECK_HEADERS(gl_HEADER_NAME) + ]) + AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME, + [-./], [___]))) + ]) +]) + +# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of +# AC_CHECK_FUNCS(FUNC1 FUNC2 ...). +AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ + : + AC_FOREACH([gl_FUNC_NAME], [$1], [ + AC_DEFUN([gl_CHECK_FUNC_]defn([gl_FUNC_NAME]), [ + AC_CHECK_FUNCS(defn([gl_FUNC_NAME])) + ]) + AC_REQUIRE([gl_CHECK_FUNC_]defn([gl_FUNC_NAME])) + ]) +]) + +# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of +# AC_CHECK_DECLS(DECL1, DECL2, ...). +AC_DEFUN([AC_CHECK_DECLS_ONCE], [ + : + AC_FOREACH([gl_DECL_NAME], [$1], [ + AC_DEFUN([gl_CHECK_DECL_]defn([gl_DECL_NAME]), [ + AC_CHECK_DECLS(defn([gl_DECL_NAME])) + ]) + AC_REQUIRE([gl_CHECK_DECL_]defn([gl_DECL_NAME])) + ]) +]) diff --git a/gsm-tvoid/config/pkg.m4 b/gsm-tvoid/config/pkg.m4 new file mode 100644 index 0000000..770f062 --- /dev/null +++ b/gsm-tvoid/config/pkg.m4 @@ -0,0 +1,68 @@ +dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) +dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page +dnl also defines GSTUFF_PKG_ERRORS on error +AC_DEFUN([PKG_CHECK_MODULES], [ + succeeded=no + + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + dnl If PKG_CONFIG_PATH is not already set, add /usr/local/lib/pkgconfig. + dnl If it's set, assume the user knows what they're doing. + dnl This should help avoid failures while looking for fftw3f + if test -z "$PKG_CONFIG_PATH"; then + export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" + fi + + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + AC_MSG_CHECKING(for $2) + + if $PKG_CONFIG --exists "$2" ; then + AC_MSG_RESULT(yes) + succeeded=yes + + AC_MSG_CHECKING($1_CFLAGS) + $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` + AC_MSG_RESULT($$1_CFLAGS) + + AC_MSG_CHECKING($1_LIBS) + $1_LIBS=`$PKG_CONFIG --libs "$2"` + AC_MSG_RESULT($$1_LIBS) + + AC_MSG_CHECKING($1_INCLUDEDIR) + $1_INCLUDEDIR=`$PKG_CONFIG --variable=includedir "$2"` + AC_MSG_RESULT($$1_INCLUDEDIR) + else + $1_CFLAGS="" + $1_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + ifelse([$4], ,echo $$1_PKG_ERRORS,) + fi + + AC_SUBST($1_CFLAGS) + AC_SUBST($1_LIBS) + AC_SUBST($1_INCLUDEDIR) + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + ifelse([$3], , :, [$3]) + else + ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) + fi +]) + + diff --git a/gsm-tvoid/config/usrp_fusb_tech.m4 b/gsm-tvoid/config/usrp_fusb_tech.m4 new file mode 100644 index 0000000..bb1f73c --- /dev/null +++ b/gsm-tvoid/config/usrp_fusb_tech.m4 @@ -0,0 +1,63 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +AC_DEFUN([USRP_SET_FUSB_TECHNIQUE],[ + AC_ARG_WITH(fusb-tech, + [ --with-fusb-tech=OS set fast usb technique (auto)], + [cf_with_fusb_tech="$withval"], + [cf_with_fusb_tech="$host_os"]) + + + AC_CHECK_HEADER([linux/usbdevice_fs.h], + [x_have_usbdevice_fs_h=yes], + [x_have_usbdevice_fs_h=no]) + + AC_MSG_CHECKING([for fast usb technique to use]) + case "$cf_with_fusb_tech" in + linux*) if test x${x_have_usbdevice_fs_h} = xyes; + then + FUSB_TECH=linux + else + FUSB_TECH=generic + fi ;; + + darwin*) FUSB_TECH=darwin ;; + cygwin*|win*|mingw*) FUSB_TECH=win32 ;; + *bsd*) + AC_MSG_CHECKING([for RA/WB]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <dev/usb/usb.h>]], + [[struct usb_bulk_ra_wb_opt o; + ioctl(0, USB_SET_BULK_RA, &o);]])], + [FUSB_TECH=ra_wb], + [FUSB_TECH=generic]) ;; + *) FUSB_TECH=generic ;; + esac + + AC_MSG_RESULT($FUSB_TECH) + AC_SUBST(FUSB_TECH) + + AM_CONDITIONAL(FUSB_TECH_darwin, test $FUSB_TECH = darwin) + AM_CONDITIONAL(FUSB_TECH_win32, test $FUSB_TECH = win32) + AM_CONDITIONAL(FUSB_TECH_generic, test $FUSB_TECH = generic) + AM_CONDITIONAL(FUSB_TECH_linux, test $FUSB_TECH = linux) + AM_CONDITIONAL(FUSB_TECH_ra_wb, test $FUSB_TECH = ra_wb) +]) + diff --git a/gsm-tvoid/config/usrp_libusb.m4 b/gsm-tvoid/config/usrp_libusb.m4 new file mode 100644 index 0000000..f6f1265 --- /dev/null +++ b/gsm-tvoid/config/usrp_libusb.m4 @@ -0,0 +1,51 @@ +# Check for libusb support. -*- Autoconf -*- + +# Copyright 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, 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., 51 Franklin Street, Boston, MA +# 02110-1301, USA. + +AC_DEFUN([USRP_LIBUSB], +[ + AC_LANG_PUSH(C) + + libusbok=yes + AC_CHECK_HEADERS([usb.h], + [], + [libusbok=no, + AC_MSG_RESULT([USRP requires libusb. usb.h not found. See http://libusb.sf.net])] + ) + + save_LIBS="$LIBS" + case "$host_os" in + darwin*) LIBS="$LIBS -lIOKit" ;; + *) ;; + esac + AC_SEARCH_LIBS(usb_bulk_write, [usb], + [USB_LIBS="$LIBS"], + [libusbok=no, + AC_MSG_RESULT([USRP requires libusb. usb_bulk_write not found. See http://libusb.sf.net])] + ) + LIBS="$save_LIBS" + + AC_LANG_POP + + if test $libusbok = yes; then + AC_SUBST(USB_LIBS) + ifelse([$1], , :, [$1]) + else + ifelse([$2], , :, [$2]) + fi +]) diff --git a/gsm-tvoid/config/usrp_sdcc.m4 b/gsm-tvoid/config/usrp_sdcc.m4 new file mode 100644 index 0000000..5f3bbc9 --- /dev/null +++ b/gsm-tvoid/config/usrp_sdcc.m4 @@ -0,0 +1,75 @@ +# Check for sdcc support. -*- Autoconf -*- + +# Copyright 2004 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, 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., 51 Franklin Street, Boston, MA +# 02110-1301, USA. + +AC_DEFUN([USRP_SDCC], +[ + sdccok=yes + AC_CHECK_PROG(XCC, sdcc, sdcc -mmcs51 --no-xinit-opt,no) + AC_CHECK_PROG(XAS, asx8051, asx8051 -plosgff,no) + + if test "$XCC" = "no" -o "$XAS" = "no" ; then + AC_MSG_RESULT([USRP requires sdcc. sdcc not found. See http://sdcc.sf.net]) + sdccok=no + else + sdcc_version_min=$1 + + sdcc_version=`sdcc --version 2>&1 | \ + sed 's/\(SDCC.* \)\([[0-9]]*\.[[0-9]]*\.[[0-9]]*\)\( .*$\)/\2/'` + + AC_MSG_CHECKING([sdcc_version "$sdcc_version"]) + + sdcc_major_version=`echo $sdcc_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + sdcc_minor_version=`echo $sdcc_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + sdcc_micro_version=`echo $sdcc_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + sdcc_major_min=`echo $sdcc_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + sdcc_minor_min=`echo $sdcc_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + sdcc_micro_min=`echo $sdcc_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + sdcc_version_proper=`expr \ + "$sdcc_major_version" \> "$sdcc_major_min" \| \ + "$sdcc_major_version" \= "$sdcc_major_min" \& \ + "$sdcc_minor_version" \> "$sdcc_minor_min" \| \ + "$sdcc_major_version" \= "$sdcc_major_min" \& \ + "$sdcc_minor_version" \= "$sdcc_minor_min" \& \ + "$sdcc_micro_version" \>= "$sdcc_micro_min" ` + + if test "$sdcc_version_proper" = "1" ; then + AC_MSG_RESULT([$sdcc_major_version.$sdcc_minor_version.$sdcc_micro_version]) + else + sdccok=no + AC_MSG_RESULT([USRP requires sdcc >= $sdcc_version_min. sdcc not found. See http://sdcc.sf.net"]) + fi + + AC_SUBST(XCC) + AC_SUBST(XAS) + fi + + if test $sdccok = yes; then + ifelse([$2], , :, [$2]) + else + ifelse([$3], , :, [$3]) + fi +]) diff --git a/gsm-tvoid/configure.ac b/gsm-tvoid/configure.ac new file mode 100644 index 0000000..ced8f31 --- /dev/null +++ b/gsm-tvoid/configure.ac @@ -0,0 +1,110 @@ +dnl +dnl Copyright 2004,2005 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +AC_INIT +AC_PREREQ(2.57) +AC_CONFIG_SRCDIR([src/lib/gsm.i]) +AM_CONFIG_HEADER(config.h) +AC_CANONICAL_TARGET([]) +AM_INIT_AUTOMAKE(gr-gsm,0.0.1) +AM_PATH_PYTHON() + +GR_X86_64 +dnl LF_CONFIGURE_CC +LF_CONFIGURE_CXX +LF_SET_WARNINGS +GR_SET_GPROF +GR_SET_PROF +GR_PROG_AS +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_PROG_INSTALL + +AC_LIBTOOL_WIN32_DLL +AC_ENABLE_SHARED dnl do build shared libraries +AC_DISABLE_STATIC dnl don't build static libraries +AC_PROG_LIBTOOL + +dnl Locate python, SWIG, etc +dnl AM_PATH_PYTHON +GR_NO_UNDEFINED +GR_SCRIPTING + +dnl Checks for libraries. + +dnl check for threads (mandatory) +GR_OMNITHREAD + +CFLAGS="${CFLAGS} $PTHREAD_CFLAGS" +CXXFLAGS="${CXXFLAGS} $PTHREAD_CFLAGS" + +if test "x$CXX_FOR_BUILD" = x +then + CXX_FOR_BUILD=${CXX} +fi +AC_SUBST(CXX_FOR_BUILD) + +dnl Checks for header files. +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/ioctl.h sys/time.h unistd.h) +AC_CHECK_HEADERS(sys/mman.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_C_INLINE +AC_TYPE_SIZE_T +AC_HEADER_TIME + +dnl Checks for library functions. +AC_CHECK_FUNCS([]) + +dnl Check for Mingw support +GR_PWIN32 + +PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core >= 3.1.2) +LIBS="$LIBS $GNURADIO_CORE_LIBS" + +dnl Define where to find boost includes +dnl defines BOOST_CFLAGS +GR_REQUIRE_BOOST_INCLUDES + +STD_DEFINES_AND_INCLUDES="$GNURADIO_CORE_CFLAGS $BOOST_CFLAGS" +AC_SUBST(STD_DEFINES_AND_INCLUDES) + +AC_CONFIG_FILES([\ + Makefile \ + config/Makefile \ + src/Makefile \ + src/lib/Makefile \ + src/python/Makefile \ + src/python/run_tests \ + ]) + +dnl run_tests is created from run_tests.in. Make it executable. +AC_CONFIG_COMMANDS([run_tests], [chmod +x src/python/run_tests]) + +AC_OUTPUT +echo "#######################################################" +echo "Type 'make all'" +echo "See src/python/go.sh for an example." +echo "#######################################################" + diff --git a/gsm-tvoid/depcomp b/gsm-tvoid/depcomp new file mode 100755 index 0000000..04701da --- /dev/null +++ b/gsm-tvoid/depcomp @@ -0,0 +1,530 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2005-07-09.11 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, 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., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, 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. + +# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to <bug-automake@gnu.org>. +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. + "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + stat=$? + + if test -f "$tmpdepfile"; then : + else + stripped=`echo "$stripped" | sed 's,^.*/,,'` + tmpdepfile="$stripped.u" + fi + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + outname="$stripped.o" + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mecanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/gsm-tvoid/src/Makefile.am b/gsm-tvoid/src/Makefile.am new file mode 100644 index 0000000..79b2172 --- /dev/null +++ b/gsm-tvoid/src/Makefile.am @@ -0,0 +1,22 @@ +# +# Copyright 2004 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +SUBDIRS = lib python diff --git a/gsm-tvoid/src/lib/Makefile.am b/gsm-tvoid/src/lib/Makefile.am new file mode 100644 index 0000000..4f2ba65 --- /dev/null +++ b/gsm-tvoid/src/lib/Makefile.am @@ -0,0 +1,101 @@ +include $(top_srcdir)/Makefile.common + +# Install this stuff so that it ends up as the gnuradio.gsm module +# This usually ends up at: +# ${prefix}/lib/python${python_version}/site-packages/gnuradio + +ourpythondir = $(grpythondir) +ourlibdir = $(grpyexecdir) + +INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) + +SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(SWIGGRFLAGS) + +ALL_IFILES = \ + $(LOCAL_IFILES) \ + $(NON_LOCAL_IFILES) + +NON_LOCAL_IFILES = \ + $(GNURADIO_CORE_INCLUDEDIR)/swig/gnuradio.i + + +LOCAL_IFILES = \ + gsm.i + +# These files are built by SWIG. The first is the C++ glue. +# The second is the python wrapper that loads the _gsm shared library +# and knows how to call our extensions. + +BUILT_SOURCES = \ + gsm.cc \ + gsm.py + +# This gets gsm.py installed in the right place +ourpython_PYTHON = \ + gsm.py + +ourlib_LTLIBRARIES = _gsm.la + +# These are the source files that go into the shared library +_gsm_la_SOURCES = \ + fire_crc.c \ + gsmstack.c \ + interleave.c \ + conv.c \ + sch.c \ + cch.c \ + gsm.cc \ + gsm_burst.cc \ + gsm_burst_ff.cc \ + mm_c.cc \ + mm_f.cc \ + gsm_burst_cf.cc \ + gsm_burst_sink_c.cc \ + tun.c \ + out_pcap.c + + +# magic flags +_gsm_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version + +# link the library against some comon swig runtime code and the +# c++ standard library +_gsm_la_LIBADD = \ + $(PYTHON_LDFLAGS) \ + -lstdc++ + +gsm.cc gsm.py: $(LOCAL_IFILES) $(ALL_IFILES) + $(SWIG) $(SWIGPYTHONARGS) -module gsm -o gsm.cc $(LOCAL_IFILES) + +# These headers get installed in ${prefix}/include/gnuradio +grinclude_HEADERS = \ + fire_crc.h \ + gsm_burst.h \ + gsmstack.h \ + interleave.h \ + conv.h \ + sch.h \ + cch.h \ + system.h \ + gsm_burst_ff.h \ + mm_c.h \ + mm_f.h \ + gsm_burst_cf.h \ + gsm_burst_sink_c.h \ + gsm_constants.h \ + tun.h \ + out_pcap.h \ + gsmtap.h + + +# These swig headers get installed in ${prefix}/include/gnuradio/swig +swiginclude_HEADERS = \ + $(LOCAL_IFILES) + + +MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc + +# Don't distribute output of swig +dist-hook: + @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done + @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done diff --git a/gsm-tvoid/src/lib/burst_types.h b/gsm-tvoid/src/lib/burst_types.h new file mode 100644 index 0000000..90d35ad --- /dev/null +++ b/gsm-tvoid/src/lib/burst_types.h @@ -0,0 +1,213 @@ +// $Id: burst_types.h,v 1.5 2007/03/14 05:44:53 jl Exp $ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include "gsm_constants.h" + +static const int TB_LEN = 3; +static const int TB_OS1 = 0; +static const int TB_OS2 = 145; +static const unsigned char tail_bits[] = {0, 0, 0}; + +/* + * The normal burst is used to carry information on traffic and control + * channels. + */ +static const int N_TSC_NUM = 8; // number of training sequence codes +static const int N_TSC_CODE_LEN = 26; // length of tsc +static const int N_TSC_OS = 61; // tsc offset +static const int N_EDATA_LEN_1 = 58; // length of first data section +static const int N_EDATA_OS_1 = 3; // offset of first data section +static const int N_EDATA_LEN_2 = 58; // length of second data section +static const int N_EDATA_OS_2 = 87; // offset of second data section +#if 0 +static const unsigned char n_tsc[][N_TSC_CODE_LEN] = { +/* 0 */ { + 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, + 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1 + }, +/* 1 */ { + 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, + 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1 + }, +/* 2 */ { + 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, + 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0 + }, +/* 3 */ { + 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, + 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0 + }, +/* 4 */ { + 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, + 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1 + }, +/* 5 */ { + 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, + 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0 + }, +/* 6 */ { + 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, + 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1 + }, +/* 7 */ { + 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, + 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0 + } +}; + +#endif + +/* + * The frequency correction burst is used for frequency synchronization + * of the mobile. This is broadcast in TS0 together with the SCH and + * BCCH. + * + * Modulating the bits below causes a spike at 62.5kHz above (below for + * COMPACT) the center frequency. One can use this spike with a narrow + * band filter to accurately determine the center of the channel. + */ +static const int FC_CODE_LEN = 142; +static const int FC_OS = 3; +static const unsigned char fc_fb[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +static const unsigned char fc_compact_fb[] = { + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 +}; + + +/* + * The synchronization burst is used for time synchronization of the + * mobile. The bits given below were chosen for their correlation + * properties. The synchronization channel (SCH) contains a long + * training sequence (given below) and carries the TDMA frame number and + * base station identity code. It is broadcast in TS0 in the frame + * following the frequency correction burst. + */ +static const int SB_CODE_LEN = 64; +static const int SB_ETS_OS = 42; +static const int SB_EDATA_LEN_1 = 39; +static const int SB_EDATA_OS_1 = 3; +static const int SB_EDATA_LEN_2 = 39; +static const int SB_EDATA_OS_2 = 106; +static const unsigned char sb_etsc[] = { + 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, + 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, + 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1 +}; + +static const unsigned char sb_cts_etsc[] = { + 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, + 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, + 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1 +}; + +static const unsigned char sb_compact_etsc[] = { + 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, + 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, + 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0 +}; + + +/* + * A base tranceiver station must transmit a burst in every timeslot of + * every TDMA frame in channel C0. The dummy burst will be transmitted + * on all timeslots of all TDMA frames for which no other channel + * requires a burst to be transmitted. + */ +static const int D_CODE_LEN = 142; +static const int D_MB_OS = 3; +static const unsigned char d_mb[] = { + 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, + 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, + 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, + 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, + 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, + 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, + 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, + 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0 +}; + + +/* + * The access burst is used for random access from a mobile. + */ +static const int AB_ETB_CODE_LEN = 8; +static const int AB_ETB_OS = 0; +static const unsigned char ab_etb[] = { + 0, 0, 1, 1, 1, 0, 1, 0 +}; + +static const int AB_SSB_CODE_LEN = 41; +static const int AB_SSB_OS = 8; +static const unsigned char ab_ssb[] = { + 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, + 0, 0, 1, 1, 1, 1, 0, 0, 0 +}; + +static const unsigned char ab_ts1_ssb[] = { + 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, + 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, + 0, 0, 1, 0, 0, 1, 1, 0, 1 +}; + +static const unsigned char ab_ts2_ssb[] = { + 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, + 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, + 1, 0, 1, 1, 1, 0, 1, 1, 1 +}; + + +typedef enum { + burst_n_0, + burst_n_1, + burst_n_2, + burst_n_3, + burst_n_4, + burst_n_5, + burst_n_6, + burst_n_7, + burst_fc, + burst_fc_c, + burst_s, + burst_s_cts, + burst_s_c, + burst_d, + burst_a, + burst_a_ts1, + burst_a_ts2, + burst_not_a_burst +} burst_t; + +static const int N_BURST_TYPES = ((int)(burst_not_a_burst) + 1); + +#ifdef __cplusplus +} +#endif diff --git a/gsm-tvoid/src/lib/cch.c b/gsm-tvoid/src/lib/cch.c new file mode 100644 index 0000000..17ee4ee --- /dev/null +++ b/gsm-tvoid/src/lib/cch.c @@ -0,0 +1,481 @@ + +#include "system.h" +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <ctype.h> + +//#include <exception> +//#include <stdexcept> +#include <math.h> +#include "burst_types.h" +#include "cch.h" +#include "fire_crc.h" + +/* + * GSM SACCH -- Slow Associated Control Channel + * + * These messages are encoded exactly the same as on the BCCH. + * (Broadcast Control Channel.) + * + * Input: 184 bits + * + * 1. Add parity and flushing bits. (Output 184 + 40 + 4 = 228 bit) + * 2. Convolutional encode. (Output 228 * 2 = 456 bit) + * 3. Interleave. (Output 456 bit) + * 4. Map on bursts. (4 x 156 bit bursts with each 2x57 bit content data) + */ + + +/* + * Parity (FIRE) for the GSM SACCH channel. + * + * g(x) = (x^23 + 1)(x^17 + x^3 + 1) + * = x^40 + x^26 + x^23 + x^17 + x^3 + 1 + */ + +static const unsigned char parity_polynomial[PARITY_SIZE + 1] = { + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, + 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, + 1 +}; + +// remainder after dividing data polynomial by g(x) +static const unsigned char parity_remainder[PARITY_SIZE] = { + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1 +}; + + +/* +static void parity_encode(unsigned char *d, unsigned char *p) { + + int i; + unsigned char buf[DATA_BLOCK_SIZE + PARITY_SIZE], *q; + + memcpy(buf, d, DATA_BLOCK_SIZE); + memset(buf + DATA_BLOCK_SIZE, 0, PARITY_SIZE); + + for(q = buf; q < buf + DATA_BLOCK_SIZE; q++) + if(*q) + for(i = 0; i < PARITY_SIZE + 1; i++) + q[i] ^= parity_polynomial[i]; + for(i = 0; i < PARITY_SIZE; i++) + p[i] = !buf[DATA_BLOCK_SIZE + i]; +} + */ + + +static int parity_check(unsigned char *d) { + + unsigned int i; + unsigned char buf[DATA_BLOCK_SIZE + PARITY_SIZE], *q; + + memcpy(buf, d, DATA_BLOCK_SIZE + PARITY_SIZE); + + for(q = buf; q < buf + DATA_BLOCK_SIZE; q++) + if(*q) + for(i = 0; i < PARITY_SIZE + 1; i++) + q[i] ^= parity_polynomial[i]; + return memcmp(buf + DATA_BLOCK_SIZE, parity_remainder, PARITY_SIZE); +} + + +/* + * Convolutional encoding and Viterbi decoding for the GSM SACCH channel. + */ + +/* + * Convolutional encoding: + * + * G_0 = 1 + x^3 + x^4 + * G_1 = 1 + x + x^3 + x^4 + * + * i.e., + * + * c_{2k} = u_k + u_{k - 3} + u_{k - 4} + * c_{2k + 1} = u_k + u_{k - 1} + u_{k - 3} + u_{k - 4} + */ +#define K 5 +#define MAX_ERROR (2 * CONV_INPUT_SIZE + 1) + + +/* + * Given the current state and input bit, what are the output bits? + * + * encode[current_state][input_bit] + */ +static const unsigned int encode[1 << (K - 1)][2] = { + {0, 3}, {3, 0}, {3, 0}, {0, 3}, + {0, 3}, {3, 0}, {3, 0}, {0, 3}, + {1, 2}, {2, 1}, {2, 1}, {1, 2}, + {1, 2}, {2, 1}, {2, 1}, {1, 2} +}; + + +/* + * Given the current state and input bit, what is the next state? + * + * next_state[current_state][input_bit] + */ +static const unsigned int next_state[1 << (K - 1)][2] = { + {0, 8}, {0, 8}, {1, 9}, {1, 9}, + {2, 10}, {2, 10}, {3, 11}, {3, 11}, + {4, 12}, {4, 12}, {5, 13}, {5, 13}, + {6, 14}, {6, 14}, {7, 15}, {7, 15} +}; + + +/* + * Given the previous state and the current state, what input bit caused + * the transition? If it is impossible to transition between the two + * states, the value is 2. + * + * prev_next_state[previous_state][current_state] + */ +static const unsigned int prev_next_state[1 << (K - 1)][1 << (K - 1)] = { + { 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2}, + { 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2}, + { 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2}, + { 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2}, + { 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2}, + { 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2}, + { 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2}, + { 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2}, + { 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2}, + { 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2}, + { 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2}, + { 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2}, + { 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2}, + { 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2}, + { 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1}, + { 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1} +}; + + +static inline unsigned int hamming_distance2(unsigned int w) { + + return (w & 1) + !!(w & 2); +} + + +/* +static void conv_encode(unsigned char *data, unsigned char *output) { + + unsigned int i, state = 0, o; + + // encode data + for(i = 0; i < CONV_INPUT_SIZE; i++) { + o = encode[state][data[i]]; + state = next_state[state][data[i]]; + *output++ = !!(o & 2); + *output++ = o & 1; + } +} + */ + + +static int conv_decode(unsigned char *output, unsigned char *data) { + + int i, t; + unsigned int rdata, state, nstate, b, o, distance, accumulated_error, + min_state, min_error, cur_state; + + unsigned int ae[1 << (K - 1)]; + unsigned int nae[1 << (K - 1)]; // next accumulated error + unsigned int state_history[1 << (K - 1)][CONV_INPUT_SIZE + 1]; + + // initialize accumulated error, assume starting state is 0 + for(i = 0; i < (1 << (K - 1)); i++) + ae[i] = nae[i] = MAX_ERROR; + ae[0] = 0; + + // build trellis + for(t = 0; t < CONV_INPUT_SIZE; t++) { + + // get received data symbol + rdata = (data[2 * t] << 1) | data[2 * t + 1]; + + // for each state + for(state = 0; state < (1 << (K - 1)); state++) { + + // make sure this state is possible + if(ae[state] >= MAX_ERROR) + continue; + + // find all states we lead to + for(b = 0; b < 2; b++) { + + // get next state given input bit b + nstate = next_state[state][b]; + + // find output for this transition + o = encode[state][b]; + + // calculate distance from received data + distance = hamming_distance2(rdata ^ o); + + // choose surviving path + accumulated_error = ae[state] + distance; + if(accumulated_error < nae[nstate]) { + + // save error for surviving state + nae[nstate] = accumulated_error; + + // update state history + state_history[nstate][t + 1] = state; + } + } + } + + // get accumulated error ready for next time slice + for(i = 0; i < (1 << (K - 1)); i++) { + ae[i] = nae[i]; + nae[i] = MAX_ERROR; + } + } + + // the final state is the state with the fewest errors + min_state = (unsigned int)-1; + min_error = MAX_ERROR; + for(i = 0; i < (1 << (K - 1)); i++) { + if(ae[i] < min_error) { + min_state = i; + min_error = ae[i]; + } + } + + // trace the path + cur_state = min_state; + for(t = CONV_INPUT_SIZE; t >= 1; t--) { + min_state = cur_state; + cur_state = state_history[cur_state][t]; // get previous + output[t - 1] = prev_next_state[cur_state][min_state]; + } + + // return the number of errors detected (hard-decision) + return min_error; +} + + +/* + * GSM SACCH interleaving and burst mapping + * + * Interleaving: + * + * Given 456 coded input bits, form 4 blocks of 114 bits: + * + * i(B, j) = c(n, k) k = 0, ..., 455 + * n = 0, ..., N, N + 1, ... + * B = B_0 + 4n + (k mod 4) + * j = 2(49k mod 57) + ((k mod 8) div 4) + * + * Mapping on Burst: + * + * e(B, j) = i(B, j) + * e(B, 59 + j) = i(B, 57 + j) j = 0, ..., 56 + * e(B, 57) = h_l(B) + * e(B, 58) = h_n(B) + * + * Where h_l(B) and h_n(B) are bits in burst B indicating flags. + */ + +/* +static void interleave(unsigned char *data, unsigned char *iBLOCK) { + + int j, k, B; + + // for each bit in input data + for(k = 0; k < CONV_SIZE; k++) { + B = k % 4; + j = 2 * ((49 * k) % 57) + ((k % 8) / 4); + iBLOCK[B * iBLOCK_SIZE + j] = data[k]; + } +} + */ + + +#if 0 +static void decode_interleave(unsigned char *data, unsigned char *iBLOCK) { + + int j, k, B; + + for(k = 0; k < CONV_SIZE; k++) { + B = k % 4; + j = 2 * ((49 * k) % 57) + ((k % 8) / 4); + data[k] = iBLOCK[B * iBLOCK_SIZE + j]; + } +} + +#endif + +/* +static void burstmap(unsigned char *iBLOCK, unsigned char *eBLOCK, + unsigned char hl, unsigned char hn) { + + int j; + + for(j = 0; j < 57; j++) { + eBLOCK[j] = iBLOCK[j]; + eBLOCK[j + 59] = iBLOCK[j + 57]; + } + eBLOCK[57] = hl; + eBLOCK[58] = hn; +} + */ + + +static void decode_burstmap(unsigned char *iBLOCK, unsigned char *eBLOCK, + unsigned char *hl, unsigned char *hn) { + + int j; + + for(j = 0; j < 57; j++) { + iBLOCK[j] = eBLOCK[j]; + iBLOCK[j + 57] = eBLOCK[j + 59]; + } + *hl = eBLOCK[57]; + *hn = eBLOCK[58]; +} + + +/* + * Transmitted bits are sent least-significant first. + */ +static int compress_bits(unsigned char *dbuf, unsigned int dbuf_len, + unsigned char *sbuf, unsigned int sbuf_len) { + + unsigned int i, j, c, pos = 0; + + if(dbuf_len < ((sbuf_len + 7) >> 3)) + return -1; + + for(i = 0; i < sbuf_len; i += 8) { + for(j = 0, c = 0; (j < 8) && (i + j < sbuf_len); j++) + c |= (!!sbuf[i + j]) << j; + dbuf[pos++] = c & 0xff; + } + return pos; +} + + +#if 0 +int get_ns_l3_len(unsigned char *data, unsigned int datalen) { + + if((data[0] & 3) != 1) { + fprintf(stderr, "error: get_ns_l3_len: pseudo-length reserved " + "bits bad (%2.2x)\n", data[0] & 3); + return -1; + } + return (data[0] >> 2); +} + +#endif + + +static unsigned char *decode_sacch(GS_CTX *ctx, unsigned char *burst, unsigned int *datalen) { + + int errors, len, data_size; + unsigned char conv_data[CONV_SIZE], iBLOCK[BLOCKS][iBLOCK_SIZE], + hl, hn, decoded_data[PARITY_OUTPUT_SIZE]; + FC_CTX fc_ctx; + + data_size = sizeof ctx->msg; + if(datalen) + *datalen = 0; + + // unmap the bursts + decode_burstmap(iBLOCK[0], burst, &hl, &hn); // XXX ignore stealing bits + decode_burstmap(iBLOCK[1], burst + 116, &hl, &hn); + decode_burstmap(iBLOCK[2], burst + 116 * 2, &hl, &hn); + decode_burstmap(iBLOCK[3], burst + 116 * 3, &hl, &hn); + + // remove interleave + interleave_decode(&ctx->interleave_ctx, conv_data, (unsigned char *)iBLOCK); + //decode_interleave(conv_data, (unsigned char *)iBLOCK); + + // Viterbi decode + errors = conv_decode(decoded_data, conv_data); + //DEBUGF("conv_decode: %d\n", errors); + if (errors) + return NULL; + + // check parity + // If parity check error detected try to fix it. + if (parity_check(decoded_data)) + { + FC_init(&fc_ctx, 40, 184); + unsigned char crc_result[224]; + if (FC_check_crc(&fc_ctx, decoded_data, crc_result) == 0) + { + errors = -1; + DEBUGF("error: sacch: parity error (%d)\n", errors); + return NULL; + } else { + DEBUGF("Successfully corrected parity bits!\n"); + memcpy(decoded_data, crc_result, sizeof crc_result); + errors = 0; + } + } + + if((len = compress_bits(ctx->msg, data_size, decoded_data, + DATA_BLOCK_SIZE)) < 0) { + fprintf(stderr, "error: compress_bits\n"); + return NULL; + } + if(len < data_size) { + fprintf(stderr, "error: buf too small (%d < %d)\n", + sizeof(ctx->msg), len); + return NULL; + } + + if(datalen) + *datalen = (unsigned int)len; + return ctx->msg; +} + + +/* + * decode_cch + * + * Decode a "common" control channel. Most control channels use + * the same burst, interleave, Viterbi and parity configuration. + * The documentation for the control channels defines SACCH first + * and then just keeps referring to that. + * + * The current (investigated) list is as follows: + * + * BCCH Norm + * BCCH Ext + * PCH + * AGCH + * CBCH (SDCCH/4) + * CBCH (SDCCH/8) + * SDCCH/4 + * SACCH/C4 + * SDCCH/8 + * SACCH/C8 + * + * We provide two functions, one for where all four bursts are + * contiguous, and one where they aren't. + */ +unsigned char *decode_cch(GS_CTX *ctx, unsigned char *burst, unsigned int *datalen) { + + return decode_sacch(ctx, burst, datalen); +} + + +#if 0 +unsigned char *decode_cch(GS_CTX *ctx, unsigned char *e, unsigned int *datalen) { + + return decode_sacch(ctx, e, e + eBLOCK_SIZE, e + 2 * eBLOCK_SIZE, + e + 3 * eBLOCK_SIZE, datalen); +} +#endif diff --git a/gsm-tvoid/src/lib/cch.h b/gsm-tvoid/src/lib/cch.h new file mode 100644 index 0000000..f1d53b9 --- /dev/null +++ b/gsm-tvoid/src/lib/cch.h @@ -0,0 +1,56 @@ + +#ifndef __GSMSTACK_CCH_H__ +#define __GSMSTACK_CCH_H__ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#include "gsmstack.h" + +/* + * decode_cch + * + * Decode a "common" control channel. Most control channels use + * the same burst, interleave, Viterbi and parity configuration. + * The documentation for the control channels defines SACCH first + * and then just keeps referring to that. + * + * The current (investigated) list is as follows: + * + * BCCH Norm + * BCCH Ext + * PCH + * AGCH + * CBCH (SDCCH/4) + * CBCH (SDCCH/8) + * SDCCH/4 + * SACCH/C4 + * SDCCH/8 + * SACCH/C8 + * + * We provide two functions, one for where all four bursts are + * contiguous, and one where they aren't. + */ + +#define DATA_BLOCK_SIZE 184 +#define PARITY_SIZE 40 +#define FLUSH_BITS_SIZE 4 +#define PARITY_OUTPUT_SIZE (DATA_BLOCK_SIZE + PARITY_SIZE + FLUSH_BITS_SIZE) + +#define CONV_INPUT_SIZE PARITY_OUTPUT_SIZE +#define CONV_SIZE (2 * CONV_INPUT_SIZE) + +#define BLOCKS 4 +#define iBLOCK_SIZE (CONV_SIZE / BLOCKS) +#define eBLOCK_SIZE (iBLOCK_SIZE + 2) + +unsigned char *decode_cch(GS_CTX *ctx, unsigned char *burst, unsigned int *len); +//unsigned char *decode_cch(GS_CTX *ctx, unsigned char *, unsigned char *, unsigned char *, unsigned char *, unsigned int *len); +//unsigned char *decode_cch(GS_CTX *ctx, unsigned char *, unsigned int *); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/gsm-tvoid/src/lib/conv.c b/gsm-tvoid/src/lib/conv.c new file mode 100644 index 0000000..eb97e30 --- /dev/null +++ b/gsm-tvoid/src/lib/conv.c @@ -0,0 +1,487 @@ +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <ctype.h> + +#include <math.h> + +//#include "burst_types.h" +#include "conv.h" +//#include "fire_crc.h" + + +/* + * GSM SACCH -- Slow Associated Control Channel + * + * These messages are encoded exactly the same as on the BCCH. + * (Broadcast Control Channel.) + * + * Input: 184 bits + * + * 1. Add parity and flushing bits. (Output 184 + 40 + 4 = 228 bit) + * 2. Convolutional encode. (Output 228 * 2 = 456 bit) + * 3. Interleave. (Output 456 bit) + * 4. Map on bursts. (4 x 156 bit bursts with each 2x57 bit content data) + */ + + +/* + * Parity (FIRE) for the GSM SACCH channel. + * + * g(x) = (x^23 + 1)(x^17 + x^3 + 1) + * = x^40 + x^26 + x^23 + x^17 + x^3 + 1 + */ + +static const unsigned char parity_polynomial[PARITY_SIZE + 1] = { + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, + 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, + 1 +}; + +// remainder after dividing data polynomial by g(x) +static const unsigned char parity_remainder[PARITY_SIZE] = { + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1 +}; + + +/* +static void parity_encode(unsigned char *d, unsigned char *p) { + + int i; + unsigned char buf[DATA_BLOCK_SIZE + PARITY_SIZE], *q; + + memcpy(buf, d, DATA_BLOCK_SIZE); + memset(buf + DATA_BLOCK_SIZE, 0, PARITY_SIZE); + + for(q = buf; q < buf + DATA_BLOCK_SIZE; q++) + if(*q) + for(i = 0; i < PARITY_SIZE + 1; i++) + q[i] ^= parity_polynomial[i]; + for(i = 0; i < PARITY_SIZE; i++) + p[i] = !buf[DATA_BLOCK_SIZE + i]; +} + */ + + +int +parity_check(unsigned char *d) { + + unsigned int i; + unsigned char buf[DATA_BLOCK_SIZE + PARITY_SIZE], *q; + + memcpy(buf, d, DATA_BLOCK_SIZE + PARITY_SIZE); + + for(q = buf; q < buf + DATA_BLOCK_SIZE; q++) + if(*q) + for(i = 0; i < PARITY_SIZE + 1; i++) + q[i] ^= parity_polynomial[i]; + return memcmp(buf + DATA_BLOCK_SIZE, parity_remainder, PARITY_SIZE); +} + + +/* + * Convolutional encoding and Viterbi decoding for the GSM SACCH channel. + */ + +/* + * Convolutional encoding: + * + * G_0 = 1 + x^3 + x^4 + * G_1 = 1 + x + x^3 + x^4 + * + * i.e., + * + * c_{2k} = u_k + u_{k - 3} + u_{k - 4} + * c_{2k + 1} = u_k + u_{k - 1} + u_{k - 3} + u_{k - 4} + */ +#define K 5 +#define MAX_ERROR (2 * CONV_INPUT_SIZE + 1) + + +/* + * Given the current state and input bit, what are the output bits? + * + * encode[current_state][input_bit] + */ +static const unsigned int encode[1 << (K - 1)][2] = { + {0, 3}, {3, 0}, {3, 0}, {0, 3}, + {0, 3}, {3, 0}, {3, 0}, {0, 3}, + {1, 2}, {2, 1}, {2, 1}, {1, 2}, + {1, 2}, {2, 1}, {2, 1}, {1, 2} +}; + + +/* + * Given the current state and input bit, what is the next state? + * + * next_state[current_state][input_bit] + */ +static const unsigned int next_state[1 << (K - 1)][2] = { + {0, 8}, {0, 8}, {1, 9}, {1, 9}, + {2, 10}, {2, 10}, {3, 11}, {3, 11}, + {4, 12}, {4, 12}, {5, 13}, {5, 13}, + {6, 14}, {6, 14}, {7, 15}, {7, 15} +}; + + +/* + * Given the previous state and the current state, what input bit caused + * the transition? If it is impossible to transition between the two + * states, the value is 2. + * + * prev_next_state[previous_state][current_state] + */ +static const unsigned int prev_next_state[1 << (K - 1)][1 << (K - 1)] = { + { 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2}, + { 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2}, + { 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2}, + { 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2}, + { 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2}, + { 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2}, + { 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2}, + { 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2}, + { 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2}, + { 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2}, + { 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2}, + { 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2}, + { 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2}, + { 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2}, + { 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1}, + { 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1} +}; + + +static inline unsigned int hamming_distance2(unsigned int w) { + + return (w & 1) + !!(w & 2); +} + + +/* +static void conv_encode(unsigned char *data, unsigned char *output) { + + unsigned int i, state = 0, o; + + // encode data + for(i = 0; i < CONV_INPUT_SIZE; i++) { + o = encode[state][data[i]]; + state = next_state[state][data[i]]; + *output++ = !!(o & 2); + *output++ = o & 1; + } +} + */ + + +int +conv_decode(unsigned char *output, unsigned char *data) { + + int i, t; + unsigned int rdata, state, nstate, b, o, distance, accumulated_error, + min_state, min_error, cur_state; + + unsigned int ae[1 << (K - 1)]; + unsigned int nae[1 << (K - 1)]; // next accumulated error + unsigned int state_history[1 << (K - 1)][CONV_INPUT_SIZE + 1]; + + // initialize accumulated error, assume starting state is 0 + for(i = 0; i < (1 << (K - 1)); i++) + ae[i] = nae[i] = MAX_ERROR; + ae[0] = 0; + + // build trellis + for(t = 0; t < CONV_INPUT_SIZE; t++) { + + // get received data symbol + rdata = (data[2 * t] << 1) | data[2 * t + 1]; + + // for each state + for(state = 0; state < (1 << (K - 1)); state++) { + + // make sure this state is possible + if(ae[state] >= MAX_ERROR) + continue; + + // find all states we lead to + for(b = 0; b < 2; b++) { + + // get next state given input bit b + nstate = next_state[state][b]; + + // find output for this transition + o = encode[state][b]; + + // calculate distance from received data + distance = hamming_distance2(rdata ^ o); + + // choose surviving path + accumulated_error = ae[state] + distance; + if(accumulated_error < nae[nstate]) { + + // save error for surviving state + nae[nstate] = accumulated_error; + + // update state history + state_history[nstate][t + 1] = state; + } + } + } + + // get accumulated error ready for next time slice + for(i = 0; i < (1 << (K - 1)); i++) { + ae[i] = nae[i]; + nae[i] = MAX_ERROR; + } + } + + // the final state is the state with the fewest errors + min_state = (unsigned int)-1; + min_error = MAX_ERROR; + for(i = 0; i < (1 << (K - 1)); i++) { + if(ae[i] < min_error) { + min_state = i; + min_error = ae[i]; + } + } + + // trace the path + cur_state = min_state; + for(t = CONV_INPUT_SIZE; t >= 1; t--) { + min_state = cur_state; + cur_state = state_history[cur_state][t]; // get previous + output[t - 1] = prev_next_state[cur_state][min_state]; + } + + // return the number of errors detected (hard-decision) + return min_error; +} + + +/* + * GSM SACCH interleaving and burst mapping + * + * Interleaving: + * + * Given 456 coded input bits, form 4 blocks of 114 bits: + * + * i(B, j) = c(n, k) k = 0, ..., 455 + * n = 0, ..., N, N + 1, ... + * B = B_0 + 4n + (k mod 4) + * j = 2(49k mod 57) + ((k mod 8) div 4) + * + * Mapping on Burst: + * + * e(B, j) = i(B, j) + * e(B, 59 + j) = i(B, 57 + j) j = 0, ..., 56 + * e(B, 57) = h_l(B) + * e(B, 58) = h_n(B) + * + * Where h_l(B) and h_n(B) are bits in burst B indicating flags. + */ + +/* +static void interleave(unsigned char *data, unsigned char *iBLOCK) { + + int j, k, B; + + // for each bit in input data + for(k = 0; k < CONV_SIZE; k++) { + B = k % 4; + j = 2 * ((49 * k) % 57) + ((k % 8) / 4); + iBLOCK[B * iBLOCK_SIZE + j] = data[k]; + } +} + */ + + +#if 0 +static void decode_interleave(unsigned char *data, unsigned char *iBLOCK) { + + int j, k, B; + + for(k = 0; k < CONV_SIZE; k++) { + B = k % 4; + j = 2 * ((49 * k) % 57) + ((k % 8) / 4); + data[k] = iBLOCK[B * iBLOCK_SIZE + j]; + } +} + +#endif + +/* +static void burstmap(unsigned char *iBLOCK, unsigned char *eBLOCK, + unsigned char hl, unsigned char hn) { + + int j; + + for(j = 0; j < 57; j++) { + eBLOCK[j] = iBLOCK[j]; + eBLOCK[j + 59] = iBLOCK[j + 57]; + } + eBLOCK[57] = hl; + eBLOCK[58] = hn; +} + */ + + +static void decode_burstmap(unsigned char *iBLOCK, unsigned char *eBLOCK, + unsigned char *hl, unsigned char *hn) { + + int j; + + for(j = 0; j < 57; j++) { + iBLOCK[j] = eBLOCK[j]; + iBLOCK[j + 57] = eBLOCK[j + 59]; + } + *hl = eBLOCK[57]; + *hn = eBLOCK[58]; +} + + +/* + * Transmitted bits are sent least-significant first. + */ +int +compress_bits(unsigned char *dbuf, int dbuf_len, + unsigned char *sbuf, int sbuf_len) { + + unsigned int i, j, c, pos = 0; + + if(dbuf_len < ((sbuf_len + 7) >> 3)) + return -1; + + for(i = 0; i < sbuf_len; i += 8) { + for(j = 0, c = 0; (j < 8) && (i + j < sbuf_len); j++) + c |= (!!sbuf[i + j]) << j; + dbuf[pos++] = c & 0xff; + } + return pos; +} + + +#if 0 +int get_ns_l3_len(unsigned char *data, unsigned int datalen) { + + if((data[0] & 3) != 1) { + fprintf(stderr, "error: get_ns_l3_len: pseudo-length reserved " + "bits bad (%2.2x)\n", data[0] & 3); + return -1; + } + return (data[0] >> 2); +} + +#endif + +#if 0 +static unsigned char *decode_sacch(unsigned char *e0, unsigned char *e1, + unsigned char *e2, unsigned char *e3, unsigned int *datalen) { + + int errors, len, data_size = (DATA_BLOCK_SIZE + 7) >> 3; + unsigned char conv_data[CONV_SIZE], iBLOCK[BLOCKS][iBLOCK_SIZE], + hl, hn, decoded_data[PARITY_OUTPUT_SIZE], *data; + + if(!(data = (unsigned char *)malloc(data_size))) { + throw std::runtime_error("error: decode_cch: malloc"); + } + + if(datalen) + *datalen = 0; + + // unmap the bursts + decode_burstmap(iBLOCK[0], e0, &hl, &hn); // XXX ignore stealing bits + decode_burstmap(iBLOCK[1], e1, &hl, &hn); + decode_burstmap(iBLOCK[2], e2, &hl, &hn); + decode_burstmap(iBLOCK[3], e3, &hl, &hn); + + // remove interleave + interleave_decode(&opt.ictx, conv_data, (unsigned char *)iBLOCK); + //decode_interleave(conv_data, (unsigned char *)iBLOCK); + + // Viterbi decode + errors = conv_decode(decoded_data, conv_data); + DEBUGF("conv_decode: %d\n", errors); + if (errors) + return NULL; + + // check parity + // If parity check error detected try to fix it. + if (parity_check(decoded_data)) + { + fire_crc crc(40, 184); + // fprintf(stderr, "error: sacch: parity error (%d)\n", errors); + unsigned char crc_result[224]; + if (crc.check_crc(decoded_data, crc_result) == 0) + { + errors = -1; + DEBUGF("error: sacch: parity error (%d)\n", errors); + return NULL; + } else { + memcpy(decoded_data, crc_result, sizeof crc_result); + errors = 0; + } + } + + if((len = compress_bits(data, data_size, decoded_data, + DATA_BLOCK_SIZE)) < 0) { + fprintf(stderr, "error: compress_bits\n"); + return 0; + } + if(len < data_size) { + fprintf(stderr, "error: buf too small (%d < %d)\n", + sizeof(data), len); + return 0; + } + + if(datalen) + *datalen = (unsigned int)len; + return data; +} + +#endif + +/* + * decode_cch + * + * Decode a "common" control channel. Most control channels use + * the same burst, interleave, Viterbi and parity configuration. + * The documentation for the control channels defines SACCH first + * and then just keeps referring to that. + * + * The current (investigated) list is as follows: + * + * BCCH Norm + * BCCH Ext + * PCH + * AGCH + * CBCH (SDCCH/4) + * CBCH (SDCCH/8) + * SDCCH/4 + * SACCH/C4 + * SDCCH/8 + * SACCH/C8 + * + * We provide two functions, one for where all four bursts are + * contiguous, and one where they aren't. + */ +#if 0 +unsigned char *decode_cch(unsigned char *e0, unsigned char *e1, + unsigned char *e2, unsigned char *e3, unsigned int *datalen) { + + return decode_sacch(e0, e1, e2, e3, datalen); +} + + +unsigned char *decode_cch(unsigned char *e, unsigned int *datalen) { + + return decode_sacch(e, e + eBLOCK_SIZE, e + 2 * eBLOCK_SIZE, + e + 3 * eBLOCK_SIZE, datalen); +} +#endif diff --git a/gsm-tvoid/src/lib/conv.h b/gsm-tvoid/src/lib/conv.h new file mode 100644 index 0000000..0d7505d --- /dev/null +++ b/gsm-tvoid/src/lib/conv.h @@ -0,0 +1,42 @@ + +/* + * decode_cch + * + * Decode a "common" control channel. Most control channels use + * the same burst, interleave, Viterbi and parity configuration. + * The documentation for the control channels defines SACCH first + * and then just keeps referring to that. + * + * The current (investigated) list is as follows: + * + * BCCH Norm + * BCCH Ext + * PCH + * AGCH + * CBCH (SDCCH/4) + * CBCH (SDCCH/8) + * SDCCH/4 + * SACCH/C4 + * SDCCH/8 + * SACCH/C8 + * + * We provide two functions, one for where all four bursts are + * contiguous, and one where they aren't. + */ + +#define DATA_BLOCK_SIZE 184 +#define PARITY_SIZE 40 +#define FLUSH_BITS_SIZE 4 +#define PARITY_OUTPUT_SIZE (DATA_BLOCK_SIZE + PARITY_SIZE + FLUSH_BITS_SIZE) + +#define CONV_INPUT_SIZE PARITY_OUTPUT_SIZE +#define CONV_SIZE (2 * CONV_INPUT_SIZE) + +#define BLOCKS 4 +#define iBLOCK_SIZE (CONV_SIZE / BLOCKS) +#define eBLOCK_SIZE (iBLOCK_SIZE + 2) + +int conv_decode(unsigned char *output, unsigned char *data); +int parity_check(unsigned char *data); +int compress_bits(unsigned char *dbuf, int dlen, unsigned char *src, int len); + diff --git a/gsm-tvoid/src/lib/fire_crc.c b/gsm-tvoid/src/lib/fire_crc.c new file mode 100644 index 0000000..c9f0348 --- /dev/null +++ b/gsm-tvoid/src/lib/fire_crc.c @@ -0,0 +1,178 @@ +/* -*- c++ -*- */ +/* + * Copyright 2005 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "fire_crc.h" +#include <stdio.h> +#include <string.h> + +#define REM(x, y) (x) % (y) + +static int FC_syndrome_shift(FC_CTX *ctx, unsigned int bit); + +static int +outit(int *data, int len) +{ + int i; + + for (i = 0; i < len; i++) + printf("%d ", data[i]); + printf("\n"); +} + +int +FC_init(FC_CTX *ctx, unsigned int crc_size, unsigned int data_size) +{ + ctx->crc_size = crc_size; + ctx->data_size = data_size; + ctx->syn_start = 0; + + return 0; +} + +int +FC_check_crc(FC_CTX *ctx, unsigned char *input_bits, unsigned char *control_data) +{ + int j,error_count = 0, error_index = 0, success_flag = 0, syn_index = 0; + unsigned int i; + + ctx->syn_start = 0; + // reset the syndrome register + memset(ctx->syndrome_reg, 0, sizeof ctx->syndrome_reg); + + // shift in the data bits + for (i=0; i < ctx->data_size; i++) { + error_count = FC_syndrome_shift(ctx, input_bits[i]); + control_data[i] = input_bits[i]; + } + + // shift in the crc bits + for (i=0; i < ctx->crc_size; i++) { + error_count = FC_syndrome_shift(ctx, 1-input_bits[i+ctx->data_size]); + } + + // Find position of error burst + if (error_count == 0) { + error_index = 0; + } + else { + error_index = 1; + error_count = FC_syndrome_shift(ctx, 0); + error_index += 1; + while (error_index < (ctx->data_size + ctx->crc_size) ) { + error_count = FC_syndrome_shift(ctx, 0); + error_index += 1; + if ( error_count == 0 ) break; + } + } + + // Test for correctable errors + //printf("error_index %d\n",error_index); + if (error_index == 224) success_flag = 0; + else { + + // correct index depending on the position of the error + if (error_index == 0) syn_index = error_index; + else syn_index = error_index - 1; + + // error burst lies within data bits + if (error_index < 184) { + //printf("error < bit 184,%d\n",error_index); + j = error_index; + while ( j < (error_index+12) ) { + if (j < 184) { + control_data[j] = control_data[j] ^ + ctx->syndrome_reg[REM(ctx->syn_start+39-j+syn_index,40)]; + } + else break; + j = j + 1; + } + } + else if ( error_index > 212 ) { + //printf("error > bit 212,%d\n",error_index); + j = 0; + while ( j < (error_index - 212) ) { + control_data[j] = control_data[j] ^ + ctx->syndrome_reg[REM(ctx->syn_start+39-j-224+syn_index,40)]; + j = j + 1; + } + } + // for 183 < error_index < 213 error in parity alone so ignore + success_flag = 1; + } + return success_flag; +} + +static int +FC_syndrome_shift(FC_CTX *ctx, unsigned int bit) +{ + int error_count = 0; + unsigned int i; + + if (ctx->syn_start == 0) + ctx->syn_start = 39; + else ctx->syn_start -= 1; + + int temp_syndrome_reg[sizeof ctx->syndrome_reg]; + + memcpy(temp_syndrome_reg, ctx->syndrome_reg, sizeof temp_syndrome_reg); + + temp_syndrome_reg[REM(ctx->syn_start+3,40)] = + ctx->syndrome_reg[REM(ctx->syn_start+3,40)] ^ + ctx->syndrome_reg[ctx->syn_start]; + temp_syndrome_reg[REM(ctx->syn_start+17,40)] = + ctx->syndrome_reg[REM(ctx->syn_start+17,40)] ^ + ctx->syndrome_reg[ctx->syn_start]; + temp_syndrome_reg[REM(ctx->syn_start+23,40)] = + ctx->syndrome_reg[REM(ctx->syn_start+23,40)] ^ + ctx->syndrome_reg[ctx->syn_start]; + temp_syndrome_reg[REM(ctx->syn_start+26,40)] = + ctx->syndrome_reg[REM(ctx->syn_start+26,40)] ^ + ctx->syndrome_reg[ctx->syn_start]; + + temp_syndrome_reg[REM(ctx->syn_start+4,40)] = + ctx->syndrome_reg[REM(ctx->syn_start+4,40)] ^ bit; + temp_syndrome_reg[REM(ctx->syn_start+6,40)] = + ctx->syndrome_reg[REM(ctx->syn_start+6,40)] ^ bit; + temp_syndrome_reg[REM(ctx->syn_start+10,40)] = + ctx->syndrome_reg[REM(ctx->syn_start+10,40)] ^ bit; + temp_syndrome_reg[REM(ctx->syn_start+16,40)] = + ctx->syndrome_reg[REM(ctx->syn_start+16,40)] ^ bit; + temp_syndrome_reg[REM(ctx->syn_start+27,40)] = + ctx->syndrome_reg[REM(ctx->syn_start+27,40)] ^ bit; + temp_syndrome_reg[REM(ctx->syn_start+29,40)] = + ctx->syndrome_reg[REM(ctx->syn_start+29,40)] ^ bit; + temp_syndrome_reg[REM(ctx->syn_start+33,40)] = + ctx->syndrome_reg[REM(ctx->syn_start+33,40)] ^ bit; + temp_syndrome_reg[REM(ctx->syn_start+39,40)] = + ctx->syndrome_reg[REM(ctx->syn_start+39,40)] ^ bit; + + temp_syndrome_reg[ctx->syn_start] = ctx->syndrome_reg[ctx->syn_start] ^ bit; + + memcpy(ctx->syndrome_reg, temp_syndrome_reg, sizeof ctx->syndrome_reg); + + for (i = 0; i < 28; i++) { + error_count = error_count + ctx->syndrome_reg[REM(ctx->syn_start+i,40)]; + } + return error_count; +} + + diff --git a/gsm-tvoid/src/lib/fire_crc.h b/gsm-tvoid/src/lib/fire_crc.h new file mode 100644 index 0000000..15d5b81 --- /dev/null +++ b/gsm-tvoid/src/lib/fire_crc.h @@ -0,0 +1,46 @@ +/* -*- c++ -*- */ +/* + * Copyright 2005 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + + +#ifndef INCLUDED_FIRE_CRC_H +#define INCLUDED_FIRE_CRC_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct +{ + unsigned int crc_size; + unsigned int data_size; + unsigned int syn_start; + int syndrome_reg[40]; +} FC_CTX; + +int FC_init(FC_CTX *ctx, unsigned int crc_size, unsigned int data_size); +int FC_check_crc(FC_CTX *ctx, unsigned char *input_bits, unsigned char *control_data); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/gsm-tvoid/src/lib/gsm.cc b/gsm-tvoid/src/lib/gsm.cc new file mode 100644 index 0000000..b2660c0 --- /dev/null +++ b/gsm-tvoid/src/lib/gsm.cc @@ -0,0 +1,9934 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.36 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + +#define SWIGPYTHON +#define SWIG_PYTHON_DIRECTOR_NO_VTABLE + +#ifdef __cplusplus +template<typename T> class SwigValueWrapper { + T *tt; +public: + SwigValueWrapper() : tt(0) { } + SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { } + SwigValueWrapper(const T& t) : tt(new T(t)) { } + ~SwigValueWrapper() { delete tt; } + SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; } + operator T&() const { return *tt; } + T *operator&() { return tt; } +private: + SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs); +}; + +template <typename T> T SwigValueInit() { + return T(); +} +#endif + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + + + +/* Python.h has to appear first */ +#include <Python.h> + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic CAPI SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the swig runtime code. + In 99.9% of the cases, swig just needs to declare them as 'static'. + + But only do this if is strictly necessary, ie, if you have problems + with your compiler or so. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The swig conversion methods, as ConvertPtr, return and integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old swig versions, you usually write code as: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit as: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + that seems to be the same, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + requires also to SWIG_ConvertPtr to return new result values, as + + int SWIG_ConvertPtr(obj, ptr,...) { + if (<obj is ok>) { + if (<need new object>) { + *ptr = <ptr to new allocated object>; + return SWIG_NEWOBJ; + } else { + *ptr = <ptr to old object>; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + swig errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() + + + */ +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + + + +#include <string.h> + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class<int>" == "Class<int >", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like <name1>|<name2>|... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like <name1>|<name2>|... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCompare(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + + +/* think of this as a c++ template<> or a scheme macro */ +#define SWIG_TypeCheck_Template(comparison, ty) \ + if (ty) { \ + swig_cast_info *iter = ty->cast; \ + while (iter) { \ + if (comparison) { \ + if (iter == ty->cast) return iter; \ + /* Move iter to the top of the linked list */ \ + iter->prev->next = iter->next; \ + if (iter->next) \ + iter->next->prev = iter->prev; \ + iter->next = ty->cast; \ + iter->prev = 0; \ + if (ty->cast) ty->cast->prev = iter; \ + ty->cast = iter; \ + return iter; \ + } \ + iter = iter->next; \ + } \ + } \ + return 0 + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty); +} + +/* Same as previous function, except strcmp is replaced with a pointer comparison */ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) { + SWIG_TypeCheck_Template(iter->type == from, into); +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + register size_t l = 0; + register size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + register size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + register int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + register size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + register const unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + register unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register char d = *(c++); + register unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = ((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = ((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + + +/* Add PyOS_snprintf for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) +# define PyOS_snprintf _snprintf +# else +# define PyOS_snprintf snprintf +# endif +#endif + +/* A crude PyString_FromFormat implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 + +#ifndef SWIG_PYBUFFER_SIZE +# define SWIG_PYBUFFER_SIZE 1024 +#endif + +static PyObject * +PyString_FromFormat(const char *fmt, ...) { + va_list ap; + char buf[SWIG_PYBUFFER_SIZE * 2]; + int res; + va_start(ap, fmt); + res = vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); +} +#endif + +/* Add PyObject_Del for old Pythons */ +#if PY_VERSION_HEX < 0x01060000 +# define PyObject_Del(op) PyMem_DEL((op)) +#endif +#ifndef PyObject_DEL +# define PyObject_DEL PyObject_Del +#endif + +/* A crude PyExc_StopIteration exception for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# ifndef PyExc_StopIteration +# define PyExc_StopIteration PyExc_RuntimeError +# endif +# ifndef PyObject_GenericGetAttr +# define PyObject_GenericGetAttr 0 +# endif +#endif +/* Py_NotImplemented is defined in 2.1 and up. */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef Py_NotImplemented +# define Py_NotImplemented PyExc_RuntimeError +# endif +#endif + + +/* A crude PyString_AsStringAndSize implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef PyString_AsStringAndSize +# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} +# endif +#endif + +/* PySequence_Size for old Pythons */ +#if PY_VERSION_HEX < 0x02000000 +# ifndef PySequence_Size +# define PySequence_Size PySequence_Length +# endif +#endif + + +/* PyBool_FromLong for old Pythons */ +#if PY_VERSION_HEX < 0x02030000 +static +PyObject *PyBool_FromLong(long ok) +{ + PyObject *result = ok ? Py_True : Py_False; + Py_INCREF(result); + return result; +} +#endif + +/* Py_ssize_t for old Pythons */ +/* This code is as recommended by: */ +/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ +#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) +typedef int Py_ssize_t; +# define PY_SSIZE_T_MAX INT_MAX +# define PY_SSIZE_T_MIN INT_MIN +#endif + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIME PyObject* +SWIG_Python_ErrorType(int code) { + PyObject* type = 0; + switch(code) { + case SWIG_MemoryError: + type = PyExc_MemoryError; + break; + case SWIG_IOError: + type = PyExc_IOError; + break; + case SWIG_RuntimeError: + type = PyExc_RuntimeError; + break; + case SWIG_IndexError: + type = PyExc_IndexError; + break; + case SWIG_TypeError: + type = PyExc_TypeError; + break; + case SWIG_DivisionByZero: + type = PyExc_ZeroDivisionError; + break; + case SWIG_OverflowError: + type = PyExc_OverflowError; + break; + case SWIG_SyntaxError: + type = PyExc_SyntaxError; + break; + case SWIG_ValueError: + type = PyExc_ValueError; + break; + case SWIG_SystemError: + type = PyExc_SystemError; + break; + case SWIG_AttributeError: + type = PyExc_AttributeError; + break; + default: + type = PyExc_RuntimeError; + } + return type; +} + + +SWIGRUNTIME void +SWIG_Python_AddErrorMsg(const char* mesg) +{ + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + + if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + PyErr_Clear(); + Py_XINCREF(type); + PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg); + Py_DECREF(old_str); + Py_DECREF(value); + } else { + PyErr_SetString(PyExc_RuntimeError, mesg); + } +} + + + +#if defined(SWIG_PYTHON_NO_THREADS) +# if defined(SWIG_PYTHON_THREADS) +# undef SWIG_PYTHON_THREADS +# endif +#endif +#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ +# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) +# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ +# define SWIG_PYTHON_USE_GIL +# endif +# endif +# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ +# ifndef SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() +# endif +# ifdef __cplusplus /* C++ code */ + class SWIG_Python_Thread_Block { + bool status; + PyGILState_STATE state; + public: + void end() { if (status) { PyGILState_Release(state); status = false;} } + SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} + ~SWIG_Python_Thread_Block() { end(); } + }; + class SWIG_Python_Thread_Allow { + bool status; + PyThreadState *save; + public: + void end() { if (status) { PyEval_RestoreThread(save); status = false; }} + SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} + ~SWIG_Python_Thread_Allow() { end(); } + }; +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block +# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow +# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() +# else /* C code */ +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() +# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() +# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) +# endif +# else /* Old thread way, not implemented, user must provide it */ +# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) +# define SWIG_PYTHON_INITIALIZE_THREADS +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) +# define SWIG_PYTHON_THREAD_END_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# endif +# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) +# define SWIG_PYTHON_THREAD_END_ALLOW +# endif +# endif +#else /* No thread support */ +# define SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# define SWIG_PYTHON_THREAD_END_BLOCK +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# define SWIG_PYTHON_THREAD_END_ALLOW +#endif + +/* ----------------------------------------------------------------------------- + * Python API portion that goes into the runtime + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* cc-mode */ +#endif +#endif + +/* ----------------------------------------------------------------------------- + * Constant declarations + * ----------------------------------------------------------------------------- */ + +/* Constant Types */ +#define SWIG_PY_POINTER 4 +#define SWIG_PY_BINARY 5 + +/* Constant information structure */ +typedef struct swig_const_info { + int type; + char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_const_info; + +#ifdef __cplusplus +#if 0 +{ /* cc-mode */ +#endif +} +#endif + + +/* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * + * pyrun.swg + * + * This file contains the runtime support for Python modules + * and includes code for managing global variables and pointer + * type checking. + * + * ----------------------------------------------------------------------------- */ + +/* Common SWIG API */ + +/* for raw pointers */ +#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) +#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) +#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags) +#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) +#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) +#define swig_owntype int + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Python_GetModule() +#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) +#define SWIG_NewClientData(obj) PySwigClientData_New(obj) + +#define SWIG_SetErrorObj SWIG_Python_SetErrorObj +#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg +#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) +#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) +#define SWIG_fail goto fail + + +/* Runtime API implementation */ + +/* Error manipulation */ + +SWIGINTERN void +SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetObject(errtype, obj); + Py_DECREF(obj); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +SWIGINTERN void +SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetString(errtype, (char *) msg); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) + +/* Set a constant value */ + +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { + PyDict_SetItemString(d, (char*) name, obj); + Py_DECREF(obj); +} + +/* Append a value to the result obj */ + +SWIGINTERN PyObject* +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyList_Check(result)) { + PyObject *o2 = result; + result = PyList_New(1); + PyList_SetItem(result, 0, o2); + } + PyList_Append(result,obj); + Py_DECREF(obj); + } + return result; +#else + PyObject* o2; + PyObject* o3; + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyTuple_Check(result)) { + o2 = result; + result = PyTuple_New(1); + PyTuple_SET_ITEM(result, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SET_ITEM(o3, 0, obj); + o2 = result; + result = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return result; +#endif +} + +/* Unpack the argument tuple */ + +SWIGINTERN int +SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) +{ + if (!args) { + if (!min && !max) { + return 1; + } else { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", + name, (min == max ? "" : "at least "), (int)min); + return 0; + } + } + if (!PyTuple_Check(args)) { + PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); + return 0; + } else { + register Py_ssize_t l = PyTuple_GET_SIZE(args); + if (l < min) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at least "), (int)min, (int)l); + return 0; + } else if (l > max) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at most "), (int)max, (int)l); + return 0; + } else { + register int i; + for (i = 0; i < l; ++i) { + objs[i] = PyTuple_GET_ITEM(args, i); + } + for (; l < max; ++l) { + objs[l] = 0; + } + return i + 1; + } + } +} + +/* A functor is a function object with one single object argument */ +#if PY_VERSION_HEX >= 0x02020000 +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); +#else +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); +#endif + +/* + Helper for static pointer initialization for both C and C++ code, for example + static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); +*/ +#ifdef __cplusplus +#define SWIG_STATIC_POINTER(var) var +#else +#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var +#endif + +/* ----------------------------------------------------------------------------- + * Pointer declarations + * ----------------------------------------------------------------------------- */ + +/* Flags for new pointer objects */ +#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) +#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) + +#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* cc-mode */ +#endif +#endif + +/* How to access Py_None */ +#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# ifndef SWIG_PYTHON_NO_BUILD_NONE +# ifndef SWIG_PYTHON_BUILD_NONE +# define SWIG_PYTHON_BUILD_NONE +# endif +# endif +#endif + +#ifdef SWIG_PYTHON_BUILD_NONE +# ifdef Py_None +# undef Py_None +# define Py_None SWIG_Py_None() +# endif +SWIGRUNTIMEINLINE PyObject * +_SWIG_Py_None(void) +{ + PyObject *none = Py_BuildValue((char*)""); + Py_DECREF(none); + return none; +} +SWIGRUNTIME PyObject * +SWIG_Py_None(void) +{ + static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); + return none; +} +#endif + +/* The python void return value */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Py_Void(void) +{ + PyObject *none = Py_None; + Py_INCREF(none); + return none; +} + +/* PySwigClientData */ + +typedef struct { + PyObject *klass; + PyObject *newraw; + PyObject *newargs; + PyObject *destroy; + int delargs; + int implicitconv; +} PySwigClientData; + +SWIGRUNTIMEINLINE int +SWIG_Python_CheckImplicit(swig_type_info *ty) +{ + PySwigClientData *data = (PySwigClientData *)ty->clientdata; + return data ? data->implicitconv : 0; +} + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_ExceptionType(swig_type_info *desc) { + PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0; + PyObject *klass = data ? data->klass : 0; + return (klass ? klass : PyExc_RuntimeError); +} + + +SWIGRUNTIME PySwigClientData * +PySwigClientData_New(PyObject* obj) +{ + if (!obj) { + return 0; + } else { + PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData)); + /* the klass element */ + data->klass = obj; + Py_INCREF(data->klass); + /* the newraw method and newargs arguments used to create a new raw instance */ + if (PyClass_Check(obj)) { + data->newraw = 0; + data->newargs = obj; + Py_INCREF(obj); + } else { +#if (PY_VERSION_HEX < 0x02020000) + data->newraw = 0; +#else + data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); +#endif + if (data->newraw) { + Py_INCREF(data->newraw); + data->newargs = PyTuple_New(1); + PyTuple_SetItem(data->newargs, 0, obj); + } else { + data->newargs = obj; + } + Py_INCREF(data->newargs); + } + /* the destroy method, aka as the C++ delete method */ + data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); + if (PyErr_Occurred()) { + PyErr_Clear(); + data->destroy = 0; + } + if (data->destroy) { + int flags; + Py_INCREF(data->destroy); + flags = PyCFunction_GET_FLAGS(data->destroy); +#ifdef METH_O + data->delargs = !(flags & (METH_O)); +#else + data->delargs = 0; +#endif + } else { + data->delargs = 0; + } + data->implicitconv = 0; + return data; + } +} + +SWIGRUNTIME void +PySwigClientData_Del(PySwigClientData* data) +{ + Py_XDECREF(data->newraw); + Py_XDECREF(data->newargs); + Py_XDECREF(data->destroy); +} + +/* =============== PySwigObject =====================*/ + +typedef struct { + PyObject_HEAD + void *ptr; + swig_type_info *ty; + int own; + PyObject *next; +} PySwigObject; + +SWIGRUNTIME PyObject * +PySwigObject_long(PySwigObject *v) +{ + return PyLong_FromVoidPtr(v->ptr); +} + +SWIGRUNTIME PyObject * +PySwigObject_format(const char* fmt, PySwigObject *v) +{ + PyObject *res = NULL; + PyObject *args = PyTuple_New(1); + if (args) { + if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) { + PyObject *ofmt = PyString_FromString(fmt); + if (ofmt) { + res = PyString_Format(ofmt,args); + Py_DECREF(ofmt); + } + Py_DECREF(args); + } + } + return res; +} + +SWIGRUNTIME PyObject * +PySwigObject_oct(PySwigObject *v) +{ + return PySwigObject_format("%o",v); +} + +SWIGRUNTIME PyObject * +PySwigObject_hex(PySwigObject *v) +{ + return PySwigObject_format("%x",v); +} + +SWIGRUNTIME PyObject * +#ifdef METH_NOARGS +PySwigObject_repr(PySwigObject *v) +#else +PySwigObject_repr(PySwigObject *v, PyObject *args) +#endif +{ + const char *name = SWIG_TypePrettyName(v->ty); + PyObject *hex = PySwigObject_hex(v); + PyObject *repr = PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString_AsString(hex)); + Py_DECREF(hex); + if (v->next) { +#ifdef METH_NOARGS + PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next); +#else + PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args); +#endif + PyString_ConcatAndDel(&repr,nrep); + } + return repr; +} + +SWIGRUNTIME int +PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) +{ +#ifdef METH_NOARGS + PyObject *repr = PySwigObject_repr(v); +#else + PyObject *repr = PySwigObject_repr(v, NULL); +#endif + if (repr) { + fputs(PyString_AsString(repr), fp); + Py_DECREF(repr); + return 0; + } else { + return 1; + } +} + +SWIGRUNTIME PyObject * +PySwigObject_str(PySwigObject *v) +{ + char result[SWIG_BUFFER_SIZE]; + return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? + PyString_FromString(result) : 0; +} + +SWIGRUNTIME int +PySwigObject_compare(PySwigObject *v, PySwigObject *w) +{ + void *i = v->ptr; + void *j = w->ptr; + return (i < j) ? -1 : ((i > j) ? 1 : 0); +} + +SWIGRUNTIME PyTypeObject* _PySwigObject_type(void); + +SWIGRUNTIME PyTypeObject* +PySwigObject_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); + return type; +} + +SWIGRUNTIMEINLINE int +PySwigObject_Check(PyObject *op) { + return ((op)->ob_type == PySwigObject_type()) + || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0); +} + +SWIGRUNTIME PyObject * +PySwigObject_New(void *ptr, swig_type_info *ty, int own); + +SWIGRUNTIME void +PySwigObject_dealloc(PyObject *v) +{ + PySwigObject *sobj = (PySwigObject *) v; + PyObject *next = sobj->next; + if (sobj->own == SWIG_POINTER_OWN) { + swig_type_info *ty = sobj->ty; + PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0; + PyObject *destroy = data ? data->destroy : 0; + if (destroy) { + /* destroy is always a VARARGS method */ + PyObject *res; + if (data->delargs) { + /* we need to create a temporal object to carry the destroy operation */ + PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0); + res = SWIG_Python_CallFunctor(destroy, tmp); + Py_DECREF(tmp); + } else { + PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); + PyObject *mself = PyCFunction_GET_SELF(destroy); + res = ((*meth)(mself, v)); + } + Py_XDECREF(res); + } +#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) + else { + const char *name = SWIG_TypePrettyName(ty); + printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); + } +#endif + } + Py_XDECREF(next); + PyObject_DEL(v); +} + +SWIGRUNTIME PyObject* +PySwigObject_append(PyObject* v, PyObject* next) +{ + PySwigObject *sobj = (PySwigObject *) v; +#ifndef METH_O + PyObject *tmp = 0; + if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; + next = tmp; +#endif + if (!PySwigObject_Check(next)) { + return NULL; + } + sobj->next = next; + Py_INCREF(next); + return SWIG_Py_Void(); +} + +SWIGRUNTIME PyObject* +#ifdef METH_NOARGS +PySwigObject_next(PyObject* v) +#else +PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + PySwigObject *sobj = (PySwigObject *) v; + if (sobj->next) { + Py_INCREF(sobj->next); + return sobj->next; + } else { + return SWIG_Py_Void(); + } +} + +SWIGINTERN PyObject* +#ifdef METH_NOARGS +PySwigObject_disown(PyObject *v) +#else +PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + PySwigObject *sobj = (PySwigObject *)v; + sobj->own = 0; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +#ifdef METH_NOARGS +PySwigObject_acquire(PyObject *v) +#else +PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + PySwigObject *sobj = (PySwigObject *)v; + sobj->own = SWIG_POINTER_OWN; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +PySwigObject_own(PyObject *v, PyObject *args) +{ + PyObject *val = 0; +#if (PY_VERSION_HEX < 0x02020000) + if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) +#else + if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) +#endif + { + return NULL; + } + else + { + PySwigObject *sobj = (PySwigObject *)v; + PyObject *obj = PyBool_FromLong(sobj->own); + if (val) { +#ifdef METH_NOARGS + if (PyObject_IsTrue(val)) { + PySwigObject_acquire(v); + } else { + PySwigObject_disown(v); + } +#else + if (PyObject_IsTrue(val)) { + PySwigObject_acquire(v,args); + } else { + PySwigObject_disown(v,args); + } +#endif + } + return obj; + } +} + +#ifdef METH_O +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)PySwigObject_append, METH_O, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)PySwigObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_NOARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +#else +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)PySwigObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)PySwigObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_VARARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +#endif + +#if PY_VERSION_HEX < 0x02020000 +SWIGINTERN PyObject * +PySwigObject_getattr(PySwigObject *sobj,char *name) +{ + return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); +} +#endif + +SWIGRUNTIME PyTypeObject* +_PySwigObject_type(void) { + static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; + + static PyNumberMethods PySwigObject_as_number = { + (binaryfunc)0, /*nb_add*/ + (binaryfunc)0, /*nb_subtract*/ + (binaryfunc)0, /*nb_multiply*/ + (binaryfunc)0, /*nb_divide*/ + (binaryfunc)0, /*nb_remainder*/ + (binaryfunc)0, /*nb_divmod*/ + (ternaryfunc)0,/*nb_power*/ + (unaryfunc)0, /*nb_negative*/ + (unaryfunc)0, /*nb_positive*/ + (unaryfunc)0, /*nb_absolute*/ + (inquiry)0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ + (coercion)0, /*nb_coerce*/ + (unaryfunc)PySwigObject_long, /*nb_int*/ + (unaryfunc)PySwigObject_long, /*nb_long*/ + (unaryfunc)0, /*nb_float*/ + (unaryfunc)PySwigObject_oct, /*nb_oct*/ + (unaryfunc)PySwigObject_hex, /*nb_hex*/ +#if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ +#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ +#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ + 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ +#endif + }; + + static PyTypeObject pyswigobject_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ + (char *)"PySwigObject", /* tp_name */ + sizeof(PySwigObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)PySwigObject_dealloc, /* tp_dealloc */ + (printfunc)PySwigObject_print, /* tp_print */ +#if PY_VERSION_HEX < 0x02020000 + (getattrfunc)PySwigObject_getattr, /* tp_getattr */ +#else + (getattrfunc)0, /* tp_getattr */ +#endif + (setattrfunc)0, /* tp_setattr */ + (cmpfunc)PySwigObject_compare, /* tp_compare */ + (reprfunc)PySwigObject_repr, /* tp_repr */ + &PySwigObject_as_number, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)PySwigObject_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigobject_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0, /* tp_iter */ + 0, /* tp_iternext */ + swigobject_methods, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#ifdef COUNT_ALLOCS + 0,0,0,0 /* tp_alloc -> tp_next */ +#endif + }; + pyswigobject_type = tmp; + pyswigobject_type.ob_type = &PyType_Type; + type_init = 1; + } + return &pyswigobject_type; +} + +SWIGRUNTIME PyObject * +PySwigObject_New(void *ptr, swig_type_info *ty, int own) +{ + PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type()); + if (sobj) { + sobj->ptr = ptr; + sobj->ty = ty; + sobj->own = own; + sobj->next = 0; + } + return (PyObject *)sobj; +} + +/* ----------------------------------------------------------------------------- + * Implements a simple Swig Packed type, and use it instead of string + * ----------------------------------------------------------------------------- */ + +typedef struct { + PyObject_HEAD + void *pack; + swig_type_info *ty; + size_t size; +} PySwigPacked; + +SWIGRUNTIME int +PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) +{ + char result[SWIG_BUFFER_SIZE]; + fputs("<Swig Packed ", fp); + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { + fputs("at ", fp); + fputs(result, fp); + } + fputs(v->ty->name,fp); + fputs(">", fp); + return 0; +} + +SWIGRUNTIME PyObject * +PySwigPacked_repr(PySwigPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { + return PyString_FromFormat("<Swig Packed at %s%s>", result, v->ty->name); + } else { + return PyString_FromFormat("<Swig Packed %s>", v->ty->name); + } +} + +SWIGRUNTIME PyObject * +PySwigPacked_str(PySwigPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ + return PyString_FromFormat("%s%s", result, v->ty->name); + } else { + return PyString_FromString(v->ty->name); + } +} + +SWIGRUNTIME int +PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w) +{ + size_t i = v->size; + size_t j = w->size; + int s = (i < j) ? -1 : ((i > j) ? 1 : 0); + return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); +} + +SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void); + +SWIGRUNTIME PyTypeObject* +PySwigPacked_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type(); + return type; +} + +SWIGRUNTIMEINLINE int +PySwigPacked_Check(PyObject *op) { + return ((op)->ob_type == _PySwigPacked_type()) + || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0); +} + +SWIGRUNTIME void +PySwigPacked_dealloc(PyObject *v) +{ + if (PySwigPacked_Check(v)) { + PySwigPacked *sobj = (PySwigPacked *) v; + free(sobj->pack); + } + PyObject_DEL(v); +} + +SWIGRUNTIME PyTypeObject* +_PySwigPacked_type(void) { + static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; + static PyTypeObject pyswigpacked_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ + (char *)"PySwigPacked", /* tp_name */ + sizeof(PySwigPacked), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)PySwigPacked_dealloc, /* tp_dealloc */ + (printfunc)PySwigPacked_print, /* tp_print */ + (getattrfunc)0, /* tp_getattr */ + (setattrfunc)0, /* tp_setattr */ + (cmpfunc)PySwigPacked_compare, /* tp_compare */ + (reprfunc)PySwigPacked_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)PySwigPacked_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigpacked_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#ifdef COUNT_ALLOCS + 0,0,0,0 /* tp_alloc -> tp_next */ +#endif + }; + pyswigpacked_type = tmp; + pyswigpacked_type.ob_type = &PyType_Type; + type_init = 1; + } + return &pyswigpacked_type; +} + +SWIGRUNTIME PyObject * +PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty) +{ + PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type()); + if (sobj) { + void *pack = malloc(size); + if (pack) { + memcpy(pack, ptr, size); + sobj->pack = pack; + sobj->ty = ty; + sobj->size = size; + } else { + PyObject_DEL((PyObject *) sobj); + sobj = 0; + } + } + return (PyObject *) sobj; +} + +SWIGRUNTIME swig_type_info * +PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size) +{ + if (PySwigPacked_Check(obj)) { + PySwigPacked *sobj = (PySwigPacked *)obj; + if (sobj->size != size) return 0; + memcpy(ptr, sobj->pack, size); + return sobj->ty; + } else { + return 0; + } +} + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIMEINLINE PyObject * +_SWIG_This(void) +{ + return PyString_FromString("this"); +} + +SWIGRUNTIME PyObject * +SWIG_This(void) +{ + static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This(); + return swig_this; +} + +/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ + +SWIGRUNTIME PySwigObject * +SWIG_Python_GetSwigThis(PyObject *pyobj) +{ + if (PySwigObject_Check(pyobj)) { + return (PySwigObject *) pyobj; + } else { + PyObject *obj = 0; +#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) + if (PyInstance_Check(pyobj)) { + obj = _PyInstance_Lookup(pyobj, SWIG_This()); + } else { + PyObject **dictptr = _PyObject_GetDictPtr(pyobj); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; + } else { +#ifdef PyWeakref_CheckProxy + if (PyWeakref_CheckProxy(pyobj)) { + PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); + return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; + } +#endif + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } + } + } +#else + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } +#endif + if (obj && !PySwigObject_Check(obj)) { + /* a PyObject is called 'this', try to get the 'real this' + PySwigObject from it */ + return SWIG_Python_GetSwigThis(obj); + } + return (PySwigObject *)obj; + } +} + +/* Acquire a pointer value */ + +SWIGRUNTIME int +SWIG_Python_AcquirePtr(PyObject *obj, int own) { + if (own == SWIG_POINTER_OWN) { + PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); + if (sobj) { + int oldown = sobj->own; + sobj->own = own; + return oldown; + } + } + return 0; +} + +/* Convert a pointer value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { + if (!obj) return SWIG_ERROR; + if (obj == Py_None) { + if (ptr) *ptr = 0; + return SWIG_OK; + } else { + PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); + if (own) + *own = 0; + while (sobj) { + void *vptr = sobj->ptr; + if (ty) { + swig_type_info *to = sobj->ty; + if (to == ty) { + /* no type cast needed */ + if (ptr) *ptr = vptr; + break; + } else { + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) { + sobj = (PySwigObject *)sobj->next; + } else { + if (ptr) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + if (newmemory == SWIG_CAST_NEW_MEMORY) { + assert(own); + if (own) + *own = *own | SWIG_CAST_NEW_MEMORY; + } + } + break; + } + } + } else { + if (ptr) *ptr = vptr; + break; + } + } + if (sobj) { + if (own) + *own = *own | sobj->own; + if (flags & SWIG_POINTER_DISOWN) { + sobj->own = 0; + } + return SWIG_OK; + } else { + int res = SWIG_ERROR; + if (flags & SWIG_POINTER_IMPLICIT_CONV) { + PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0; + if (data && !data->implicitconv) { + PyObject *klass = data->klass; + if (klass) { + PyObject *impconv; + data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ + impconv = SWIG_Python_CallFunctor(klass, obj); + data->implicitconv = 0; + if (PyErr_Occurred()) { + PyErr_Clear(); + impconv = 0; + } + if (impconv) { + PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv); + if (iobj) { + void *vptr; + res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); + if (SWIG_IsOK(res)) { + if (ptr) { + *ptr = vptr; + /* transfer the ownership to 'ptr' */ + iobj->own = 0; + res = SWIG_AddCast(res); + res = SWIG_AddNewMask(res); + } else { + res = SWIG_AddCast(res); + } + } + } + Py_DECREF(impconv); + } + } + } + } + return res; + } + } +} + +/* Convert a function ptr value */ + +SWIGRUNTIME int +SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { + if (!PyCFunction_Check(obj)) { + return SWIG_ConvertPtr(obj, ptr, ty, 0); + } else { + void *vptr = 0; + + /* here we get the method pointer for callbacks */ + const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); + const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; + if (desc) { + desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; + if (!desc) return SWIG_ERROR; + } + if (ty) { + swig_cast_info *tc = SWIG_TypeCheck(desc,ty); + if (tc) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } else { + return SWIG_ERROR; + } + } else { + *ptr = vptr; + } + return SWIG_OK; + } +} + +/* Convert a packed value value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { + swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz); + if (!to) return SWIG_ERROR; + if (ty) { + if (to != ty) { + /* check type cast? */ + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) return SWIG_ERROR; + } + } + return SWIG_OK; +} + +/* ----------------------------------------------------------------------------- + * Create a new pointer object + * ----------------------------------------------------------------------------- */ + +/* + Create a new instance object, whitout calling __init__, and set the + 'this' attribute. +*/ + +SWIGRUNTIME PyObject* +SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this) +{ +#if (PY_VERSION_HEX >= 0x02020000) + PyObject *inst = 0; + PyObject *newraw = data->newraw; + if (newraw) { + inst = PyObject_Call(newraw, data->newargs, NULL); + if (inst) { +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + PyDict_SetItem(dict, SWIG_This(), swig_this); + } + } +#else + PyObject *key = SWIG_This(); + PyObject_SetAttr(inst, key, swig_this); +#endif + } + } else { + PyObject *dict = PyDict_New(); + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + } + return inst; +#else +#if (PY_VERSION_HEX >= 0x02010000) + PyObject *inst; + PyObject *dict = PyDict_New(); + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + return (PyObject *) inst; +#else + PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); + if (inst == NULL) { + return NULL; + } + inst->in_class = (PyClassObject *)data->newargs; + Py_INCREF(inst->in_class); + inst->in_dict = PyDict_New(); + if (inst->in_dict == NULL) { + Py_DECREF(inst); + return NULL; + } +#ifdef Py_TPFLAGS_HAVE_WEAKREFS + inst->in_weakreflist = NULL; +#endif +#ifdef Py_TPFLAGS_GC + PyObject_GC_Init(inst); +#endif + PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); + return (PyObject *) inst; +#endif +#endif +} + +SWIGRUNTIME void +SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) +{ + PyObject *dict; +#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + } + PyDict_SetItem(dict, SWIG_This(), swig_this); + return; + } +#endif + dict = PyObject_GetAttrString(inst, (char*)"__dict__"); + PyDict_SetItem(dict, SWIG_This(), swig_this); + Py_DECREF(dict); +} + + +SWIGINTERN PyObject * +SWIG_Python_InitShadowInstance(PyObject *args) { + PyObject *obj[2]; + if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { + return NULL; + } else { + PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]); + if (sthis) { + PySwigObject_append((PyObject*) sthis, obj[1]); + } else { + SWIG_Python_SetSwigThis(obj[0], obj[1]); + } + return SWIG_Py_Void(); + } +} + +/* Create a new pointer object */ + +SWIGRUNTIME PyObject * +SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { + if (!ptr) { + return SWIG_Py_Void(); + } else { + int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; + PyObject *robj = PySwigObject_New(ptr, type, own); + PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 0; + if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { + PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); + if (inst) { + Py_DECREF(robj); + robj = inst; + } + } + return robj; + } +} + +/* Create a new packed object */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { + return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); +} + +/* -----------------------------------------------------------------------------* + * Get type list + * -----------------------------------------------------------------------------*/ + +#ifdef SWIG_LINK_RUNTIME +void *SWIG_ReturnGlobalTypeList(void *); +#endif + +SWIGRUNTIME swig_module_info * +SWIG_Python_GetModule(void) { + static void *type_pointer = (void *)0; + /* first check if module already created */ + if (!type_pointer) { +#ifdef SWIG_LINK_RUNTIME + type_pointer = SWIG_ReturnGlobalTypeList((void *)0); +#else + type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, + (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); + if (PyErr_Occurred()) { + PyErr_Clear(); + type_pointer = (void *)0; + } +#endif + } + return (swig_module_info *) type_pointer; +} + +#if PY_MAJOR_VERSION < 2 +/* PyModule_AddObject function was introduced in Python 2.0. The following function + is copied out of Python/modsupport.c in python version 2.3.4 */ +SWIGINTERN int +PyModule_AddObject(PyObject *m, char *name, PyObject *o) +{ + PyObject *dict; + if (!PyModule_Check(m)) { + PyErr_SetString(PyExc_TypeError, + "PyModule_AddObject() needs module as first arg"); + return SWIG_ERROR; + } + if (!o) { + PyErr_SetString(PyExc_TypeError, + "PyModule_AddObject() needs non-NULL value"); + return SWIG_ERROR; + } + + dict = PyModule_GetDict(m); + if (dict == NULL) { + /* Internal error -- modules must have a dict! */ + PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", + PyModule_GetName(m)); + return SWIG_ERROR; + } + if (PyDict_SetItemString(dict, name, o)) + return SWIG_ERROR; + Py_DECREF(o); + return SWIG_OK; +} +#endif + +SWIGRUNTIME void +SWIG_Python_DestroyModule(void *vptr) +{ + swig_module_info *swig_module = (swig_module_info *) vptr; + swig_type_info **types = swig_module->types; + size_t i; + for (i =0; i < swig_module->size; ++i) { + swig_type_info *ty = types[i]; + if (ty->owndata) { + PySwigClientData *data = (PySwigClientData *) ty->clientdata; + if (data) PySwigClientData_Del(data); + } + } + Py_DECREF(SWIG_This()); +} + +SWIGRUNTIME void +SWIG_Python_SetModule(swig_module_info *swig_module) { + static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */ + + PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, + swig_empty_runtime_method_table); + PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); + if (pointer && module) { + PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); + } else { + Py_XDECREF(pointer); + } +} + +/* The python cached type query */ +SWIGRUNTIME PyObject * +SWIG_Python_TypeCache(void) { + static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); + return cache; +} + +SWIGRUNTIME swig_type_info * +SWIG_Python_TypeQuery(const char *type) +{ + PyObject *cache = SWIG_Python_TypeCache(); + PyObject *key = PyString_FromString(type); + PyObject *obj = PyDict_GetItem(cache, key); + swig_type_info *descriptor; + if (obj) { + descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); + } else { + swig_module_info *swig_module = SWIG_Python_GetModule(); + descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); + if (descriptor) { + obj = PyCObject_FromVoidPtr(descriptor, NULL); + PyDict_SetItem(cache, key, obj); + Py_DECREF(obj); + } + } + Py_DECREF(key); + return descriptor; +} + +/* + For backward compatibility only +*/ +#define SWIG_POINTER_EXCEPTION 0 +#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) +#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) + +SWIGRUNTIME int +SWIG_Python_AddErrMesg(const char* mesg, int infront) +{ + if (PyErr_Occurred()) { + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + Py_XINCREF(type); + PyErr_Clear(); + if (infront) { + PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str)); + } else { + PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg); + } + Py_DECREF(old_str); + } + return 1; + } else { + return 0; + } +} + +SWIGRUNTIME int +SWIG_Python_ArgFail(int argnum) +{ + if (PyErr_Occurred()) { + /* add information about failing argument */ + char mesg[256]; + PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); + return SWIG_Python_AddErrMesg(mesg, 1); + } else { + return 0; + } +} + +SWIGRUNTIMEINLINE const char * +PySwigObject_GetDesc(PyObject *self) +{ + PySwigObject *v = (PySwigObject *)self; + swig_type_info *ty = v ? v->ty : 0; + return ty ? ty->str : (char*)""; +} + +SWIGRUNTIME void +SWIG_Python_TypeError(const char *type, PyObject *obj) +{ + if (type) { +#if defined(SWIG_COBJECT_TYPES) + if (obj && PySwigObject_Check(obj)) { + const char *otype = (const char *) PySwigObject_GetDesc(obj); + if (otype) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received", + type, otype); + return; + } + } else +#endif + { + const char *otype = (obj ? obj->ob_type->tp_name : 0); + if (otype) { + PyObject *str = PyObject_Str(obj); + const char *cstr = str ? PyString_AsString(str) : 0; + if (cstr) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", + type, otype, cstr); + } else { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", + type, otype); + } + Py_XDECREF(str); + return; + } + } + PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); + } else { + PyErr_Format(PyExc_TypeError, "unexpected type is received"); + } +} + + +/* Convert a pointer value, signal an exception on a type mismatch */ +SWIGRUNTIME void * +SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { + void *result; + if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { + PyErr_Clear(); + if (flags & SWIG_POINTER_EXCEPTION) { + SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); + SWIG_Python_ArgFail(argnum); + } + } + return result; +} + + +#ifdef __cplusplus +#if 0 +{ /* cc-mode */ +#endif +} +#endif + + + +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) + +#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else + + + +/* -------- TYPES TABLE (BEGIN) -------- */ + +#define SWIGTYPE_p_allocator_type swig_types[0] +#define SWIGTYPE_p_boost__shared_ptrT_gr_basic_block_t swig_types[1] +#define SWIGTYPE_p_boost__shared_ptrT_gr_block_detail_t swig_types[2] +#define SWIGTYPE_p_boost__shared_ptrT_gr_block_t swig_types[3] +#define SWIGTYPE_p_boost__shared_ptrT_gr_buffer_reader_t swig_types[4] +#define SWIGTYPE_p_boost__shared_ptrT_gr_buffer_t swig_types[5] +#define SWIGTYPE_p_boost__shared_ptrT_gr_dispatcher_t swig_types[6] +#define SWIGTYPE_p_boost__shared_ptrT_gr_hier_block2_t swig_types[7] +#define SWIGTYPE_p_boost__shared_ptrT_gr_io_signature_t swig_types[8] +#define SWIGTYPE_p_boost__shared_ptrT_gr_message_t swig_types[9] +#define SWIGTYPE_p_boost__shared_ptrT_gr_msg_queue_t swig_types[10] +#define SWIGTYPE_p_boost__shared_ptrT_gr_single_threaded_scheduler_t swig_types[11] +#define SWIGTYPE_p_boost__shared_ptrT_gr_top_block_t swig_types[12] +#define SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t swig_types[13] +#define SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t swig_types[14] +#define SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t swig_types[15] +#define SWIGTYPE_p_char swig_types[16] +#define SWIGTYPE_p_difference_type swig_types[17] +#define SWIGTYPE_p_gr_basic_block swig_types[18] +#define SWIGTYPE_p_gr_block swig_types[19] +#define SWIGTYPE_p_gr_feval_ll swig_types[20] +#define SWIGTYPE_p_gr_hier_block2 swig_types[21] +#define SWIGTYPE_p_gr_sync_block swig_types[22] +#define SWIGTYPE_p_gr_sync_decimator swig_types[23] +#define SWIGTYPE_p_gr_sync_interpolator swig_types[24] +#define SWIGTYPE_p_gr_top_block swig_types[25] +#define SWIGTYPE_p_gruel__rt_status_t swig_types[26] +#define SWIGTYPE_p_gsm_burst swig_types[27] +#define SWIGTYPE_p_gsm_burst_cf swig_types[28] +#define SWIGTYPE_p_gsm_burst_ff swig_types[29] +#define SWIGTYPE_p_gsm_burst_sink_c swig_types[30] +#define SWIGTYPE_p_size_type swig_types[31] +#define SWIGTYPE_p_std__complexT_double_t swig_types[32] +#define SWIGTYPE_p_std__complexT_float_t swig_types[33] +#define SWIGTYPE_p_value_type swig_types[34] +static swig_type_info *swig_types[36]; +static swig_module_info swig_module = {swig_types, 35, 0, 0, 0, 0}; +#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) +#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) + +/* -------- TYPES TABLE (END) -------- */ + +#if (PY_VERSION_HEX <= 0x02000000) +# if !defined(SWIG_PYTHON_CLASSIC) +# error "This python version requires swig to be run with the '-classic' option" +# endif +#endif +#if (PY_VERSION_HEX <= 0x02020000) +# error "This python version requires swig to be run with the '-nomodern' option" +#endif +#if (PY_VERSION_HEX <= 0x02020000) +# error "This python version requires swig to be run with the '-nomodernargs' option" +#endif + +/*----------------------------------------------- + @(target):= _gsm.so + ------------------------------------------------*/ +#define SWIG_init init_gsm + +#define SWIG_name "_gsm" + +#define SWIGVERSION 0x010336 +#define SWIG_VERSION SWIGVERSION + + +#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) + + +#include <stdexcept> + + +namespace swig { + class PyObject_ptr { + protected: + PyObject *_obj; + + public: + PyObject_ptr() :_obj(0) + { + } + + PyObject_ptr(const PyObject_ptr& item) : _obj(item._obj) + { + Py_XINCREF(_obj); + } + + PyObject_ptr(PyObject *obj, bool initial_ref = true) :_obj(obj) + { + if (initial_ref) { + Py_XINCREF(_obj); + } + } + + PyObject_ptr & operator=(const PyObject_ptr& item) + { + Py_XINCREF(item._obj); + Py_XDECREF(_obj); + _obj = item._obj; + return *this; + } + + ~PyObject_ptr() + { + Py_XDECREF(_obj); + } + + operator PyObject *() const + { + return _obj; + } + + PyObject *operator->() const + { + return _obj; + } + }; +} + + +namespace swig { + struct PyObject_var : PyObject_ptr { + PyObject_var(PyObject* obj = 0) : PyObject_ptr(obj, false) { } + + PyObject_var & operator = (PyObject* obj) + { + Py_XDECREF(_obj); + _obj = obj; + return *this; + } + }; +} + + +namespace swig { + struct stop_iteration { + }; + + struct PySwigIterator { + private: + PyObject_ptr _seq; + + protected: + PySwigIterator(PyObject *seq) : _seq(seq) + { + } + + public: + virtual ~PySwigIterator() {} + + // Access iterator method, required by Python + virtual PyObject *value() const = 0; + + // Forward iterator method, required by Python + virtual PySwigIterator *incr(size_t n = 1) = 0; + + // Backward iterator method, very common in C++, but not required in Python + virtual PySwigIterator *decr(size_t /*n*/ = 1) + { + throw stop_iteration(); + } + + // Random access iterator methods, but not required in Python + virtual ptrdiff_t distance(const PySwigIterator &/*x*/) const + { + throw std::invalid_argument("operation not supported"); + } + + virtual bool equal (const PySwigIterator &/*x*/) const + { + throw std::invalid_argument("operation not supported"); + } + + // C++ common/needed methods + virtual PySwigIterator *copy() const = 0; + + PyObject *next() + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads + PyObject *obj = value(); + incr(); + SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads + return obj; + } + + PyObject *previous() + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads + decr(); + PyObject *obj = value(); + SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads + return obj; + } + + PySwigIterator *advance(ptrdiff_t n) + { + return (n > 0) ? incr(n) : decr(-n); + } + + bool operator == (const PySwigIterator& x) const + { + return equal(x); + } + + bool operator != (const PySwigIterator& x) const + { + return ! operator==(x); + } + + PySwigIterator& operator += (ptrdiff_t n) + { + return *advance(n); + } + + PySwigIterator& operator -= (ptrdiff_t n) + { + return *advance(-n); + } + + PySwigIterator* operator + (ptrdiff_t n) const + { + return copy()->advance(n); + } + + PySwigIterator* operator - (ptrdiff_t n) const + { + return copy()->advance(-n); + } + + ptrdiff_t operator - (const PySwigIterator& x) const + { + return x.distance(*this); + } + + static swig_type_info* descriptor() { + static int init = 0; + static swig_type_info* desc = 0; + if (!init) { + desc = SWIG_TypeQuery("swig::PySwigIterator *"); + init = 1; + } + return desc; + } + }; +} + + +namespace swig { + template <class Type> + struct noconst_traits { + typedef Type noconst_type; + }; + + template <class Type> + struct noconst_traits<const Type> { + typedef Type noconst_type; + }; + + /* + type categories + */ + struct pointer_category { }; + struct value_category { }; + + /* + General traits that provides type_name and type_info + */ + template <class Type> struct traits { }; + + template <class Type> + inline const char* type_name() { + return traits<typename noconst_traits<Type >::noconst_type >::type_name(); + } + + template <class Type> + struct traits_info { + static swig_type_info *type_query(std::string name) { + name += " *"; + return SWIG_TypeQuery(name.c_str()); + } + static swig_type_info *type_info() { + static swig_type_info *info = type_query(type_name<Type>()); + return info; + } + }; + + template <class Type> + inline swig_type_info *type_info() { + return traits_info<Type>::type_info(); + } + + /* + Partial specialization for pointers + */ + template <class Type> struct traits <Type *> { + typedef pointer_category category; + static std::string make_ptr_name(const char* name) { + std::string ptrname = name; + ptrname += " *"; + return ptrname; + } + static const char* type_name() { + static std::string name = make_ptr_name(swig::type_name<Type>()); + return name.c_str(); + } + }; + + template <class Type, class Category> + struct traits_as { }; + + template <class Type, class Category> + struct traits_check { }; + +} + + +namespace swig { + /* + Traits that provides the from method + */ + template <class Type> struct traits_from_ptr { + static PyObject *from(Type *val, int owner = 0) { + return SWIG_NewPointerObj(val, type_info<Type>(), owner); + } + }; + + template <class Type> struct traits_from { + static PyObject *from(const Type& val) { + return traits_from_ptr<Type>::from(new Type(val), 1); + } + }; + + template <class Type> struct traits_from<Type *> { + static PyObject *from(Type* val) { + return traits_from_ptr<Type>::from(val, 0); + } + }; + + template <class Type> struct traits_from<const Type *> { + static PyObject *from(const Type* val) { + return traits_from_ptr<Type>::from(const_cast<Type*>(val), 0); + } + }; + + + template <class Type> + inline PyObject *from(const Type& val) { + return traits_from<Type>::from(val); + } + + template <class Type> + inline PyObject *from_ptr(Type* val, int owner) { + return traits_from_ptr<Type>::from(val, owner); + } + + /* + Traits that provides the asval/as/check method + */ + template <class Type> + struct traits_asptr { + static int asptr(PyObject *obj, Type **val) { + Type *p; + int res = (SWIG_ConvertPtr(obj, (void**)&p, type_info<Type>(), 0) == SWIG_OK) ? SWIG_OLDOBJ : 0; + if (SWIG_IsOK(res)) { + if (val) *val = p; + } + return res; + } + }; + + template <class Type> + inline int asptr(PyObject *obj, Type **vptr) { + return traits_asptr<Type>::asptr(obj, vptr); + } + + template <class Type> + struct traits_asval { + static int asval(PyObject *obj, Type *val) { + if (val) { + Type *p = 0; + int res = traits_asptr<Type>::asptr(obj, &p); + if (!SWIG_IsOK(res)) return res; + if (p) { + typedef typename noconst_traits<Type>::noconst_type noconst_type; + *(const_cast<noconst_type*>(val)) = *p; + if (SWIG_IsNewObj(res)){ + delete p; + res = SWIG_DelNewMask(res); + } + return res; + } else { + return SWIG_ERROR; + } + } else { + return traits_asptr<Type>::asptr(obj, (Type **)(0)); + } + } + }; + + template <class Type> struct traits_asval<Type*> { + static int asval(PyObject *obj, Type **val) { + if (val) { + typedef typename noconst_traits<Type>::noconst_type noconst_type; + noconst_type *p = 0; + int res = traits_asptr<noconst_type>::asptr(obj, &p); + if (SWIG_IsOK(res)) { + *(const_cast<noconst_type**>(val)) = p; + } + return res; + } else { + return traits_asptr<Type>::asptr(obj, (Type **)(0)); + } + } + }; + + template <class Type> + inline int asval(PyObject *obj, Type *val) { + return traits_asval<Type>::asval(obj, val); + } + + template <class Type> + struct traits_as<Type, value_category> { + static Type as(PyObject *obj, bool throw_error) { + Type v; + int res = asval(obj, &v); + if (!obj || !SWIG_IsOK(res)) { + if (!PyErr_Occurred()) { + ::SWIG_Error(SWIG_TypeError, swig::type_name<Type>()); + } + if (throw_error) throw std::invalid_argument("bad type"); + } + return v; + } + }; + + template <class Type> + struct traits_as<Type, pointer_category> { + static Type as(PyObject *obj, bool throw_error) { + Type *v = 0; + int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR); + if (SWIG_IsOK(res) && v) { + if (SWIG_IsNewObj(res)) { + Type r(*v); + delete v; + return r; + } else { + return *v; + } + } else { + // Uninitialized return value, no Type() constructor required. + static Type *v_def = (Type*) malloc(sizeof(Type)); + if (!PyErr_Occurred()) { + SWIG_Error(SWIG_TypeError, swig::type_name<Type>()); + } + if (throw_error) throw std::invalid_argument("bad type"); + memset(v_def,0,sizeof(Type)); + return *v_def; + } + } + }; + + template <class Type> + struct traits_as<Type*, pointer_category> { + static Type* as(PyObject *obj, bool throw_error) { + Type *v = 0; + int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR); + if (SWIG_IsOK(res)) { + return v; + } else { + if (!PyErr_Occurred()) { + SWIG_Error(SWIG_TypeError, swig::type_name<Type>()); + } + if (throw_error) throw std::invalid_argument("bad type"); + return 0; + } + } + }; + + template <class Type> + inline Type as(PyObject *obj, bool te = false) { + return traits_as<Type, typename traits<Type>::category>::as(obj, te); + } + + template <class Type> + struct traits_check<Type, value_category> { + static bool check(PyObject *obj) { + int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR; + return SWIG_IsOK(res) ? true : false; + } + }; + + template <class Type> + struct traits_check<Type, pointer_category> { + static bool check(PyObject *obj) { + int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR; + return SWIG_IsOK(res) ? true : false; + } + }; + + template <class Type> + inline bool check(PyObject *obj) { + return traits_check<Type, typename traits<Type>::category>::check(obj); + } +} + + +#include <functional> + +namespace std { + template <> + struct less <PyObject *>: public binary_function<PyObject *, PyObject *, bool> + { + bool + operator()(PyObject * v, PyObject *w) const + { + bool res; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + res = PyObject_Compare(v, w) < 0; + SWIG_PYTHON_THREAD_END_BLOCK; + return res; + } + }; + + template <> + struct less <swig::PyObject_ptr>: public binary_function<swig::PyObject_ptr, swig::PyObject_ptr, bool> + { + bool + operator()(const swig::PyObject_ptr& v, const swig::PyObject_ptr& w) const + { + return std::less<PyObject *>()(v, w); + } + }; + + template <> + struct less <swig::PyObject_var>: public binary_function<swig::PyObject_var, swig::PyObject_var, bool> + { + bool + operator()(const swig::PyObject_var& v, const swig::PyObject_var& w) const + { + return std::less<PyObject *>()(v, w); + } + }; + +} + +namespace swig { + template <> struct traits<PyObject *> { + typedef value_category category; + static const char* type_name() { return "PyObject *"; } + }; + + template <> struct traits_asval<PyObject * > { + typedef PyObject * value_type; + static int asval(PyObject *obj, value_type *val) { + if (val) *val = obj; + return SWIG_OK; + } + }; + + template <> + struct traits_check<PyObject *, value_category> { + static bool check(PyObject *) { + return true; + } + }; + + template <> struct traits_from<PyObject *> { + typedef PyObject * value_type; + static PyObject *from(const value_type& val) { + Py_XINCREF(val); + return val; + } + }; + +} + +namespace swig { + inline size_t + check_index(ptrdiff_t i, size_t size, bool insert = false) { + if ( i < 0 ) { + if ((size_t) (-i) <= size) + return (size_t) (i + size); + } else if ( (size_t) i < size ) { + return (size_t) i; + } else if (insert && ((size_t) i == size)) { + return size; + } + + throw std::out_of_range("index out of range"); + } + + inline size_t + slice_index(ptrdiff_t i, size_t size) { + if ( i < 0 ) { + if ((size_t) (-i) <= size) { + return (size_t) (i + size); + } else { + throw std::out_of_range("index out of range"); + } + } else { + return ( (size_t) i < size ) ? ((size_t) i) : size; + } + } + + template <class Sequence, class Difference> + inline typename Sequence::iterator + getpos(Sequence* self, Difference i) { + typename Sequence::iterator pos = self->begin(); + std::advance(pos, check_index(i,self->size())); + return pos; + } + + template <class Sequence, class Difference> + inline typename Sequence::const_iterator + cgetpos(const Sequence* self, Difference i) { + typename Sequence::const_iterator pos = self->begin(); + std::advance(pos, check_index(i,self->size())); + return pos; + } + + template <class Sequence, class Difference> + inline Sequence* + getslice(const Sequence* self, Difference i, Difference j) { + typename Sequence::size_type size = self->size(); + typename Sequence::size_type ii = swig::check_index(i, size); + typename Sequence::size_type jj = swig::slice_index(j, size); + + if (jj > ii) { + typename Sequence::const_iterator vb = self->begin(); + typename Sequence::const_iterator ve = self->begin(); + std::advance(vb,ii); + std::advance(ve,jj); + return new Sequence(vb, ve); + } else { + return new Sequence(); + } + } + + template <class Sequence, class Difference, class InputSeq> + inline void + setslice(Sequence* self, Difference i, Difference j, const InputSeq& v) { + typename Sequence::size_type size = self->size(); + typename Sequence::size_type ii = swig::check_index(i, size, true); + typename Sequence::size_type jj = swig::slice_index(j, size); + if (jj < ii) jj = ii; + size_t ssize = jj - ii; + if (ssize <= v.size()) { + typename Sequence::iterator sb = self->begin(); + typename InputSeq::const_iterator vmid = v.begin(); + std::advance(sb,ii); + std::advance(vmid, jj - ii); + self->insert(std::copy(v.begin(), vmid, sb), vmid, v.end()); + } else { + typename Sequence::iterator sb = self->begin(); + typename Sequence::iterator se = self->begin(); + std::advance(sb,ii); + std::advance(se,jj); + self->erase(sb,se); + self->insert(sb, v.begin(), v.end()); + } + } + + template <class Sequence, class Difference> + inline void + delslice(Sequence* self, Difference i, Difference j) { + typename Sequence::size_type size = self->size(); + typename Sequence::size_type ii = swig::check_index(i, size, true); + typename Sequence::size_type jj = swig::slice_index(j, size); + if (jj > ii) { + typename Sequence::iterator sb = self->begin(); + typename Sequence::iterator se = self->begin(); + std::advance(sb,ii); + std::advance(se,jj); + self->erase(sb,se); + } + } +} + + +#if defined(__SUNPRO_CC) && defined(_RWSTD_VER) +# if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL) +# define SWIG_STD_NOITERATOR_TRAITS_STL +# endif +#endif + +#if !defined(SWIG_STD_NOITERATOR_TRAITS_STL) +#include <iterator> +#else +namespace std { + template <class Iterator> + struct iterator_traits { + typedef ptrdiff_t difference_type; + typedef typename Iterator::value_type value_type; + }; + + template <class Iterator, class Category,class T, class Reference, class Pointer, class Distance> + struct iterator_traits<__reverse_bi_iterator<Iterator,Category,T,Reference,Pointer,Distance> > { + typedef Distance difference_type; + typedef T value_type; + }; + + template <class T> + struct iterator_traits<T*> { + typedef T value_type; + typedef ptrdiff_t difference_type; + }; + + template<typename _InputIterator> + inline typename iterator_traits<_InputIterator>::difference_type + distance(_InputIterator __first, _InputIterator __last) + { + typename iterator_traits<_InputIterator>::difference_type __n = 0; + while (__first != __last) { + ++__first; ++__n; + } + return __n; + } +} +#endif + + +namespace swig { + template<typename OutIterator> + class PySwigIterator_T : public PySwigIterator + { + public: + typedef OutIterator out_iterator; + typedef typename std::iterator_traits<out_iterator>::value_type value_type; + typedef PySwigIterator_T<out_iterator> self_type; + + PySwigIterator_T(out_iterator curr, PyObject *seq) + : PySwigIterator(seq), current(curr) + { + } + + const out_iterator& get_current() const + { + return current; + } + + + bool equal (const PySwigIterator &iter) const + { + const self_type *iters = dynamic_cast<const self_type *>(&iter); + if (iters) { + return (current == iters->get_current()); + } else { + throw std::invalid_argument("bad iterator type"); + } + } + + ptrdiff_t distance(const PySwigIterator &iter) const + { + const self_type *iters = dynamic_cast<const self_type *>(&iter); + if (iters) { + return std::distance(current, iters->get_current()); + } else { + throw std::invalid_argument("bad iterator type"); + } + } + + protected: + out_iterator current; + }; + + template <class ValueType> + struct from_oper + { + typedef const ValueType& argument_type; + typedef PyObject *result_type; + result_type operator()(argument_type v) const + { + return swig::from(v); + } + }; + + template<typename OutIterator, + typename ValueType = typename std::iterator_traits<OutIterator>::value_type, + typename FromOper = from_oper<ValueType> > + class PySwigIteratorOpen_T : public PySwigIterator_T<OutIterator> + { + public: + FromOper from; + typedef OutIterator out_iterator; + typedef ValueType value_type; + typedef PySwigIterator_T<out_iterator> base; + typedef PySwigIteratorOpen_T<OutIterator, ValueType, FromOper> self_type; + + PySwigIteratorOpen_T(out_iterator curr, PyObject *seq) + : PySwigIterator_T<OutIterator>(curr, seq) + { + } + + PyObject *value() const { + return from(static_cast<const value_type&>(*(base::current))); + } + + PySwigIterator *copy() const + { + return new self_type(*this); + } + + PySwigIterator *incr(size_t n = 1) + { + while (n--) { + ++base::current; + } + return this; + } + + PySwigIterator *decr(size_t n = 1) + { + while (n--) { + --base::current; + } + return this; + } + }; + + template<typename OutIterator, + typename ValueType = typename std::iterator_traits<OutIterator>::value_type, + typename FromOper = from_oper<ValueType> > + class PySwigIteratorClosed_T : public PySwigIterator_T<OutIterator> + { + public: + FromOper from; + typedef OutIterator out_iterator; + typedef ValueType value_type; + typedef PySwigIterator_T<out_iterator> base; + typedef PySwigIteratorClosed_T<OutIterator, ValueType, FromOper> self_type; + + PySwigIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq) + : PySwigIterator_T<OutIterator>(curr, seq), begin(first), end(last) + { + } + + PyObject *value() const { + if (base::current == end) { + throw stop_iteration(); + } else { + return from(static_cast<const value_type&>(*(base::current))); + } + } + + PySwigIterator *copy() const + { + return new self_type(*this); + } + + PySwigIterator *incr(size_t n = 1) + { + while (n--) { + if (base::current == end) { + throw stop_iteration(); + } else { + ++base::current; + } + } + return this; + } + + PySwigIterator *decr(size_t n = 1) + { + while (n--) { + if (base::current == begin) { + throw stop_iteration(); + } else { + --base::current; + } + } + return this; + } + + private: + out_iterator begin; + out_iterator end; + }; + + template<typename OutIter> + inline PySwigIterator* + make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0) + { + return new PySwigIteratorClosed_T<OutIter>(current, begin, end, seq); + } + + template<typename OutIter> + inline PySwigIterator* + make_output_iterator(const OutIter& current, PyObject *seq = 0) + { + return new PySwigIteratorOpen_T<OutIter>(current, seq); + } +} + + +namespace swig +{ + template <class T> + struct PySequence_Ref + { + PySequence_Ref(PyObject* seq, int index) + : _seq(seq), _index(index) + { + } + + operator T () const + { + swig::PyObject_var item = PySequence_GetItem(_seq, _index); + try { + return swig::as<T>(item, true); + } catch (std::exception& e) { + char msg[1024]; + sprintf(msg, "in sequence element %d ", _index); + if (!PyErr_Occurred()) { + ::SWIG_Error(SWIG_TypeError, swig::type_name<T>()); + } + SWIG_Python_AddErrorMsg(msg); + SWIG_Python_AddErrorMsg(e.what()); + throw; + } + } + + PySequence_Ref& operator=(const T& v) + { + PySequence_SetItem(_seq, _index, swig::from<T>(v)); + return *this; + } + + private: + PyObject* _seq; + int _index; + }; + + template <class T> + struct PySequence_ArrowProxy + { + PySequence_ArrowProxy(const T& x): m_value(x) {} + const T* operator->() const { return &m_value; } + operator const T*() const { return &m_value; } + T m_value; + }; + + template <class T, class Reference > + struct PySequence_InputIterator + { + typedef PySequence_InputIterator<T, Reference > self; + + typedef std::random_access_iterator_tag iterator_category; + typedef Reference reference; + typedef T value_type; + typedef T* pointer; + typedef int difference_type; + + PySequence_InputIterator() + { + } + + PySequence_InputIterator(PyObject* seq, int index) + : _seq(seq), _index(index) + { + } + + reference operator*() const + { + return reference(_seq, _index); + } + + PySequence_ArrowProxy<T> + operator->() const { + return PySequence_ArrowProxy<T>(operator*()); + } + + bool operator==(const self& ri) const + { + return (_index == ri._index) && (_seq == ri._seq); + } + + bool operator!=(const self& ri) const + { + return !(operator==(ri)); + } + + self& operator ++ () + { + ++_index; + return *this; + } + + self& operator -- () + { + --_index; + return *this; + } + + self& operator += (difference_type n) + { + _index += n; + return *this; + } + + self operator +(difference_type n) const + { + return self(_seq, _index + n); + } + + self& operator -= (difference_type n) + { + _index -= n; + return *this; + } + + self operator -(difference_type n) const + { + return self(_seq, _index - n); + } + + difference_type operator - (const self& ri) const + { + return _index - ri._index; + } + + bool operator < (const self& ri) const + { + return _index < ri._index; + } + + reference + operator[](difference_type n) const + { + return reference(_seq, _index + n); + } + + private: + PyObject* _seq; + difference_type _index; + }; + + template <class T> + struct PySequence_Cont + { + typedef PySequence_Ref<T> reference; + typedef const PySequence_Ref<T> const_reference; + typedef T value_type; + typedef T* pointer; + typedef int difference_type; + typedef int size_type; + typedef const pointer const_pointer; + typedef PySequence_InputIterator<T, reference> iterator; + typedef PySequence_InputIterator<T, const_reference> const_iterator; + + PySequence_Cont(PyObject* seq) : _seq(0) + { + if (!PySequence_Check(seq)) { + throw std::invalid_argument("a sequence is expected"); + } + _seq = seq; + Py_INCREF(_seq); + } + + ~PySequence_Cont() + { + Py_XDECREF(_seq); + } + + size_type size() const + { + return static_cast<size_type>(PySequence_Size(_seq)); + } + + bool empty() const + { + return size() == 0; + } + + iterator begin() + { + return iterator(_seq, 0); + } + + const_iterator begin() const + { + return const_iterator(_seq, 0); + } + + iterator end() + { + return iterator(_seq, size()); + } + + const_iterator end() const + { + return const_iterator(_seq, size()); + } + + reference operator[](difference_type n) + { + return reference(_seq, n); + } + + const_reference operator[](difference_type n) const + { + return const_reference(_seq, n); + } + + bool check(bool set_err = true) const + { + int s = size(); + for (int i = 0; i < s; ++i) { + swig::PyObject_var item = PySequence_GetItem(_seq, i); + if (!swig::check<value_type>(item)) { + if (set_err) { + char msg[1024]; + sprintf(msg, "in sequence element %d", i); + SWIG_Error(SWIG_RuntimeError, msg); + } + return false; + } + } + return true; + } + + private: + PyObject* _seq; + }; + +} + + +#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix +//#include "gsm_constants.h" +//#include "gsm_burst.h" +#include "gsm_burst_ff.h" +#include "gsm_burst_cf.h" +#include "gsm_burst_sink_c.h" +//#include <stdexcept> + + + + #define SWIG_From_long PyInt_FromLong + + +SWIGINTERNINLINE PyObject * +SWIG_From_int (int value) +{ + return SWIG_From_long (value); +} + + +SWIGINTERN int +SWIG_AsVal_double (PyObject *obj, double *val) +{ + int res = SWIG_TypeError; + if (PyFloat_Check(obj)) { + if (val) *val = PyFloat_AsDouble(obj); + return SWIG_OK; + } else if (PyInt_Check(obj)) { + if (val) *val = PyInt_AsLong(obj); + return SWIG_OK; + } else if (PyLong_Check(obj)) { + double v = PyLong_AsDouble(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + double d = PyFloat_AsDouble(obj); + if (!PyErr_Occurred()) { + if (val) *val = d; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); + } else { + PyErr_Clear(); + } + } + } +#endif + return res; +} + + +#include <float.h> + + +#include <math.h> + + +SWIGINTERNINLINE int +SWIG_CanCastAsInteger(double *d, double min, double max) { + double x = *d; + if ((min <= x && x <= max)) { + double fx = floor(x); + double cx = ceil(x); + double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ + if ((errno == EDOM) || (errno == ERANGE)) { + errno = 0; + } else { + double summ, reps, diff; + if (rd < x) { + diff = x - rd; + } else if (rd > x) { + diff = rd - x; + } else { + return 1; + } + summ = rd + x; + reps = diff/summ; + if (reps < 8*DBL_EPSILON) { + *d = rd; + return 1; + } + } + } + return 0; +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) +{ + if (PyInt_Check(obj)) { + long v = PyInt_AsLong(obj); + if (v >= 0) { + if (val) *val = v; + return SWIG_OK; + } else { + return SWIG_OverflowError; + } + } else if (PyLong_Check(obj)) { + unsigned long v = PyLong_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + unsigned long v = PyLong_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { + if (val) *val = (unsigned long)(d); + return res; + } + } + } +#endif + return SWIG_TypeError; +} + + +SWIGINTERNINLINE PyObject* +SWIG_From_unsigned_SS_long (unsigned long value) +{ + return (value > LONG_MAX) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); +} + + +#include <limits.h> +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif + + +SWIGINTERN int +SWIG_AsVal_long (PyObject *obj, long* val) +{ + if (PyInt_Check(obj)) { + if (val) *val = PyInt_AsLong(obj); + return SWIG_OK; + } else if (PyLong_Check(obj)) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + long v = PyInt_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { + if (val) *val = (long)(d); + return res; + } + } + } +#endif + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsVal_int (PyObject * obj, int *val) +{ + long v; + int res = SWIG_AsVal_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v < INT_MIN || v > INT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< int >(v); + } + } + return res; +} + + + #define SWIG_From_double PyFloat_FromDouble + + +SWIGINTERNINLINE PyObject * +SWIG_From_float (float value) +{ + return SWIG_From_double (value); +} + + +SWIGINTERNINLINE PyObject * +SWIG_From_unsigned_SS_int (unsigned int value) +{ + return SWIG_From_unsigned_SS_long (value); +} + + +SWIGINTERNINLINE PyObject* + SWIG_From_bool (bool value) +{ + return PyBool_FromLong(value ? 1 : 0); +} + + +SWIGINTERN swig_type_info* +SWIG_pchar_descriptor(void) +{ + static int init = 0; + static swig_type_info* info = 0; + if (!init) { + info = SWIG_TypeQuery("_p_char"); + init = 1; + } + return info; +} + + +SWIGINTERNINLINE PyObject * +SWIG_FromCharPtrAndSize(const char* carray, size_t size) +{ + if (carray) { + if (size > INT_MAX) { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + return pchar_descriptor ? + SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); + } else { + return PyString_FromStringAndSize(carray, static_cast< int >(size)); + } + } else { + return SWIG_Py_Void(); + } +} + + +SWIGINTERNINLINE PyObject * +SWIG_From_std_string (const std::string& s) +{ + if (s.size()) { + return SWIG_FromCharPtrAndSize(s.data(), s.size()); + } else { + return SWIG_FromCharPtrAndSize(s.c_str(), 0); + } +} + + + gr_block_sptr gsm_burst_ff_block (gsm_burst_ff_sptr r) + { + return gr_block_sptr (r); + } + + + gr_block_sptr gsm_burst_cf_block (gsm_burst_cf_sptr r) + { + return gr_block_sptr (r); + } + + +SWIGINTERN int +SWIG_AsVal_float (PyObject * obj, float *val) +{ + double v; + int res = SWIG_AsVal_double (obj, &v); + if (SWIG_IsOK(res)) { + if ((v < -FLT_MAX || v > FLT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< float >(v); + } + } + return res; +} + + + gr_block_sptr gsm_burst_sink_c_block (gsm_burst_sink_c_sptr r) + { + return gr_block_sptr (r); + } + +#ifdef __cplusplus +extern "C" { +#endif +SWIGINTERN PyObject *_wrap_delete_gsm_burst(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"delete_gsm_burst",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_gsm_burst" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_clock_options_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + unsigned long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_clock_options_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_clock_options_set" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_d_clock_options_set" "', argument " "2"" of type '" "unsigned long""'"); + } + arg2 = static_cast< unsigned long >(val2); + if (arg1) (arg1)->d_clock_options = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_clock_options_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + unsigned long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_clock_options_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_clock_options_get" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + result = (unsigned long) ((arg1)->d_clock_options); + resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_print_options_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + unsigned long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_print_options_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_print_options_set" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_d_print_options_set" "', argument " "2"" of type '" "unsigned long""'"); + } + arg2 = static_cast< unsigned long >(val2); + if (arg1) (arg1)->d_print_options = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_print_options_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + unsigned long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_print_options_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_print_options_get" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + result = (unsigned long) ((arg1)->d_print_options); + resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_test_options_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + unsigned long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_test_options_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_test_options_set" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_d_test_options_set" "', argument " "2"" of type '" "unsigned long""'"); + } + arg2 = static_cast< unsigned long >(val2); + if (arg1) (arg1)->d_test_options = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_test_options_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + unsigned long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_test_options_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_test_options_get" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + result = (unsigned long) ((arg1)->d_test_options); + resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_equalizer_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + EQ_TYPE arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_equalizer_type_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_equalizer_type_set" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_d_equalizer_type_set" "', argument " "2"" of type '" "EQ_TYPE""'"); + } + arg2 = static_cast< EQ_TYPE >(val2); + if (arg1) (arg1)->d_equalizer_type = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_equalizer_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + EQ_TYPE result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_equalizer_type_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_equalizer_type_get" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + result = (EQ_TYPE) ((arg1)->d_equalizer_type); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_sync_loss_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_sync_loss_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_sync_loss_count_set" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_d_sync_loss_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (arg1)->d_sync_loss_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_sync_loss_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_sync_loss_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_sync_loss_count_get" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + result = (long) ((arg1)->d_sync_loss_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_fcch_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_fcch_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_fcch_count_set" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_d_fcch_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (arg1)->d_fcch_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_fcch_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_fcch_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_fcch_count_get" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + result = (long) ((arg1)->d_fcch_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_part_sch_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_part_sch_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_part_sch_count_set" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_d_part_sch_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (arg1)->d_part_sch_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_part_sch_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_part_sch_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_part_sch_count_get" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + result = (long) ((arg1)->d_part_sch_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_sch_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_sch_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_sch_count_set" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_d_sch_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (arg1)->d_sch_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_sch_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_sch_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_sch_count_get" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + result = (long) ((arg1)->d_sch_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_normal_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_normal_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_normal_count_set" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_d_normal_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (arg1)->d_normal_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_normal_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_normal_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_normal_count_get" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + result = (long) ((arg1)->d_normal_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_dummy_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_dummy_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_dummy_count_set" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_d_dummy_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (arg1)->d_dummy_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_dummy_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_dummy_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_dummy_count_get" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + result = (long) ((arg1)->d_dummy_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_unknown_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_unknown_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_unknown_count_set" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_d_unknown_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (arg1)->d_unknown_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_unknown_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_unknown_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_unknown_count_get" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + result = (long) ((arg1)->d_unknown_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_total_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_total_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_total_count_set" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_d_total_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (arg1)->d_total_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_total_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_total_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_total_count_get" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + result = (long) ((arg1)->d_total_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_next_arfcn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_next_arfcn_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_next_arfcn_set" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_next_arfcn_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (arg1)->next_arfcn = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_next_arfcn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_next_arfcn_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_next_arfcn_get" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + result = (long) ((arg1)->next_arfcn); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_hop_good_arfcn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_hop_good_arfcn_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_hop_good_arfcn_set" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_d_hop_good_arfcn_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (arg1)->d_hop_good_arfcn = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_hop_good_arfcn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_hop_good_arfcn_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_hop_good_arfcn_get" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + result = (long) ((arg1)->d_hop_good_arfcn); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_hop_bad_arfcn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_hop_bad_arfcn_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_hop_bad_arfcn_set" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_d_hop_bad_arfcn_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (arg1)->d_hop_bad_arfcn = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_d_hop_bad_arfcn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_d_hop_bad_arfcn_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_d_hop_bad_arfcn_get" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + result = (long) ((arg1)->d_hop_bad_arfcn); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sync_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sync_state",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sync_state" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + result = (int)(arg1)->sync_state(); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_last_freq_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + float result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_last_freq_offset",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_last_freq_offset" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + result = (float)(arg1)->last_freq_offset(); + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_mean_freq_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + float result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_mean_freq_offset",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_mean_freq_offset" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + result = (float)(arg1)->mean_freq_offset(); + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_full_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst *arg1 = (gsm_burst *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_full_reset",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_full_reset" "', argument " "1"" of type '" "gsm_burst *""'"); + } + arg1 = reinterpret_cast< gsm_burst * >(argp1); + (arg1)->full_reset(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *gsm_burst_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_gsm_burst, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_gsm_burst_ff_sptr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"new_gsm_burst_ff_sptr",0,0)) SWIG_fail; + result = (boost::shared_ptr< gsm_burst_ff > *)new boost::shared_ptr< gsm_burst_ff >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_gsm_burst_ff_sptr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst_ff *arg1 = (gsm_burst_ff *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + boost::shared_ptr< gsm_burst_ff > *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"new_gsm_burst_ff_sptr",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst_ff, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_gsm_burst_ff_sptr" "', argument " "1"" of type '" "gsm_burst_ff *""'"); + } + arg1 = reinterpret_cast< gsm_burst_ff * >(argp1); + result = (boost::shared_ptr< gsm_burst_ff > *)new boost::shared_ptr< gsm_burst_ff >(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_gsm_burst_ff_sptr(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = (int)PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_gsm_burst_ff_sptr__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_gsm_burst_ff, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_gsm_burst_ff_sptr__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_gsm_burst_ff_sptr'.\n" + " Possible C/C++ prototypes are:\n" + " boost::shared_ptr< gsm_burst_ff >()\n" + " boost::shared_ptr< gsm_burst_ff >(gsm_burst_ff *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + gsm_burst_ff *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr___deref__",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr___deref__" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (gsm_burst_ff *)(arg1)->operator ->(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gsm_burst_ff, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_gsm_burst_ff_sptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"delete_gsm_burst_ff_sptr",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_gsm_burst_ff_sptr" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_history(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + unsigned int result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_history",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_history" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (unsigned int)(*arg1)->history(); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_output_multiple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_output_multiple",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_output_multiple" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (int)(*arg1)->output_multiple(); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_relative_rate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + double result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_relative_rate",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_relative_rate" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (double)(*arg1)->relative_rate(); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_start(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + bool result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_start",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_start" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (bool)(*arg1)->start(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_stop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + bool result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_stop",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_stop" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (bool)(*arg1)->stop(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_detail(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + gr_block_detail_sptr result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_detail",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_detail" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (*arg1)->detail(); + resultobj = SWIG_NewPointerObj((new gr_block_detail_sptr(static_cast< const gr_block_detail_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_block_detail_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_set_detail(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + gr_block_detail_sptr arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_set_detail",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_set_detail" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_boost__shared_ptrT_gr_block_detail_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsm_burst_ff_sptr_set_detail" "', argument " "2"" of type '" "gr_block_detail_sptr""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsm_burst_ff_sptr_set_detail" "', argument " "2"" of type '" "gr_block_detail_sptr""'"); + } else { + gr_block_detail_sptr * temp = reinterpret_cast< gr_block_detail_sptr * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + (*arg1)->set_detail(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + std::string result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_name",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_name" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (*arg1)->name(); + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_input_signature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + gr_io_signature_sptr result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_input_signature",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_input_signature" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (*arg1)->input_signature(); + resultobj = SWIG_NewPointerObj((new gr_io_signature_sptr(static_cast< const gr_io_signature_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_io_signature_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_output_signature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + gr_io_signature_sptr result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_output_signature",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_output_signature" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (*arg1)->output_signature(); + resultobj = SWIG_NewPointerObj((new gr_io_signature_sptr(static_cast< const gr_io_signature_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_io_signature_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_unique_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_unique_id",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_unique_id" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (long)(*arg1)->unique_id(); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_basic_block(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + gr_basic_block_sptr result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_basic_block",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_basic_block" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (*arg1)->basic_block(); + resultobj = SWIG_NewPointerObj((new gr_basic_block_sptr(static_cast< const gr_basic_block_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_basic_block_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_check_topology(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + int arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + bool result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_check_topology",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_check_topology" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_ff_sptr_check_topology" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gsm_burst_ff_sptr_check_topology" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (bool)(*arg1)->check_topology(arg2,arg3); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_clock_options_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + unsigned long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_clock_options_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_clock_options_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_ff_sptr_d_clock_options_set" "', argument " "2"" of type '" "unsigned long""'"); + } + arg2 = static_cast< unsigned long >(val2); + if (arg1) (*arg1)->d_clock_options = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_clock_options_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + unsigned long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_clock_options_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_clock_options_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (unsigned long) ((*arg1)->d_clock_options); + resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_print_options_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + unsigned long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_print_options_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_print_options_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_ff_sptr_d_print_options_set" "', argument " "2"" of type '" "unsigned long""'"); + } + arg2 = static_cast< unsigned long >(val2); + if (arg1) (*arg1)->d_print_options = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_print_options_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + unsigned long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_print_options_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_print_options_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (unsigned long) ((*arg1)->d_print_options); + resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_test_options_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + unsigned long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_test_options_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_test_options_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_ff_sptr_d_test_options_set" "', argument " "2"" of type '" "unsigned long""'"); + } + arg2 = static_cast< unsigned long >(val2); + if (arg1) (*arg1)->d_test_options = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_test_options_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + unsigned long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_test_options_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_test_options_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (unsigned long) ((*arg1)->d_test_options); + resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_equalizer_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + EQ_TYPE arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_equalizer_type_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_equalizer_type_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_ff_sptr_d_equalizer_type_set" "', argument " "2"" of type '" "EQ_TYPE""'"); + } + arg2 = static_cast< EQ_TYPE >(val2); + if (arg1) (*arg1)->d_equalizer_type = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_equalizer_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + EQ_TYPE result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_equalizer_type_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_equalizer_type_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (EQ_TYPE) ((*arg1)->d_equalizer_type); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_sync_loss_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_sync_loss_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_sync_loss_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_ff_sptr_d_sync_loss_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_sync_loss_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_sync_loss_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_sync_loss_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_sync_loss_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (long) ((*arg1)->d_sync_loss_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_fcch_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_fcch_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_fcch_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_ff_sptr_d_fcch_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_fcch_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_fcch_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_fcch_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_fcch_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (long) ((*arg1)->d_fcch_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_part_sch_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_part_sch_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_part_sch_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_ff_sptr_d_part_sch_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_part_sch_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_part_sch_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_part_sch_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_part_sch_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (long) ((*arg1)->d_part_sch_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_sch_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_sch_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_sch_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_ff_sptr_d_sch_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_sch_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_sch_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_sch_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_sch_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (long) ((*arg1)->d_sch_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_normal_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_normal_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_normal_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_ff_sptr_d_normal_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_normal_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_normal_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_normal_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_normal_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (long) ((*arg1)->d_normal_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_dummy_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_dummy_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_dummy_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_ff_sptr_d_dummy_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_dummy_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_dummy_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_dummy_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_dummy_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (long) ((*arg1)->d_dummy_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_unknown_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_unknown_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_unknown_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_ff_sptr_d_unknown_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_unknown_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_unknown_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_unknown_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_unknown_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (long) ((*arg1)->d_unknown_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_total_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_total_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_total_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_ff_sptr_d_total_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_total_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_total_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_total_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_total_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (long) ((*arg1)->d_total_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_next_arfcn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_next_arfcn_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_next_arfcn_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_ff_sptr_next_arfcn_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->next_arfcn = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_next_arfcn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_next_arfcn_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_next_arfcn_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (long) ((*arg1)->next_arfcn); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_hop_good_arfcn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_hop_good_arfcn_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_hop_good_arfcn_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_ff_sptr_d_hop_good_arfcn_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_hop_good_arfcn = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_hop_good_arfcn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_hop_good_arfcn_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_hop_good_arfcn_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (long) ((*arg1)->d_hop_good_arfcn); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_hop_bad_arfcn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_hop_bad_arfcn_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_hop_bad_arfcn_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_ff_sptr_d_hop_bad_arfcn_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_hop_bad_arfcn = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_d_hop_bad_arfcn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_d_hop_bad_arfcn_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_d_hop_bad_arfcn_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (long) ((*arg1)->d_hop_bad_arfcn); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_sync_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_sync_state",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_sync_state" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (int)(*arg1)->sync_state(); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_last_freq_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + float result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_last_freq_offset",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_last_freq_offset" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (float)(*arg1)->last_freq_offset(); + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_mean_freq_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + float result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_mean_freq_offset",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_mean_freq_offset" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + result = (float)(*arg1)->mean_freq_offset(); + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_sptr_full_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_ff > *arg1 = (boost::shared_ptr< gsm_burst_ff > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_sptr_full_reset",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_sptr_full_reset" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_ff > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_ff > * >(argp1); + (*arg1)->full_reset(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *gsm_burst_ff_sptr_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_gsm_burst_ff_block(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst_ff_sptr arg1 ; + void *argp1 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + gr_block_sptr result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_ff_block",1,1,&obj0)) SWIG_fail; + { + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_ff_block" "', argument " "1"" of type '" "gsm_burst_ff_sptr""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsm_burst_ff_block" "', argument " "1"" of type '" "gsm_burst_ff_sptr""'"); + } else { + gsm_burst_ff_sptr * temp = reinterpret_cast< gsm_burst_ff_sptr * >(argp1); + arg1 = *temp; + if (SWIG_IsNewObj(res1)) delete temp; + } + } + result = gsm_burst_ff_block(arg1); + resultobj = SWIG_NewPointerObj((new gr_block_sptr(static_cast< const gr_block_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_block_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_burst_ff(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gr_feval_ll *arg1 = (gr_feval_ll *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + gsm_burst_ff_sptr result; + + if(!PyArg_UnpackTuple(args,(char *)"burst_ff",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gr_feval_ll, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "burst_ff" "', argument " "1"" of type '" "gr_feval_ll *""'"); + } + arg1 = reinterpret_cast< gr_feval_ll * >(argp1); + result = gsm_make_burst_ff(arg1); + resultobj = SWIG_NewPointerObj((new gsm_burst_ff_sptr(static_cast< const gsm_burst_ff_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gsm_burst_ff_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_gsm_burst_cf_sptr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"new_gsm_burst_cf_sptr",0,0)) SWIG_fail; + result = (boost::shared_ptr< gsm_burst_cf > *)new boost::shared_ptr< gsm_burst_cf >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_gsm_burst_cf_sptr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst_cf *arg1 = (gsm_burst_cf *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + boost::shared_ptr< gsm_burst_cf > *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"new_gsm_burst_cf_sptr",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst_cf, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_gsm_burst_cf_sptr" "', argument " "1"" of type '" "gsm_burst_cf *""'"); + } + arg1 = reinterpret_cast< gsm_burst_cf * >(argp1); + result = (boost::shared_ptr< gsm_burst_cf > *)new boost::shared_ptr< gsm_burst_cf >(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_gsm_burst_cf_sptr(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = (int)PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_gsm_burst_cf_sptr__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_gsm_burst_cf, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_gsm_burst_cf_sptr__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_gsm_burst_cf_sptr'.\n" + " Possible C/C++ prototypes are:\n" + " boost::shared_ptr< gsm_burst_cf >()\n" + " boost::shared_ptr< gsm_burst_cf >(gsm_burst_cf *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + gsm_burst_cf *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr___deref__",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr___deref__" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (gsm_burst_cf *)(arg1)->operator ->(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gsm_burst_cf, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_gsm_burst_cf_sptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"delete_gsm_burst_cf_sptr",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_gsm_burst_cf_sptr" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_get_omega(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + float result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_get_omega",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_get_omega" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (float)(*arg1)->get_omega(); + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_history(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + unsigned int result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_history",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_history" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (unsigned int)(*arg1)->history(); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_output_multiple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_output_multiple",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_output_multiple" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (int)(*arg1)->output_multiple(); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_relative_rate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + double result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_relative_rate",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_relative_rate" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (double)(*arg1)->relative_rate(); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_start(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + bool result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_start",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_start" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (bool)(*arg1)->start(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_stop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + bool result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_stop",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_stop" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (bool)(*arg1)->stop(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_detail(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + gr_block_detail_sptr result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_detail",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_detail" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (*arg1)->detail(); + resultobj = SWIG_NewPointerObj((new gr_block_detail_sptr(static_cast< const gr_block_detail_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_block_detail_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_set_detail(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + gr_block_detail_sptr arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_set_detail",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_set_detail" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_boost__shared_ptrT_gr_block_detail_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsm_burst_cf_sptr_set_detail" "', argument " "2"" of type '" "gr_block_detail_sptr""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsm_burst_cf_sptr_set_detail" "', argument " "2"" of type '" "gr_block_detail_sptr""'"); + } else { + gr_block_detail_sptr * temp = reinterpret_cast< gr_block_detail_sptr * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + (*arg1)->set_detail(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + std::string result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_name",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_name" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (*arg1)->name(); + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_input_signature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + gr_io_signature_sptr result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_input_signature",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_input_signature" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (*arg1)->input_signature(); + resultobj = SWIG_NewPointerObj((new gr_io_signature_sptr(static_cast< const gr_io_signature_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_io_signature_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_output_signature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + gr_io_signature_sptr result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_output_signature",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_output_signature" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (*arg1)->output_signature(); + resultobj = SWIG_NewPointerObj((new gr_io_signature_sptr(static_cast< const gr_io_signature_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_io_signature_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_unique_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_unique_id",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_unique_id" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (long)(*arg1)->unique_id(); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_basic_block(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + gr_basic_block_sptr result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_basic_block",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_basic_block" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (*arg1)->basic_block(); + resultobj = SWIG_NewPointerObj((new gr_basic_block_sptr(static_cast< const gr_basic_block_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_basic_block_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_check_topology(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + int arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + bool result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_check_topology",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_check_topology" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_cf_sptr_check_topology" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gsm_burst_cf_sptr_check_topology" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (bool)(*arg1)->check_topology(arg2,arg3); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_clock_options_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + unsigned long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_clock_options_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_clock_options_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_cf_sptr_d_clock_options_set" "', argument " "2"" of type '" "unsigned long""'"); + } + arg2 = static_cast< unsigned long >(val2); + if (arg1) (*arg1)->d_clock_options = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_clock_options_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + unsigned long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_clock_options_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_clock_options_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (unsigned long) ((*arg1)->d_clock_options); + resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_print_options_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + unsigned long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_print_options_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_print_options_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_cf_sptr_d_print_options_set" "', argument " "2"" of type '" "unsigned long""'"); + } + arg2 = static_cast< unsigned long >(val2); + if (arg1) (*arg1)->d_print_options = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_print_options_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + unsigned long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_print_options_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_print_options_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (unsigned long) ((*arg1)->d_print_options); + resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_test_options_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + unsigned long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_test_options_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_test_options_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_cf_sptr_d_test_options_set" "', argument " "2"" of type '" "unsigned long""'"); + } + arg2 = static_cast< unsigned long >(val2); + if (arg1) (*arg1)->d_test_options = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_test_options_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + unsigned long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_test_options_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_test_options_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (unsigned long) ((*arg1)->d_test_options); + resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_equalizer_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + EQ_TYPE arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_equalizer_type_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_equalizer_type_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_cf_sptr_d_equalizer_type_set" "', argument " "2"" of type '" "EQ_TYPE""'"); + } + arg2 = static_cast< EQ_TYPE >(val2); + if (arg1) (*arg1)->d_equalizer_type = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_equalizer_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + EQ_TYPE result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_equalizer_type_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_equalizer_type_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (EQ_TYPE) ((*arg1)->d_equalizer_type); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_sync_loss_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_sync_loss_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_sync_loss_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_cf_sptr_d_sync_loss_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_sync_loss_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_sync_loss_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_sync_loss_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_sync_loss_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (long) ((*arg1)->d_sync_loss_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_fcch_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_fcch_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_fcch_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_cf_sptr_d_fcch_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_fcch_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_fcch_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_fcch_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_fcch_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (long) ((*arg1)->d_fcch_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_part_sch_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_part_sch_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_part_sch_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_cf_sptr_d_part_sch_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_part_sch_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_part_sch_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_part_sch_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_part_sch_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (long) ((*arg1)->d_part_sch_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_sch_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_sch_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_sch_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_cf_sptr_d_sch_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_sch_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_sch_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_sch_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_sch_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (long) ((*arg1)->d_sch_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_normal_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_normal_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_normal_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_cf_sptr_d_normal_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_normal_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_normal_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_normal_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_normal_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (long) ((*arg1)->d_normal_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_dummy_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_dummy_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_dummy_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_cf_sptr_d_dummy_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_dummy_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_dummy_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_dummy_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_dummy_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (long) ((*arg1)->d_dummy_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_unknown_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_unknown_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_unknown_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_cf_sptr_d_unknown_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_unknown_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_unknown_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_unknown_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_unknown_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (long) ((*arg1)->d_unknown_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_total_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_total_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_total_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_cf_sptr_d_total_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_total_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_total_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_total_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_total_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (long) ((*arg1)->d_total_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_next_arfcn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_next_arfcn_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_next_arfcn_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_cf_sptr_next_arfcn_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->next_arfcn = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_next_arfcn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_next_arfcn_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_next_arfcn_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (long) ((*arg1)->next_arfcn); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_hop_good_arfcn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_hop_good_arfcn_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_hop_good_arfcn_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_cf_sptr_d_hop_good_arfcn_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_hop_good_arfcn = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_hop_good_arfcn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_hop_good_arfcn_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_hop_good_arfcn_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (long) ((*arg1)->d_hop_good_arfcn); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_hop_bad_arfcn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_hop_bad_arfcn_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_hop_bad_arfcn_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_cf_sptr_d_hop_bad_arfcn_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_hop_bad_arfcn = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_d_hop_bad_arfcn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_d_hop_bad_arfcn_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_d_hop_bad_arfcn_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (long) ((*arg1)->d_hop_bad_arfcn); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_sync_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_sync_state",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_sync_state" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (int)(*arg1)->sync_state(); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_last_freq_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + float result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_last_freq_offset",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_last_freq_offset" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (float)(*arg1)->last_freq_offset(); + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_mean_freq_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + float result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_mean_freq_offset",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_mean_freq_offset" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + result = (float)(*arg1)->mean_freq_offset(); + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_sptr_full_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_cf > *arg1 = (boost::shared_ptr< gsm_burst_cf > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_sptr_full_reset",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_sptr_full_reset" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_cf > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_cf > * >(argp1); + (*arg1)->full_reset(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *gsm_burst_cf_sptr_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_gsm_burst_cf_block(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst_cf_sptr arg1 ; + void *argp1 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + gr_block_sptr result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_cf_block",1,1,&obj0)) SWIG_fail; + { + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_cf_block" "', argument " "1"" of type '" "gsm_burst_cf_sptr""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsm_burst_cf_block" "', argument " "1"" of type '" "gsm_burst_cf_sptr""'"); + } else { + gsm_burst_cf_sptr * temp = reinterpret_cast< gsm_burst_cf_sptr * >(argp1); + arg1 = *temp; + if (SWIG_IsNewObj(res1)) delete temp; + } + } + result = gsm_burst_cf_block(arg1); + resultobj = SWIG_NewPointerObj((new gr_block_sptr(static_cast< const gr_block_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_block_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_burst_cf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gr_feval_ll *arg1 = (gr_feval_ll *) 0 ; + float arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + gsm_burst_cf_sptr result; + + if(!PyArg_UnpackTuple(args,(char *)"burst_cf",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gr_feval_ll, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "burst_cf" "', argument " "1"" of type '" "gr_feval_ll *""'"); + } + arg1 = reinterpret_cast< gr_feval_ll * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "burst_cf" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + result = gsm_make_burst_cf(arg1,arg2); + resultobj = SWIG_NewPointerObj((new gsm_burst_cf_sptr(static_cast< const gsm_burst_cf_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gsm_burst_cf_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_gsm_burst_sink_c_sptr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"new_gsm_burst_sink_c_sptr",0,0)) SWIG_fail; + result = (boost::shared_ptr< gsm_burst_sink_c > *)new boost::shared_ptr< gsm_burst_sink_c >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_gsm_burst_sink_c_sptr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst_sink_c *arg1 = (gsm_burst_sink_c *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + boost::shared_ptr< gsm_burst_sink_c > *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"new_gsm_burst_sink_c_sptr",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gsm_burst_sink_c, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_gsm_burst_sink_c_sptr" "', argument " "1"" of type '" "gsm_burst_sink_c *""'"); + } + arg1 = reinterpret_cast< gsm_burst_sink_c * >(argp1); + result = (boost::shared_ptr< gsm_burst_sink_c > *)new boost::shared_ptr< gsm_burst_sink_c >(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_gsm_burst_sink_c_sptr(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = (int)PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_gsm_burst_sink_c_sptr__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_gsm_burst_sink_c, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_gsm_burst_sink_c_sptr__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_gsm_burst_sink_c_sptr'.\n" + " Possible C/C++ prototypes are:\n" + " boost::shared_ptr< gsm_burst_sink_c >()\n" + " boost::shared_ptr< gsm_burst_sink_c >(gsm_burst_sink_c *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + gsm_burst_sink_c *result = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr___deref__",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr___deref__" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (gsm_burst_sink_c *)(arg1)->operator ->(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gsm_burst_sink_c, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_gsm_burst_sink_c_sptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"delete_gsm_burst_sink_c_sptr",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_gsm_burst_sink_c_sptr" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + delete arg1; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_history(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + unsigned int result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_history",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_history" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (unsigned int)(*arg1)->history(); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_output_multiple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_output_multiple",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_output_multiple" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (int)(*arg1)->output_multiple(); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_relative_rate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + double result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_relative_rate",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_relative_rate" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (double)(*arg1)->relative_rate(); + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_start(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + bool result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_start",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_start" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (bool)(*arg1)->start(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_stop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + bool result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_stop",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_stop" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (bool)(*arg1)->stop(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_detail(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + gr_block_detail_sptr result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_detail",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_detail" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (*arg1)->detail(); + resultobj = SWIG_NewPointerObj((new gr_block_detail_sptr(static_cast< const gr_block_detail_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_block_detail_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_set_detail(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + gr_block_detail_sptr arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_set_detail",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_set_detail" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_boost__shared_ptrT_gr_block_detail_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsm_burst_sink_c_sptr_set_detail" "', argument " "2"" of type '" "gr_block_detail_sptr""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsm_burst_sink_c_sptr_set_detail" "', argument " "2"" of type '" "gr_block_detail_sptr""'"); + } else { + gr_block_detail_sptr * temp = reinterpret_cast< gr_block_detail_sptr * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + (*arg1)->set_detail(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + std::string result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_name",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_name" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (*arg1)->name(); + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_input_signature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + gr_io_signature_sptr result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_input_signature",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_input_signature" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (*arg1)->input_signature(); + resultobj = SWIG_NewPointerObj((new gr_io_signature_sptr(static_cast< const gr_io_signature_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_io_signature_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_output_signature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + gr_io_signature_sptr result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_output_signature",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_output_signature" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (*arg1)->output_signature(); + resultobj = SWIG_NewPointerObj((new gr_io_signature_sptr(static_cast< const gr_io_signature_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_io_signature_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_unique_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_unique_id",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_unique_id" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > const *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (long)(*arg1)->unique_id(); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_basic_block(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + gr_basic_block_sptr result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_basic_block",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_basic_block" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (*arg1)->basic_block(); + resultobj = SWIG_NewPointerObj((new gr_basic_block_sptr(static_cast< const gr_basic_block_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_basic_block_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_check_topology(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + int arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + bool result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_check_topology",3,3,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_check_topology" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_sink_c_sptr_check_topology" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gsm_burst_sink_c_sptr_check_topology" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (bool)(*arg1)->check_topology(arg2,arg3); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_clock_options_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + unsigned long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_clock_options_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_clock_options_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_sink_c_sptr_d_clock_options_set" "', argument " "2"" of type '" "unsigned long""'"); + } + arg2 = static_cast< unsigned long >(val2); + if (arg1) (*arg1)->d_clock_options = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_clock_options_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + unsigned long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_clock_options_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_clock_options_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (unsigned long) ((*arg1)->d_clock_options); + resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_print_options_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + unsigned long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_print_options_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_print_options_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_sink_c_sptr_d_print_options_set" "', argument " "2"" of type '" "unsigned long""'"); + } + arg2 = static_cast< unsigned long >(val2); + if (arg1) (*arg1)->d_print_options = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_print_options_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + unsigned long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_print_options_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_print_options_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (unsigned long) ((*arg1)->d_print_options); + resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_test_options_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + unsigned long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_test_options_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_test_options_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_sink_c_sptr_d_test_options_set" "', argument " "2"" of type '" "unsigned long""'"); + } + arg2 = static_cast< unsigned long >(val2); + if (arg1) (*arg1)->d_test_options = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_test_options_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + unsigned long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_test_options_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_test_options_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (unsigned long) ((*arg1)->d_test_options); + resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_equalizer_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + EQ_TYPE arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_equalizer_type_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_equalizer_type_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_sink_c_sptr_d_equalizer_type_set" "', argument " "2"" of type '" "EQ_TYPE""'"); + } + arg2 = static_cast< EQ_TYPE >(val2); + if (arg1) (*arg1)->d_equalizer_type = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_equalizer_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + EQ_TYPE result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_equalizer_type_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_equalizer_type_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (EQ_TYPE) ((*arg1)->d_equalizer_type); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_sync_loss_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_sync_loss_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_sync_loss_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_sink_c_sptr_d_sync_loss_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_sync_loss_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_sync_loss_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_sync_loss_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_sync_loss_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (long) ((*arg1)->d_sync_loss_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_fcch_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_fcch_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_fcch_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_sink_c_sptr_d_fcch_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_fcch_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_fcch_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_fcch_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_fcch_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (long) ((*arg1)->d_fcch_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_part_sch_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_part_sch_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_part_sch_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_sink_c_sptr_d_part_sch_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_part_sch_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_part_sch_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_part_sch_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_part_sch_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (long) ((*arg1)->d_part_sch_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_sch_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_sch_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_sch_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_sink_c_sptr_d_sch_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_sch_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_sch_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_sch_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_sch_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (long) ((*arg1)->d_sch_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_normal_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_normal_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_normal_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_sink_c_sptr_d_normal_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_normal_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_normal_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_normal_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_normal_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (long) ((*arg1)->d_normal_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_dummy_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_dummy_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_dummy_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_sink_c_sptr_d_dummy_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_dummy_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_dummy_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_dummy_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_dummy_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (long) ((*arg1)->d_dummy_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_unknown_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_unknown_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_unknown_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_sink_c_sptr_d_unknown_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_unknown_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_unknown_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_unknown_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_unknown_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (long) ((*arg1)->d_unknown_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_total_count_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_total_count_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_total_count_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_sink_c_sptr_d_total_count_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_total_count = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_total_count_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_total_count_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_total_count_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (long) ((*arg1)->d_total_count); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_next_arfcn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_next_arfcn_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_next_arfcn_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_sink_c_sptr_next_arfcn_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->next_arfcn = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_next_arfcn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_next_arfcn_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_next_arfcn_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (long) ((*arg1)->next_arfcn); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_hop_good_arfcn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_hop_good_arfcn_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_hop_good_arfcn_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_sink_c_sptr_d_hop_good_arfcn_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_hop_good_arfcn = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_hop_good_arfcn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_hop_good_arfcn_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_hop_good_arfcn_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (long) ((*arg1)->d_hop_good_arfcn); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_hop_bad_arfcn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + long arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + long val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_hop_bad_arfcn_set",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_hop_bad_arfcn_set" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + ecode2 = SWIG_AsVal_long(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsm_burst_sink_c_sptr_d_hop_bad_arfcn_set" "', argument " "2"" of type '" "long""'"); + } + arg2 = static_cast< long >(val2); + if (arg1) (*arg1)->d_hop_bad_arfcn = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_d_hop_bad_arfcn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + long result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_d_hop_bad_arfcn_get",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_d_hop_bad_arfcn_get" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (long) ((*arg1)->d_hop_bad_arfcn); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_sync_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + int result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_sync_state",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_sync_state" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (int)(*arg1)->sync_state(); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_last_freq_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + float result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_last_freq_offset",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_last_freq_offset" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (float)(*arg1)->last_freq_offset(); + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_mean_freq_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + float result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_mean_freq_offset",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_mean_freq_offset" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + result = (float)(*arg1)->mean_freq_offset(); + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_sptr_full_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + boost::shared_ptr< gsm_burst_sink_c > *arg1 = (boost::shared_ptr< gsm_burst_sink_c > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_sptr_full_reset",1,1,&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_sptr_full_reset" "', argument " "1"" of type '" "boost::shared_ptr< gsm_burst_sink_c > *""'"); + } + arg1 = reinterpret_cast< boost::shared_ptr< gsm_burst_sink_c > * >(argp1); + (*arg1)->full_reset(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *gsm_burst_sink_c_sptr_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_gsm_burst_sink_c_block(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gsm_burst_sink_c_sptr arg1 ; + void *argp1 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + gr_block_sptr result; + + if(!PyArg_UnpackTuple(args,(char *)"gsm_burst_sink_c_block",1,1,&obj0)) SWIG_fail; + { + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsm_burst_sink_c_block" "', argument " "1"" of type '" "gsm_burst_sink_c_sptr""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsm_burst_sink_c_block" "', argument " "1"" of type '" "gsm_burst_sink_c_sptr""'"); + } else { + gsm_burst_sink_c_sptr * temp = reinterpret_cast< gsm_burst_sink_c_sptr * >(argp1); + arg1 = *temp; + if (SWIG_IsNewObj(res1)) delete temp; + } + } + result = gsm_burst_sink_c_block(arg1); + resultobj = SWIG_NewPointerObj((new gr_block_sptr(static_cast< const gr_block_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gr_block_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_burst_sink_c(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + gr_feval_ll *arg1 = (gr_feval_ll *) 0 ; + float arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + gsm_burst_sink_c_sptr result; + + if(!PyArg_UnpackTuple(args,(char *)"burst_sink_c",2,2,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_gr_feval_ll, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "burst_sink_c" "', argument " "1"" of type '" "gr_feval_ll *""'"); + } + arg1 = reinterpret_cast< gr_feval_ll * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "burst_sink_c" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + result = gsm_make_burst_sink_c(arg1,arg2); + resultobj = SWIG_NewPointerObj((new gsm_burst_sink_c_sptr(static_cast< const gsm_burst_sink_c_sptr& >(result))), SWIGTYPE_p_boost__shared_ptrT_gsm_burst_sink_c_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +static PyMethodDef SwigMethods[] = { + { (char *)"delete_gsm_burst", _wrap_delete_gsm_burst, METH_VARARGS, (char *)"delete_gsm_burst(gsm_burst self)"}, + { (char *)"gsm_burst_d_clock_options_set", _wrap_gsm_burst_d_clock_options_set, METH_VARARGS, (char *)"gsm_burst_d_clock_options_set(gsm_burst self, unsigned long d_clock_options)"}, + { (char *)"gsm_burst_d_clock_options_get", _wrap_gsm_burst_d_clock_options_get, METH_VARARGS, (char *)"gsm_burst_d_clock_options_get(gsm_burst self) -> unsigned long"}, + { (char *)"gsm_burst_d_print_options_set", _wrap_gsm_burst_d_print_options_set, METH_VARARGS, (char *)"gsm_burst_d_print_options_set(gsm_burst self, unsigned long d_print_options)"}, + { (char *)"gsm_burst_d_print_options_get", _wrap_gsm_burst_d_print_options_get, METH_VARARGS, (char *)"gsm_burst_d_print_options_get(gsm_burst self) -> unsigned long"}, + { (char *)"gsm_burst_d_test_options_set", _wrap_gsm_burst_d_test_options_set, METH_VARARGS, (char *)"gsm_burst_d_test_options_set(gsm_burst self, unsigned long d_test_options)"}, + { (char *)"gsm_burst_d_test_options_get", _wrap_gsm_burst_d_test_options_get, METH_VARARGS, (char *)"gsm_burst_d_test_options_get(gsm_burst self) -> unsigned long"}, + { (char *)"gsm_burst_d_equalizer_type_set", _wrap_gsm_burst_d_equalizer_type_set, METH_VARARGS, (char *)"gsm_burst_d_equalizer_type_set(gsm_burst self, EQ_TYPE d_equalizer_type)"}, + { (char *)"gsm_burst_d_equalizer_type_get", _wrap_gsm_burst_d_equalizer_type_get, METH_VARARGS, (char *)"gsm_burst_d_equalizer_type_get(gsm_burst self) -> EQ_TYPE"}, + { (char *)"gsm_burst_d_sync_loss_count_set", _wrap_gsm_burst_d_sync_loss_count_set, METH_VARARGS, (char *)"gsm_burst_d_sync_loss_count_set(gsm_burst self, long d_sync_loss_count)"}, + { (char *)"gsm_burst_d_sync_loss_count_get", _wrap_gsm_burst_d_sync_loss_count_get, METH_VARARGS, (char *)"gsm_burst_d_sync_loss_count_get(gsm_burst self) -> long"}, + { (char *)"gsm_burst_d_fcch_count_set", _wrap_gsm_burst_d_fcch_count_set, METH_VARARGS, (char *)"gsm_burst_d_fcch_count_set(gsm_burst self, long d_fcch_count)"}, + { (char *)"gsm_burst_d_fcch_count_get", _wrap_gsm_burst_d_fcch_count_get, METH_VARARGS, (char *)"gsm_burst_d_fcch_count_get(gsm_burst self) -> long"}, + { (char *)"gsm_burst_d_part_sch_count_set", _wrap_gsm_burst_d_part_sch_count_set, METH_VARARGS, (char *)"gsm_burst_d_part_sch_count_set(gsm_burst self, long d_part_sch_count)"}, + { (char *)"gsm_burst_d_part_sch_count_get", _wrap_gsm_burst_d_part_sch_count_get, METH_VARARGS, (char *)"gsm_burst_d_part_sch_count_get(gsm_burst self) -> long"}, + { (char *)"gsm_burst_d_sch_count_set", _wrap_gsm_burst_d_sch_count_set, METH_VARARGS, (char *)"gsm_burst_d_sch_count_set(gsm_burst self, long d_sch_count)"}, + { (char *)"gsm_burst_d_sch_count_get", _wrap_gsm_burst_d_sch_count_get, METH_VARARGS, (char *)"gsm_burst_d_sch_count_get(gsm_burst self) -> long"}, + { (char *)"gsm_burst_d_normal_count_set", _wrap_gsm_burst_d_normal_count_set, METH_VARARGS, (char *)"gsm_burst_d_normal_count_set(gsm_burst self, long d_normal_count)"}, + { (char *)"gsm_burst_d_normal_count_get", _wrap_gsm_burst_d_normal_count_get, METH_VARARGS, (char *)"gsm_burst_d_normal_count_get(gsm_burst self) -> long"}, + { (char *)"gsm_burst_d_dummy_count_set", _wrap_gsm_burst_d_dummy_count_set, METH_VARARGS, (char *)"gsm_burst_d_dummy_count_set(gsm_burst self, long d_dummy_count)"}, + { (char *)"gsm_burst_d_dummy_count_get", _wrap_gsm_burst_d_dummy_count_get, METH_VARARGS, (char *)"gsm_burst_d_dummy_count_get(gsm_burst self) -> long"}, + { (char *)"gsm_burst_d_unknown_count_set", _wrap_gsm_burst_d_unknown_count_set, METH_VARARGS, (char *)"gsm_burst_d_unknown_count_set(gsm_burst self, long d_unknown_count)"}, + { (char *)"gsm_burst_d_unknown_count_get", _wrap_gsm_burst_d_unknown_count_get, METH_VARARGS, (char *)"gsm_burst_d_unknown_count_get(gsm_burst self) -> long"}, + { (char *)"gsm_burst_d_total_count_set", _wrap_gsm_burst_d_total_count_set, METH_VARARGS, (char *)"gsm_burst_d_total_count_set(gsm_burst self, long d_total_count)"}, + { (char *)"gsm_burst_d_total_count_get", _wrap_gsm_burst_d_total_count_get, METH_VARARGS, (char *)"gsm_burst_d_total_count_get(gsm_burst self) -> long"}, + { (char *)"gsm_burst_next_arfcn_set", _wrap_gsm_burst_next_arfcn_set, METH_VARARGS, (char *)"gsm_burst_next_arfcn_set(gsm_burst self, long next_arfcn)"}, + { (char *)"gsm_burst_next_arfcn_get", _wrap_gsm_burst_next_arfcn_get, METH_VARARGS, (char *)"gsm_burst_next_arfcn_get(gsm_burst self) -> long"}, + { (char *)"gsm_burst_d_hop_good_arfcn_set", _wrap_gsm_burst_d_hop_good_arfcn_set, METH_VARARGS, (char *)"gsm_burst_d_hop_good_arfcn_set(gsm_burst self, long d_hop_good_arfcn)"}, + { (char *)"gsm_burst_d_hop_good_arfcn_get", _wrap_gsm_burst_d_hop_good_arfcn_get, METH_VARARGS, (char *)"gsm_burst_d_hop_good_arfcn_get(gsm_burst self) -> long"}, + { (char *)"gsm_burst_d_hop_bad_arfcn_set", _wrap_gsm_burst_d_hop_bad_arfcn_set, METH_VARARGS, (char *)"gsm_burst_d_hop_bad_arfcn_set(gsm_burst self, long d_hop_bad_arfcn)"}, + { (char *)"gsm_burst_d_hop_bad_arfcn_get", _wrap_gsm_burst_d_hop_bad_arfcn_get, METH_VARARGS, (char *)"gsm_burst_d_hop_bad_arfcn_get(gsm_burst self) -> long"}, + { (char *)"gsm_burst_sync_state", _wrap_gsm_burst_sync_state, METH_VARARGS, (char *)"gsm_burst_sync_state(gsm_burst self) -> int"}, + { (char *)"gsm_burst_last_freq_offset", _wrap_gsm_burst_last_freq_offset, METH_VARARGS, (char *)"gsm_burst_last_freq_offset(gsm_burst self) -> float"}, + { (char *)"gsm_burst_mean_freq_offset", _wrap_gsm_burst_mean_freq_offset, METH_VARARGS, (char *)"gsm_burst_mean_freq_offset(gsm_burst self) -> float"}, + { (char *)"gsm_burst_full_reset", _wrap_gsm_burst_full_reset, METH_VARARGS, (char *)"gsm_burst_full_reset(gsm_burst self)"}, + { (char *)"gsm_burst_swigregister", gsm_burst_swigregister, METH_VARARGS, NULL}, + { (char *)"new_gsm_burst_ff_sptr", _wrap_new_gsm_burst_ff_sptr, METH_VARARGS, (char *)"\n" + "gsm_burst_ff_sptr()\n" + "new_gsm_burst_ff_sptr( p) -> gsm_burst_ff_sptr\n" + ""}, + { (char *)"gsm_burst_ff_sptr___deref__", _wrap_gsm_burst_ff_sptr___deref__, METH_VARARGS, (char *)"gsm_burst_ff_sptr___deref__(gsm_burst_ff_sptr self)"}, + { (char *)"delete_gsm_burst_ff_sptr", _wrap_delete_gsm_burst_ff_sptr, METH_VARARGS, (char *)"delete_gsm_burst_ff_sptr(gsm_burst_ff_sptr self)"}, + { (char *)"gsm_burst_ff_sptr_history", _wrap_gsm_burst_ff_sptr_history, METH_VARARGS, (char *)"gsm_burst_ff_sptr_history(gsm_burst_ff_sptr self) -> unsigned int"}, + { (char *)"gsm_burst_ff_sptr_output_multiple", _wrap_gsm_burst_ff_sptr_output_multiple, METH_VARARGS, (char *)"gsm_burst_ff_sptr_output_multiple(gsm_burst_ff_sptr self) -> int"}, + { (char *)"gsm_burst_ff_sptr_relative_rate", _wrap_gsm_burst_ff_sptr_relative_rate, METH_VARARGS, (char *)"gsm_burst_ff_sptr_relative_rate(gsm_burst_ff_sptr self) -> double"}, + { (char *)"gsm_burst_ff_sptr_start", _wrap_gsm_burst_ff_sptr_start, METH_VARARGS, (char *)"gsm_burst_ff_sptr_start(gsm_burst_ff_sptr self) -> bool"}, + { (char *)"gsm_burst_ff_sptr_stop", _wrap_gsm_burst_ff_sptr_stop, METH_VARARGS, (char *)"gsm_burst_ff_sptr_stop(gsm_burst_ff_sptr self) -> bool"}, + { (char *)"gsm_burst_ff_sptr_detail", _wrap_gsm_burst_ff_sptr_detail, METH_VARARGS, (char *)"gsm_burst_ff_sptr_detail(gsm_burst_ff_sptr self) -> gr_block_detail_sptr"}, + { (char *)"gsm_burst_ff_sptr_set_detail", _wrap_gsm_burst_ff_sptr_set_detail, METH_VARARGS, (char *)"gsm_burst_ff_sptr_set_detail(gsm_burst_ff_sptr self, gr_block_detail_sptr detail)"}, + { (char *)"gsm_burst_ff_sptr_name", _wrap_gsm_burst_ff_sptr_name, METH_VARARGS, (char *)"gsm_burst_ff_sptr_name(gsm_burst_ff_sptr self) -> string"}, + { (char *)"gsm_burst_ff_sptr_input_signature", _wrap_gsm_burst_ff_sptr_input_signature, METH_VARARGS, (char *)"gsm_burst_ff_sptr_input_signature(gsm_burst_ff_sptr self) -> gr_io_signature_sptr"}, + { (char *)"gsm_burst_ff_sptr_output_signature", _wrap_gsm_burst_ff_sptr_output_signature, METH_VARARGS, (char *)"gsm_burst_ff_sptr_output_signature(gsm_burst_ff_sptr self) -> gr_io_signature_sptr"}, + { (char *)"gsm_burst_ff_sptr_unique_id", _wrap_gsm_burst_ff_sptr_unique_id, METH_VARARGS, (char *)"gsm_burst_ff_sptr_unique_id(gsm_burst_ff_sptr self) -> long"}, + { (char *)"gsm_burst_ff_sptr_basic_block", _wrap_gsm_burst_ff_sptr_basic_block, METH_VARARGS, (char *)"gsm_burst_ff_sptr_basic_block(gsm_burst_ff_sptr self) -> gr_basic_block_sptr"}, + { (char *)"gsm_burst_ff_sptr_check_topology", _wrap_gsm_burst_ff_sptr_check_topology, METH_VARARGS, (char *)"gsm_burst_ff_sptr_check_topology(gsm_burst_ff_sptr self, int ninputs, int noutputs) -> bool"}, + { (char *)"gsm_burst_ff_sptr_d_clock_options_set", _wrap_gsm_burst_ff_sptr_d_clock_options_set, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_clock_options_set(gsm_burst_ff_sptr self, unsigned long d_clock_options)"}, + { (char *)"gsm_burst_ff_sptr_d_clock_options_get", _wrap_gsm_burst_ff_sptr_d_clock_options_get, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_clock_options_get(gsm_burst_ff_sptr self) -> unsigned long"}, + { (char *)"gsm_burst_ff_sptr_d_print_options_set", _wrap_gsm_burst_ff_sptr_d_print_options_set, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_print_options_set(gsm_burst_ff_sptr self, unsigned long d_print_options)"}, + { (char *)"gsm_burst_ff_sptr_d_print_options_get", _wrap_gsm_burst_ff_sptr_d_print_options_get, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_print_options_get(gsm_burst_ff_sptr self) -> unsigned long"}, + { (char *)"gsm_burst_ff_sptr_d_test_options_set", _wrap_gsm_burst_ff_sptr_d_test_options_set, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_test_options_set(gsm_burst_ff_sptr self, unsigned long d_test_options)"}, + { (char *)"gsm_burst_ff_sptr_d_test_options_get", _wrap_gsm_burst_ff_sptr_d_test_options_get, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_test_options_get(gsm_burst_ff_sptr self) -> unsigned long"}, + { (char *)"gsm_burst_ff_sptr_d_equalizer_type_set", _wrap_gsm_burst_ff_sptr_d_equalizer_type_set, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_equalizer_type_set(gsm_burst_ff_sptr self, EQ_TYPE d_equalizer_type)"}, + { (char *)"gsm_burst_ff_sptr_d_equalizer_type_get", _wrap_gsm_burst_ff_sptr_d_equalizer_type_get, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_equalizer_type_get(gsm_burst_ff_sptr self) -> EQ_TYPE"}, + { (char *)"gsm_burst_ff_sptr_d_sync_loss_count_set", _wrap_gsm_burst_ff_sptr_d_sync_loss_count_set, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_sync_loss_count_set(gsm_burst_ff_sptr self, long d_sync_loss_count)"}, + { (char *)"gsm_burst_ff_sptr_d_sync_loss_count_get", _wrap_gsm_burst_ff_sptr_d_sync_loss_count_get, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_sync_loss_count_get(gsm_burst_ff_sptr self) -> long"}, + { (char *)"gsm_burst_ff_sptr_d_fcch_count_set", _wrap_gsm_burst_ff_sptr_d_fcch_count_set, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_fcch_count_set(gsm_burst_ff_sptr self, long d_fcch_count)"}, + { (char *)"gsm_burst_ff_sptr_d_fcch_count_get", _wrap_gsm_burst_ff_sptr_d_fcch_count_get, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_fcch_count_get(gsm_burst_ff_sptr self) -> long"}, + { (char *)"gsm_burst_ff_sptr_d_part_sch_count_set", _wrap_gsm_burst_ff_sptr_d_part_sch_count_set, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_part_sch_count_set(gsm_burst_ff_sptr self, long d_part_sch_count)"}, + { (char *)"gsm_burst_ff_sptr_d_part_sch_count_get", _wrap_gsm_burst_ff_sptr_d_part_sch_count_get, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_part_sch_count_get(gsm_burst_ff_sptr self) -> long"}, + { (char *)"gsm_burst_ff_sptr_d_sch_count_set", _wrap_gsm_burst_ff_sptr_d_sch_count_set, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_sch_count_set(gsm_burst_ff_sptr self, long d_sch_count)"}, + { (char *)"gsm_burst_ff_sptr_d_sch_count_get", _wrap_gsm_burst_ff_sptr_d_sch_count_get, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_sch_count_get(gsm_burst_ff_sptr self) -> long"}, + { (char *)"gsm_burst_ff_sptr_d_normal_count_set", _wrap_gsm_burst_ff_sptr_d_normal_count_set, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_normal_count_set(gsm_burst_ff_sptr self, long d_normal_count)"}, + { (char *)"gsm_burst_ff_sptr_d_normal_count_get", _wrap_gsm_burst_ff_sptr_d_normal_count_get, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_normal_count_get(gsm_burst_ff_sptr self) -> long"}, + { (char *)"gsm_burst_ff_sptr_d_dummy_count_set", _wrap_gsm_burst_ff_sptr_d_dummy_count_set, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_dummy_count_set(gsm_burst_ff_sptr self, long d_dummy_count)"}, + { (char *)"gsm_burst_ff_sptr_d_dummy_count_get", _wrap_gsm_burst_ff_sptr_d_dummy_count_get, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_dummy_count_get(gsm_burst_ff_sptr self) -> long"}, + { (char *)"gsm_burst_ff_sptr_d_unknown_count_set", _wrap_gsm_burst_ff_sptr_d_unknown_count_set, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_unknown_count_set(gsm_burst_ff_sptr self, long d_unknown_count)"}, + { (char *)"gsm_burst_ff_sptr_d_unknown_count_get", _wrap_gsm_burst_ff_sptr_d_unknown_count_get, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_unknown_count_get(gsm_burst_ff_sptr self) -> long"}, + { (char *)"gsm_burst_ff_sptr_d_total_count_set", _wrap_gsm_burst_ff_sptr_d_total_count_set, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_total_count_set(gsm_burst_ff_sptr self, long d_total_count)"}, + { (char *)"gsm_burst_ff_sptr_d_total_count_get", _wrap_gsm_burst_ff_sptr_d_total_count_get, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_total_count_get(gsm_burst_ff_sptr self) -> long"}, + { (char *)"gsm_burst_ff_sptr_next_arfcn_set", _wrap_gsm_burst_ff_sptr_next_arfcn_set, METH_VARARGS, (char *)"gsm_burst_ff_sptr_next_arfcn_set(gsm_burst_ff_sptr self, long next_arfcn)"}, + { (char *)"gsm_burst_ff_sptr_next_arfcn_get", _wrap_gsm_burst_ff_sptr_next_arfcn_get, METH_VARARGS, (char *)"gsm_burst_ff_sptr_next_arfcn_get(gsm_burst_ff_sptr self) -> long"}, + { (char *)"gsm_burst_ff_sptr_d_hop_good_arfcn_set", _wrap_gsm_burst_ff_sptr_d_hop_good_arfcn_set, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_hop_good_arfcn_set(gsm_burst_ff_sptr self, long d_hop_good_arfcn)"}, + { (char *)"gsm_burst_ff_sptr_d_hop_good_arfcn_get", _wrap_gsm_burst_ff_sptr_d_hop_good_arfcn_get, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_hop_good_arfcn_get(gsm_burst_ff_sptr self) -> long"}, + { (char *)"gsm_burst_ff_sptr_d_hop_bad_arfcn_set", _wrap_gsm_burst_ff_sptr_d_hop_bad_arfcn_set, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_hop_bad_arfcn_set(gsm_burst_ff_sptr self, long d_hop_bad_arfcn)"}, + { (char *)"gsm_burst_ff_sptr_d_hop_bad_arfcn_get", _wrap_gsm_burst_ff_sptr_d_hop_bad_arfcn_get, METH_VARARGS, (char *)"gsm_burst_ff_sptr_d_hop_bad_arfcn_get(gsm_burst_ff_sptr self) -> long"}, + { (char *)"gsm_burst_ff_sptr_sync_state", _wrap_gsm_burst_ff_sptr_sync_state, METH_VARARGS, (char *)"gsm_burst_ff_sptr_sync_state(gsm_burst_ff_sptr self) -> int"}, + { (char *)"gsm_burst_ff_sptr_last_freq_offset", _wrap_gsm_burst_ff_sptr_last_freq_offset, METH_VARARGS, (char *)"gsm_burst_ff_sptr_last_freq_offset(gsm_burst_ff_sptr self) -> float"}, + { (char *)"gsm_burst_ff_sptr_mean_freq_offset", _wrap_gsm_burst_ff_sptr_mean_freq_offset, METH_VARARGS, (char *)"gsm_burst_ff_sptr_mean_freq_offset(gsm_burst_ff_sptr self) -> float"}, + { (char *)"gsm_burst_ff_sptr_full_reset", _wrap_gsm_burst_ff_sptr_full_reset, METH_VARARGS, (char *)"gsm_burst_ff_sptr_full_reset(gsm_burst_ff_sptr self)"}, + { (char *)"gsm_burst_ff_sptr_swigregister", gsm_burst_ff_sptr_swigregister, METH_VARARGS, NULL}, + { (char *)"gsm_burst_ff_block", _wrap_gsm_burst_ff_block, METH_VARARGS, (char *)"gsm_burst_ff_block(gsm_burst_ff_sptr r) -> gr_block_sptr"}, + { (char *)"burst_ff", _wrap_burst_ff, METH_VARARGS, (char *)"burst_ff(gr_feval_ll ?) -> gsm_burst_ff_sptr"}, + { (char *)"new_gsm_burst_cf_sptr", _wrap_new_gsm_burst_cf_sptr, METH_VARARGS, (char *)"\n" + "gsm_burst_cf_sptr()\n" + "new_gsm_burst_cf_sptr( p) -> gsm_burst_cf_sptr\n" + ""}, + { (char *)"gsm_burst_cf_sptr___deref__", _wrap_gsm_burst_cf_sptr___deref__, METH_VARARGS, (char *)"gsm_burst_cf_sptr___deref__(gsm_burst_cf_sptr self)"}, + { (char *)"delete_gsm_burst_cf_sptr", _wrap_delete_gsm_burst_cf_sptr, METH_VARARGS, (char *)"delete_gsm_burst_cf_sptr(gsm_burst_cf_sptr self)"}, + { (char *)"gsm_burst_cf_sptr_get_omega", _wrap_gsm_burst_cf_sptr_get_omega, METH_VARARGS, (char *)"gsm_burst_cf_sptr_get_omega(gsm_burst_cf_sptr self) -> float"}, + { (char *)"gsm_burst_cf_sptr_history", _wrap_gsm_burst_cf_sptr_history, METH_VARARGS, (char *)"gsm_burst_cf_sptr_history(gsm_burst_cf_sptr self) -> unsigned int"}, + { (char *)"gsm_burst_cf_sptr_output_multiple", _wrap_gsm_burst_cf_sptr_output_multiple, METH_VARARGS, (char *)"gsm_burst_cf_sptr_output_multiple(gsm_burst_cf_sptr self) -> int"}, + { (char *)"gsm_burst_cf_sptr_relative_rate", _wrap_gsm_burst_cf_sptr_relative_rate, METH_VARARGS, (char *)"gsm_burst_cf_sptr_relative_rate(gsm_burst_cf_sptr self) -> double"}, + { (char *)"gsm_burst_cf_sptr_start", _wrap_gsm_burst_cf_sptr_start, METH_VARARGS, (char *)"gsm_burst_cf_sptr_start(gsm_burst_cf_sptr self) -> bool"}, + { (char *)"gsm_burst_cf_sptr_stop", _wrap_gsm_burst_cf_sptr_stop, METH_VARARGS, (char *)"gsm_burst_cf_sptr_stop(gsm_burst_cf_sptr self) -> bool"}, + { (char *)"gsm_burst_cf_sptr_detail", _wrap_gsm_burst_cf_sptr_detail, METH_VARARGS, (char *)"gsm_burst_cf_sptr_detail(gsm_burst_cf_sptr self) -> gr_block_detail_sptr"}, + { (char *)"gsm_burst_cf_sptr_set_detail", _wrap_gsm_burst_cf_sptr_set_detail, METH_VARARGS, (char *)"gsm_burst_cf_sptr_set_detail(gsm_burst_cf_sptr self, gr_block_detail_sptr detail)"}, + { (char *)"gsm_burst_cf_sptr_name", _wrap_gsm_burst_cf_sptr_name, METH_VARARGS, (char *)"gsm_burst_cf_sptr_name(gsm_burst_cf_sptr self) -> string"}, + { (char *)"gsm_burst_cf_sptr_input_signature", _wrap_gsm_burst_cf_sptr_input_signature, METH_VARARGS, (char *)"gsm_burst_cf_sptr_input_signature(gsm_burst_cf_sptr self) -> gr_io_signature_sptr"}, + { (char *)"gsm_burst_cf_sptr_output_signature", _wrap_gsm_burst_cf_sptr_output_signature, METH_VARARGS, (char *)"gsm_burst_cf_sptr_output_signature(gsm_burst_cf_sptr self) -> gr_io_signature_sptr"}, + { (char *)"gsm_burst_cf_sptr_unique_id", _wrap_gsm_burst_cf_sptr_unique_id, METH_VARARGS, (char *)"gsm_burst_cf_sptr_unique_id(gsm_burst_cf_sptr self) -> long"}, + { (char *)"gsm_burst_cf_sptr_basic_block", _wrap_gsm_burst_cf_sptr_basic_block, METH_VARARGS, (char *)"gsm_burst_cf_sptr_basic_block(gsm_burst_cf_sptr self) -> gr_basic_block_sptr"}, + { (char *)"gsm_burst_cf_sptr_check_topology", _wrap_gsm_burst_cf_sptr_check_topology, METH_VARARGS, (char *)"gsm_burst_cf_sptr_check_topology(gsm_burst_cf_sptr self, int ninputs, int noutputs) -> bool"}, + { (char *)"gsm_burst_cf_sptr_d_clock_options_set", _wrap_gsm_burst_cf_sptr_d_clock_options_set, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_clock_options_set(gsm_burst_cf_sptr self, unsigned long d_clock_options)"}, + { (char *)"gsm_burst_cf_sptr_d_clock_options_get", _wrap_gsm_burst_cf_sptr_d_clock_options_get, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_clock_options_get(gsm_burst_cf_sptr self) -> unsigned long"}, + { (char *)"gsm_burst_cf_sptr_d_print_options_set", _wrap_gsm_burst_cf_sptr_d_print_options_set, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_print_options_set(gsm_burst_cf_sptr self, unsigned long d_print_options)"}, + { (char *)"gsm_burst_cf_sptr_d_print_options_get", _wrap_gsm_burst_cf_sptr_d_print_options_get, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_print_options_get(gsm_burst_cf_sptr self) -> unsigned long"}, + { (char *)"gsm_burst_cf_sptr_d_test_options_set", _wrap_gsm_burst_cf_sptr_d_test_options_set, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_test_options_set(gsm_burst_cf_sptr self, unsigned long d_test_options)"}, + { (char *)"gsm_burst_cf_sptr_d_test_options_get", _wrap_gsm_burst_cf_sptr_d_test_options_get, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_test_options_get(gsm_burst_cf_sptr self) -> unsigned long"}, + { (char *)"gsm_burst_cf_sptr_d_equalizer_type_set", _wrap_gsm_burst_cf_sptr_d_equalizer_type_set, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_equalizer_type_set(gsm_burst_cf_sptr self, EQ_TYPE d_equalizer_type)"}, + { (char *)"gsm_burst_cf_sptr_d_equalizer_type_get", _wrap_gsm_burst_cf_sptr_d_equalizer_type_get, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_equalizer_type_get(gsm_burst_cf_sptr self) -> EQ_TYPE"}, + { (char *)"gsm_burst_cf_sptr_d_sync_loss_count_set", _wrap_gsm_burst_cf_sptr_d_sync_loss_count_set, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_sync_loss_count_set(gsm_burst_cf_sptr self, long d_sync_loss_count)"}, + { (char *)"gsm_burst_cf_sptr_d_sync_loss_count_get", _wrap_gsm_burst_cf_sptr_d_sync_loss_count_get, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_sync_loss_count_get(gsm_burst_cf_sptr self) -> long"}, + { (char *)"gsm_burst_cf_sptr_d_fcch_count_set", _wrap_gsm_burst_cf_sptr_d_fcch_count_set, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_fcch_count_set(gsm_burst_cf_sptr self, long d_fcch_count)"}, + { (char *)"gsm_burst_cf_sptr_d_fcch_count_get", _wrap_gsm_burst_cf_sptr_d_fcch_count_get, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_fcch_count_get(gsm_burst_cf_sptr self) -> long"}, + { (char *)"gsm_burst_cf_sptr_d_part_sch_count_set", _wrap_gsm_burst_cf_sptr_d_part_sch_count_set, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_part_sch_count_set(gsm_burst_cf_sptr self, long d_part_sch_count)"}, + { (char *)"gsm_burst_cf_sptr_d_part_sch_count_get", _wrap_gsm_burst_cf_sptr_d_part_sch_count_get, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_part_sch_count_get(gsm_burst_cf_sptr self) -> long"}, + { (char *)"gsm_burst_cf_sptr_d_sch_count_set", _wrap_gsm_burst_cf_sptr_d_sch_count_set, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_sch_count_set(gsm_burst_cf_sptr self, long d_sch_count)"}, + { (char *)"gsm_burst_cf_sptr_d_sch_count_get", _wrap_gsm_burst_cf_sptr_d_sch_count_get, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_sch_count_get(gsm_burst_cf_sptr self) -> long"}, + { (char *)"gsm_burst_cf_sptr_d_normal_count_set", _wrap_gsm_burst_cf_sptr_d_normal_count_set, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_normal_count_set(gsm_burst_cf_sptr self, long d_normal_count)"}, + { (char *)"gsm_burst_cf_sptr_d_normal_count_get", _wrap_gsm_burst_cf_sptr_d_normal_count_get, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_normal_count_get(gsm_burst_cf_sptr self) -> long"}, + { (char *)"gsm_burst_cf_sptr_d_dummy_count_set", _wrap_gsm_burst_cf_sptr_d_dummy_count_set, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_dummy_count_set(gsm_burst_cf_sptr self, long d_dummy_count)"}, + { (char *)"gsm_burst_cf_sptr_d_dummy_count_get", _wrap_gsm_burst_cf_sptr_d_dummy_count_get, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_dummy_count_get(gsm_burst_cf_sptr self) -> long"}, + { (char *)"gsm_burst_cf_sptr_d_unknown_count_set", _wrap_gsm_burst_cf_sptr_d_unknown_count_set, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_unknown_count_set(gsm_burst_cf_sptr self, long d_unknown_count)"}, + { (char *)"gsm_burst_cf_sptr_d_unknown_count_get", _wrap_gsm_burst_cf_sptr_d_unknown_count_get, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_unknown_count_get(gsm_burst_cf_sptr self) -> long"}, + { (char *)"gsm_burst_cf_sptr_d_total_count_set", _wrap_gsm_burst_cf_sptr_d_total_count_set, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_total_count_set(gsm_burst_cf_sptr self, long d_total_count)"}, + { (char *)"gsm_burst_cf_sptr_d_total_count_get", _wrap_gsm_burst_cf_sptr_d_total_count_get, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_total_count_get(gsm_burst_cf_sptr self) -> long"}, + { (char *)"gsm_burst_cf_sptr_next_arfcn_set", _wrap_gsm_burst_cf_sptr_next_arfcn_set, METH_VARARGS, (char *)"gsm_burst_cf_sptr_next_arfcn_set(gsm_burst_cf_sptr self, long next_arfcn)"}, + { (char *)"gsm_burst_cf_sptr_next_arfcn_get", _wrap_gsm_burst_cf_sptr_next_arfcn_get, METH_VARARGS, (char *)"gsm_burst_cf_sptr_next_arfcn_get(gsm_burst_cf_sptr self) -> long"}, + { (char *)"gsm_burst_cf_sptr_d_hop_good_arfcn_set", _wrap_gsm_burst_cf_sptr_d_hop_good_arfcn_set, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_hop_good_arfcn_set(gsm_burst_cf_sptr self, long d_hop_good_arfcn)"}, + { (char *)"gsm_burst_cf_sptr_d_hop_good_arfcn_get", _wrap_gsm_burst_cf_sptr_d_hop_good_arfcn_get, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_hop_good_arfcn_get(gsm_burst_cf_sptr self) -> long"}, + { (char *)"gsm_burst_cf_sptr_d_hop_bad_arfcn_set", _wrap_gsm_burst_cf_sptr_d_hop_bad_arfcn_set, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_hop_bad_arfcn_set(gsm_burst_cf_sptr self, long d_hop_bad_arfcn)"}, + { (char *)"gsm_burst_cf_sptr_d_hop_bad_arfcn_get", _wrap_gsm_burst_cf_sptr_d_hop_bad_arfcn_get, METH_VARARGS, (char *)"gsm_burst_cf_sptr_d_hop_bad_arfcn_get(gsm_burst_cf_sptr self) -> long"}, + { (char *)"gsm_burst_cf_sptr_sync_state", _wrap_gsm_burst_cf_sptr_sync_state, METH_VARARGS, (char *)"gsm_burst_cf_sptr_sync_state(gsm_burst_cf_sptr self) -> int"}, + { (char *)"gsm_burst_cf_sptr_last_freq_offset", _wrap_gsm_burst_cf_sptr_last_freq_offset, METH_VARARGS, (char *)"gsm_burst_cf_sptr_last_freq_offset(gsm_burst_cf_sptr self) -> float"}, + { (char *)"gsm_burst_cf_sptr_mean_freq_offset", _wrap_gsm_burst_cf_sptr_mean_freq_offset, METH_VARARGS, (char *)"gsm_burst_cf_sptr_mean_freq_offset(gsm_burst_cf_sptr self) -> float"}, + { (char *)"gsm_burst_cf_sptr_full_reset", _wrap_gsm_burst_cf_sptr_full_reset, METH_VARARGS, (char *)"gsm_burst_cf_sptr_full_reset(gsm_burst_cf_sptr self)"}, + { (char *)"gsm_burst_cf_sptr_swigregister", gsm_burst_cf_sptr_swigregister, METH_VARARGS, NULL}, + { (char *)"gsm_burst_cf_block", _wrap_gsm_burst_cf_block, METH_VARARGS, (char *)"gsm_burst_cf_block(gsm_burst_cf_sptr r) -> gr_block_sptr"}, + { (char *)"burst_cf", _wrap_burst_cf, METH_VARARGS, (char *)"burst_cf(gr_feval_ll ?, float ?) -> gsm_burst_cf_sptr"}, + { (char *)"new_gsm_burst_sink_c_sptr", _wrap_new_gsm_burst_sink_c_sptr, METH_VARARGS, (char *)"\n" + "gsm_burst_sink_c_sptr()\n" + "new_gsm_burst_sink_c_sptr( p) -> gsm_burst_sink_c_sptr\n" + ""}, + { (char *)"gsm_burst_sink_c_sptr___deref__", _wrap_gsm_burst_sink_c_sptr___deref__, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr___deref__(gsm_burst_sink_c_sptr self)"}, + { (char *)"delete_gsm_burst_sink_c_sptr", _wrap_delete_gsm_burst_sink_c_sptr, METH_VARARGS, (char *)"delete_gsm_burst_sink_c_sptr(gsm_burst_sink_c_sptr self)"}, + { (char *)"gsm_burst_sink_c_sptr_history", _wrap_gsm_burst_sink_c_sptr_history, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_history(gsm_burst_sink_c_sptr self) -> unsigned int"}, + { (char *)"gsm_burst_sink_c_sptr_output_multiple", _wrap_gsm_burst_sink_c_sptr_output_multiple, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_output_multiple(gsm_burst_sink_c_sptr self) -> int"}, + { (char *)"gsm_burst_sink_c_sptr_relative_rate", _wrap_gsm_burst_sink_c_sptr_relative_rate, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_relative_rate(gsm_burst_sink_c_sptr self) -> double"}, + { (char *)"gsm_burst_sink_c_sptr_start", _wrap_gsm_burst_sink_c_sptr_start, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_start(gsm_burst_sink_c_sptr self) -> bool"}, + { (char *)"gsm_burst_sink_c_sptr_stop", _wrap_gsm_burst_sink_c_sptr_stop, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_stop(gsm_burst_sink_c_sptr self) -> bool"}, + { (char *)"gsm_burst_sink_c_sptr_detail", _wrap_gsm_burst_sink_c_sptr_detail, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_detail(gsm_burst_sink_c_sptr self) -> gr_block_detail_sptr"}, + { (char *)"gsm_burst_sink_c_sptr_set_detail", _wrap_gsm_burst_sink_c_sptr_set_detail, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_set_detail(gsm_burst_sink_c_sptr self, gr_block_detail_sptr detail)"}, + { (char *)"gsm_burst_sink_c_sptr_name", _wrap_gsm_burst_sink_c_sptr_name, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_name(gsm_burst_sink_c_sptr self) -> string"}, + { (char *)"gsm_burst_sink_c_sptr_input_signature", _wrap_gsm_burst_sink_c_sptr_input_signature, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_input_signature(gsm_burst_sink_c_sptr self) -> gr_io_signature_sptr"}, + { (char *)"gsm_burst_sink_c_sptr_output_signature", _wrap_gsm_burst_sink_c_sptr_output_signature, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_output_signature(gsm_burst_sink_c_sptr self) -> gr_io_signature_sptr"}, + { (char *)"gsm_burst_sink_c_sptr_unique_id", _wrap_gsm_burst_sink_c_sptr_unique_id, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_unique_id(gsm_burst_sink_c_sptr self) -> long"}, + { (char *)"gsm_burst_sink_c_sptr_basic_block", _wrap_gsm_burst_sink_c_sptr_basic_block, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_basic_block(gsm_burst_sink_c_sptr self) -> gr_basic_block_sptr"}, + { (char *)"gsm_burst_sink_c_sptr_check_topology", _wrap_gsm_burst_sink_c_sptr_check_topology, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_check_topology(gsm_burst_sink_c_sptr self, int ninputs, int noutputs) -> bool"}, + { (char *)"gsm_burst_sink_c_sptr_d_clock_options_set", _wrap_gsm_burst_sink_c_sptr_d_clock_options_set, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_clock_options_set(gsm_burst_sink_c_sptr self, unsigned long d_clock_options)"}, + { (char *)"gsm_burst_sink_c_sptr_d_clock_options_get", _wrap_gsm_burst_sink_c_sptr_d_clock_options_get, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_clock_options_get(gsm_burst_sink_c_sptr self) -> unsigned long"}, + { (char *)"gsm_burst_sink_c_sptr_d_print_options_set", _wrap_gsm_burst_sink_c_sptr_d_print_options_set, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_print_options_set(gsm_burst_sink_c_sptr self, unsigned long d_print_options)"}, + { (char *)"gsm_burst_sink_c_sptr_d_print_options_get", _wrap_gsm_burst_sink_c_sptr_d_print_options_get, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_print_options_get(gsm_burst_sink_c_sptr self) -> unsigned long"}, + { (char *)"gsm_burst_sink_c_sptr_d_test_options_set", _wrap_gsm_burst_sink_c_sptr_d_test_options_set, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_test_options_set(gsm_burst_sink_c_sptr self, unsigned long d_test_options)"}, + { (char *)"gsm_burst_sink_c_sptr_d_test_options_get", _wrap_gsm_burst_sink_c_sptr_d_test_options_get, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_test_options_get(gsm_burst_sink_c_sptr self) -> unsigned long"}, + { (char *)"gsm_burst_sink_c_sptr_d_equalizer_type_set", _wrap_gsm_burst_sink_c_sptr_d_equalizer_type_set, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_equalizer_type_set(gsm_burst_sink_c_sptr self, EQ_TYPE d_equalizer_type)"}, + { (char *)"gsm_burst_sink_c_sptr_d_equalizer_type_get", _wrap_gsm_burst_sink_c_sptr_d_equalizer_type_get, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_equalizer_type_get(gsm_burst_sink_c_sptr self) -> EQ_TYPE"}, + { (char *)"gsm_burst_sink_c_sptr_d_sync_loss_count_set", _wrap_gsm_burst_sink_c_sptr_d_sync_loss_count_set, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_sync_loss_count_set(gsm_burst_sink_c_sptr self, long d_sync_loss_count)"}, + { (char *)"gsm_burst_sink_c_sptr_d_sync_loss_count_get", _wrap_gsm_burst_sink_c_sptr_d_sync_loss_count_get, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_sync_loss_count_get(gsm_burst_sink_c_sptr self) -> long"}, + { (char *)"gsm_burst_sink_c_sptr_d_fcch_count_set", _wrap_gsm_burst_sink_c_sptr_d_fcch_count_set, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_fcch_count_set(gsm_burst_sink_c_sptr self, long d_fcch_count)"}, + { (char *)"gsm_burst_sink_c_sptr_d_fcch_count_get", _wrap_gsm_burst_sink_c_sptr_d_fcch_count_get, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_fcch_count_get(gsm_burst_sink_c_sptr self) -> long"}, + { (char *)"gsm_burst_sink_c_sptr_d_part_sch_count_set", _wrap_gsm_burst_sink_c_sptr_d_part_sch_count_set, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_part_sch_count_set(gsm_burst_sink_c_sptr self, long d_part_sch_count)"}, + { (char *)"gsm_burst_sink_c_sptr_d_part_sch_count_get", _wrap_gsm_burst_sink_c_sptr_d_part_sch_count_get, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_part_sch_count_get(gsm_burst_sink_c_sptr self) -> long"}, + { (char *)"gsm_burst_sink_c_sptr_d_sch_count_set", _wrap_gsm_burst_sink_c_sptr_d_sch_count_set, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_sch_count_set(gsm_burst_sink_c_sptr self, long d_sch_count)"}, + { (char *)"gsm_burst_sink_c_sptr_d_sch_count_get", _wrap_gsm_burst_sink_c_sptr_d_sch_count_get, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_sch_count_get(gsm_burst_sink_c_sptr self) -> long"}, + { (char *)"gsm_burst_sink_c_sptr_d_normal_count_set", _wrap_gsm_burst_sink_c_sptr_d_normal_count_set, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_normal_count_set(gsm_burst_sink_c_sptr self, long d_normal_count)"}, + { (char *)"gsm_burst_sink_c_sptr_d_normal_count_get", _wrap_gsm_burst_sink_c_sptr_d_normal_count_get, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_normal_count_get(gsm_burst_sink_c_sptr self) -> long"}, + { (char *)"gsm_burst_sink_c_sptr_d_dummy_count_set", _wrap_gsm_burst_sink_c_sptr_d_dummy_count_set, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_dummy_count_set(gsm_burst_sink_c_sptr self, long d_dummy_count)"}, + { (char *)"gsm_burst_sink_c_sptr_d_dummy_count_get", _wrap_gsm_burst_sink_c_sptr_d_dummy_count_get, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_dummy_count_get(gsm_burst_sink_c_sptr self) -> long"}, + { (char *)"gsm_burst_sink_c_sptr_d_unknown_count_set", _wrap_gsm_burst_sink_c_sptr_d_unknown_count_set, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_unknown_count_set(gsm_burst_sink_c_sptr self, long d_unknown_count)"}, + { (char *)"gsm_burst_sink_c_sptr_d_unknown_count_get", _wrap_gsm_burst_sink_c_sptr_d_unknown_count_get, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_unknown_count_get(gsm_burst_sink_c_sptr self) -> long"}, + { (char *)"gsm_burst_sink_c_sptr_d_total_count_set", _wrap_gsm_burst_sink_c_sptr_d_total_count_set, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_total_count_set(gsm_burst_sink_c_sptr self, long d_total_count)"}, + { (char *)"gsm_burst_sink_c_sptr_d_total_count_get", _wrap_gsm_burst_sink_c_sptr_d_total_count_get, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_total_count_get(gsm_burst_sink_c_sptr self) -> long"}, + { (char *)"gsm_burst_sink_c_sptr_next_arfcn_set", _wrap_gsm_burst_sink_c_sptr_next_arfcn_set, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_next_arfcn_set(gsm_burst_sink_c_sptr self, long next_arfcn)"}, + { (char *)"gsm_burst_sink_c_sptr_next_arfcn_get", _wrap_gsm_burst_sink_c_sptr_next_arfcn_get, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_next_arfcn_get(gsm_burst_sink_c_sptr self) -> long"}, + { (char *)"gsm_burst_sink_c_sptr_d_hop_good_arfcn_set", _wrap_gsm_burst_sink_c_sptr_d_hop_good_arfcn_set, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_hop_good_arfcn_set(gsm_burst_sink_c_sptr self, long d_hop_good_arfcn)"}, + { (char *)"gsm_burst_sink_c_sptr_d_hop_good_arfcn_get", _wrap_gsm_burst_sink_c_sptr_d_hop_good_arfcn_get, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_hop_good_arfcn_get(gsm_burst_sink_c_sptr self) -> long"}, + { (char *)"gsm_burst_sink_c_sptr_d_hop_bad_arfcn_set", _wrap_gsm_burst_sink_c_sptr_d_hop_bad_arfcn_set, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_hop_bad_arfcn_set(gsm_burst_sink_c_sptr self, long d_hop_bad_arfcn)"}, + { (char *)"gsm_burst_sink_c_sptr_d_hop_bad_arfcn_get", _wrap_gsm_burst_sink_c_sptr_d_hop_bad_arfcn_get, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_d_hop_bad_arfcn_get(gsm_burst_sink_c_sptr self) -> long"}, + { (char *)"gsm_burst_sink_c_sptr_sync_state", _wrap_gsm_burst_sink_c_sptr_sync_state, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_sync_state(gsm_burst_sink_c_sptr self) -> int"}, + { (char *)"gsm_burst_sink_c_sptr_last_freq_offset", _wrap_gsm_burst_sink_c_sptr_last_freq_offset, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_last_freq_offset(gsm_burst_sink_c_sptr self) -> float"}, + { (char *)"gsm_burst_sink_c_sptr_mean_freq_offset", _wrap_gsm_burst_sink_c_sptr_mean_freq_offset, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_mean_freq_offset(gsm_burst_sink_c_sptr self) -> float"}, + { (char *)"gsm_burst_sink_c_sptr_full_reset", _wrap_gsm_burst_sink_c_sptr_full_reset, METH_VARARGS, (char *)"gsm_burst_sink_c_sptr_full_reset(gsm_burst_sink_c_sptr self)"}, + { (char *)"gsm_burst_sink_c_sptr_swigregister", gsm_burst_sink_c_sptr_swigregister, METH_VARARGS, NULL}, + { (char *)"gsm_burst_sink_c_block", _wrap_gsm_burst_sink_c_block, METH_VARARGS, (char *)"gsm_burst_sink_c_block(gsm_burst_sink_c_sptr r) -> gr_block_sptr"}, + { (char *)"burst_sink_c", _wrap_burst_sink_c, METH_VARARGS, (char *)"burst_sink_c(gr_feval_ll ?, float ?) -> gsm_burst_sink_c_sptr"}, + { NULL, NULL, 0, NULL } +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ + +static void *_p_gsm_burst_sink_cTo_p_gr_sync_block(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gr_sync_block *) ((gsm_burst_sink_c *) x)); +} +static void *_p_gr_sync_decimatorTo_p_gr_sync_block(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gr_sync_block *) ((gr_sync_decimator *) x)); +} +static void *_p_gr_sync_interpolatorTo_p_gr_sync_block(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gr_sync_block *) ((gr_sync_interpolator *) x)); +} +static void *_p_gsm_burst_sink_cTo_p_gr_basic_block(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gr_basic_block *) (gr_block *)(gr_sync_block *) ((gsm_burst_sink_c *) x)); +} +static void *_p_gsm_burst_ffTo_p_gr_basic_block(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gr_basic_block *) (gr_block *) ((gsm_burst_ff *) x)); +} +static void *_p_gr_sync_decimatorTo_p_gr_basic_block(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gr_basic_block *) (gr_block *)(gr_sync_block *) ((gr_sync_decimator *) x)); +} +static void *_p_gr_hier_block2To_p_gr_basic_block(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gr_basic_block *) ((gr_hier_block2 *) x)); +} +static void *_p_gr_sync_blockTo_p_gr_basic_block(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gr_basic_block *) (gr_block *) ((gr_sync_block *) x)); +} +static void *_p_gsm_burst_cfTo_p_gr_basic_block(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gr_basic_block *) (gr_block *) ((gsm_burst_cf *) x)); +} +static void *_p_gr_blockTo_p_gr_basic_block(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gr_basic_block *) ((gr_block *) x)); +} +static void *_p_gr_sync_interpolatorTo_p_gr_basic_block(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gr_basic_block *) (gr_block *)(gr_sync_block *) ((gr_sync_interpolator *) x)); +} +static void *_p_gr_top_blockTo_p_gr_basic_block(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gr_basic_block *) (gr_hier_block2 *) ((gr_top_block *) x)); +} +static void *_p_gsm_burst_sink_cTo_p_gsm_burst(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gsm_burst *) ((gsm_burst_sink_c *) x)); +} +static void *_p_gsm_burst_ffTo_p_gsm_burst(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gsm_burst *) ((gsm_burst_ff *) x)); +} +static void *_p_gsm_burst_cfTo_p_gsm_burst(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gsm_burst *) ((gsm_burst_cf *) x)); +} +static void *_p_gsm_burst_sink_cTo_p_gr_block(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gr_block *) (gr_sync_block *) ((gsm_burst_sink_c *) x)); +} +static void *_p_gsm_burst_ffTo_p_gr_block(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gr_block *) ((gsm_burst_ff *) x)); +} +static void *_p_gr_sync_decimatorTo_p_gr_block(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gr_block *) (gr_sync_block *) ((gr_sync_decimator *) x)); +} +static void *_p_gr_sync_blockTo_p_gr_block(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gr_block *) ((gr_sync_block *) x)); +} +static void *_p_gsm_burst_cfTo_p_gr_block(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gr_block *) ((gsm_burst_cf *) x)); +} +static void *_p_gr_sync_interpolatorTo_p_gr_block(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((gr_block *) (gr_sync_block *) ((gr_sync_interpolator *) x)); +} +static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_boost__shared_ptrT_gr_basic_block_t = {"_p_boost__shared_ptrT_gr_basic_block_t", "boost::shared_ptr< gr_basic_block > *|gr_basic_block_sptr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_boost__shared_ptrT_gr_block_detail_t = {"_p_boost__shared_ptrT_gr_block_detail_t", "boost::shared_ptr< gr_block_detail > *|gr_block_detail_sptr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_boost__shared_ptrT_gr_block_t = {"_p_boost__shared_ptrT_gr_block_t", "boost::shared_ptr< gr_block > *|gr_block_sptr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_boost__shared_ptrT_gr_buffer_reader_t = {"_p_boost__shared_ptrT_gr_buffer_reader_t", "boost::shared_ptr< gr_buffer_reader > *|gr_buffer_reader_sptr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_boost__shared_ptrT_gr_buffer_t = {"_p_boost__shared_ptrT_gr_buffer_t", "boost::shared_ptr< gr_buffer > *|gr_buffer_sptr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_boost__shared_ptrT_gr_dispatcher_t = {"_p_boost__shared_ptrT_gr_dispatcher_t", "boost::shared_ptr< gr_dispatcher > *|gr_dispatcher_sptr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_boost__shared_ptrT_gr_hier_block2_t = {"_p_boost__shared_ptrT_gr_hier_block2_t", "boost::shared_ptr< gr_hier_block2 > *|gr_hier_block2_sptr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_boost__shared_ptrT_gr_io_signature_t = {"_p_boost__shared_ptrT_gr_io_signature_t", "boost::shared_ptr< gr_io_signature > *|gr_io_signature_sptr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_boost__shared_ptrT_gr_message_t = {"_p_boost__shared_ptrT_gr_message_t", "boost::shared_ptr< gr_message > *|gr_message_sptr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_boost__shared_ptrT_gr_msg_queue_t = {"_p_boost__shared_ptrT_gr_msg_queue_t", "boost::shared_ptr< gr_msg_queue > *|gr_msg_queue_sptr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_boost__shared_ptrT_gr_single_threaded_scheduler_t = {"_p_boost__shared_ptrT_gr_single_threaded_scheduler_t", "boost::shared_ptr< gr_single_threaded_scheduler > *|gr_single_threaded_scheduler_sptr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_boost__shared_ptrT_gr_top_block_t = {"_p_boost__shared_ptrT_gr_top_block_t", "boost::shared_ptr< gr_top_block > *|gr_top_block_sptr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_boost__shared_ptrT_gsm_burst_cf_t = {"_p_boost__shared_ptrT_gsm_burst_cf_t", "boost::shared_ptr< gsm_burst_cf > *|gsm_burst_cf_sptr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_boost__shared_ptrT_gsm_burst_ff_t = {"_p_boost__shared_ptrT_gsm_burst_ff_t", "boost::shared_ptr< gsm_burst_ff > *|gsm_burst_ff_sptr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_boost__shared_ptrT_gsm_burst_sink_c_t = {"_p_boost__shared_ptrT_gsm_burst_sink_c_t", "boost::shared_ptr< gsm_burst_sink_c > *|gsm_burst_sink_c_sptr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_gr_basic_block = {"_p_gr_basic_block", "gr_basic_block *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_gr_sync_decimator = {"_p_gr_sync_decimator", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_gr_hier_block2 = {"_p_gr_hier_block2", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_gr_sync_interpolator = {"_p_gr_sync_interpolator", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_gr_top_block = {"_p_gr_top_block", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_gr_block = {"_p_gr_block", "gr_block *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_gr_feval_ll = {"_p_gr_feval_ll", "gr_feval_ll *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_gr_sync_block = {"_p_gr_sync_block", "gr_sync_block *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_gruel__rt_status_t = {"_p_gruel__rt_status_t", "enum gruel::rt_status_t *|gruel::rt_status_t *|gr_rt_status_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_gsm_burst = {"_p_gsm_burst", "gsm_burst *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_gsm_burst_cf = {"_p_gsm_burst_cf", "gsm_burst_cf *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_gsm_burst_ff = {"_p_gsm_burst_ff", "gsm_burst_ff *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_gsm_burst_sink_c = {"_p_gsm_burst_sink_c", "gsm_burst_sink_c *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__complexT_double_t = {"_p_std__complexT_double_t", "gr_complexd *|std::complex< double > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__complexT_float_t = {"_p_std__complexT_float_t", "std::complex< float > *|gr_complex *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0}; + +static swig_type_info *swig_type_initial[] = { + &_swigt__p_allocator_type, + &_swigt__p_boost__shared_ptrT_gr_basic_block_t, + &_swigt__p_boost__shared_ptrT_gr_block_detail_t, + &_swigt__p_boost__shared_ptrT_gr_block_t, + &_swigt__p_boost__shared_ptrT_gr_buffer_reader_t, + &_swigt__p_boost__shared_ptrT_gr_buffer_t, + &_swigt__p_boost__shared_ptrT_gr_dispatcher_t, + &_swigt__p_boost__shared_ptrT_gr_hier_block2_t, + &_swigt__p_boost__shared_ptrT_gr_io_signature_t, + &_swigt__p_boost__shared_ptrT_gr_message_t, + &_swigt__p_boost__shared_ptrT_gr_msg_queue_t, + &_swigt__p_boost__shared_ptrT_gr_single_threaded_scheduler_t, + &_swigt__p_boost__shared_ptrT_gr_top_block_t, + &_swigt__p_boost__shared_ptrT_gsm_burst_cf_t, + &_swigt__p_boost__shared_ptrT_gsm_burst_ff_t, + &_swigt__p_boost__shared_ptrT_gsm_burst_sink_c_t, + &_swigt__p_char, + &_swigt__p_difference_type, + &_swigt__p_gr_basic_block, + &_swigt__p_gr_block, + &_swigt__p_gr_feval_ll, + &_swigt__p_gr_hier_block2, + &_swigt__p_gr_sync_block, + &_swigt__p_gr_sync_decimator, + &_swigt__p_gr_sync_interpolator, + &_swigt__p_gr_top_block, + &_swigt__p_gruel__rt_status_t, + &_swigt__p_gsm_burst, + &_swigt__p_gsm_burst_cf, + &_swigt__p_gsm_burst_ff, + &_swigt__p_gsm_burst_sink_c, + &_swigt__p_size_type, + &_swigt__p_std__complexT_double_t, + &_swigt__p_std__complexT_float_t, + &_swigt__p_value_type, +}; + +static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_boost__shared_ptrT_gr_basic_block_t[] = { {&_swigt__p_boost__shared_ptrT_gr_basic_block_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_boost__shared_ptrT_gr_block_detail_t[] = { {&_swigt__p_boost__shared_ptrT_gr_block_detail_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_boost__shared_ptrT_gr_block_t[] = { {&_swigt__p_boost__shared_ptrT_gr_block_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_boost__shared_ptrT_gr_buffer_reader_t[] = { {&_swigt__p_boost__shared_ptrT_gr_buffer_reader_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_boost__shared_ptrT_gr_buffer_t[] = { {&_swigt__p_boost__shared_ptrT_gr_buffer_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_boost__shared_ptrT_gr_dispatcher_t[] = { {&_swigt__p_boost__shared_ptrT_gr_dispatcher_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_boost__shared_ptrT_gr_hier_block2_t[] = { {&_swigt__p_boost__shared_ptrT_gr_hier_block2_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_boost__shared_ptrT_gr_io_signature_t[] = { {&_swigt__p_boost__shared_ptrT_gr_io_signature_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_boost__shared_ptrT_gr_message_t[] = { {&_swigt__p_boost__shared_ptrT_gr_message_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_boost__shared_ptrT_gr_msg_queue_t[] = { {&_swigt__p_boost__shared_ptrT_gr_msg_queue_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_boost__shared_ptrT_gr_single_threaded_scheduler_t[] = { {&_swigt__p_boost__shared_ptrT_gr_single_threaded_scheduler_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_boost__shared_ptrT_gr_top_block_t[] = { {&_swigt__p_boost__shared_ptrT_gr_top_block_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_boost__shared_ptrT_gsm_burst_cf_t[] = { {&_swigt__p_boost__shared_ptrT_gsm_burst_cf_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_boost__shared_ptrT_gsm_burst_ff_t[] = { {&_swigt__p_boost__shared_ptrT_gsm_burst_ff_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_boost__shared_ptrT_gsm_burst_sink_c_t[] = { {&_swigt__p_boost__shared_ptrT_gsm_burst_sink_c_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_gr_sync_decimator[] = {{&_swigt__p_gr_sync_decimator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_gr_hier_block2[] = {{&_swigt__p_gr_hier_block2, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_gr_sync_interpolator[] = {{&_swigt__p_gr_sync_interpolator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_gr_top_block[] = {{&_swigt__p_gr_top_block, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_gr_basic_block[] = { {&_swigt__p_gsm_burst_sink_c, _p_gsm_burst_sink_cTo_p_gr_basic_block, 0, 0}, {&_swigt__p_gsm_burst_ff, _p_gsm_burst_ffTo_p_gr_basic_block, 0, 0}, {&_swigt__p_gr_sync_decimator, _p_gr_sync_decimatorTo_p_gr_basic_block, 0, 0}, {&_swigt__p_gr_basic_block, 0, 0, 0}, {&_swigt__p_gr_hier_block2, _p_gr_hier_block2To_p_gr_basic_block, 0, 0}, {&_swigt__p_gr_sync_block, _p_gr_sync_blockTo_p_gr_basic_block, 0, 0}, {&_swigt__p_gsm_burst_cf, _p_gsm_burst_cfTo_p_gr_basic_block, 0, 0}, {&_swigt__p_gr_sync_interpolator, _p_gr_sync_interpolatorTo_p_gr_basic_block, 0, 0}, {&_swigt__p_gr_block, _p_gr_blockTo_p_gr_basic_block, 0, 0}, {&_swigt__p_gr_top_block, _p_gr_top_blockTo_p_gr_basic_block, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_gr_block[] = { {&_swigt__p_gsm_burst_sink_c, _p_gsm_burst_sink_cTo_p_gr_block, 0, 0}, {&_swigt__p_gsm_burst_ff, _p_gsm_burst_ffTo_p_gr_block, 0, 0}, {&_swigt__p_gr_sync_decimator, _p_gr_sync_decimatorTo_p_gr_block, 0, 0}, {&_swigt__p_gr_sync_block, _p_gr_sync_blockTo_p_gr_block, 0, 0}, {&_swigt__p_gsm_burst_cf, _p_gsm_burst_cfTo_p_gr_block, 0, 0}, {&_swigt__p_gr_block, 0, 0, 0}, {&_swigt__p_gr_sync_interpolator, _p_gr_sync_interpolatorTo_p_gr_block, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_gr_feval_ll[] = { {&_swigt__p_gr_feval_ll, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_gr_sync_block[] = { {&_swigt__p_gsm_burst_sink_c, _p_gsm_burst_sink_cTo_p_gr_sync_block, 0, 0}, {&_swigt__p_gr_sync_decimator, _p_gr_sync_decimatorTo_p_gr_sync_block, 0, 0}, {&_swigt__p_gr_sync_block, 0, 0, 0}, {&_swigt__p_gr_sync_interpolator, _p_gr_sync_interpolatorTo_p_gr_sync_block, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_gruel__rt_status_t[] = { {&_swigt__p_gruel__rt_status_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_gsm_burst[] = { {&_swigt__p_gsm_burst_sink_c, _p_gsm_burst_sink_cTo_p_gsm_burst, 0, 0}, {&_swigt__p_gsm_burst, 0, 0, 0}, {&_swigt__p_gsm_burst_ff, _p_gsm_burst_ffTo_p_gsm_burst, 0, 0}, {&_swigt__p_gsm_burst_cf, _p_gsm_burst_cfTo_p_gsm_burst, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_gsm_burst_cf[] = { {&_swigt__p_gsm_burst_cf, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_gsm_burst_ff[] = { {&_swigt__p_gsm_burst_ff, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_gsm_burst_sink_c[] = { {&_swigt__p_gsm_burst_sink_c, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__complexT_double_t[] = { {&_swigt__p_std__complexT_double_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__complexT_float_t[] = { {&_swigt__p_std__complexT_float_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}}; + +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_allocator_type, + _swigc__p_boost__shared_ptrT_gr_basic_block_t, + _swigc__p_boost__shared_ptrT_gr_block_detail_t, + _swigc__p_boost__shared_ptrT_gr_block_t, + _swigc__p_boost__shared_ptrT_gr_buffer_reader_t, + _swigc__p_boost__shared_ptrT_gr_buffer_t, + _swigc__p_boost__shared_ptrT_gr_dispatcher_t, + _swigc__p_boost__shared_ptrT_gr_hier_block2_t, + _swigc__p_boost__shared_ptrT_gr_io_signature_t, + _swigc__p_boost__shared_ptrT_gr_message_t, + _swigc__p_boost__shared_ptrT_gr_msg_queue_t, + _swigc__p_boost__shared_ptrT_gr_single_threaded_scheduler_t, + _swigc__p_boost__shared_ptrT_gr_top_block_t, + _swigc__p_boost__shared_ptrT_gsm_burst_cf_t, + _swigc__p_boost__shared_ptrT_gsm_burst_ff_t, + _swigc__p_boost__shared_ptrT_gsm_burst_sink_c_t, + _swigc__p_char, + _swigc__p_difference_type, + _swigc__p_gr_basic_block, + _swigc__p_gr_block, + _swigc__p_gr_feval_ll, + _swigc__p_gr_hier_block2, + _swigc__p_gr_sync_block, + _swigc__p_gr_sync_decimator, + _swigc__p_gr_sync_interpolator, + _swigc__p_gr_top_block, + _swigc__p_gruel__rt_status_t, + _swigc__p_gsm_burst, + _swigc__p_gsm_burst_cf, + _swigc__p_gsm_burst_ff, + _swigc__p_gsm_burst_sink_c, + _swigc__p_size_type, + _swigc__p_std__complexT_double_t, + _swigc__p_std__complexT_float_t, + _swigc__p_value_type, +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ + +static swig_const_info swig_const_table[] = { +{0, 0, 0, 0.0, 0, 0}}; + +#ifdef __cplusplus +} +#endif +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned staticly to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* c-mode */ +#endif +#endif + +#if 0 +#define SWIGRUNTIME_DEBUG +#endif + + +SWIGRUNTIME void +SWIG_InitializeModule(void *clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int found, init; + + clientdata = clientdata; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; + } else { + init = 0; + } + + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + module_head = &swig_module; + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + found=0; + iter=module_head; + do { + if (iter==&swig_module) { + found=1; + break; + } + iter=iter->next; + } while (iter!= module_head); + + /* if the is found in the list, then all is done and we may leave */ + if (found) return; + /* otherwise we must add out module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + + /* When multiple interpeters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %d\n", swig_module.size); +#endif + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); +#endif + + /* if there is another module already loaded */ + if (swig_module.next != &swig_module) { + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } + if (type) { + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } + if (ret) { + if (type == swig_module.type_initial[i]) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } + + if (!ret) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif + if (type->cast) { + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; + +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); + for (i = 0; i < swig_module.size; ++i) { + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + while (cast->type) { + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} + +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void +SWIG_PropagateClientData(void) { + size_t i; + swig_cast_info *equiv; + static int init_run = 0; + + if (init_run) return; + init_run = 1; + + for (i = 0; i < swig_module.size; i++) { + if (swig_module.types[i]->clientdata) { + equiv = swig_module.types[i]->cast; + while (equiv) { + if (!equiv->converter) { + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} + +#ifdef __cplusplus +#if 0 +{ + /* c-mode */ +#endif +} +#endif + + + +#ifdef __cplusplus +extern "C" { +#endif + + /* Python-specific SWIG API */ +#define SWIG_newvarlink() SWIG_Python_newvarlink() +#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) +#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) + + /* ----------------------------------------------------------------------------- + * global variable support code. + * ----------------------------------------------------------------------------- */ + + typedef struct swig_globalvar { + char *name; /* Name of global variable */ + PyObject *(*get_attr)(void); /* Return the current value */ + int (*set_attr)(PyObject *); /* Set the value */ + struct swig_globalvar *next; + } swig_globalvar; + + typedef struct swig_varlinkobject { + PyObject_HEAD + swig_globalvar *vars; + } swig_varlinkobject; + + SWIGINTERN PyObject * + swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { + return PyString_FromString("<Swig global variables>"); + } + + SWIGINTERN PyObject * + swig_varlink_str(swig_varlinkobject *v) { + PyObject *str = PyString_FromString("("); + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + PyString_ConcatAndDel(&str,PyString_FromString(var->name)); + if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); + } + PyString_ConcatAndDel(&str,PyString_FromString(")")); + return str; + } + + SWIGINTERN int + swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { + PyObject *str = swig_varlink_str(v); + fprintf(fp,"Swig global variables "); + fprintf(fp,"%s\n", PyString_AsString(str)); + Py_DECREF(str); + return 0; + } + + SWIGINTERN void + swig_varlink_dealloc(swig_varlinkobject *v) { + swig_globalvar *var = v->vars; + while (var) { + swig_globalvar *n = var->next; + free(var->name); + free(var); + var = n; + } + } + + SWIGINTERN PyObject * + swig_varlink_getattr(swig_varlinkobject *v, char *n) { + PyObject *res = NULL; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->get_attr)(); + break; + } + var = var->next; + } + if (res == NULL && !PyErr_Occurred()) { + PyErr_SetString(PyExc_NameError,"Unknown C global variable"); + } + return res; + } + + SWIGINTERN int + swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { + int res = 1; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->set_attr)(p); + break; + } + var = var->next; + } + if (res == 1 && !PyErr_Occurred()) { + PyErr_SetString(PyExc_NameError,"Unknown C global variable"); + } + return res; + } + + SWIGINTERN PyTypeObject* + swig_varlink_type(void) { + static char varlink__doc__[] = "Swig var link object"; + static PyTypeObject varlink_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + PyObject_HEAD_INIT(NULL) + 0, /* Number of items in variable part (ob_size) */ + (char *)"swigvarlink", /* Type name (tp_name) */ + sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */ + 0, /* Itemsize (tp_itemsize) */ + (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */ + (printfunc) swig_varlink_print, /* Print (tp_print) */ + (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */ + (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */ + 0, /* tp_compare */ + (reprfunc) swig_varlink_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + (reprfunc)swig_varlink_str, /* tp_str */ + 0, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + 0, /* tp_flags */ + varlink__doc__, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#ifdef COUNT_ALLOCS + 0,0,0,0 /* tp_alloc -> tp_next */ +#endif + }; + varlink_type = tmp; + varlink_type.ob_type = &PyType_Type; + type_init = 1; + } + return &varlink_type; + } + + /* Create a variable linking object for use later */ + SWIGINTERN PyObject * + SWIG_Python_newvarlink(void) { + swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); + if (result) { + result->vars = 0; + } + return ((PyObject*) result); + } + + SWIGINTERN void + SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { + swig_varlinkobject *v = (swig_varlinkobject *) p; + swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); + if (gv) { + size_t size = strlen(name)+1; + gv->name = (char *)malloc(size); + if (gv->name) { + strncpy(gv->name,name,size); + gv->get_attr = get_attr; + gv->set_attr = set_attr; + gv->next = v->vars; + } + } + v->vars = gv; + } + + SWIGINTERN PyObject * + SWIG_globals(void) { + static PyObject *_SWIG_globals = 0; + if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); + return _SWIG_globals; + } + + /* ----------------------------------------------------------------------------- + * constants/methods manipulation + * ----------------------------------------------------------------------------- */ + + /* Install Constants */ + SWIGINTERN void + SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { + PyObject *obj = 0; + size_t i; + for (i = 0; constants[i].type; ++i) { + switch(constants[i].type) { + case SWIG_PY_POINTER: + obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); + break; + case SWIG_PY_BINARY: + obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); + break; + default: + obj = 0; + break; + } + if (obj) { + PyDict_SetItemString(d, constants[i].name, obj); + Py_DECREF(obj); + } + } + } + + /* -----------------------------------------------------------------------------*/ + /* Fix SwigMethods to carry the callback ptrs when needed */ + /* -----------------------------------------------------------------------------*/ + + SWIGINTERN void + SWIG_Python_FixMethods(PyMethodDef *methods, + swig_const_info *const_table, + swig_type_info **types, + swig_type_info **types_initial) { + size_t i; + for (i = 0; methods[i].ml_name; ++i) { + const char *c = methods[i].ml_doc; + if (c && (c = strstr(c, "swig_ptr: "))) { + int j; + swig_const_info *ci = 0; + const char *name = c + 10; + for (j = 0; const_table[j].type; ++j) { + if (strncmp(const_table[j].name, name, + strlen(const_table[j].name)) == 0) { + ci = &(const_table[j]); + break; + } + } + if (ci) { + size_t shift = (ci->ptype) - types; + swig_type_info *ty = types_initial[shift]; + size_t ldoc = (c - methods[i].ml_doc); + size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; + char *ndoc = (char*)malloc(ldoc + lptr + 10); + if (ndoc) { + char *buff = ndoc; + void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; + if (ptr) { + strncpy(buff, methods[i].ml_doc, ldoc); + buff += ldoc; + strncpy(buff, "swig_ptr: ", 10); + buff += 10; + SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); + methods[i].ml_doc = ndoc; + } + } + } + } + } + } + +#ifdef __cplusplus +} +#endif + +/* -----------------------------------------------------------------------------* + * Partial Init method + * -----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT void SWIG_init(void) { + PyObject *m, *d; + + /* Fix SwigMethods to carry the callback ptrs when needed */ + SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); + + m = Py_InitModule((char *) SWIG_name, SwigMethods); + d = PyModule_GetDict(m); + + SWIG_InitializeModule(0); + SWIG_InstallConstants(d,swig_const_table); + + + SWIG_Python_SetConstant(d, "OPT_TEST_HOP_SPEED",SWIG_From_int(static_cast< int >(0x00000001))); + SWIG_Python_SetConstant(d, "PRINT_NOTHING",SWIG_From_int(static_cast< int >(0x00000000))); + SWIG_Python_SetConstant(d, "PRINT_EVERYTHING",SWIG_From_int(static_cast< int >(0x7FFFFFFF))); + SWIG_Python_SetConstant(d, "PRINT_BITS",SWIG_From_int(static_cast< int >(0x00000001))); + SWIG_Python_SetConstant(d, "PRINT_ALL_BITS",SWIG_From_int(static_cast< int >(0x00000002))); + SWIG_Python_SetConstant(d, "PRINT_CORR_BITS",SWIG_From_int(static_cast< int >(0x00000004))); + SWIG_Python_SetConstant(d, "PRINT_STATE",SWIG_From_int(static_cast< int >(0x00000008))); + SWIG_Python_SetConstant(d, "PRINT_ALL_TYPES",SWIG_From_int(static_cast< int >(0x00000FF0))); + SWIG_Python_SetConstant(d, "PRINT_KNOWN",SWIG_From_int(static_cast< int >(0x00000FE0))); + SWIG_Python_SetConstant(d, "PRINT_UNKNOWN",SWIG_From_int(static_cast< int >(0x00000010))); + SWIG_Python_SetConstant(d, "PRINT_TS0",SWIG_From_int(static_cast< int >(0x00000020))); + SWIG_Python_SetConstant(d, "PRINT_FCCH",SWIG_From_int(static_cast< int >(0x00000040))); + SWIG_Python_SetConstant(d, "PRINT_SCH",SWIG_From_int(static_cast< int >(0x00000080))); + SWIG_Python_SetConstant(d, "PRINT_DUMMY",SWIG_From_int(static_cast< int >(0x00000100))); + SWIG_Python_SetConstant(d, "PRINT_NORMAL",SWIG_From_int(static_cast< int >(0x00000200))); + SWIG_Python_SetConstant(d, "PRINT_GSM_DECODE",SWIG_From_int(static_cast< int >(0x00004000))); + SWIG_Python_SetConstant(d, "PRINT_HEX",SWIG_From_int(static_cast< int >(0x00001000))); + SWIG_Python_SetConstant(d, "QB_NONE",SWIG_From_int(static_cast< int >(0x00000000))); + SWIG_Python_SetConstant(d, "QB_QUARTER",SWIG_From_int(static_cast< int >(0x00000001))); + SWIG_Python_SetConstant(d, "QB_FULL04",SWIG_From_int(static_cast< int >(0x00000003))); + SWIG_Python_SetConstant(d, "QB_MASK",SWIG_From_int(static_cast< int >(0x0000000F))); + SWIG_Python_SetConstant(d, "CLK_CORR_TRACK",SWIG_From_int(static_cast< int >(0x00000010))); + SWIG_Python_SetConstant(d, "BURST_CB_SYNC_OFFSET",SWIG_From_int(static_cast< int >(1))); + SWIG_Python_SetConstant(d, "BURST_CB_ADJ_OFFSET",SWIG_From_int(static_cast< int >(2))); + SWIG_Python_SetConstant(d, "BURST_CB_TUNE",SWIG_From_int(static_cast< int >(3))); + SWIG_Python_SetConstant(d, "EQ_NONE",SWIG_From_int(static_cast< int >(EQ_NONE))); + SWIG_Python_SetConstant(d, "EQ_FIXED_LINEAR",SWIG_From_int(static_cast< int >(EQ_FIXED_LINEAR))); + SWIG_Python_SetConstant(d, "EQ_ADAPTIVE_LINEAR",SWIG_From_int(static_cast< int >(EQ_ADAPTIVE_LINEAR))); + SWIG_Python_SetConstant(d, "EQ_FIXED_DFE",SWIG_From_int(static_cast< int >(EQ_FIXED_DFE))); + SWIG_Python_SetConstant(d, "EQ_ADAPTIVE_DFE",SWIG_From_int(static_cast< int >(EQ_ADAPTIVE_DFE))); + SWIG_Python_SetConstant(d, "EQ_VITERBI",SWIG_From_int(static_cast< int >(EQ_VITERBI))); +} + diff --git a/gsm-tvoid/src/lib/gsm.i b/gsm-tvoid/src/lib/gsm.i new file mode 100755 index 0000000..af644d9 --- /dev/null +++ b/gsm-tvoid/src/lib/gsm.i @@ -0,0 +1,134 @@ +/* -*- c++ -*- */ +//%feature("autodoc", "1"); // generate python docstrings +//%include "exception.i" +%import "gnuradio.i" // the common stuff + +%{ +#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix +//#include "gsm_constants.h" +//#include "gsm_burst.h" +#include "gsm_burst_ff.h" +#include "gsm_burst_cf.h" +#include "gsm_burst_sink_c.h" +//#include <stdexcept> + +%} + +// ---------------------------------------------------------------- + +#define OPT_TEST_HOP_SPEED 0x00000001 + + +#define PRINT_NOTHING 0x00000000 +#define PRINT_EVERYTHING 0x7FFFFFFF //7 for SWIG overflow check work around +#define PRINT_BITS 0x00000001 +#define PRINT_ALL_BITS 0x00000002 +#define PRINT_CORR_BITS 0x00000004 +#define PRINT_STATE 0x00000008 + +#define PRINT_ALL_TYPES 0x00000FF0 +#define PRINT_KNOWN 0x00000FE0 +#define PRINT_UNKNOWN 0x00000010 +#define PRINT_TS0 0x00000020 +#define PRINT_FCCH 0x00000040 +#define PRINT_SCH 0x00000080 +#define PRINT_DUMMY 0x00000100 +#define PRINT_NORMAL 0x00000200 + +#define PRINT_GSM_DECODE 0x00004000 + +#define PRINT_HEX 0x00001000 + +//Timing/clock options +#define QB_NONE 0x00000000 +#define QB_QUARTER 0x00000001 //only for internal clocked versions +#define QB_FULL04 0x00000003 +#define QB_MASK 0x0000000F + +#define CLK_CORR_TRACK 0x00000010 //adjust timing based on correlation offsets + +#define BURST_CB_SYNC_OFFSET 1 +#define BURST_CB_ADJ_OFFSET 2 +#define BURST_CB_TUNE 3 + +//EQ options +enum EQ_TYPE { + EQ_NONE, + EQ_FIXED_LINEAR, + EQ_ADAPTIVE_LINEAR, + EQ_FIXED_DFE, + EQ_ADAPTIVE_DFE, + EQ_VITERBI +}; + +//GR_SWIG_BLOCK_MAGIC(gsm,burst); + +class gsm_burst { +public: + ~gsm_burst (); + + unsigned long d_clock_options; + unsigned long d_print_options; + unsigned long d_test_options; + + EQ_TYPE d_equalizer_type; + + //stats + long d_sync_loss_count; + long d_fcch_count; + long d_part_sch_count; + long d_sch_count; + long d_normal_count; + long d_dummy_count; + long d_unknown_count; + long d_total_count; + + long next_arfcn; + + //hop testing + long d_hop_good_arfcn; + long d_hop_bad_arfcn; + + int sync_state(); + float last_freq_offset(void); + float mean_freq_offset(void); + + //Methods + void full_reset(void); + +protected: + gsm_burst(gr_feval_ll *); +}; + + +GR_SWIG_BLOCK_MAGIC(gsm,burst_ff); +gsm_burst_ff_sptr gsm_make_burst_ff (gr_feval_ll *); + +class gsm_burst_ff : public gr_block, public gsm_burst { +private: + gsm_burst_ff (gr_feval_ll *); +}; + +GR_SWIG_BLOCK_MAGIC(gsm,burst_cf); +gsm_burst_cf_sptr gsm_make_burst_cf (gr_feval_ll *,float); + +class gsm_burst_cf : public gr_block, public gsm_burst { +public: + float get_omega(); + +private: + gsm_burst_cf (gr_feval_ll *,float); +}; + +GR_SWIG_BLOCK_MAGIC(gsm,burst_sink_c); +gsm_burst_sink_c_sptr gsm_make_burst_sink_c(gr_feval_ll *,float); + +class gsm_burst_sink_c : public gr_sync_block, public gsm_burst { +private: + gsm_burst_sink_c (gr_feval_ll *,float); +}; + + + + + diff --git a/gsm-tvoid/src/lib/gsm_burst.cc b/gsm-tvoid/src/lib/gsm_burst.cc new file mode 100755 index 0000000..c52ff38 --- /dev/null +++ b/gsm-tvoid/src/lib/gsm_burst.cc @@ -0,0 +1,766 @@ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "gsm_burst.h" +#include <gr_math.h> +#include <stdio.h> +#include <math.h> +#include <memory.h> +#include <assert.h> +#include "system.h" +#include "gsmstack.h" + + +gsm_burst::gsm_burst (gr_feval_ll *t) : + p_tuner(t), + d_clock_options(DEFAULT_CLK_OPTS), + d_print_options(0), + d_test_options(0), + d_hop_good_arfcn(1), + d_hop_bad_arfcn(2), + d_equalizer_type(EQ_FIXED_DFE) +{ + +// fprintf(stderr,"gsm_burst: enter constructor (t=%8.8x)\n",(unsigned int)t); + +// M_PI = M_PI; //4.0 * atan(1.0); + + full_reset(); + + //encode sync bits + float tsync[N_SYNC_BITS]; + + for (int i=0; i < N_SYNC_BITS; i++) { + tsync[i] = 2.0*SYNC_BITS[i] - 1.0; + } + + diff_encode(tsync,corr_sync,N_SYNC_BITS); + +/* + fprintf(stderr," Sync: "); + print_bits(tsync,N_SYNC_BITS); + fprintf(stderr,"\n"); + + fprintf(stderr,"DSync: "); + print_bits(corr_sync,N_SYNC_BITS); + fprintf(stderr,"\n\n"); +*/ + + for (int i=0; i < 10; i++) { + for (int j=0; j < N_TRAIN_BITS; j++) { + tsync[j] = 2.0*train_seq[i][j] - 1.0; + } + diff_encode(tsync,corr_train_seq[i],N_TRAIN_BITS); + +/* + fprintf(stderr,"TSC%d: ",i); + print_bits(corr_train_seq[i],N_TRAIN_BITS); + fprintf(stderr,"\n"); +*/ + } + + /* Initialize GSM Stack */ + GS_new(&d_gs_ctx); +} + +gsm_burst::~gsm_burst () +{ +} + +void gsm_burst::sync_reset(void) +{ + d_sync_state = WAIT_FCCH; + d_last_good = 0; + d_last_sch = 0; + d_burst_count = 0; +} + +//TODO: check this for thread safeness +void gsm_burst::full_reset(void) +{ + sync_reset(); + + d_sync_loss_count=0; + d_fcch_count=0; + d_part_sch_count=0; + d_sch_count=0; + d_normal_count=0; + d_dummy_count=0; + d_unknown_count=0; + d_total_count=0; + + d_freq_offset=0.0; + d_freq_off_sum=0.0; + d_freq_off_weight=0; + + d_ts=0; + + d_bbuf_pos=0; + d_burst_start=MAX_CORR_DIST; + d_sample_count=0; + d_last_burst_s_count=0; + d_corr_pattern=0; + d_corr_pat_size=0; + d_corr_max=0.0; + d_corr_maxpos=0; + d_corr_center=0; + d_last_sync_state=WAIT_FCCH; + +} + +float gsm_burst::mean_freq_offset(void) +{ + if (d_freq_off_weight) + return d_freq_off_sum / d_freq_off_weight; + else + return 0.0; +} + +void gsm_burst::diff_encode(const float *in,float *out,int length,float lastbit) { + + for (int i=0; i < length; i++) { + out[i] = in[i] * lastbit; + lastbit=in[i]; + + } +} + +void gsm_burst::diff_decode(const float *in,float *out,int length,float lastbit) { + + for (int i=0; i < length; i++) { + out[i] = in[i] * lastbit; + lastbit = out [i]; + } +} + +void gsm_burst::diff_decode_burst(void) { + char lastbit = 0; + + //slice + for (int i = 0; i < USEFUL_BITS; i++) { + d_decoded_burst[i] = d_burst_buffer[d_burst_start + i] > 0 ? 0 : 1; + } + + //diff decode + for (int i=0; i < USEFUL_BITS; i++) { + d_decoded_burst[i] ^= lastbit; + lastbit = d_decoded_burst[i]; + } + +} + +void gsm_burst::print_hex(const unsigned char *data,int length) +{ + unsigned char tbyte; + int i,bitpos=0; + + assert(data); + assert(length >= 0); + + + + while (bitpos < length) { + tbyte = 0; + for (i=0; (i < 8) && (bitpos < length); i++) { + tbyte <<= 1; + tbyte |= data[bitpos++]; + } + if (i<8) + tbyte <<= 8 - i; + + fprintf(stdout,"%2.2X ",tbyte); + } +} + +void gsm_burst::print_bits(const float *data,int length) +{ + assert(data); + assert(length >= 0); + + for (int i=0; i < length; i++) + data[i] < 0 ? fprintf(stderr,"+") : fprintf(stderr,"."); + +} + +#if 0 +void gsm_burst::soft2hardbit(char *dst, const float *data, int len) +{ + for (int i=0; i < len; i++) + { + if (data[i] < 0) + dst[i] = 0; + else + dst[i] = 1; + } +} +#endif + +void gsm_burst::print_burst(void) +{ + int bursts_since_sch; + + int print = 0; + + //fprintf(stderr,"p=%8.8X ", d_print_options); + + if ( PRINT_GSM_DECODE & d_print_options ) { + + /* + * Pass information to GSM stack. GSM stack will try to extract + * information (fn, layer 2 messages, ...) + */ + diff_decode_burst(); + GS_process(&d_gs_ctx, d_ts, d_burst_type, d_decoded_burst); + } + + if ( PRINT_EVERYTHING == d_print_options ) + print = 1; + else if ( (!d_ts) && (d_print_options & PRINT_TS0) ) + print = 1; + else if ( (DUMMY == d_burst_type) && (d_print_options & PRINT_DUMMY) ) + print = 1; + else if ( (NORMAL == d_burst_type) && (d_print_options & PRINT_NORMAL) ) + print = 1; + else if ( (SCH == d_burst_type) && (d_print_options & PRINT_SCH) ) + print = 1; + else if ( (FCCH == d_burst_type) && (d_print_options & PRINT_FCCH) ) + print = 1; + else if ( (UNKNOWN == d_burst_type) && (d_print_options & PRINT_UNKNOWN) ) + print = 1; + + if ( print && (d_print_options & PRINT_BITS) ) { + if (d_print_options & PRINT_ALL_BITS) + { + print_bits(d_burst_buffer,BBUF_SIZE); + } else { + /* 142 useful bits: 2*58 + 26 training */ + print_bits(d_burst_buffer + d_burst_start,USEFUL_BITS); + } + + fprintf(stderr," "); + } + + if (print) { + + fprintf(stderr,"%d/%d/%+d/%lu/%lu ", + d_sync_state, + d_ts, + d_burst_start - MAX_CORR_DIST, + d_sample_count, + d_sample_count - d_last_burst_s_count); + + switch (d_burst_type) { + case FCCH: + fprintf(stderr,"[FCCH] foff:%g cnt:%lu",d_freq_offset,d_fcch_count); + break; + case PARTIAL_SCH: + bursts_since_sch = d_burst_count - d_last_sch; + + fprintf(stderr,"[P-SCH] cor:%.2f last:%d cnt: %lu", + d_corr_max,bursts_since_sch,d_sch_count); + break; + case SCH: + bursts_since_sch = d_burst_count - d_last_sch; + + fprintf(stderr,"[SCH] cor:%.2f last:%d cnt: %lu", + d_corr_max,bursts_since_sch,d_sch_count); + break; + case DUMMY: + fprintf(stderr,"[DUMMY] cor:%.2f",d_corr_max); + break; + case ACCESS: + fprintf(stderr,"[ACCESS]"); //We don't detect this yet + break; + case NORMAL: + fprintf(stderr,"[NORM] clr:%d cor:%.2f",d_color_code,d_corr_max); + break; + case UNKNOWN: + fprintf(stderr,"[?]"); + break; + default: + fprintf(stderr,"[oops! default]"); + break; + } + + fprintf(stderr,"\n"); + + + //print the correlation pattern for visual inspection + if ( (UNKNOWN != d_burst_type) && + (d_sync_state > WAIT_SCH_ALIGN) && + (d_print_options & PRINT_CORR_BITS) ) + { + + int pat_indent; + + if (d_print_options & PRINT_ALL_BITS) + pat_indent = d_corr_center + d_corr_maxpos; + else + pat_indent = d_corr_center - MAX_CORR_DIST; //useful bits will already be offset + + for (int i = 0; i < pat_indent; i++) + fprintf(stderr," "); + + fprintf(stderr," "); //extra space for skipped bit + print_bits(d_corr_pattern+1,d_corr_pat_size-1); //skip first bit (diff encoding) + + fprintf(stderr,"\t\toffset:%d, max: %.2f \n",d_corr_maxpos,d_corr_max); + } + + } + + //Print Burst data in hex + if ( d_print_options & PRINT_HEX ) { + fprintf(stdout,"%d,%d,",d_ts,d_burst_type); + diff_decode_burst(); + print_hex(d_decoded_burst,USEFUL_BITS); + fprintf(stdout,"\n"); + } + + //Print State related messages + if ( d_print_options & PRINT_STATE ) { + if ( (SYNCHRONIZED == d_sync_state) && (SYNCHRONIZED != d_last_sync_state) ) { + fprintf(stderr,"====== SYNC GAINED (FOff: %g Corr: %.2f, Color: %d ) ======\n",d_freq_offset,d_corr_max,d_color_code); + } + else if ( (SYNCHRONIZED != d_sync_state) && (SYNCHRONIZED == d_last_sync_state) ) { + fprintf(stderr,"====== SYNC LOST (%ld) ======\n",d_sync_loss_count); + } + } + +} + +void gsm_burst::shift_burst(int shift_bits) +{ + //fprintf(stderr,"sft:%d\n",shift_bits); + + assert(shift_bits >= 0); + assert(shift_bits < BBUF_SIZE ); + + float *p_src = d_burst_buffer + shift_bits; + float *p_dst = d_burst_buffer; + int num = BBUF_SIZE - shift_bits; + + memmove(p_dst,p_src,num * sizeof(float)); //need memmove because of overlap + + //adjust the buffer positions + d_bbuf_pos -= shift_bits; + + assert(d_bbuf_pos >= 0); +} + + +//Calculate frequency offset of an FCCH burst from the mean phase difference +//FCCH should be a constant frequency and equivalently a constant phase +//increment (pi/2) per sample. Calculate the frequency offset by the difference +//of the mean phase from pi/2. +void gsm_burst::calc_freq_offset(void) +{ + const int padding = 20; + int start = d_burst_start + padding; + int end = d_burst_start + USEFUL_BITS - padding; + + float sum = 0.0; + for (int j = start; j <= end; j++) { + sum += d_burst_buffer[j]; + } + float mean = sum / ((float)USEFUL_BITS - (2.0 * (float)padding) ); + + float p_off = mean - (M_PI / 2); + d_freq_offset = p_off * 1625000.0 / (12.0 * M_PI); + + + //maintain a 100 weight mean + if (d_freq_off_weight < 100) + d_freq_off_weight++; + else + d_freq_off_sum *= 99.0/100.0; + + d_freq_off_sum += d_freq_offset; +} + +// This will look for a series of positive phase differences comprising +// a FCCH burst. When we find one, we calculate the frequency offset and +// adjust the burst timing so that it will be at least coarsely aligned +// for SCH detection. +// +// TODO: Adjust start pos on long hits +// very large hit counts may indicate an unmodulated carrier. +BURST_TYPE gsm_burst::get_fcch_burst(void) +{ + int hit_count = 0; + int miss_count = 0; + int start_pos = -1; + + for (int i=0; i < BBUF_SIZE; i++) { + if (d_burst_buffer[i] > 0) { + if ( ! hit_count++ ) + start_pos = i; + } + else { + if (hit_count >= FCCH_HITS_NEEDED) { + break; + } + else if ( ++miss_count > FCCH_MAX_MISSES ) { + start_pos = -1; + hit_count = miss_count = 0; + } + } + } + + //Do we have a match? + if ( start_pos >= 0 ) { + //Is it within range? (we know it's long enough then too) + if ( start_pos < 2*MAX_CORR_DIST ) { + d_burst_start = start_pos; + d_bbuf_pos = 0; //load buffer from start + return FCCH; + + } + else { + //TODO: don't shift a tiny amount + shift_burst(start_pos - MAX_CORR_DIST); + } + } + else { + //Didn't find anything + d_burst_start = MAX_CORR_DIST; + d_bbuf_pos = 0; //load buffer from start + } + + return UNKNOWN; +} + + +void gsm_burst::equalize(void) +{ + float last = 0.0; + + switch ( d_equalizer_type ) { + case EQ_FIXED_LINEAR: + //TODO: should filter w/ inverse freq response + //this is just for giggles + for (int i = 1; i < BBUF_SIZE - 1; i++) { + d_burst_buffer[i] = - 0.4 * d_burst_buffer[i-1] + 1.1 * d_burst_buffer[i] - 0.4 * d_burst_buffer[i+1]; + } + break; + case EQ_FIXED_DFE: + //TODO: allow coefficients to be options? + for (int i = 0; i < BBUF_SIZE; i++) { + d_burst_buffer[i] -= 0.4 * last; + d_burst_buffer[i] > 0.0 ? last = M_PI/2 : last = -M_PI/2; + } + break; + default: + fprintf(stderr,"!EQ"); + case EQ_NONE: + break; + } +} + +//TODO: optimize by working incrementally out from center and returning when a provided threshold is reached +float gsm_burst::correlate_pattern(const float *pattern,const int pat_size,const int center,const int distance) +{ + float corr; + + //need to save these for later printing, etc + //TODO: not much need for function params when we have the member vars + d_corr_pattern = pattern; + d_corr_pat_size = pat_size; + d_corr_max = 0.0; + d_corr_maxpos = 0; + d_corr_center = center; + + for (int j=-distance;j<=distance;j++) { + corr = 0.0; + for (int i = 1; i < pat_size; i++) { //Start a 1 to skip first bit due to diff encoding + //d_corr[j+distance] += d_burst_buffer[center+i+j] * pattern[i]; + //corr += SIGNUM(d_burst_buffer[center+i+j]) * pattern[i]; //binary corr/sliced + corr += d_burst_buffer[center+i+j] * pattern[i]; + } + corr /= pat_size - 1; //normalize, -1 for skipped first bit + if (corr > d_corr_max) { + d_corr_max = corr; + d_corr_maxpos = j; + } + } + + return d_corr_max; +} + +BURST_TYPE gsm_burst::get_sch_burst(void) +{ + BURST_TYPE type = UNKNOWN; + int tpos = 0; //default d_bbuf_pos + + equalize(); + +// if (!d_ts) { // wait for TS0 + + //correlate over a range to detect and align on the sync pattern + correlate_pattern(corr_sync,N_SYNC_BITS,MAX_CORR_DIST+SYNC_POS,20); + + if (d_corr_max > SCH_CORR_THRESHOLD) { + d_burst_start += d_corr_maxpos; + + //It's possible that we will corelate far enough out that some burst data will be lost. + // In this case we should be in aligned state, and wait until next SCH to decode it + if (d_burst_start < 0) { + //We've missed the beginning of the data, wait for the next SCH + //TODO: verify timing in this case + type = PARTIAL_SCH; + } else if (d_burst_start > 2 * MAX_CORR_DIST) { + //The rest of our data is still coming, get it... + shift_burst(d_burst_start - MAX_CORR_DIST); + d_burst_start = MAX_CORR_DIST; + tpos = d_bbuf_pos; + } else { + type = SCH; + } + } + else { + d_burst_start = MAX_CORR_DIST; + } + +// } else { +// d_burst_start = MAX_CORR_DIST; +// } + + d_bbuf_pos = tpos; + + return type; +} + +BURST_TYPE gsm_burst::get_norm_burst(void) +{ + int eq = 0; + BURST_TYPE type = UNKNOWN; + + + if (!d_ts) { + // Don't equalize before checking FCCH + if ( FCCH_CORR_THRESHOLD < correlate_pattern(corr_train_seq[TS_FCCH],N_TRAIN_BITS,MAX_CORR_DIST+TRAIN_POS,0) ) { + type = FCCH; + d_burst_start = MAX_CORR_DIST; + d_corr_maxpos = 0; //we don't want to affect timing + + } + else { + equalize(); + eq=1; + + //TODO: check CTS & COMPACT SYNC + if (SCH_CORR_THRESHOLD < correlate_pattern(corr_sync,N_SYNC_BITS,MAX_CORR_DIST+SYNC_POS,MAX_CORR_DIST) ) + type = SCH; + } + } + + if (UNKNOWN == type) { //no matches yet + if (!eq) equalize(); + + //Match dummy sequence + if ( NORM_CORR_THRESHOLD < correlate_pattern(corr_train_seq[TS_DUMMY],N_TRAIN_BITS,MAX_CORR_DIST+TRAIN_POS,MAX_CORR_DIST) ) { + type = DUMMY; + + } + else { + //Match normal training sequences + //TODO: start with current color code + for (int i=0; i < 8; i++) { + if ( NORM_CORR_THRESHOLD < correlate_pattern(corr_train_seq[i],N_TRAIN_BITS,MAX_CORR_DIST+TRAIN_POS,MAX_CORR_DIST) ) { + type = NORMAL; + d_color_code = i; + break; + } + } + } + } + + if ( UNKNOWN == type ) { + d_burst_start = MAX_CORR_DIST; + + } else { + d_burst_start += d_corr_maxpos; + } + + return type; +} + + +int gsm_burst::get_burst(void) +{ + //TODO: should we output data while looking for FCCH? Maybe an option. + int got_burst=1; //except for the WAIT_FCCH case we always have output + d_burst_type = UNKNOWN; //default + + //begin with the assumption the the burst will be in the correct position + d_burst_start = MAX_CORR_DIST; + + //process the burst + switch (d_sync_state) { + case WAIT_FCCH: + d_ts = 0; + + if ( FCCH == ( d_burst_type = get_fcch_burst()) ) { + d_sync_state = WAIT_SCH_ALIGN; + d_bbuf_pos = 0; //load buffer from start + + } + else { + got_burst = 0; + } + + break; + + case WAIT_SCH_ALIGN: + d_burst_type = get_sch_burst(); + + switch ( d_burst_type ) { + case PARTIAL_SCH: + d_sync_state = WAIT_SCH; + break; + //case SCH: + //let the burst type switch handle this so it knows if new or old sync + // d_sync_state = SYNCHRONIZED; + break; + default: + break; + } + + break; + + case WAIT_SCH: //TODO: check this case + case SYNCHRONIZED: + d_burst_type = get_norm_burst(); + d_bbuf_pos = 0; //load buffer from start + + break; + } + + //Update stats + switch (d_burst_type) { + case FCCH: + if (SYNCHRONIZED == d_sync_state) + d_burst_count++; + else + d_burst_count = 0; + + d_fcch_count++; + calc_freq_offset(); + d_ts = 0; + break; + case PARTIAL_SCH: + d_burst_count++; + d_part_sch_count++; + d_last_sch = d_burst_count; + d_ts = 0; //TODO: check this + break; + case SCH: + //TODO: it would be better to adjust tuning on first FCCH (for better SCH detection), + // but tuning can run away with false FCCHs + // Some logic to retune back to original offset on false FCCH might work + if (p_tuner) { + if (SYNCHRONIZED == d_sync_state) + p_tuner->calleval(BURST_CB_ADJ_OFFSET); + else + p_tuner->calleval(BURST_CB_SYNC_OFFSET); + + } + d_burst_count++; + d_sch_count++; + d_last_sch = d_burst_count; + d_sync_state = SYNCHRONIZED; //handle WAIT_SCH + d_ts = 0; + break; + case NORMAL: + d_burst_count++; + d_normal_count++; + break; + case DUMMY: + d_burst_count++; + d_dummy_count++; + break; + default: + case UNKNOWN: + if (SYNCHRONIZED == d_sync_state) { + d_burst_count++; + d_unknown_count++; + } + break; + } + + if (UNKNOWN != d_burst_type) { + d_last_good = d_burst_count; + } + + //Check for loss of sync + int bursts_since_good = d_burst_count - d_last_good; + if (bursts_since_good > MAX_SYNC_WAIT) { + d_sync_loss_count++; + sync_reset(); + } + + if (got_burst) { + d_total_count++; + + //print info + print_burst(); + + ///////////////////// + //start tune testing +#ifdef TEST_HOP_SPEED + static int good_count = -1; //-1: wait sch, >=0: got sch, counting + static int wait_count = 0; + + if (OPT_TEST_HOP_SPEED & d_test_options ) { + //have we started counting? + if ( good_count >= 0 ) { + + if (UNKNOWN == d_burst_type) { + if (good_count >= 0) { + fprintf(stdout,"good_count: %d\n",good_count); + + if (p_tuner) { + next_arfcn = d_hop_good_arfcn; + p_tuner->calleval(BURST_CB_TUNE); + } + } + good_count = -1; // start again at resync + + } else { + //count good bursts + good_count++; + } + + } else { + //haven't started counting + // get some good syncs before trying again + if ((SCH == d_burst_type) && (++wait_count > 5)) { + //fprintf(stdout,"restarting good_count\n"); + good_count = wait_count = 0; + //tune away + if (p_tuner) { + next_arfcn = d_hop_bad_arfcn; + p_tuner->calleval(BURST_CB_TUNE); + } + } + } + } +#endif + //end tune testing + ///////////////////// + + + //Adjust the buffer write position to align on MAX_CORR_DIST + if ( d_clock_options & CLK_CORR_TRACK ) + d_bbuf_pos += MAX_CORR_DIST - d_burst_start; + } + + d_last_sync_state = d_sync_state; + + d_ts = (++d_ts)%8; //next TS + + return got_burst; +} + diff --git a/gsm-tvoid/src/lib/gsm_burst.h b/gsm-tvoid/src/lib/gsm_burst.h new file mode 100755 index 0000000..056516c --- /dev/null +++ b/gsm-tvoid/src/lib/gsm_burst.h @@ -0,0 +1,193 @@ +#ifndef INCLUDED_GSM_BURST_H +#define INCLUDED_GSM_BURST_H + +//TODO: rename to gsm_burst_receiver ? use gsm_burst as encapsulation of an actual burst, incl bbuf, etc. +// need to determine what is a decoder vs. burst function. E.g. calc_freq_offset +// everything but I/O & clocking & sync_state? +// What about handling complex&diff&bin data? + +#include "gsm_constants.h" +#include <gr_math.h> +#include <gr_feval.h> +#include "gsmstack.h" + +//Testing Modes +//Tune test measures hopping latency by hopping between good and empty ARFCNs +#define TEST_HOP_SPEED + +//Test Options +#define OPT_TEST_HOP_SPEED 0x00000001 + +//Console printing options +#define PRINT_NOTHING 0x00000000 +#define PRINT_EVERYTHING 0x7FFFFFFF //7 for SWIG overflow check work around +#define PRINT_BITS 0x00000001 +#define PRINT_ALL_BITS 0x00000002 +#define PRINT_CORR_BITS 0x00000004 +#define PRINT_STATE 0x00000008 + +#define PRINT_ALL_TYPES 0x00000FF0 +#define PRINT_KNOWN 0x00000FE0 +#define PRINT_UNKNOWN 0x00000010 +#define PRINT_TS0 0x00000020 +#define PRINT_FCCH 0x00000040 +#define PRINT_SCH 0x00000080 +#define PRINT_DUMMY 0x00000100 +#define PRINT_NORMAL 0x00000200 + +#define PRINT_GSM_DECODE 0x00004000 + +#define PRINT_HEX 0x00001000 + +//Timing/clock options +#define QB_NONE 0x00000000 +#define QB_QUARTER 0x00000001 //only for internal clocked versions +#define QB_FULL04 0x00000003 +#define QB_MASK 0x0000000F + +#define CLK_CORR_TRACK 0x00000010 //adjust timing based on correlation offsets + +#define DEFAULT_CLK_OPTS ( QB_QUARTER | CLK_CORR_TRACK ) + +#define SIGNUM(x) ((x>0)-(x<0)) + +#define BBUF_SIZE TS_BITS + +// Center bursts in the TS, splitting the guard period +// +// +--+--+---...-----+--...---+----...----+--+--+ +// G T D1 TS D2 T G +// Start ^ + +//#define MAX_SYNC_WAIT 32 //Number of missed bursts before reverting to WAIT_FCCH. +#define MAX_SYNC_WAIT 64 //Number of missed bursts before reverting to WAIT_FCCH. + +#define MAX_CORR_DIST 7 // 4 + 3 = 1/2 GUARD + TAIL +#define SCH_CORR_THRESHOLD 0.80 +#define FCCH_CORR_THRESHOLD 0.90 +#define NORM_CORR_THRESHOLD 0.80 + +#define FCCH_HITS_NEEDED (USEFUL_BITS - 4) +#define FCCH_MAX_MISSES 1 + +enum EQ_TYPE { + EQ_NONE, + EQ_FIXED_LINEAR, + EQ_ADAPTIVE_LINEAR, + EQ_FIXED_DFE, + EQ_ADAPTIVE_DFE, + EQ_ADAPT_TRAINING, + EQ_VITERBI +}; + +#define BURST_CB_SYNC_OFFSET 1 +#define BURST_CB_ADJ_OFFSET 2 +#define BURST_CB_TUNE 3 + + +class gsm_burst; + +class gsm_burst +{ +protected: + + gsm_burst(gr_feval_ll *t); + + //Burst Buffer: Storage for burst data + float d_burst_buffer[BBUF_SIZE]; + int d_bbuf_pos; //write position + int d_burst_start; //first useful bit (beginning of output) + unsigned long d_sample_count; //sample count at end (TODO:beginning) of BBUF (bit count if external clock) + unsigned long d_last_burst_s_count; //sample count from previous burst + + unsigned char d_decoded_burst[USEFUL_BITS]; //Differentially Decoded burst buffer {0,1} + + ///// Sync/training sequence correlation + float corr_sync[N_SYNC_BITS]; //encoded sync bits for correlation + float corr_train_seq[10][N_TRAIN_BITS]; + const float *d_corr_pattern; + int d_corr_pat_size; + float d_corr_max; + int d_corr_maxpos; + int d_corr_center; + + ///// GSM Stack + GS_CTX d_gs_ctx; + + ///// Burst information + SYNC_STATE d_sync_state; + SYNC_STATE d_last_sync_state; + BURST_TYPE d_burst_type; + unsigned d_ts; //timeslot 0-7 + unsigned long d_last_good; //Burst count of last good burst + unsigned long d_burst_count; //Bursts received starting w/ initial FCCH reset after lost sync + unsigned long d_last_sch; //Burst count of last SCH + int d_color_code; + + float d_freq_offset; + float d_freq_off_sum; + float d_freq_off_weight; + + gr_feval_ll *p_tuner; + + //////// Methods + int get_burst(void); + BURST_TYPE get_fcch_burst(void); + BURST_TYPE get_sch_burst(void); + BURST_TYPE get_norm_burst(void); + + virtual void shift_burst(int); + void calc_freq_offset(void); + virtual void equalize(void); + float correlate_pattern(const float *,const int,const int,const int); + void diff_decode_burst(void); + + void sync_reset(void); + + void print_bits(const float *data,int length); + void print_hex(const unsigned char *data,int length); + +// void soft2hardbit(char *dst, const float *data, int len); //need this? + void print_burst(void); + + void diff_encode(const float *in,float *out,int length,float lastbit = 1.0); + void diff_decode(const float *in,float *out,int length,float lastbit = 1.0); + +public: + virtual ~gsm_burst (); + + ////// General Stats + //TODO: Maybe there should be a burst_stats class? + long d_sync_loss_count; + long d_fcch_count; + long d_part_sch_count; + long d_sch_count; + long d_normal_count; + long d_dummy_count; + long d_unknown_count; + long d_total_count; + + ////// Options + unsigned long d_test_options; + unsigned long d_clock_options; + unsigned long d_print_options; + EQ_TYPE d_equalizer_type; + + //Hop speed info + long d_hop_good_arfcn; + long d_hop_bad_arfcn; + + //Methods + void full_reset(void); + + int sync_state() { return d_sync_state;} + + //Frequency + float last_freq_offset() {return d_freq_offset;} + float mean_freq_offset(void); + + long next_arfcn; +}; + + +#endif /* INCLUDED_GSM_BURST_H */ diff --git a/gsm-tvoid/src/lib/gsm_burst_cf.cc b/gsm-tvoid/src/lib/gsm_burst_cf.cc new file mode 100755 index 0000000..73293d8 --- /dev/null +++ b/gsm-tvoid/src/lib/gsm_burst_cf.cc @@ -0,0 +1,157 @@ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <gsm_burst_cf.h> +#include <gr_io_signature.h> +#include <gr_math.h> +#include <stdio.h> +#include <string.h> +#include <gri_mmse_fir_interpolator_cc.h> + +gsm_burst_cf_sptr gsm_make_burst_cf (gr_feval_ll *t,float sample_rate) +{ + return gsm_burst_cf_sptr (new gsm_burst_cf (t,sample_rate)); +} + +static const int MIN_IN = 1; // minimum number of input streams +static const int MAX_IN = 1; // maximum number of input streams +static const int MIN_OUT = 0; // minimum number of output streams +static const int MAX_OUT = 1; // maximum number of output streams + +gsm_burst_cf::gsm_burst_cf (gr_feval_ll *t, float sample_rate) : + gr_block( "burst_cf", + gr_make_io_signature (MIN_IN, MAX_IN, sizeof (gr_complex)), + gr_make_io_signature (MIN_OUT, MAX_OUT, USEFUL_BITS * sizeof (float)) //TODO: pad to ^2 = 256 ? + ), + gsm_burst(t), + d_clock_counter(0.0), + d_last_sample(0.0,0.0), + mm(sample_rate / GSM_SYMBOL_RATE), + d_interp(new gri_mmse_fir_interpolator_cc() + ) + +{ + + //clocking parameters + //d_sample_interval = 1.0 / sample_rate; + //d_omega = sample_rate / GSM_SYMBOL_RATE; + +// fprintf(stderr,"Sample interval : %e\n",d_sample_interval); +// fprintf(stderr,"Relative sample rate : %g\n",d_omega); + + + //set_relative_rate( mm.d_omega / 156); + set_relative_rate( 1.0 / (mm.d_omega * 156) ); + + set_history(4); //need history for interpolator + +} + +gsm_burst_cf::~gsm_burst_cf () +{ + delete d_interp; +} + +void gsm_burst_cf::forecast (int noutput_items, gr_vector_int &ninput_items_required) +{ + unsigned ninputs = ninput_items_required.size (); + for (unsigned i = 0; i < ninputs; i++) { + ninput_items_required[i] = noutput_items * (int)ceil(mm.d_omega) * TS_BITS; + //fprintf(stderr,"forecast[%d]: %d = %d\n",i,noutput_items,ninput_items_required[i]); + } +} + +int gsm_burst_cf::general_work (int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) +{ + const gr_complex *in = (const gr_complex *) input_items[0]; + float *out = (float *) output_items[0]; + + int ii=0; + int rval = 0; //default to no output + int num_outputs = output_items.size(); + int do_output = num_outputs > 0 ? 1 : 0; + + int ninput = ninput_items[0]; + //fprintf(stderr,"#i=%d/#o=%d",ninput,noutput_items); + + int ni = ninput - d_interp->ntaps() - 16; // interpolator need -4/+3 samples NTAPS = 8 , - 16 for safety margin + + while (( rval < noutput_items) && ( ii < ni ) ) { + //clock symbols + //TODO: this is very basic and can be improved. Need tracking... + //TODO: save complex samples for Viterbi EQ + + //get interpolated sample + gr_complex x_0 = d_interp->interpolate (&in[ii], mm.d_mu); + + //calulate phase difference (demod) + gr_complex conjprod = x_0 * conj(d_last_sample); + float diff_angle = gr_fast_atan2f(imag(conjprod), real(conjprod)); + + //mM&M + //mm.update(x_0); //mm_c + mm.update(diff_angle); //mm_f + + assert(d_bbuf_pos <= BBUF_SIZE ); + + if (d_bbuf_pos >= 0) //could be negative offset from burst alignment. TODO: perhaps better just to add some padding to the buffer + d_burst_buffer[d_bbuf_pos] = diff_angle; + + d_bbuf_pos++; + + if ( d_bbuf_pos >= BBUF_SIZE ) { + + if (get_burst()) { + //found a burst, send to output + if (do_output) { + //ensure that output data is in range + int b = d_burst_start; + if (b < 0) + b = 0; + else if (b >= 2 * MAX_CORR_DIST) + b = 2 * MAX_CORR_DIST - 1; + + memcpy(out+rval*USEFUL_BITS, d_burst_buffer + b, USEFUL_BITS*sizeof(float)); + } + rval++; + + switch ( d_clock_options & QB_MASK ) { + case QB_QUARTER: //extra 1/4 bit each burst + mm.d_mu -= mm.d_omega / 4.0; + //d_clock_counter -= GSM_SYMBOL_PERIOD / 4.0; + break; + case QB_FULL04: //extra bit on timeslot 0 & 4 + if (!(d_ts%4)) + mm.d_mu -= mm.d_omega; + //d_clock_counter -= GSM_SYMBOL_PERIOD; + break; + case QB_NONE: //don't adjust for quarter bits at all + default: + break; + } + + d_last_burst_s_count = d_sample_count; + + //fprintf(stderr,"clock: %f, pos: %d\n",d_clock_counter,d_bbuf_pos); + } + } + + //process mu / ii advance + ii += (int)floor(mm.d_mu); + d_sample_count += (int)floor(mm.d_mu); + mm.d_mu -= floor(mm.d_mu); + + d_last_sample = x_0; + } + + //fprintf(stderr,"/ii=%d/rval=%d\n",ii,rval); + + consume_each (ii); + + return rval; +} diff --git a/gsm-tvoid/src/lib/gsm_burst_cf.h b/gsm-tvoid/src/lib/gsm_burst_cf.h new file mode 100755 index 0000000..fe3663c --- /dev/null +++ b/gsm-tvoid/src/lib/gsm_burst_cf.h @@ -0,0 +1,50 @@ +#ifndef INCLUDED_GSM_BURST_CF_H +#define INCLUDED_GSM_BURST_CF_H + +#include <gr_block.h> +#include "gsm_burst.h" +#include "mm_f.h" + +class gsm_burst_cf; + +typedef boost::shared_ptr<gsm_burst_cf> gsm_burst_cf_sptr; + +gsm_burst_cf_sptr gsm_make_burst_cf(gr_feval_ll *,float); + +class gri_mmse_fir_interpolator_cc; + +class gsm_burst_cf : public gr_block, public gsm_burst +{ +private: + + friend gsm_burst_cf_sptr gsm_make_burst_cf(gr_feval_ll *,float); + gsm_burst_cf(gr_feval_ll *,float); + + //clocking parameters + float d_sample_interval; + float d_clock_counter; //??? sample count ??? + + gr_complex d_last_sample; + + //M&M clock recovery + mm_f mm; + + gri_mmse_fir_interpolator_cc *d_interp; //sub-sample interpolator from GR + + gr_complex slicer(gr_complex x); + +public: + ~gsm_burst_cf (); + + void forecast (int noutput_items, gr_vector_int &ninput_items_required); + + int general_work ( int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); + + float get_omega() {return mm.d_omega;} + +}; + +#endif /* INCLUDED_GSM_BURST_CF_H */ diff --git a/gsm-tvoid/src/lib/gsm_burst_ff.cc b/gsm-tvoid/src/lib/gsm_burst_ff.cc new file mode 100755 index 0000000..ce7999e --- /dev/null +++ b/gsm-tvoid/src/lib/gsm_burst_ff.cc @@ -0,0 +1,110 @@ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <gsm_burst_ff.h> +#include <gr_io_signature.h> +#include <gr_math.h> +#include <stdio.h> +#include <string.h> +#include <gri_mmse_fir_interpolator_cc.h> + +gsm_burst_ff_sptr gsm_make_burst_ff (gr_feval_ll *t) +{ + return gsm_burst_ff_sptr (new gsm_burst_ff(t)); +} + +static const int MIN_IN = 1; // minimum number of input streams +static const int MAX_IN = 1; // maximum number of input streams +static const int MIN_OUT = 0; // minimum number of output streams +static const int MAX_OUT = 1; // maximum number of output streams + +gsm_burst_ff::gsm_burst_ff (gr_feval_ll *t) : + gsm_burst(t), + gr_block( "burst_ff", + gr_make_io_signature (MIN_IN, MAX_IN, sizeof (float)), + gr_make_io_signature (MIN_OUT, MAX_OUT, USEFUL_BITS * sizeof (float))) +{ + + set_history(1); + +} + +gsm_burst_ff::~gsm_burst_ff () +{ +} + +void gsm_burst_ff::forecast (int noutput_items, gr_vector_int &ninput_items_required) +{ + unsigned ninputs = ninput_items_required.size (); + for (unsigned i = 0; i < ninputs; i++) + ninput_items_required[i] = noutput_items * BBUF_SIZE; +} + + +int gsm_burst_ff::general_work (int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) +{ + const float *in = (const float *) input_items[0]; + float *out = (float *) output_items[0]; + + int ii=0; + int rval = 0; //default to no output + int do_output = output_items.size() > 0 ? 1 : 0; + + int n_input = ninput_items[0]; +// fprintf(stderr,"out=%8.8x/#i=%d/#o=%d",(unsigned)out,n_input,noutput_items); + + while (( rval < noutput_items) && ( ii < n_input ) ) { + + assert(d_bbuf_pos <= BBUF_SIZE ); + + if (d_bbuf_pos >= 0) //could have been offset negative. TODO: perhaps better just to add some slack to the buffer + d_burst_buffer[d_bbuf_pos] = in[ii]; + + d_bbuf_pos++; + + if ( d_bbuf_pos >= BBUF_SIZE ) { + + if (get_burst()) { + //found a burst, send to output + if (do_output) { + //ensure that output data is in range + int b = d_burst_start; + if (b < 0) + b = 0; + else if (b >= 2 * MAX_CORR_DIST) + b = 2 * MAX_CORR_DIST - 1; + + memcpy(out+rval*USEFUL_BITS, d_burst_buffer + b, USEFUL_BITS*sizeof(float)); + } + rval++; + + switch ( d_clock_options & QB_MASK ) { + case QB_QUARTER: //Can't do this in the FF version + case QB_FULL04: //extra bit on timeslot 0 & 4 + if (!(d_ts%4)) + d_bbuf_pos--; + break; + case QB_NONE: //don't adjust for quarter bits at all + default: + break; + } + + d_last_burst_s_count = d_sample_count; + + } + } + d_sample_count++; + ii++; + } + +// fprintf(stderr,"/ii=%d/rval=%d\n",ii,rval); + + consume_each (ii); + + return rval; +} diff --git a/gsm-tvoid/src/lib/gsm_burst_ff.h b/gsm-tvoid/src/lib/gsm_burst_ff.h new file mode 100755 index 0000000..8ca61ef --- /dev/null +++ b/gsm-tvoid/src/lib/gsm_burst_ff.h @@ -0,0 +1,31 @@ +#ifndef INCLUDED_GSM_BURST_FF_H +#define INCLUDED_GSM_BURST_FF_H + +#include <gr_block.h> +#include <gsm_burst.h> + +class gsm_burst_ff; + +typedef boost::shared_ptr<gsm_burst_ff> gsm_burst_ff_sptr; + +gsm_burst_ff_sptr gsm_make_burst_ff(gr_feval_ll *); + +class gsm_burst_ff : public gr_block, public gsm_burst +{ +private: + + friend gsm_burst_ff_sptr gsm_make_burst_ff(gr_feval_ll *); + gsm_burst_ff(gr_feval_ll *t); + +public: + ~gsm_burst_ff (); + + void forecast (int noutput_items, gr_vector_int &ninput_items_required); + + int general_work ( int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); +}; + +#endif /* INCLUDED_GSM_BURST_FF_H */ diff --git a/gsm-tvoid/src/lib/gsm_burst_ff_single.cc b/gsm-tvoid/src/lib/gsm_burst_ff_single.cc new file mode 100755 index 0000000..ff6c354 --- /dev/null +++ b/gsm-tvoid/src/lib/gsm_burst_ff_single.cc @@ -0,0 +1,118 @@ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <gsm_burst_ff.h> +#include <gr_io_signature.h> +#include <gr_math.h> +#include <stdio.h> +#include <gri_mmse_fir_interpolator_cc.h> + +gsm_burst_ff_sptr gsm_make_burst_ff (gr_feval_ll *t) +{ + return gsm_burst_ff_sptr (new gsm_burst_ff(t)); +} + +static const int MIN_IN = 1; // minimum number of input streams +static const int MAX_IN = 1; // maximum number of input streams +static const int MIN_OUT = 0; // minimum number of output streams +static const int MAX_OUT = 1; // maximum number of output streams + +gsm_burst_ff::gsm_burst_ff (gr_feval_ll *t) : + gsm_burst(t), + gr_block( "burst_ff", + gr_make_io_signature (MIN_IN, MAX_IN, sizeof (float)), +// gr_make_io_signature (MIN_OUT, MAX_OUT, USEFUL_BITS * sizeof (float))) + gr_make_io_signature (0, 0, 0)) +// gr_make_io_signature (MIN_OUT, MAX_OUT, sizeof (float))) +{ + + set_history(1); + +} + +gsm_burst_ff::~gsm_burst_ff () +{ +} + +/* +void gsm_burst_ff::forecast (int noutput_items, gr_vector_int &ninput_items_required) +{ + unsigned ninputs = ninput_items_required.size (); + for (unsigned i = 0; i < ninputs; i++) + ninput_items_required[i] = noutput_items * BBUF_SIZE + history(); +} +*/ + +int gsm_burst_ff::general_work (int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) +{ + const float *in = (const float *) input_items[0]; + float *out = (float *) output_items[0]; + + int ii=0; + //int rval = 0; //default to no output + int rval = noutput_items; //default to no output + + //int do_output = output_items.size() > 0 ? 1 : 0; + int do_output = 0; + + int n_input = ninput_items[0]; +// fprintf(stderr,"out=%8.8x/#i=%d/#o=%d",(unsigned)out,n_input,noutput_items); +// fprintf(stderr,"#i=%d/#o=%d",n_input,noutput_items); + +// while (( rval < noutput_items) && ( ii < n_input ) ) { + while ( ii < n_input ) { + + assert(d_bbuf_pos <= BBUF_SIZE ); + + if (d_bbuf_pos >= 0) //could have been offset negative. TODO: perhaps better just to add some slack to the buffer + d_burst_buffer[d_bbuf_pos] = in[ii]; + + d_bbuf_pos++; + + if ( d_bbuf_pos >= BBUF_SIZE ) { + + if (get_burst()) { + //found a burst, send to output + if (do_output) { + //ensure that output data is in range + int b = d_burst_start; + if (b < 0) + b = 0; + else if (b >= 2 * MAX_CORR_DIST) + b = 2 * MAX_CORR_DIST - 1; + + memcpy(out+rval*USEFUL_BITS, d_burst_buffer + b, USEFUL_BITS*sizeof(float)); + } + //rval++; + //rval += USEFUL_BITS*sizeof(float); + + switch ( d_clock_options & QB_MASK ) { + case QB_QUARTER: //Can't do this in the FF version + case QB_FULL04: //extra bit on timeslot 0 & 4 + if (!(d_ts%4)) + d_bbuf_pos--; + break; + case QB_NONE: //don't adjust for quarter bits at all + default: + break; + } + + d_last_burst_s_count = d_sample_count; + + } + } + d_sample_count++; + ii++; + } + +// fprintf(stderr,"/ii=%d/rval=%d\n",ii,rval); + + consume_each (ii); + + return rval; +} diff --git a/gsm-tvoid/src/lib/gsm_burst_ff_single.h b/gsm-tvoid/src/lib/gsm_burst_ff_single.h new file mode 100755 index 0000000..553fe65 --- /dev/null +++ b/gsm-tvoid/src/lib/gsm_burst_ff_single.h @@ -0,0 +1,31 @@ +#ifndef INCLUDED_GSM_BURST_FF_H +#define INCLUDED_GSM_BURST_FF_H + +#include <gr_block.h> +#include <gsm_burst.h> + +class gsm_burst_ff; + +typedef boost::shared_ptr<gsm_burst_ff> gsm_burst_ff_sptr; + +gsm_burst_ff_sptr gsm_make_burst_ff(gr_feval_ll *); + +class gsm_burst_ff : public gr_block, public gsm_burst +{ +private: + + friend gsm_burst_ff_sptr gsm_make_burst_ff(gr_feval_ll *); + gsm_burst_ff(gr_feval_ll *t); + +public: + ~gsm_burst_ff (); + +// void forecast (int noutput_items, gr_vector_int &ninput_items_required); + + int general_work ( int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); +}; + +#endif /* INCLUDED_GSM_BURST_FF_H */ diff --git a/gsm-tvoid/src/lib/gsm_burst_sink_c.cc b/gsm-tvoid/src/lib/gsm_burst_sink_c.cc new file mode 100755 index 0000000..16dcada --- /dev/null +++ b/gsm-tvoid/src/lib/gsm_burst_sink_c.cc @@ -0,0 +1,142 @@ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "gsm_burst_sink_c.h" +#include <gr_io_signature.h> +#include <gr_math.h> +#include <stdio.h> +#include <string.h> +#include <gri_mmse_fir_interpolator_cc.h> + +gsm_burst_sink_c_sptr gsm_make_burst_sink_c (gr_feval_ll *t,float sample_rate) +{ + return gsm_burst_sink_c_sptr (new gsm_burst_sink_c(t,sample_rate)); +} + +static const int MIN_IN = 1; // minimum number of input streams +static const int MAX_IN = 1; // maximum number of input streams + +gsm_burst_sink_c::gsm_burst_sink_c (gr_feval_ll *t, float sample_rate) : + gsm_burst(t), + gr_sync_block ( "burst_sink_c", + gr_make_io_signature (MIN_IN, MAX_IN, sizeof (gr_complex)), + gr_make_io_signature (0,0,0) + ), + d_clock_counter(0.0), + d_mu(0.5), + d_last_sample(0.0,0.0), + d_ii(0), + d_interp(new gri_mmse_fir_interpolator_cc()) + +{ + + //clocking parameters + d_sample_interval = 1.0 / sample_rate; + d_relative_sample_rate = sample_rate / GSM_SYMBOL_RATE; + + fprintf(stderr,"Sample interval : %e\n",d_sample_interval); + fprintf(stderr,"Relative sample rate : %g\n",d_relative_sample_rate); + + //we need history for interpolator taps and some saftey relative to relative rate + int hist = d_interp->ntaps(); // + 16; // interpolator need -4/+3 samples NTAPS = 8 , 16 for safety margin + set_history(hist); //need history for interpolator + +} + +gsm_burst_sink_c::~gsm_burst_sink_c () +{ + delete d_interp; +} + +void gsm_burst_sink_c::shift_burst(int shift_bits) +{ + //fprintf(stderr,"sft:%d\n",shift_bits); + + assert(shift_bits >= 0); + assert(shift_bits < BBUF_SIZE ); + + gr_complex *p_src = d_complex_burst + shift_bits; + gr_complex *p_dst = d_complex_burst; + int num = BBUF_SIZE - shift_bits; + + memmove(p_dst,p_src,num * sizeof(gr_complex)); //need memmove because of overlap + + //DON'T adjust the buffer positions, the superclass method will do that... + //d_bbuf_pos -= shift_bits; + //call the parent method to shift the float version + gsm_burst::shift_burst(shift_bits); +} + +//TODO: put everything but GR stuff in a common complex type class (share w/ gsm_burst_cf) +int gsm_burst_sink_c::work(int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) + +{ + const gr_complex *in = (const gr_complex *) input_items[0]; + +// fprintf(stderr,"#o=%d",noutput_items); + + assert( d_ii >= 0 ); + + while ( d_ii < noutput_items ) { + //clock symbols + + gr_complex sample = d_interp->interpolate (&in[d_ii], d_mu); + + gr_complex conjprod = sample * conj(d_last_sample); + float diff_angle = gr_fast_atan2f(imag(conjprod), real(conjprod)); + + d_last_sample = sample; + +#if 1 + assert(d_bbuf_pos <= BBUF_SIZE ); + + if (d_bbuf_pos >= 0) { //could be negative offset from burst alignment. TODO: perhaps better just to add some padding to the buffer + d_burst_buffer[d_bbuf_pos] = diff_angle; + d_complex_burst[d_bbuf_pos] = sample; + } + + d_bbuf_pos++; + + if ( d_bbuf_pos >= BBUF_SIZE ) { + if (get_burst()) { + //adjust timing + //TODO: generate timing error from burst buffer (phase & freq) + + switch ( d_clock_options & QB_MASK ) { + case QB_QUARTER: //extra 1/4 bit each burst + d_mu -= d_relative_sample_rate / 4.0; + break; + case QB_FULL04: //extra bit on timeslot 0 & 4 + if (!(d_ts%4)) + d_mu -= d_relative_sample_rate; + break; + case QB_NONE: //don't adjust for quarter bits at all + default: + break; + } + + d_last_burst_s_count = d_sample_count; + + //fprintf(stderr,"clock: %f, pos: %d\n",d_clock_counter,d_bbuf_pos); + } + } +#endif + + d_mu += d_relative_sample_rate; + d_ii += (int)floor(d_mu); + //d_sample_count += (int)floor(d_mu); //TODO: outside loop? + d_mu -= floor(d_mu); + } + + //reset d_ii, accounting for advance + d_ii -= noutput_items; + +// fprintf(stderr,"/mu=%f",d_mu); +// fprintf(stderr,"/ii=%d\n",d_ii); + + return noutput_items; +} diff --git a/gsm-tvoid/src/lib/gsm_burst_sink_c.h b/gsm-tvoid/src/lib/gsm_burst_sink_c.h new file mode 100755 index 0000000..1197a2c --- /dev/null +++ b/gsm-tvoid/src/lib/gsm_burst_sink_c.h @@ -0,0 +1,54 @@ +#ifndef INCLUDED_gsm_burst_sink_c_H +#define INCLUDED_gsm_burst_sink_c_H + +#include <gr_sync_block.h> +#include <gsm_burst.h> + +class gsm_burst_sink_c; + +typedef boost::shared_ptr<gsm_burst_sink_c> gsm_burst_sink_c_sptr; + +gsm_burst_sink_c_sptr gsm_make_burst_sink_c(gr_feval_ll *,float); + +class gri_mmse_fir_interpolator_cc; + +//class gsm_burst_sink_c : public gr_block, public gsm_burst +class gsm_burst_sink_c : public gr_sync_block, public gsm_burst +{ +private: + + friend gsm_burst_sink_c_sptr gsm_make_burst_sink_c(gr_feval_ll *,float); + gsm_burst_sink_c(gr_feval_ll *,float); + + //clocking parameters + double d_sample_interval; + double d_clock_counter; + gr_complex d_last_sample; + + float d_relative_sample_rate; //omega + float d_mu; + int d_ii; //save index between work calls for interp advance + + gri_mmse_fir_interpolator_cc *d_interp; //sub-sample interpolator from GR + + gr_complex d_complex_burst[BBUF_SIZE]; + + void shift_burst(int shift_bits); + +public: + ~gsm_burst_sink_c (); + +// void forecast (int noutput_items, gr_vector_int &ninput_items_required); + + int work(int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); + +/* int general_work ( int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); +*/ +}; + +#endif /* INCLUDED_gsm_burst_sink_c_H */ diff --git a/gsm-tvoid/src/lib/gsm_constants.h b/gsm-tvoid/src/lib/gsm_constants.h new file mode 100644 index 0000000..942736d --- /dev/null +++ b/gsm-tvoid/src/lib/gsm_constants.h @@ -0,0 +1,127 @@ +#ifndef INCLUDED_GSM_CONSTANTS_H
+#define INCLUDED_GSM_CONSTANTS_H
+
+#define GSM_SYMBOL_RATE (1625000.0/6.0) //symbols per second
+#define GSM_SYMBOL_PERIOD (1.0/GSM_SYMBOL_RATE) //seconds per symbol
+
+//Burst timing
+#define TAIL_BITS 3
+#define GUARD_BITS 8 //8.25
+#define DATA_BITS 58 //size of 1 data block in normal burst
+#define N_TRAIN_BITS 26
+#define N_SYNC_BITS 64
+#define USEFUL_BITS 142 //(2*DATA_BITS + N_TRAIN_BITS )
+#define FCCH_BITS USEFUL_BITS
+
+#define TS_BITS (TAIL_BITS+USEFUL_BITS+TAIL_BITS+GUARD_BITS) //a full TS (156)
+#define TS_PER_FRAME 8
+#define FRAME_BITS (TS_PER_FRAME * TS_BITS + 2) // +2 for extra 8*0.25 guard bits
+#define FCCH_POS TAIL_BITS
+#define SYNC_POS 39
+#define TRAIN_POS 58
+
+static const float gaussian_impulse[] = { 0.03455935, 0.39947558, 0.90323022, 0.39947558, 0.03455935};
+
+enum SYNC_STATE {
+ WAIT_FCCH,
+ WAIT_SCH_ALIGN,
+ WAIT_SCH,
+ SYNCHRONIZED
+};
+
+enum BURST_TYPE {
+ UNKNOWN,
+ FCCH,
+ PARTIAL_SCH, //successful correlation, but missing data
+ SCH,
+ CTS_SCH,
+ COMPACT_SCH,
+ NORMAL,
+ DUMMY,
+ ACCESS
+};
+
+
+static const int SYNC_BITS[] = {
+ 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0,
+ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
+ 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1,
+ 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1
+};
+
+static const int CTS_SYNC[] = {
+ 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1,
+ 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0,
+ 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0,
+ 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1
+};
+
+static const int COMPACT_SYNC[] = {
+ 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1,
+ 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0,
+ 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0
+};
+
+// Sync : .+...++.+..+++.++++++.++++++....++.+..+.+.+++.+.+...+..++++..+..
+// Diff Encoded Sync: .++..+.+++.+..++.....++.....+...+.+++.+++++..+++++..++.+...+.++.
+
+#define TSC0 0
+#define TSC1 1
+#define TSC2 2
+#define TSC3 3
+#define TSC4 4
+#define TSC5 5
+#define TSC6 6
+#define TSC7 7
+#define TS_FCCH 8
+#define TS_DUMMY 9
+
+static const unsigned char train_seq[10][N_TRAIN_BITS] = {
+ {0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1},
+ {0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1},
+ {0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0},
+ {0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0},
+ {0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1},
+ {0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0},
+ {1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1},
+ {1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0},
+ {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //#9 FCCH ;-)
+ {0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1} // DUMMY
+};
+
+//Dummy burst 0xFB 76 0A 4E 09 10 1F 1C 5C 5C 57 4A 33 39 E9 F1 2F A8
+static const unsigned char dummy_burst[] = {
+ 1, 1, 1, 1, 1, 0, 1, 1, 0, 1,
+ 1, 1, 0, 1, 1, 0, 0, 0, 0, 0,
+ 1, 0, 1, 0, 0, 1, 0, 0, 1, 1,
+ 1, 0, 0, 0, 0, 0, 1, 0, 0, 1,
+ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
+ 0, 1, 1, 1, 1, 1, 0, 0,
+
+ 0, 1, 1, 1, 0, 0, 0, 1, 0, 1,
+ 1, 1, 0, 0, 0, 1, 0, 1, 1, 1,
+ 0, 0, 0, 1, 0, 1,
+
+ 0, 1, 1, 1, 0, 1, 0, 0, 1, 0,
+ 1, 0, 0, 0, 1, 1, 0, 0, 1, 1,
+ 0, 0, 1, 1, 1, 0, 0, 1, 1, 1,
+ 1, 0, 1, 0, 0, 1, 1, 1, 1, 1,
+ 0, 0, 0, 1, 0, 0, 1, 0, 1, 1,
+ 1, 1, 1, 0, 1, 0, 1, 0
+};
+
+//Diff encoded train_seq
+//TSC0: +.++.+++..+...++..++.+++..
+//TSC1: +.+++.++..++...+..++.+++..
+//TSC2: +++...+..++..+++.++...+..+
+//TSC3: +++..+...++.+++..++..+...+
+//TSC4: +..+.++++..+.++....+.++++.
+//TSC5: +++.+..++++.+....++.+..+++
+//TSC6: .+++.+....++.+..++++.+....
+//TSC7: ...++...+..++.+++..++...+.
+//TSC8: ..........................
+//TSC9: ++..+..+++..+..+++..+..+++
+
+
+#endif /* INCLUDED_GSM_CONSTANTS_H */
diff --git a/gsm-tvoid/src/lib/gsmstack.c b/gsm-tvoid/src/lib/gsmstack.c new file mode 100644 index 0000000..a46bc87 --- /dev/null +++ b/gsm-tvoid/src/lib/gsmstack.c @@ -0,0 +1,195 @@ +/* + * Invoke gsmstack() with any kind of burst. Automaticly decode and retrieve + * information. + */ +#include "system.h" +#include <stdlib.h> +#include <stdio.h> +#include <errno.h> +#include <string.h> +#include "gsmstack.h" +#include "gsm_constants.h" +#include "interleave.h" +#include "sch.h" +#include "cch.h" + +#include "out_pcap.h" + +static void out_gsmdecode(char type, int arfcn, int ts, int fn, char *data, int len); + +/* encode a decoded burst (1 bit per byte) into 8-bit-per-byte */ +static void burst_octify(unsigned char *dest, + const unsigned char *data, int length) +{ + int bitpos = 0; + + while (bitpos < USEFUL_BITS) { + unsigned char tbyte; + int i; + + tbyte = 0; + for (i = 0; (i < 8) && (bitpos < length); i++) { + tbyte <<= 1; + tbyte |= data[bitpos++]; + } + if (i < 8) + tbyte <<= 8 - i; + *dest++ = tbyte; + } +} + + +#if 0 +static void +diff_decode(char *dst, char *src, int len) +{ + const char *end = src + len; + unsigned char last; + + src += 3; + last = 0; + memset(dst, 0, 3); + dst += 3; + + while (src < end) + { + *dst = !*src ^ last; + last = *dst; + src++; + dst++; + } +} +#endif + +/* + * Initialize a new GSMSTACK context. + */ +int +GS_new(GS_CTX *ctx) +{ + memset(ctx, 0, sizeof *ctx); + interleave_init(&ctx->interleave_ctx, 456, 114); + ctx->fn = -1; + ctx->bsic = -1; + + ctx->tun_fd = mktun("gsm", ctx->ether_addr); + if (ctx->tun_fd < 0) + fprintf(stderr, "cannot open 'gsm' tun device, did you create it?\n"); + + ctx->pcap_fd = open_pcap_file("tvoid.pcap"); + if (ctx->pcap_fd < 0) + fprintf(stderr, "cannot open PCAP file: %s\n", strerror(errno)); + + ctx->burst_pcap_fd = open_pcap_file("tvoid-burst.pcap"); + if (ctx->burst_pcap_fd < 0) + fprintf(stderr, "cannot open burst PCAP file: %s\n", strerror(errno)); + + return 0; +} + +#define BURST_BYTES ((USEFUL_BITS/8)+1) +/* + * 142 bit + */ +int +GS_process(GS_CTX *ctx, int ts, int type, const unsigned char *src) +{ + int fn; + int bsic; + int ret; + unsigned char *data; + int len; + struct gs_ts_ctx *ts_ctx = &ctx->ts_ctx[ts]; + unsigned char octified[BURST_BYTES]; + + memset(ctx->msg, 0, sizeof(ctx->msg)); + + /* write burst to burst PCAP file */ + burst_octify(octified, src, USEFUL_BITS); + write_pcap_packet(ctx->burst_pcap_fd, 0 /* arfcn */, ts, ctx->fn, + 1, type, octified, BURST_BYTES); + +#if 0 + if (ts != 0) { + /* non-0 timeslots should end up in PCAP */ + data = decode_cch(ctx, ctx->burst, &len); + if (data == NULL) + return -1; + write_pcap_packet(ctx->pcap_fd, 0 /* arfcn */, ts, ctx->fn, data, len); + return; + } +#endif + + if (ts == 0) { + if (type == SCH) { + ret = decode_sch(src, &fn, &bsic); + if (ret != 0) + return 0; + if ((ctx->bsic > 0) && (bsic != ctx->bsic)) + fprintf(stderr, "WARN: BSIC changed.\n"); + //DEBUGF("FN %d, BSIC %d\n", fn, bsic); + ctx->fn = fn; + ctx->bsic = bsic; + /* Reset message concatenator */ + ts_ctx->burst_count = 0; + return 0; + } + + /* If we did not get Frame Number yet then return */ + if (ctx->fn < 0) + return 0; + + ctx->fn++; + } + + if (type == NORMAL) { + /* Interested in these frame numbers (cch) + * 2-5, 12-15, 22-25, 23-35, 42-45 + * 6-9, 16-19, 26-29, 36-39, 46-49 + */ + /* Copy content data into new array */ + //DEBUGF("burst count %d\n", ctx->burst_count); + memcpy(ts_ctx->burst + (116 * ts_ctx->burst_count), src, 58); + memcpy(ts_ctx->burst + (116 * ts_ctx->burst_count) + 58, src + 58 + 26, 58); + ts_ctx->burst_count++; + /* Return if not enough bursts for a full gsm message */ + if (ts_ctx->burst_count < 4) + return 0; + + ts_ctx->burst_count = 0; + data = decode_cch(ctx, ts_ctx->burst, &len); + if (data == NULL) { + DEBUGF("cannot decode fnr=0x%08x ts=%d\n", ctx->fn, ts); + return -1; + } + //DEBUGF("OK TS %d, len %d\n", ts, len); + + out_gsmdecode(0, 0, ts, ctx->fn - 4, data, len); + write_interface(ctx->tun_fd, data+1, len-1, ctx->ether_addr); + write_pcap_packet(ctx->pcap_fd, 0 /* arfcn */, ts, ctx->fn, + 0, NORMAL, data, len); +#if 0 + if (ctx->fn % 51 != 0) && ( (((ctx->fn % 51 + 5) % 10 == 0) || (((ctx->fn % 51) + 1) % 10 ==0) ) ) + ready = 1; +#endif + + return 0; + } +} + + +/* + * Output data so that it can be parsed from gsmdeocde. + */ +static void +out_gsmdecode(char type, int arfcn, int ts, int fn, char *data, int len) +{ + char *end = data + len; + + /* FIXME: speed this up by first printing into an array */ + while (data < end) + printf(" %02.2x", (unsigned char)*data++); + printf("\n"); + fflush(stdout); +} + diff --git a/gsm-tvoid/src/lib/gsmstack.h b/gsm-tvoid/src/lib/gsmstack.h new file mode 100644 index 0000000..a9da102 --- /dev/null +++ b/gsm-tvoid/src/lib/gsmstack.h @@ -0,0 +1,43 @@ + +#ifndef __GSMSTACK_H__ +#define __GSMSTACK_H__ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#include <linux/if_ether.h> +#include "interleave.h" + +struct gs_ts_ctx { + /* FIXME: later do this per each ts per each arfcn */ + unsigned char burst[4 * 58 * 2]; + int burst_count; +}; + +typedef struct +{ + int flags; + int fn; + int bsic; + char msg[23]; /* last decoded message */ + + INTERLEAVE_CTX interleave_ctx; + + struct gs_ts_ctx ts_ctx[8]; + + int tun_fd; + unsigned char ether_addr[ETH_ALEN]; + + int pcap_fd; + int burst_pcap_fd; +} GS_CTX; + +int GS_new(GS_CTX *ctx); +int GS_process(GS_CTX *ctx, int ts, int type, const unsigned char *src); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/gsm-tvoid/src/lib/gsmtap.h b/gsm-tvoid/src/lib/gsmtap.h new file mode 100644 index 0000000..1022194 --- /dev/null +++ b/gsm-tvoid/src/lib/gsmtap.h @@ -0,0 +1,41 @@ +#ifndef _GSMTAP_H +#define _GSMTAP_H + +/* gsmtap header, pseudo-header in front of the actua GSM payload*/ + +#include <sys/types.h> + +#define GSMTAP_VERSION 0x01 + +#define GSMTAP_TYPE_UM 0x01 +#define GSMTAP_TYPE_ABIS 0x02 +#define GSMTAP_TYPE_UM_BURST 0x03 /* raw burst bits */ + +#define GSMTAP_BURST_UNKNOWN 0x00 +#define GSMTAP_BURST_FCCH 0x01 +#define GSMTAP_BURST_PARTIAL_SCH 0x02 +#define GSMTAP_BURST_SCH 0x03 +#define GSMTAP_BURST_CTS_SCH 0x04 +#define GSMTAP_BURST_COMPACT_SCH 0x05 +#define GSMTAP_BURST_NORMAL 0x06 +#define GSMTAP_BURST_DUMMY 0x07 +#define GSMTAP_BURST_ACCESS 0x08 + +struct gsmtap_hdr { + u_int8_t version; /* version, set to 0x01 currently */ + u_int8_t hdr_len; /* length in number of 32bit words */ + u_int8_t type; /* see GSMTAP_TYPE_* */ + u_int8_t timeslot; /* timeslot (0..7 on Um) */ + + u_int16_t arfcn; /* ARFCN (frequency) */ + u_int8_t noise_db; /* noise figure in dB */ + u_int8_t signal_db; /* signal level in dB */ + + u_int32_t frame_number; /* GSM Frame Number (FN) */ + + u_int8_t burst_type; /* Type of burst, see above */ + u_int8_t antenna_nr; /* Antenna Number */ + u_int16_t res; /* reserved for future use (RFU) */ + +} __attribute__((packed)); +#endif /* _GSMTAP_H */ diff --git a/gsm-tvoid/src/lib/interleave.c b/gsm-tvoid/src/lib/interleave.c new file mode 100644 index 0000000..437ed92 --- /dev/null +++ b/gsm-tvoid/src/lib/interleave.c @@ -0,0 +1,47 @@ + +#include <stdlib.h> +#include <stdio.h> +#include "interleave.h" + +int +interleave_init(INTERLEAVE_CTX *ictx, int size, int block_size) +{ + ictx->trans_size = size; + ictx->trans = (unsigned short *)malloc(size * sizeof *ictx->trans); + +// DEBUGF("size: %d\n", size); +// DEBUGF("Block size: %d\n", block_size); + int j, k, B; + for (k = 0; k < size; k++) + { + B = k % 4; + j = 2 * ((49 * k) % 57) + ((k % 8) / 4); + ictx->trans[k] = B * block_size + j; + /* Mapping: pos1 goes to pos2: pos1 -> pos2 */ +// DEBUGF("%d -> %d\n", ictx->trans[k], k); + } +// exit(0); + return 0; +} + +int +interleave_deinit(INTERLEAVE_CTX *ictx) +{ + if (ictx->trans != NULL) + { + free(ictx->trans); + ictx->trans = NULL; + } + + return 0; +} + +void +interleave_decode(INTERLEAVE_CTX *ictx, unsigned char *dst, unsigned char *src) +{ + + int k; + for (k = 0; k < ictx->trans_size; k++) + dst[k] = src[ictx->trans[k]]; +} + diff --git a/gsm-tvoid/src/lib/interleave.h b/gsm-tvoid/src/lib/interleave.h new file mode 100644 index 0000000..b1abf81 --- /dev/null +++ b/gsm-tvoid/src/lib/interleave.h @@ -0,0 +1,18 @@ +/* + * $Id:$ + */ + +#ifndef __GSMSP_INTERLEAVE_H__ +#define __GSMSP_INTERLEAVE_H__ 1 + +typedef struct _interleave_ctx +{ + unsigned short *trans; + int trans_size; +} INTERLEAVE_CTX; + +int interleave_init(INTERLEAVE_CTX *ictx, int size, int block_size); +int interleave_deinit(INTERLEAVE_CTX *ictx); +void interleave_decode(INTERLEAVE_CTX *ictx, unsigned char *dst, unsigned char *src); + +#endif diff --git a/gsm-tvoid/src/lib/mm_c.cc b/gsm-tvoid/src/lib/mm_c.cc new file mode 100644 index 0000000..7b3e335 --- /dev/null +++ b/gsm-tvoid/src/lib/mm_c.cc @@ -0,0 +1,73 @@ +
+#include "mm_c.h"
+
+mm_c::mm_c(float omega):
+ d_omega(omega),
+ d_mu(0.5),
+ d_x_1(0.0,0.0),
+ d_x_2(0.0,0.0),
+ d_a_1(0.0,0.0),
+ d_a_2(0.0,0.0),
+ d_gain_mu(0.01),
+ d_gain_omega(0.25 * d_gain_mu * d_gain_mu)
+{}
+
+
+gr_complex mm_c::slicer(gr_complex x)
+{
+ float real=SLICE_0_R, imag=SLICE_0_I;
+
+ if(x.real() > 0.0)
+ real = SLICE_1_R;
+
+ if(x.imag() > 0.0)
+ imag = SLICE_1_I;
+
+ return gr_complex(real,imag);
+}
+
+float mm_c::update(gr_complex x_0, gr_complex a_0)
+{
+ //mm vars
+ gr_complex x,y,u;
+
+ x = (a_0 - d_a_2) * conj(d_x_1);
+ y = (x_0 - d_x_2) * conj(d_a_1);
+ u = y - x;
+ d_mm = u.real(); //error signal
+
+ //limit d_mm
+ if (d_mm > 1.0) d_mm = 1.0;
+ else if (d_mm < -1.0) d_mm = -1.0;
+
+ //error feedback
+ d_omega = d_omega + d_gain_omega * d_mm;
+
+ //limit omega
+/*
+ if (d_omega > d_max_omega)
+ d_omega = d_max_omega;
+ else if (d_omega < d_min_omega)
+ d_omega = d_min_omega;
+*/
+ //update mu
+ d_mu = d_mu + d_omega + d_gain_mu * d_mm;
+ //process mu / ii advances after burst processing for burst timing
+
+ //update delay taps
+ d_x_2 = d_x_1;
+ d_x_1 = x_0;
+ d_a_2 = d_a_1;
+ d_a_1 = a_0;
+
+ return d_mu;
+}
+
+
+float mm_c::update(gr_complex x_0)
+{
+ return update(x_0, slicer(x_0) );
+}
+
+
+
diff --git a/gsm-tvoid/src/lib/mm_c.h b/gsm-tvoid/src/lib/mm_c.h new file mode 100644 index 0000000..e9881dd --- /dev/null +++ b/gsm-tvoid/src/lib/mm_c.h @@ -0,0 +1,48 @@ +#ifndef INCLUDED_MM_C_H
+#define INCLUDED_MM_C_H
+
+#include <gr_math.h>
+
+#if 0
+#define SLICE_0_R 0.0
+#define SLICE_0_I 0.0
+#define SLICE_1_R 1.0
+#define SLICE_1_I 1.0
+#else
+#define SLICE_0_R -1.0
+#define SLICE_0_I -1.0
+#define SLICE_1_R 1.0
+#define SLICE_1_I 1.0
+#endif
+
+class mm_c {
+private:
+public:
+
+ float d_mm;
+
+ float d_omega; //relative sample rate
+ float d_mu;
+
+ float d_gain_mu;
+ float d_gain_omega;
+
+ //delay taps
+ gr_complex d_x_1; //last input sample
+ gr_complex d_x_2;
+ gr_complex d_a_1; //last decision
+ gr_complex d_a_2;
+
+ mm_c (float omega);
+
+ gr_complex slicer(gr_complex x);
+
+ float update(gr_complex sample, gr_complex decision); //return mu
+
+ float update(gr_complex sample); //use built in decision
+
+};
+
+
+
+#endif
diff --git a/gsm-tvoid/src/lib/mm_f.cc b/gsm-tvoid/src/lib/mm_f.cc new file mode 100644 index 0000000..4637149 --- /dev/null +++ b/gsm-tvoid/src/lib/mm_f.cc @@ -0,0 +1,55 @@ +
+#include "mm_f.h"
+
+mm_f::mm_f(float omega):
+ d_omega(omega),
+ d_mu(0.5),
+ d_x_1(0.0),
+ d_a_1(0.0),
+ d_gain_mu(0.01),
+ d_gain_omega(0.25 * d_gain_mu * d_gain_mu)
+{}
+
+
+float mm_f::slicer(float x)
+{
+ return x < 0 ? -1.0 : 1.0;
+}
+
+float mm_f::update(float x_0, float a_0)
+{
+ d_mm = (d_a_1 * x_0) - (a_0 * d_x_1);
+
+ //limit d_mm
+ if (d_mm > 1.0) d_mm = 1.0;
+ else if (d_mm < -1.0) d_mm = -1.0;
+
+ //error feedback
+ d_omega = d_omega + d_gain_omega * d_mm;
+
+ //limit omega
+/*
+ if (d_omega > d_max_omega)
+ d_omega = d_max_omega;
+ else if (d_omega < d_min_omega)
+ d_omega = d_min_omega;
+*/
+ //update mu
+ d_mu = d_mu + d_omega + d_gain_mu * d_mm;
+ //process mu / ii advances after burst processing for burst timing
+
+ //update delay taps
+ d_x_1 = x_0;
+ d_a_1 = a_0;
+
+ return d_mu;
+}
+
+
+float mm_f::update(float x_0)
+{
+ return update(x_0, slicer(x_0) );
+}
+
+
+
diff --git a/gsm-tvoid/src/lib/mm_f.h b/gsm-tvoid/src/lib/mm_f.h new file mode 100644 index 0000000..8b359be --- /dev/null +++ b/gsm-tvoid/src/lib/mm_f.h @@ -0,0 +1,34 @@ +#ifndef INCLUDED_MM_F_H
+#define INCLUDED_MM_F_H
+
+#include <gr_math.h>
+
+class mm_f {
+private:
+public:
+
+ float d_mm;
+
+ float d_omega; //relative sample rate
+ float d_mu;
+
+ float d_gain_mu;
+ float d_gain_omega;
+
+ //delay taps
+ float d_x_1; //last input sample
+ float d_a_1; //last decision
+
+ mm_f (float omega);
+
+ float slicer(float x);
+
+ float update(float sample, float decision); //return mu
+
+ float update(float sample); //use built in decision
+
+};
+
+
+
+#endif
diff --git a/gsm-tvoid/src/lib/out_pcap.c b/gsm-tvoid/src/lib/out_pcap.c new file mode 100644 index 0000000..4da5fd6 --- /dev/null +++ b/gsm-tvoid/src/lib/out_pcap.c @@ -0,0 +1,111 @@ +/* PCAP support for gsm-tvoid + * (C) 2008 by Harald Welte <laforge@gnumonks.org> + */ + +#include <stdio.h> +#include <stdlib.h> +#include <fcntl.h> +#include <pcap.h> +#include <errno.h> +#include <time.h> + +#include "out_pcap.h" +#include "gsmtap.h" + +#ifndef LINKTYPE_GSMTAP +#define LINKTYPE_GSMTAP 2342 +#endif + +#define TCPDUMP_MAGIC 0xa1b2c3d4 + +struct pcap_timeval { + int32_t tv_sec; + int32_t tv_usec; +}; + +struct pcap_sf_pkthdr { + struct pcap_timeval ts; /* time stamp */ + u_int32_t caplen; /* lenght of portion present */ + u_int32_t len; /* length of this packet */ +}; + +static int write_pcap_file_header(int fd) +{ + struct pcap_file_header pfh; + + pfh.magic = TCPDUMP_MAGIC; + pfh.version_major = PCAP_VERSION_MAJOR; + pfh.version_minor = PCAP_VERSION_MINOR; + pfh.thiszone = timezone; + pfh.sigfigs = 0; + pfh.snaplen = 1024; /* FIXME */ + pfh.linktype = LINKTYPE_GSMTAP; + + if (write(fd, &pfh, sizeof(pfh)) < sizeof(pfh)) + return -1; + + return 0; +} + +/* open pcap file and write header */ +int open_pcap_file(char *fname) +{ + int fd; + int rc; + + fd = open(fname, O_WRONLY|O_CREAT|O_TRUNC, 0660); + if (fd < 0) + return fd; + + rc = write_pcap_file_header(fd); + if (rc < 0) { + close(fd); + fd = -EIO; + } + + return fd; +} + +int write_pcap_packet(int fd, int arfcn, int ts, int fn, + int burst, int burst_type, + const unsigned char *data, unsigned int len) +{ + unsigned char buf[8192]; + struct pcap_sf_pkthdr *ph; + struct gsmtap_hdr *gh; + struct timeval tv; + int rc; + + if (fd < 0) + return -EINVAL; + + ph = (struct pcap_sf_pkthdr *) &buf[0]; + gh = (struct gsmtap_hdr *) &buf[sizeof(struct pcap_sf_pkthdr)]; + + gettimeofday(&tv, NULL); + + ph->ts.tv_sec = tv.tv_sec; + ph->ts.tv_usec = tv.tv_usec; + ph->caplen = ph->len = len + sizeof(struct gsmtap_hdr); + + gh->version = GSMTAP_VERSION; + gh->hdr_len = sizeof(struct gsmtap_hdr)>>2; + if (burst) + gh->type = GSMTAP_TYPE_UM_BURST; + else + gh->type = GSMTAP_TYPE_UM; + gh->timeslot = ts; + gh->arfcn = htons(arfcn); + /* we don't support signal/noise yet */ + gh->noise_db = gh->signal_db = 0; + gh->frame_number = htonl(fn); + gh->burst_type = burst_type & 0xff; + + memcpy(buf + sizeof(*ph) + sizeof(*gh), data, len); + + rc = write(fd, buf, sizeof(*ph) + sizeof(*gh) + len); + + //fsync(fd); + + return rc; +} diff --git a/gsm-tvoid/src/lib/out_pcap.h b/gsm-tvoid/src/lib/out_pcap.h new file mode 100644 index 0000000..5ae5e3c --- /dev/null +++ b/gsm-tvoid/src/lib/out_pcap.h @@ -0,0 +1,9 @@ +#ifndef _PCAP_IF_H +#define _PCAP_IF_H + +extern int open_pcap_file(char *fname); + +int write_pcap_packet(int fd, int arfcn, int ts, int fn, + int burst, int burst_type, + const unsigned char *data, unsigned int len); +#endif diff --git a/gsm-tvoid/src/lib/sch.c b/gsm-tvoid/src/lib/sch.c new file mode 100644 index 0000000..d311371 --- /dev/null +++ b/gsm-tvoid/src/lib/sch.c @@ -0,0 +1,323 @@ +#include "system.h" +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include "burst_types.h" + +/* + * Synchronization channel. + * + * Timeslot Repeat length Frame Number (mod repeat length) + * 0 51 1, 11, 21, 31, 41 + */ + +/* + * Parity (FIRE) for the GSM SCH. + * + * g(x) = x^10 + x^8 + x^6 + x^5 + x^4 + x^2 + 1 + */ +#define DATA_BLOCK_SIZE 25 +#define PARITY_SIZE 10 +#define TAIL_BITS_SIZE 4 +#define PARITY_OUTPUT_SIZE (DATA_BLOCK_SIZE + PARITY_SIZE + TAIL_BITS_SIZE) + +static const unsigned char parity_polynomial[PARITY_SIZE + 1] = { + 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1 +}; + +static const unsigned char parity_remainder[PARITY_SIZE] = { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +}; + + +static void parity_encode(unsigned char *d, unsigned char *p) { + + unsigned int i; + unsigned char buf[DATA_BLOCK_SIZE + PARITY_SIZE], *q; + + memcpy(buf, d, DATA_BLOCK_SIZE); + memset(buf + DATA_BLOCK_SIZE, 0, PARITY_SIZE); + + for(q = buf; q < buf + DATA_BLOCK_SIZE; q++) + if(*q) + for(i = 0; i < PARITY_SIZE + 1; i++) + q[i] ^= parity_polynomial[i]; + for(i = 0; i < PARITY_SIZE; i++) + p[i] = !buf[DATA_BLOCK_SIZE + i]; +} + + +static int parity_check(unsigned char *d) { + + unsigned int i; + unsigned char buf[DATA_BLOCK_SIZE + PARITY_SIZE], *q; + + memcpy(buf, d, DATA_BLOCK_SIZE + PARITY_SIZE); + + for(q = buf; q < buf + DATA_BLOCK_SIZE; q++) + if(*q) + for(i = 0; i < PARITY_SIZE + 1; i++) + q[i] ^= parity_polynomial[i]; + return memcmp(buf + DATA_BLOCK_SIZE, parity_remainder, PARITY_SIZE); +} + + +/* + * Convolutional encoding and Viterbi decoding for the GSM SCH. + * (Equivalent to the GSM SACCH.) + * + * G_0 = 1 + x^3 + x^4 + * G_1 = 1 + x + x^3 + x^4 + * + * i.e., + * + * c_{2k} = u_k + u_{k - 3} + u_{k - 4} + * c_{2k + 1} = u_k + u_{k - 1} + u_{k - 3} + u_{k - 4} + */ +#define CONV_INPUT_SIZE PARITY_OUTPUT_SIZE +#define CONV_SIZE (2 * CONV_INPUT_SIZE) +#define K 5 +#define MAX_ERROR (2 * CONV_INPUT_SIZE + 1) + + +/* + * Given the current state and input bit, what are the output bits? + * + * encode[current_state][input_bit] + */ +static const unsigned int encode[1 << (K - 1)][2] = { + {0, 3}, {3, 0}, {3, 0}, {0, 3}, + {0, 3}, {3, 0}, {3, 0}, {0, 3}, + {1, 2}, {2, 1}, {2, 1}, {1, 2}, + {1, 2}, {2, 1}, {2, 1}, {1, 2} +}; + + +/* + * Given the current state and input bit, what is the next state? + * + * next_state[current_state][input_bit] + */ +static const unsigned int next_state[1 << (K - 1)][2] = { + {0, 8}, {0, 8}, {1, 9}, {1, 9}, + {2, 10}, {2, 10}, {3, 11}, {3, 11}, + {4, 12}, {4, 12}, {5, 13}, {5, 13}, + {6, 14}, {6, 14}, {7, 15}, {7, 15} +}; + + +/* + * Given the previous state and the current state, what input bit caused + * the transition? If it is impossible to transition between the two + * states, the value is 2. + * + * prev_next_state[previous_state][current_state] + */ +static const unsigned int prev_next_state[1 << (K - 1)][1 << (K - 1)] = { + { 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2}, + { 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2}, + { 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2}, + { 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2}, + { 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2}, + { 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2}, + { 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2}, + { 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2}, + { 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2}, + { 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2}, + { 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2}, + { 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2}, + { 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2}, + { 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2}, + { 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1}, + { 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1} +}; + + +static inline unsigned int hamming_distance2(unsigned int w) { + + return (w & 1) + !!(w & 2); +} + + +static void conv_encode(unsigned char *data, unsigned char *output) { + + unsigned int i, state = 0, o; + + // encode data + for(i = 0; i < CONV_INPUT_SIZE; i++) { + o = encode[state][data[i]]; + state = next_state[state][data[i]]; + *output++ = !!(o & 2); + *output++ = o & 1; + } +} + + +static int conv_decode(unsigned char *data, unsigned char *output) { + + int i, t; + unsigned int rdata, state, nstate, b, o, distance, accumulated_error, + min_state, min_error, cur_state; + + unsigned int ae[1 << (K - 1)]; + unsigned int nae[1 << (K - 1)]; // next accumulated error + unsigned int state_history[1 << (K - 1)][CONV_INPUT_SIZE + 1]; + + // initialize accumulated error, assume starting state is 0 + for(i = 0; i < (1 << (K - 1)); i++) + ae[i] = nae[i] = MAX_ERROR; + ae[0] = 0; + + // build trellis + for(t = 0; t < CONV_INPUT_SIZE; t++) { + + // get received data symbol + rdata = (data[2 * t] << 1) | data[2 * t + 1]; + + // for each state + for(state = 0; state < (1 << (K - 1)); state++) { + + // make sure this state is possible + if(ae[state] >= MAX_ERROR) + continue; + + // find all states we lead to + for(b = 0; b < 2; b++) { + + // get next state given input bit b + nstate = next_state[state][b]; + + // find output for this transition + o = encode[state][b]; + + // calculate distance from received data + distance = hamming_distance2(rdata ^ o); + + // choose surviving path + accumulated_error = ae[state] + distance; + if(accumulated_error < nae[nstate]) { + + // save error for surviving state + nae[nstate] = accumulated_error; + + // update state history + state_history[nstate][t + 1] = state; + } + } + } + + // get accumulated error ready for next time slice + for(i = 0; i < (1 << (K - 1)); i++) { + ae[i] = nae[i]; + nae[i] = MAX_ERROR; + } + } + + // the final state is the state with the fewest errors + min_state = (unsigned int)-1; + min_error = MAX_ERROR; + for(i = 0; i < (1 << (K - 1)); i++) { + if(ae[i] < min_error) { + min_state = i; + min_error = ae[i]; + } + } + + // trace the path + cur_state = min_state; + for(t = CONV_INPUT_SIZE; t >= 1; t--) { + min_state = cur_state; + cur_state = state_history[cur_state][t]; // get previous + output[t - 1] = prev_next_state[cur_state][min_state]; + } + + // return the number of errors detected (hard-decision) + return min_error; +} + + +int decode_sch(const unsigned char *buf, int *fn_o, int *bsic_o) { + + int errors, bsic, t1, t2, t3p, t3, fn, tt; + unsigned char data[CONV_SIZE], decoded_data[PARITY_OUTPUT_SIZE]; + + // extract encoded data from synchronization burst + /* buf, 39 bit */ + /* buf + 39 + 64 = 103, 39 */ + memcpy(data, buf, SB_EDATA_LEN_1); + memcpy(data + SB_EDATA_LEN_1, buf + SB_EDATA_LEN_1 + N_SYNC_BITS, SB_EDATA_LEN_2); + + // Viterbi decode + if(errors = conv_decode(data, decoded_data)) { + // fprintf(stderr, "error: sch: conv_decode (%d)\n", errors); + DEBUGF("ERR: conv_decode %d\n", errors); + return errors; + } + + // check parity + if(parity_check(decoded_data)) { + // fprintf(stderr, "error: sch: parity failed\n"); + DEBUGF("ERR: parity_check failed\n"); + return 1; + } + + // Synchronization channel information, 44.018 page 171. (V7.2.0) + bsic = + (decoded_data[ 7] << 5) | + (decoded_data[ 6] << 4) | + (decoded_data[ 5] << 3) | + (decoded_data[ 4] << 2) | + (decoded_data[ 3] << 1) | + (decoded_data[ 2] << 0); + t1 = + (decoded_data[ 1] << 10) | + (decoded_data[ 0] << 9) | + (decoded_data[15] << 8) | + (decoded_data[14] << 7) | + (decoded_data[13] << 6) | + (decoded_data[12] << 5) | + (decoded_data[11] << 4) | + (decoded_data[10] << 3) | + (decoded_data[ 9] << 2) | + (decoded_data[ 8] << 1) | + (decoded_data[23] << 0); + t2 = + (decoded_data[22] << 4) | + (decoded_data[21] << 3) | + (decoded_data[20] << 2) | + (decoded_data[19] << 1) | + (decoded_data[18] << 0); + t3p = + (decoded_data[17] << 2) | + (decoded_data[16] << 1) | + (decoded_data[24] << 0); + + t3 = 10 * t3p + 1; + + // modulo arithmetic + if(t3 < t2) + tt = (t3 + 26) - t2; + else + tt = (t3 - t2) % 26; + fn = (51 * 26 * t1) + (51 * tt) + t3; + + /* + * BSIC: Base Station Identification Code + * BCC: Base station Color Code + * NCC: Network Color Code + * + * FN: Frame Number + */ + /* + printf("bsic: %x (bcc: %u; ncc: %u)\tFN: %u\n", bsic, bsic & 7, + (bsic >> 3) & 7, fn); + */ + + if(fn_o) + *fn_o = fn; + if(bsic_o) + *bsic_o = bsic; + + return 0; +} diff --git a/gsm-tvoid/src/lib/sch.h b/gsm-tvoid/src/lib/sch.h new file mode 100644 index 0000000..6fd31b8 --- /dev/null +++ b/gsm-tvoid/src/lib/sch.h @@ -0,0 +1,16 @@ + +#ifndef __GSMSTACK_H__ +#define __GSMSTACK_H__ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +int decode_sch(const unsigned char *src, int *fn_o, int *bsic_o); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/gsm-tvoid/src/lib/system.h b/gsm-tvoid/src/lib/system.h new file mode 100644 index 0000000..414730a --- /dev/null +++ b/gsm-tvoid/src/lib/system.h @@ -0,0 +1,11 @@ + +#ifndef __GSMTVOID_SYSTEM_H__ +#define __GSMTVOID_SYSTEM_H__ 1 + +#define DEBUGF(a...) { \ + fprintf(stderr, "%s:%d ", __FILE__, __LINE__); \ + fprintf(stderr, a); \ +} while (0) + +#endif + diff --git a/gsm-tvoid/src/lib/tun.c b/gsm-tvoid/src/lib/tun.c new file mode 100644 index 0000000..2abda90 --- /dev/null +++ b/gsm-tvoid/src/lib/tun.c @@ -0,0 +1,125 @@ +// $Id: tun.cc,v 1.2 2007-07-07 16:31:42 jl Exp $ + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <libgen.h> +#include <fcntl.h> +#include <sys/ioctl.h> +#include <sys/socket.h> +#include <linux/if_tun.h> +#include <linux/if.h> +#include <linux/if_ether.h> +#include <arpa/inet.h> + +int mktun(const char *chan_name, unsigned char *ether_addr) { + + struct ifreq ifr; + // struct ifreq ifw; + char if_name[IFNAMSIZ]; + int fd, one = 1; + // int sd; + + // construct TUN interface + if((fd = open("/dev/net/tun", O_RDWR)) == -1) { + perror("open"); + return -1; + } + memset(&ifr, 0, sizeof(ifr)); + ifr.ifr_flags = IFF_TAP | IFF_NO_PI; + snprintf(ifr.ifr_name, IFNAMSIZ, "%s", chan_name); + if(ioctl(fd, TUNSETIFF, (void *)&ifr) == -1) { + perror("TUNSETIFF"); + close(fd); + return -1; + } + + // save actual name + memcpy(if_name, ifr.ifr_name, IFNAMSIZ); + + // get ether addr + memset(&ifr, 0, sizeof(ifr)); + memcpy(ifr.ifr_name, if_name, IFNAMSIZ); + if(ioctl(fd, SIOCGIFHWADDR, (void *)&ifr) == -1) { + perror("SIOCGIFHWADDR"); + close(fd); + return -1; + } + memcpy(ether_addr, ifr.ifr_hwaddr.sa_data, ETH_ALEN); + + // set persistent + if(ioctl(fd, TUNSETPERSIST, (void *)&one) == -1) { + perror("TUNSETPERSIST"); + close(fd); + return -1; + } + + // set interface up + /* XXX must be root + if((sd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { + perror("socket"); + close(fd); + return -1; + } + + // get current flags + memset(&ifr, 0, sizeof(ifr)); + strncpy(ifr.ifr_name, if_name, IFNAMSIZ - 1); + if(ioctl(sd, SIOCGIFFLAGS, &ifr) == -1) { + perror("SIOCGIFFLAGS"); + close(sd); + close(fd); + return -1; + } + + // set up + memset(&ifw, 0, sizeof(ifw)); + strncpy(ifw.ifr_name, if_name, IFNAMSIZ - 1); + ifw.ifr_flags = ifr.ifr_flags | IFF_UP | IFF_RUNNING; + if(ioctl(sd, SIOCSIFFLAGS, &ifw) == -1) { + perror("SIOCSIFFLAGS"); + close(sd); + close(fd); + return -1; + } + close(sd); + */ + + return fd; +} + + +static inline int min(int a, int b) { + + return (a < b)? a : b; +} + + +static const unsigned int DEFAULT_MTU = 1500; +static const unsigned short ether_type = 0xfed5; // current dtap ethertype + +int write_interface(int fd, unsigned char *data, unsigned int data_len, + unsigned char *ether_addr) { + + unsigned char frame[DEFAULT_MTU]; // XXX buffer overflow? + struct ethhdr eh; + + if(fd < 0) + return data_len; + + memcpy(eh.h_dest, ether_addr, ETH_ALEN); + memcpy(eh.h_source, ether_addr, ETH_ALEN); + eh.h_proto = htons(ether_type); + + memcpy(frame, &eh, sizeof(eh)); + memcpy(frame + sizeof(eh), data, + min(data_len, sizeof(frame) - sizeof(eh))); + + if(write(fd, frame, sizeof(eh) + data_len) == -1) { + perror("write"); + return -1; + } + + return data_len; +} diff --git a/gsm-tvoid/src/lib/tun.h b/gsm-tvoid/src/lib/tun.h new file mode 100644 index 0000000..a7868c4 --- /dev/null +++ b/gsm-tvoid/src/lib/tun.h @@ -0,0 +1,4 @@ +// $Id: tun.h,v 1.1.1.1 2007-06-01 04:26:57 jl Exp $ + +int mktun(const char *, unsigned char *); +int write_interface(int, unsigned char *, unsigned int, unsigned char *); diff --git a/gsm-tvoid/src/python/Makefile.am b/gsm-tvoid/src/python/Makefile.am new file mode 100644 index 0000000..10e282c --- /dev/null +++ b/gsm-tvoid/src/python/Makefile.am @@ -0,0 +1,33 @@ +# +# Copyright 2004 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +include $(top_srcdir)/Makefile.common + +EXTRA_DIST = run_tests.in \ + gsm_scan.py + + +TESTS = \ + run_tests + + +noinst_PYTHON = \ + qa_gsm.py diff --git a/gsm-tvoid/src/python/capture.sh b/gsm-tvoid/src/python/capture.sh new file mode 100755 index 0000000..7256f2b --- /dev/null +++ b/gsm-tvoid/src/python/capture.sh @@ -0,0 +1,39 @@ +#! /bin/sh + +if [ $1"x" = x ]; then + echo "./capture.sh <freq> [duration==10] [decim==112]" + echo "Example: ./capture.sh 940.4M" + exit 1 +fi +FREQ=$1 + +DURATION=$2 +if [ $2"x" = x ]; then + DURATION=10 +fi +DECIM=$3 +if [ $3"x" = x ]; then + DECIM=112 +fi + +USRP_PROG=usrp_rx_cfile.py +while :; do + which "$USRP_PROG" + if [ $? -eq 0 ]; then + break + fi + USRP_PROG=/usr/share/gnuradio/usrp/usrp_rx_cfile.py + which "$USRP_PROG" + if [ $? -eq 0 ]; then + break + fi + + echo "ERROR: usrp_rx_cfile.py not found. Make sure it's in your PATH!" + exit 1 +done + +FILE="capture_${FREQ}_${DECIM}.cfile" +samples=`expr 64000000 / $DECIM '*' $DURATION` +echo "Capturing for $DURATION seconds to $FILE ($samples samples)" +$USRP_PROG -d "$DECIM" -f "$FREQ" -N $samples $FILE + diff --git a/gsm-tvoid/src/python/go.sh b/gsm-tvoid/src/python/go.sh new file mode 100755 index 0000000..85fbeb9 --- /dev/null +++ b/gsm-tvoid/src/python/go.sh @@ -0,0 +1,16 @@ +#! /bin/sh + +echo "go.sh <file.cfile> [decim==112]" + +DECIM=$2 +FILE=$1 +if [ $FILE"x" = x ]; then + FILE="../../../resource/data/GSMSP_940.8Mhz_118.cfile" + DECIM=118 +fi + +if [ $DECIM"x" = x ]; then + DECIM=112 +fi + +./gsm_scan.py -SN -pd -d "$DECIM" -I "$FILE" | ../../../gsmdecode/src/gsmdecode -i diff --git a/gsm-tvoid/src/python/gsm_scan.py b/gsm-tvoid/src/python/gsm_scan.py new file mode 100755 index 0000000..a366960 --- /dev/null +++ b/gsm-tvoid/src/python/gsm_scan.py @@ -0,0 +1,731 @@ +#!/usr/bin/env python +# TODO: +# * Add status info to window (frequency, offset, etc) +# * Put direct frequency tuning back +# * Add rate-limited file reads (throttle?) +# * Make console only version +# * Reset burst_stats on retune +# * Add better option checking +# * Wideband (multi-channel) processing (usrp and/or file input) +# * Automatic beacon scan (quick scan RSSI, then check for BCCH) +# * AGC + +import sys + +#nasty hack for testing +for extdir in ['../lib','../lib/.libs']: + if extdir not in sys.path: + sys.path.append(extdir) + +from gnuradio import gr, gru, blks +from gnuradio import usrp +from gnuradio import eng_notation +from gnuradio.eng_option import eng_option +from gnuradio.wxgui import stdgui, fftsink, waterfallsink, scopesink, form, slider +from optparse import OptionParser +from math import pi +import wx +import gsm + +#################### +class burst_callback(gr.feval_ll): + def __init__(self, fg): + gr.feval_ll.__init__(self) + self.fg = fg + self.offset_mean_num = 10 #number of FCCH offsets to average + self.offset_vals = [] + +#################### + def eval(self, x): + #print "burst_callback: eval(",x,")\n"; + try: + if gsm.BURST_CB_SYNC_OFFSET == x: + #print "burst_callback: SYNC_OFFSET\n"; + if self.fg.options.tuning.count("o"): + last_offset = self.fg.burst.last_freq_offset() + self.fg.offset -= last_offset + #print "burst_callback: SYNC_OFFSET:", last_offset, " ARFCN: ", self.fg.channel, "\n"; + self.fg.set_channel(self.fg.channel) + + elif gsm.BURST_CB_ADJ_OFFSET == x: + last_offset = self.fg.burst.last_freq_offset() + + self.offset_vals.append(last_offset) + count = len(self.offset_vals) + #print "burst_callback: ADJ_OFFSET:", last_offset, ", count=",count,"\n"; + + if count >= self.offset_mean_num: + sum = 0.0 + while len(self.offset_vals): + sum += self.offset_vals.pop(0) + + self.fg.mean_offset = sum / self.offset_mean_num + + #print "burst_callback: mean offset:", self.fg.mean_offset, "\n"; + + #retune if greater than 100 Hz + if abs(self.fg.mean_offset) > 100.0: + #print "burst_callback: mean offset adjust:", self.fg.mean_offset, "\n"; + if self.fg.options.tuning.count("o"): + #print "burst_callback: tuning.\n"; + self.fg.offset -= self.fg.mean_offset + self.fg.set_channel(self.fg.channel) + + elif gsm.BURST_CB_TUNE == x: + #print "burst_callback: BURST_CB_TUNE: ARFCN: ", self.fg.burst.next_arfcn, "\n"; + if self.fg.options.tuning.count("h"): + #print "burst_callback: tuning.\n"; + self.fg.set_channel(self.fg.burst.next_arfcn) + + return 0 + + except Exception, e: + print >> sys.stderr, "burst_callback: Exception: ", e + + +#################### +def pick_subdevice(u): + if u.db[0][0].dbid() >= 0: + return (0, 0) + if u.db[1][0].dbid() >= 0: + return (1, 0) + return (0, 0) + +#################### +def get_freq_from_arfcn(chan,region): + + #P/E/R-GSM 900 + if chan >= 0 and chan <= 124: + freq = 890 + 0.2*chan + 45 + + #GSM 850 + elif chan >= 128 and chan <= 251: + freq = 824.2 + 0.2*(chan - 128) + 45 + + #GSM 450 + elif chan >= 259 and chan <= 293: + freq = 450.6 + 0.2*(chan - 259) + 10 + + #GSM 480 + elif chan >= 306 and chan <= 340: + freq = 479 + 0.2*(chan - 306) + 10 + + #DCS 1800 + elif region is "e" and chan >= 512 and chan <= 885: + freq = 1710.2 + 0.2*(chan - 512) + 95 + + #DCS 1900 + elif region is "u" and chan >= 512 and chan <= 810: + freq = 1850.2 + 0.2*(chan - 512) + 80 + + #E/R-GSM 900 + elif chan >= 955 and chan <= 1023: + freq = 890 + 0.2*(chan - 1024) + 45 + + else: + freq = 0 + + return freq * 1e6 + +def get_arfcn_from_freq(freq,region): + freq = freq / 1e6 + # GSM 450 + if freq <= 450.6 + 0.2*(293 - 259) + 10: + arfcn = ((freq - (450.6 + 10)) / 0.2) + 259 + # GSM 480 + elif freq <= 479 + 0.2*(340 - 306) + 10: + arfcn = ((freq - (479 + 10)) / 0.2) + 306 + # GSM 850 + elif freq <= 824.2 + 0.2*(251 - 128) + 45: + arfcn = ((freq - (824.2 + 45)) / 0.2) + 128 + #E/R-GSM 900 + elif freq <= 890 + 0.2*(1023 - 1024) + 45: + arfcn = ((freq - (890 + 45)) / -0.2) + 955 + # GSM 900 + elif freq <= 890 + 0.2*124 + 45: + arfcn = (freq - (890 + 45)) / 0.2 + else: + if region is "u": + if freq > 1850.2 + 0.2*(810 - 512) + 80: + arfcn = 0; + else: + arfcn = (freq - (1850.2 + 80) / 0.2) + 512 + elif region is "e": + if freq > 1710.2 + 0.2*(885 - 512) + 95: + arfcn = 0; + else: + arfcn = (freq - (1710.2 + 95) / 0.2) + 512 + else: + arfcn = 0 + + return arfcn + +#################### +class app_flow_graph(stdgui.gui_flow_graph): + + def __init__(self, frame, panel, vbox, argv): + stdgui.gui_flow_graph.__init__(self) + + self.frame = frame + self.panel = panel + self.parse_options() + self.setup_flowgraph() + self.setup_print_options() + self._build_gui(vbox) + + #some non-gui wxwindows handlers + self.t1 = wx.Timer(self.frame) + self.t1.Start(5000,0) + self.frame.Bind(wx.EVT_TIMER, self.on_tick) + + #bind the idle routing for message_queue processing + self.frame.Bind(wx.EVT_IDLE, self.on_idle) + + #tune + self.set_channel(self.channel) + + #giddyup + self.status_msg = "Started." + + +#################### + def parse_options(self): + parser = OptionParser(option_class=eng_option) + + #view options + parser.add_option("-S", "--scopes", type="string", default="I", + help="Select scopes to display. (N)one, (I)nput,(F)ilter,(d)emod,(c)locked,(b)urst [default=%default]") + parser.add_option("-p", "--print-console", type="string", default="s", + help="What to print on console. [default=%default]\n" + + "(n)othing, (e)verything, (s)tatus, (a)ll Types, (k)nown, (u)nknown, \n" + + "TS(0), (F)CCH, (S)CH, (N)ormal, (D)ummy\n" + + "Usefull (b)its, All TS (B)its, (C)orrelation bits, he(x) raw burst data, \n" + + "(d)ecoded hex for gsmdecode") + + + #decoder options + parser.add_option("-D", "--decoder", type="string", default="c", + help="Select decoder block to use. (c)omplex,(f)loat [default=%default]") + parser.add_option("-E", "--equalizer", type="string", default="none", + help="Type of equalizer to use. none, fixed-dfe, fixed-linear [default=%default]") + parser.add_option("-t", "--timing", type="string", default="cn", + help="Type of timing techniques to use. [default=%default] \n" + + "(n)one, (c)orrelation track, (q)uarter bit, (f)ull04 ") + + #tuning options + parser.add_option("-T", "--tuning", type="string", default="oh", + help="Type of tuning to perform. [default=%default] \n" + + "(n)one, (o)ffset adjustment, (h)opping ") + parser.add_option("-o", "--offset", type="eng_float", default=0.0, + help="Tuning offset frequency") + + #file options + parser.add_option("-I", "--inputfile", type="string", default=None, + help="Select a capture file to read") + parser.add_option("-O", "--outputfile", type="string", default=None, + help="Filename to save burst output") + parser.add_option("-l", "--fileloop", action="store_true", dest="fileloop", default=False, + help="Continuously loop data from input file") + + #usrp options + parser.add_option("-d", "--decim", type="int", default=112, + help="Set USRP decimation rate to DECIM [default=%default]") + parser.add_option("-R", "--rx-subdev-spec", type="subdev", default=None, + help="Select USRP Rx side A or B (default=first one with a daughterboard)") + parser.add_option("--fusb-block-size", type="int", default=0, + help="Set USRP blocksize") + parser.add_option("--fusb-nblocks", type="int", default=0, + help="Set USRP block buffers") + parser.add_option("--realtime",action="store_true", dest="realtime", + help="Use realtime scheduling.") + parser.add_option("-C", "--clock-offset", type="eng_float", default=0.0, + help="Sample clock offset frequency") + + #FIXME: gain not working? + parser.add_option("-g", "--gain", type="eng_float", default=None, + help="Set gain in dB (default is midpoint)") + parser.add_option("-c", "--channel", type="int", default=1, + help="Tune to GSM ARFCN.") + parser.add_option("-r", "--region", type="string", default="u", + help="Frequency bands to use for channels. (u)s or (e)urope [default=%default]") + + #testing options + parser.add_option("--test-hop-speed",action="store_true", dest="test_hop_speed", + help="Test hopping speed.") + parser.add_option("--hopgood", type="int", default=658, + help="Good ARFCN [default=%default]") + parser.add_option("--hopbad", type="int", default=655, + help="Emtpy ARFCN [default=%default]") + + (options, args) = parser.parse_args() + if (len(args) != 0): + parser.print_help() + sys.exit(1) + +# if (options.inputfile and ( options.freq or options.rx_subdev_spec or options.gain)): +# print "datafile option cannot be used with USRP options." +# sys.exit(1) + + if options.test_hop_speed: + options.tuning = 'h' #hopping only, no offset + options.channel = options.hopgood + + self.options = options + self.scopes = options.scopes + self.region = options.region + self.channel = options.channel + self.offset = options.offset + +#################### + def setup_print_options(self): + options = self.options + + self.print_status = options.print_console.count('s') + + if options.print_console.count('e'): + self.print_status = 1 + + #console print options + popts = 0 + + if options.print_console.count('d'): + popts |= gsm.PRINT_GSM_DECODE + + if options.print_console.count('s'): + popts |= gsm.PRINT_STATE + + if options.print_console.count('e'): + popts |= gsm.PRINT_EVERYTHING + + if options.print_console.count('a'): + popts |= gsm.PRINT_ALL_TYPES + + if options.print_console.count('k'): + popts |= gsm.PRINT_KNOWN + + if options.print_console.count('u'): + popts |= gsm.PRINT_UNKNOWN + + if options.print_console.count('0'): + popts |= gsm.PRINT_TS0 + + if options.print_console.count('F'): + popts |= gsm.PRINT_FCCH + + if options.print_console.count('S'): + popts |= gsm.PRINT_SCH + + if options.print_console.count('N'): + popts |= gsm.PRINT_NORMAL + + if options.print_console.count('D'): + popts |= gsm.PRINT_DUMMY + + if options.print_console.count('x'): + popts |= gsm.PRINT_BITS | gsm.PRINT_HEX + + if options.print_console.count('B'): + popts |= gsm.PRINT_BITS | gsm.PRINT_ALL_BITS + + elif options.print_console.count('b'): + popts |= gsm.PRINT_BITS + + elif options.print_console.count('C'): + popts |= gsm.PRINT_BITS | gsm.PRINT_CORR_BITS + + #print "Print flags: 0x%8.8x\n" %(popts) + + self.burst.d_print_options = popts + + +#################### + def setup_usrp(self): + options = self.options + + #set resonable defaults if no user prefs set + if options.realtime: + if options.fusb_block_size == 0: + options.fusb_block_size = gr.prefs().get_long('fusb', 'rt_block_size', 1024) + if options.fusb_nblocks == 0: + options.fusb_nblocks = gr.prefs().get_long('fusb', 'rt_nblocks', 16) + else: + if options.fusb_block_size == 0: + options.fusb_block_size = gr.prefs().get_long('fusb', 'block_size', 4096) + if options.fusb_nblocks == 0: + options.fusb_nblocks = gr.prefs().get_long('fusb', 'nblocks', 16) + + print >> sys.stderr, "fusb_block_size =", options.fusb_block_size + print >> sys.stderr, "fusb_nblocks =", options.fusb_nblocks + + + self.ursp = usrp.source_c(decim_rate=options.decim,fusb_block_size=options.fusb_block_size,fusb_nblocks=options.fusb_nblocks) + + if options.rx_subdev_spec is None: + options.rx_subdev_spec = pick_subdevice(self.ursp) + + self.ursp.set_mux(usrp.determine_rx_mux_value(self.ursp, options.rx_subdev_spec)) + + # determine the daughterboard subdevice + self.subdev = usrp.selected_subdev(self.ursp, options.rx_subdev_spec) + input_rate = self.ursp.adc_freq() / self.ursp.decim_rate() + + # set initial values + if options.gain is None: + # if no gain was specified, use the mid-point in dB + g = self.subdev.gain_range() + options.gain = float(g[0]+g[1])/2 + + self.set_gain(options.gain) + + self.source = self.ursp + +#################### + def setup_timing(self): + options = self.options + clock_rate = 64e6 + + if options.clock_offset: + clock_rate = 64e6 + options.clock_offset + elif options.channel: + #calculate actual clock rate based on frequency offset (assumes shared clock for sampling and tuning) + f = get_freq_from_arfcn(options.channel,options.region) + if f: + percent_offset = options.offset / get_freq_from_arfcn(options.channel,options.region) + else: + percent_offset = 0.0 + + clock_rate += clock_rate * percent_offset + print >> sys.stderr, "% offset = ", percent_offset, "clock = ", clock_rate + + self.clock_rate = clock_rate + self.input_rate = clock_rate / options.decim #TODO: what about usrp value? + self.gsm_symb_rate = 1625000.0 / 6.0 + self.sps = self.input_rate / self.gsm_symb_rate + +#################### + def setup_filter(self): + #test w/o filter (for buffer latency) + #self.filter = self.source + #return + + options = self.options + + # configure channel filter + filter_cutoff = 145e3 #135,417Hz is GSM bandwidth + filter_t_width = 10e3 + + #Only DSP adjust for offset on datafile, adjust tuner for USRP + #TODO: see if we can change this offset at runtime based on freq detection + if options.inputfile: + offset = self.offset + else: + offset = 0.0 + + filter_taps = gr.firdes.low_pass(1.0, self.input_rate, filter_cutoff, filter_t_width, gr.firdes.WIN_HAMMING) + self.filter = gr.freq_xlating_fir_filter_ccf(1, filter_taps, offset, self.input_rate) + + self.connect(self.source, self.filter) + +#################### + def setup_f_flowgraph(self): + # configure demodulator + # adjust the phase gain for sampling rate + self.demod = gr.quadrature_demod_cf(self.sps); + + #configure clock recovery + gain_mu = 0.01 + gain_omega = .25 * gain_mu * gain_mu # critically damped + self.clocker = gr.clock_recovery_mm_ff( self.sps, + gain_omega, + 0.5, #mu + gain_mu, + 0.5) #omega_relative_limit, + + self.burst = gsm.burst_ff(self.burst_cb) + self.connect(self.filter, self.demod, self.clocker, self.burst) + +#################### + def setup_c_flowgraph(self): + #use the sink version if burst scope not selected +# if self.scopes.count("b"): +# self.burst = gsm.burst_cf(self.burst_cb,self.input_rate) +# else: +# self.burst = gsm.burst_sink_c(self.burst_cb,self.input_rate) + + self.burst = gsm.burst_cf(self.burst_cb,self.input_rate) + + self.connect(self.filter, self.burst) + +#################### + def setup_scopes(self): + #Input FFT + if self.scopes.count("I"): + self.input_fft_scope = fftsink.fft_sink_c (self, self.panel, fft_size=1024, sample_rate=self.input_rate) + self.connect(self.source, self.input_fft_scope) + + #Filter FFT + if self.scopes.count("F"): + self.filter_fft_scope = fftsink.fft_sink_c (self, self.panel, fft_size=1024, sample_rate=self.input_rate) + self.connect(self.filter, self.filter_fft_scope) + + #Burst Scope + if self.scopes.count("b"): + self.burst_scope = scopesink.scope_sink_f(self, self.panel, sample_rate=self.gsm_symb_rate,v_scale=1) + self.connect(self.v2s, self.burst_scope) + + #burst_f options + if self.options.decoder.count("f"): + if self.scopes.count("d"): + self.demod_scope = scopesink.scope_sink_f(self, self.panel, sample_rate=self.input_rate) + self.connect(self.demod, self.demod_scope) + + if self.scopes.count("c"): + #f_flowgraph + self.clocked_scope = scopesink.scope_sink_f(self, self.panel, sample_rate=self.gsm_symb_rate,v_scale=1) + self.connect(self.clocker, self.clocked_scope) + #for testing: f_flowgraph2 + #self.clocked_scope = scopesink.scope_sink_c(self, self.panel, sample_rate=self.gsm_symb_rate,v_scale=1) + #self.connect(self.clocker, self.clocked_scope) + #self.connect((self.clocker,1),(self.clocked_scope,1)) + +#################### + def configure_burst_decoder(self): + options = self.options + + # equalizer + eq_types = {'none': gsm.EQ_NONE, 'fixed-dfe': gsm.EQ_FIXED_DFE, 'fixed-linear': gsm.EQ_FIXED_LINEAR } + self.burst.d_equalizer_type = eq_types[options.equalizer] + + # timing + topts = 0 + + if options.timing.count('c'): + topts |= gsm.CLK_CORR_TRACK + + if options.timing.count('q'): + topts |= gsm.QB_QUARTER + + elif options.timing.count('f'): + topts |= gsm.QB_FULL04 + + self.burst.d_clock_options = topts + + #test modes + testopts = 0 + + if options.test_hop_speed: + testopts |= gsm.OPT_TEST_HOP_SPEED + self.burst.d_hop_good_arfcn = options.hopgood + self.burst.d_hop_bad_arfcn = options.hopbad + + print "!!!!! Enabling Hop Speed Testing (good=%d, bad=%d) !!!!!" % (options.hopgood,options.hopbad) + + self.burst.d_test_options = testopts + #print "Test Options: 0x%8.8x" % (self.burst.d_test_options) + + + +#################### + def setup_flowgraph(self): + + options = self.options + + # Attempt to enable realtime scheduling + if options.realtime: + r = gr.enable_realtime_scheduling() + if r == gr.RT_OK: + options.realtime = True + print >> sys.stderr, "Realtime scheduling ENABLED" + else: + options.realtime = False + print >> sys.stderr, "Realtime scheduling FAILED" + + self.setup_timing() + + # Setup our input source + if options.inputfile: + self.using_usrp = False + print >> sys.stderr, "Reading data from: " + options.inputfile + self.source = gr.file_source(gr.sizeof_gr_complex, options.inputfile, options.fileloop) + else: + self.using_usrp = True + self.setup_usrp() + + self.setup_filter() + + #create a tuner callback + self.mean_offset = 0.0 #this is set by tuner callback + self.burst_cb = burst_callback(self) + + # Setup flow based on decoder selection + if options.decoder.count("c"): + self.setup_c_flowgraph() + elif options.decoder.count("f"): + self.setup_f_flowgraph() + + self.configure_burst_decoder() + + #Hookup a vector-stream converter if we want burst output + if self.scopes.count("b") or options.outputfile: + self.v2s = gr.vector_to_stream(gr.sizeof_float,142) #burst output is 142 (USEFUL_BITS) + self.connect(self.burst, self.v2s) +# else: +# self.burst_sink = gr.null_sink(gr.sizeof_float) +# self.connect(self.v2s, self.burst_sink) + + + #Output file + if options.outputfile: + self.filesink = gr.file_sink(gr.sizeof_float, options.outputfile) + self.connect(self.v2s, self.filesink) + + self.setup_scopes() + +#################### + def set_status_msg(self, msg): + self.frame.GetStatusBar().SetStatusText(msg, 0) + +#################### + def _build_gui(self, vbox): + + if self.scopes.count("I"): + vbox.Add(self.input_fft_scope.win, 5, wx.EXPAND) + + if self.scopes.count("F"): + vbox.Add(self.filter_fft_scope.win, 5, wx.EXPAND) + + if self.scopes.count("d"): + vbox.Add(self.demod_scope.win, 5, wx.EXPAND) + + if self.scopes.count("c"): + vbox.Add(self.clocked_scope.win, 5, wx.EXPAND) + + if self.scopes.count("b"): + vbox.Add(self.burst_scope.win, 5, wx.EXPAND) + + # add control area at the bottom + if self.using_usrp: + + def _form_set_freq(kv): + return self.set_freq(kv['freq']) + + self.usrpform = usrpform = form.form() + hbox = wx.BoxSizer(wx.HORIZONTAL) + + hbox.Add((5,0), 0, 0) + g = self.subdev.gain_range() + usrpform['gain'] = form.slider_field(parent=self.panel, sizer=hbox, label="Gain", + weight=3, + min=int(g[0]), max=int(g[1]), + callback=self.set_gain) + + hbox.Add((5,0), 0, 0) + usrpform['chan'] = form.slider_field( parent=self.panel, sizer=hbox, label="Channel", + weight=3, + min=0, max=1023, + value=self.channel, + callback=self.set_channel) + + vbox.Add(hbox, 0, wx.EXPAND) + + +#################### + def set_freq(self, freq): + #TODO: for wideband processing, determine if the desired freq is within our current sample range. + # If so, use the frequency translator to tune. Tune the USRP otherwise. + # Maybe have a flag to force tuning the USRP? + + if not self.using_usrp: + #if reading from file just adjust for offset in the freq translator + if self.print_status: + print >> sys.stderr, "Setting filter center freq to offset: ", self.offset, "\n" + + self.filter.set_center_freq(self.offset) + return True + + freq = freq - self.offset + + r = self.ursp.tune(0, self.subdev, freq) + + if r: + self.status_msg = '%f' % (freq/1e6) + return True + else: + self.status_msg = "Failed to set frequency (%f)" % (freq/1e6) + return False + +#################### + def set_gain(self, gain): + + if not self.using_usrp: + return False + + self.subdev.set_gain(gain) + +#################### + def set_channel(self, chan): + + self.chan = chan + + freq = get_freq_from_arfcn(chan,self.region) + + if freq: + self.set_freq(freq) + else: + self.status_msg = "Invalid Channel" + +#################### + def print_stats(self): + out = sys.stderr + + n_total = self.burst.d_total_count + n_unknown = self.burst.d_unknown_count + n_known = n_total - n_unknown + + print >> out, "======== STATS =========" + print >> out, 'freq_offset: ',self.offset + print >> out, 'mean_offset: ',self.mean_offset + print >> out, 'sync_loss_count:',self.burst.d_sync_loss_count + print >> out, 'total_bursts: ',n_total + print >> out, 'fcch_count: ',self.burst.d_fcch_count + print >> out, 'part_sch_count: ',self.burst.d_part_sch_count + print >> out, 'sch_count: ',self.burst.d_sch_count + print >> out, 'normal_count: ',self.burst.d_normal_count + print >> out, 'dummy_count: ',self.burst.d_dummy_count + print >> out, 'unknown_count: ',self.burst.d_unknown_count + print >> out, 'known_count: ',n_known + if n_total: + print >> out, '%known: ', 100.0 * n_known / n_total + + #timing + if self.options.decoder.count("c"): + omega = self.burst.get_omega() + else: + omega = self.clocker.omega() + + percent_sps = omega / self.sps + print >> out, 'omega: %f (%f / %f)' % (omega,self.sps,percent_sps) + + print >> out, "" + +#################### + def on_tick(self, evt): + + if self.print_status: + self.print_stats() + +#################### + def on_idle(self, event): + #We can't update this while in the tune functions since they can be invoked by callbaks and the GUI croaks... + #FIXME: This is icky. + self.set_status_msg(self.status_msg) + #print "Idle.\n"; + +#################### +def main(): + app = stdgui.stdapp(app_flow_graph, "GSM Scanner", nstatus=1) + app.MainLoop() + +#################### +if __name__ == '__main__': + main() diff --git a/gsm-tvoid/src/python/qa_gsm.py b/gsm-tvoid/src/python/qa_gsm.py new file mode 100755 index 0000000..5709756 --- /dev/null +++ b/gsm-tvoid/src/python/qa_gsm.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python +# + + +from gnuradio import gr, gr_unittest +import gsm + +class qa_gsm (gr_unittest.TestCase): + + def setUp (self): + self.fg = gr.flow_graph () + + def tearDown (self): + self.fg = None + + def test_001_burst_cf (self): +# src_data = map(complex,(-3, 4, -5.5, 2, 3)) + src_data = (-3, 4, -5.5, 2, 3) + print src_data + expected_result = (9, 16, 30.25, 4, 9) + print expected_result + src = gr.vector_source_c (src_data) + burst = gsm.burst_cf () + dst = gr.vector_sink_f () + self.fg.connect (src, burst) + self.fg.connect (burst, dst) + self.fg.run () + result_data = dst.data () + self.assertFloatTuplesAlmostEqual (expected_result, result_data, 5) + +if __name__ == '__main__': + gr_unittest.main () diff --git a/gsm-tvoid/src/python/run_tests.in b/gsm-tvoid/src/python/run_tests.in new file mode 100644 index 0000000..6e4b83e --- /dev/null +++ b/gsm-tvoid/src/python/run_tests.in @@ -0,0 +1,50 @@ +#!/bin/sh + +# All this strange PYTHONPATH manipulation is required to run our +# tests using our just built shared library and swig-generated python +# code prior to installation. + +# build tree == src tree unless you're doing a VPATH build. +# If you don't know what a VPATH build is, you're not doing one. Relax... + +prefix=@prefix@ +exec_prefix=@exec_prefix@ + +# Where to look in the build tree for our shared library +libbld=@abs_top_builddir@/src/lib +# Where to look in the src tree for swig generated python code +libsrc=@abs_top_srcdir@/src/lib +# Where to look in the src tree for hand written python code +py=@abs_top_srcdir@/src/python + +# Where to look for installed GNU Radio python modules +# FIXME this is wrong on a distcheck. We really need to ask gnuradio-core +# where it put its python files. +installed_pythondir=@pythondir@ +installed_pyexecdir=@pyexecdir@ + +PYTHONPATH="$libbld:$libbld/.libs:$libsrc:$py:$installed_pythondir:$installed_pyexecdir:$PYTHONPATH" +#PYTHONPATH="$libbld:$libbld/.libs:$libsrc:$py:$installed_pythondir:$installed_pyexecdir" + +export PYTHONPATH + +# +# This is the simple part... +# Run everything that matches qa_*.py and return the final result. +# + +ok=yes +for file in @srcdir@/qa_*.py +do + if ! $file + then + ok=no + fi +done + +if [ $ok = yes ] +then + exit 0 +else + exit 1 +fi diff --git a/gsmdecode/INSTALL b/gsmdecode/INSTALL new file mode 100644 index 0000000..9a8b266 --- /dev/null +++ b/gsmdecode/INSTALL @@ -0,0 +1,11 @@ + + The GSM Scanner Project + 2007/04/27, http://www.thc.org/gsm + +GSMDECODE decodes layer1/layer2 messages. It either takes raw hex input +or xml input generated by gammu & nokia dct3 debug trace mobile. + +$ ./configure +$ make all +$ src/gsmdecode -x <example_sms2.xml + diff --git a/gsmdecode/Makefile.am b/gsmdecode/Makefile.am new file mode 100644 index 0000000..69fd6b1 --- /dev/null +++ b/gsmdecode/Makefile.am @@ -0,0 +1,6 @@ +SUBDIRS = src +EXTRA_DIST = config VERSION bootstrap INSTALL example_sms2.xml + +test: + @echo "foobar" + diff --git a/gsmdecode/bootstrap b/gsmdecode/bootstrap new file mode 100755 index 0000000..f32d6de --- /dev/null +++ b/gsmdecode/bootstrap @@ -0,0 +1,45 @@ +#! /bin/bash + +DIE=0 + +(autoconf --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have autoconf installed." + DIE=1 +} + +# libtool --version check not done... + +(automake --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have automake installed." + DIE=1 +} + +if test "$DIE" -eq 1; then + exit 1 +fi + +echo Removing old files... +rm -f configure Makefile Makefile.in src/Makefile src/Makefile.in config.h config.status aclocal.m4 config.cache config.log + +mkdir config +echo "aclocal -I config" +aclocal -I config +if test $? -ne 0; then + exit 1 +fi +echo "autoheader" +autoheader +if test $? -ne 0; then + exit 1 +fi +echo "automake --foreign --add-missing" +automake --foreign --add-missing +if test $? -ne 0; then + exit 1 +fi +echo "autoconf" +autoconf +echo "BOOTSTRAP complete" + diff --git a/gsmdecode/configure.in b/gsmdecode/configure.in new file mode 100644 index 0000000..1bce538 --- /dev/null +++ b/gsmdecode/configure.in @@ -0,0 +1,84 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(src/gsmdecode.c) +VER=`cat ${srcdir}/VERSION` +AC_MSG_RESULT(Begining autoconfiguration process for gsmdecode-$VER...) + +AC_CONFIG_AUX_DIR(config) +AC_CANONICAL_SYSTEM + +dnl we use automake +AM_INIT_AUTOMAKE(gsmdecode, $VER) +AM_CONFIG_HEADER(config.h) +dnl for --enable-maintainer-mode fun use: +dnl AM_MAINTAINER_MODE +dnl we use automake anyway...no need for AC_CONFIG_HEADER +dnl AC_CONFIG_HEADER(config.h) + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_RANLIB +AC_C_CONST +dnl +dnl Use these compiler flags if we have gcc. +dnl +if test $ac_cv_prog_gcc = yes; then + CCOPTS='-O2 -Wall' + CFLAGS="$CCOPTS" +fi +test "x$prefix" != "xNONE" || prefix="/usr/local" +test "x$exec_prefix" != "xNONE" || exec_prefix="${prefix}" +dnl AC_CHECK_LIB(nsl, gethostbyname) + +dnl Checks for header files. +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS(sys/time.h unistd.h string.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_PID_T +AC_HEADER_TIME + +dnl Checks for library functions. +AC_FUNC_MEMCMP + +AC_TYPE_SIGNAL +dnl If size_t is not defined, define size_t to be unsigned. +AC_TYPE_SIZE_T +dnl If uid_t is not defined, define uid_t to be int and gid_t to be int. +AC_TYPE_UID_T + +dnl check if we are on a bigendian b0x +dnl We dont check for this because autoconf maintainers are pussies and +dnl yell a warning everytime. Guys, introduce AC_C_BIGENDIAN_CROSS for +dnl gods sake! +dnl AC_C_BIGENDIAN + +AC_CHECK_FUNCS(gettimeofday memcpy strchr) +dnl FIXME: repair this later +dnl SNPRINTF='' +dnl AC_CHECK_FUNC(snprintf, AC_DEFINE(HAVE_SNPRINTF), SNPRINTF='snprintf.o') +dnl AC_SUBST(SNPRINTF) + +AC_ARG_ENABLE(debug, +[ --enable-debug Enable debug information], + AC_DEFINE(GSMSP_DEBUG, 1, [Debug infos]) +) + +B=`eval echo ${bindir}` ; B=`eval echo ${B}` +D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}` +AC_OUTPUT(Makefile src/Makefile) + +dnl Just to show the correct values... + +echo "gsmdecode has been configured with the following options:" +echo " User binaries: $B" +echo "" +echo " Host: ${host}" +echo " Compiler: ${CC}" +echo " Compiler flags: ${CFLAGS}" +echo "Preprocessor flags: ${CPPFLAGS}" +echo " Linker flags: ${LDFLAGS}" +echo " Libraries: ${LIBS}" +echo "Configuration complete. Now type: make; src/gsmdecode -x <example_sms2.xml" diff --git a/gsmdecode/src/Makefile.am b/gsmdecode/src/Makefile.am new file mode 100644 index 0000000..ec2b21d --- /dev/null +++ b/gsmdecode/src/Makefile.am @@ -0,0 +1,3 @@ +bin_PROGRAMS = gsmdecode +gsmdecode_SOURCES = data_out.c gsmdecode.c id_list.c common.c mcc_list.c +noinst_HEADERS = data_out.h gsm_desc.h id_list.h common.h mcc_list.h diff --git a/gsmdecode/src/common.c b/gsmdecode/src/common.c new file mode 100644 index 0000000..decea53 --- /dev/null +++ b/gsmdecode/src/common.c @@ -0,0 +1,86 @@ +/* + */ + +#include "common.h" +#include <stdio.h> +#include <string.h> + +void +hexdump(const unsigned char *data, size_t len) +{ + size_t n = 0; + int line = 0; + + if (!len) + return; + + printf("%03x: ", line++); + while (1) + { + printf("%2.2x ", data[n++]); + if (n >= len) + break; + if ((n % 8 == 0) && (n % 16 != 0)) + printf(" - "); + if (n % 16 == 0) + printf("\n%03x: ", line++); + } + printf("\n"); +} + +#ifndef HAVE_STRLCPY +/* + * bsd'sh strlcpy(). + * The strlcpy() function copies up to size-1 characters from the + * NUL-terminated string src to dst, NUL-terminating the result. + * Return: total length of the string tried to create. + */ +size_t +strlcpy(char *dst, const char *src, size_t size) +{ + size_t len = strlen(src); + size_t ret = len; + + if (size <= 0) + return 0; + if (len >= size) + len = size - 1; + memcpy(dst, src, len); + dst[len] = 0; + + return ret; +} +#endif + +/* + * Debuggging... + * Convert an interger to a bit string and output it. + * Most significatn bit first. + */ +char * +int2bit(unsigned int val) +{ + static char buf[33 + 3]; + char *ptr = buf; + unsigned int i = 0x1 << 31; + int round = 0; + + while (i > 0) + { + + if (val & i) + *ptr++ = '1'; + else + *ptr++ = '0'; + + i = i >> 1; + + if ((++round % 8 == 0) && (i > 0)) + *ptr++ = '.'; + } + + *ptr = '\0'; + + return buf; +} + diff --git a/gsmdecode/src/common.h b/gsmdecode/src/common.h new file mode 100644 index 0000000..61abc5f --- /dev/null +++ b/gsmdecode/src/common.h @@ -0,0 +1,50 @@ +#ifndef __GSMSP_COMMON_H__ +#define __GSMSP_COMMON_H__ 1 + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <unistd.h> + +#define MIN(a,b) ((a)<(b)?(a):(b)) +#define MAX(a,b) ((a)>(b)?(a):(b)) + +/* DISABLE me for release build. Otherwise with debug output. */ +//#define GSMSP_DEBUG 1 + +#ifdef GSMSP_DEBUG +# define DEBUGF(a...) do { \ + fprintf(stderr, "DEBUG %s:%d ", __func__, __LINE__); \ + fprintf(stderr, a); \ +} while (0) +#else +# define DEBUGF(a...) +#endif + +/* True if bit at position 'pos' in 'data' is set */ +#define BIT(data, pos) ((data) >> (pos)) & 1 + +# define HEXDUMPF(data, len, a...) do { \ + printf("HEX %s:%d ", __func__, __LINE__); \ + printf(a); \ + hexdump(data, len); \ +} while (0) + +void hexdump(const unsigned char *data, size_t len); + +struct _opt +{ + char format; + char flags; +}; + +#define MSG_FORMAT_BBIS (1) +#define MSG_FORMAT_B (2) +#define MSG_FORMAT_XML (3) + +#define FL_MOTOROLA (0x01) + +#endif /* !__GSMSP_COMMON_H__ */ + + diff --git a/gsmdecode/src/data_out.c b/gsmdecode/src/data_out.c new file mode 100644 index 0000000..1f69d2e --- /dev/null +++ b/gsmdecode/src/data_out.c @@ -0,0 +1,3867 @@ +/* + * TODO: memcpy for concatendated sms is unchecked. + */ +#include "common.h" +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +//#include <arpa/inet.h> +//#include <netinet/in.h> +#include "id_list.h" +#include "gsm_desc.h" +#include "mcc_list.h" + +#define OUTF(a...) do { \ + printf(" %3d: %02x ", (int)(data - start), data[0]); \ + printf(a); \ +} while (0) + +#define OUT(a...) do { \ + printf(a); \ +} while (0) + +#define RETTRUNK() do { \ + printf("%s:%d TRUNKATED (0x%p - 0x%p)\n", __func__, __LINE__, data, end); \ + return; \ +} while (0) + +extern struct _opt opt; + +/* Prototype helper functions */ +static unsigned int Bit_extract_val(unsigned char *data, int bit_pos, int numbits); + + +static void l2_rrm(); +static void l2_sms(); +static void l2_cc(); +static void l2_RRsystemInfo1(); +static void l2_MccMncLac(); +static void l2_RRsystemInfo2(); +static void l2_RRsystemInfo2bis(); +static void l2_RRsystemInfo2ter(); +static void l2_RRsystemInfo3C(); +static void l2_RRsystemInfo4C(); +static void l2_RRsystemInfo6(); +static void l2_RRsystemInfo13C(); +static void l2_RRimmediateAssTBFC(); +static void l2_RRassignCommand(); +static void l2_RRassignComplete(); +static void l2_RRpagingrequest1(); +static void l2_RRpagingrequest2(); +static void l2_RRpagingrequest3(); +static void l2_RRimmediateAssignment(); +static void l2_RRimmAssTBFDirEncHoChaC(); +static void l2_MobId(); +static void l2_mmm(); +static void l2_HoppingChannel(); +static void l2_HoppingChannelC(); +static void l2_SingleChannel(); +static void l2_SingleChannelC(); +static void l2_HoppingChannelAssCom(); +static void l2_SingleChannelAssCom(); +static void l2_MobileAllocation(); +static void l2_BcchAllocation(); +static void l2_TmsiReallocCommand(); +static void l2_RachControlParameters(); +static void l2_bcc(); +static void l2_Bbis(); +static void l2_ChannelRelease(); +static void l2_MMcmServiceRequest(); +static void l2_RRciphModCmd(); +static void l2_RRciphModCompl(); +static void l2_RRpagingresponse(); +static void l2_RRclassmarkChange(); +static void l2_NonCallSS(); +static void l2_FacilityRegister(); +static void l2_FacilityInvoke(); +static void l2_Facility(); +static void l2_FacilityReturnResult(); +static void l2_UssRequest(); +static void l2_UssData(); +static void l2_CCReleaseComplete(); + +static void l2_ChannelNeeded(char *str, unsigned char ch); +static int l2_MNCC(int mcc, unsigned char a, unsigned char b, unsigned char c); + +static void maio(); +static char *BitRow(unsigned char c, int pos); +static char *PageMode(unsigned char mode); +static char *BitRowFill(unsigned char c, unsigned char mask); + +static void dcch_address(); +static void dcch_control(); +static void ControlChannelDescription(); +static void CellOptionsBcch(); +static void CellSelectionParameters(); +static void RequestReference(); +static void TimingAdvance(); +static void StartingTime(); +static void TypeOfIdentity(); +static void l2_NeighbourCellDescription(); +static void CellIdentity(); +static void MSClassMarkTwo(); +static void MSClassMarkOne(); +static void ClassMarkThree(); +static void cpData(); +static void Address(const char *str); +static void TPAddress(const char *str); +static void ChannelDescriptionTwo(); +static void CCalerting(); +static void CCsetup(); +static void ProgressIndicator(); +static void Cause(); +static void SmsProtocolDataValidity(); +static void BearerCap(); +static void Number(int len); +static void BCDNumber(); +static void AuthenticationRequest(); +static void AuthenticationResponse(); +static void sms_dcs(); +static void sms_udh(); +static void sms_default_alphabet(); +static void SmscTimestamp(); +static void simdatadownload(); +static void LocationUpdateRequest(); +static void MultiSupportTwo(); +static void MeasurmentReport(); +static int CellAllocation(unsigned char format, char *str); +static void ChannelMode(); + +static const unsigned char *start; +static const unsigned char *data; +static const unsigned char *end; + +struct _nfo +{ + unsigned int flags; + unsigned char seq_counter; + unsigned char sapi; + int direction; /* 0 == downlink, 1 == uplink */ +}; +#define GSMSP_NFO_SMS (0x01) +#define GSMSP_NFO_SEGMENTATION (0x02) +#define GSMSP_NFO_UDHI (0x04) +#define GSMSP_NFO_DEFAULTALPHABET (0x08) +#define GSMSP_NFO_SIMDATADL (0x10) /* Sim Data Download */ +#define GSMSP_NFO_SMSCON (0x20) /* Concatenated SMS */ +#define GSMSP_NFO_LASTSMSCHUNK (0x40) + +static struct _nfo nfo; + +#if 0 +struct _sms +{ + unsigned char buf[248 + 3]; + unsigned char *ptr; +}; +#endif + +/* For concatenating SMS'es */ +struct _sms_con +{ + unsigned char buf[8192]; + unsigned char *ptr; +}; + +struct _con +{ + unsigned char buf[248 + 3]; + unsigned char *ptr; + int logicalchannel; +}; +/* Is initialized to 0 (do not remove from .bss) */ +static struct _sms_con sms_con; + +struct _con con[8]; +struct _con conuplink[8]; +struct _con *conptr; + + + +/* + * B-format (and also A-Format) + */ +void +l2_data_out_B(int fn, const unsigned char *input_data, int len, int logicalchannel, int direction) +{ + const unsigned char *from; + int val; + + data = input_data; + start = data; + end = data + len; + + HEXDUMPF(data, 23 /*len*/, "Format B DATA (%s)\n", direction?"up":"down"); + + /* Do not analyze dummy octets */ + if (memcmp(data + 3, "\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b\x2b", 20) == 0) + return; + + //printf("Logical channel: %d\n", logicalchannel); + + /* Need at least 3 octets */ + if (data + 2 >= end) + RETTRUNK(); + + memset(&nfo, 0, sizeof nfo); + nfo.direction = direction; + dcch_address(); + data++; + dcch_control(); + data++; + /* FIXME: Why is extended length always set to 1? */ + OUTF("%s EL, Extended Length: %s\n", BitRow(data[0], 0), (data[0] & 1)?"y":"n"); + OUTF("%s M, segmentation: %c\n", BitRow(data[0], 1), ((data[0] >> 1) & 1)?'Y':'N'); + + /* Initialization. have to do this only once but there + * is no better place to do it atm + */ + if (conptr->ptr == NULL) + conptr->ptr = conptr->buf; + + if ((data[0] >> 1) & 1) + { + /* Segmentation: y */ + if ((logicalchannel != conptr->logicalchannel) && (conptr->ptr > conptr->buf)) + { + /* Currently we only support 1 segmented stream + * at the same time per direction. + * If downlink sends two segments on two different + * logical channels then we can not handle this.. + */ + OUTF("WARN: Two segmented streams at the same time..\n"); + /* Reset */ + conptr->ptr = conptr->buf; + } + nfo.flags |= GSMSP_NFO_SEGMENTATION; + conptr->logicalchannel = logicalchannel; + } + + val = data[0] >> 2; + OUTF("%s Length: %u\n", BitRowFill(data[0], 0xfc), val); + if (data + val < end) + { + end = data + val + 1; + } + + data++; + if (data >= end) + return; + + /* Chunk of a fragmented. */ + /* All SMS type messages go into the same buffer. + * Other segmented messages are currently not supported. + */ + //if (nfo.flags & GSMSP_NFO_SMS) + if ((logicalchannel == conptr->logicalchannel) && ((conptr->ptr > conptr->buf) || (nfo.flags & GSMSP_NFO_SEGMENTATION))) + { + from = data; + + if (conptr->ptr + (end - data) < conptr->buf + sizeof conptr->buf) + { + memcpy(conptr->ptr, data, end - data); + conptr->ptr += (end - data); + } else { + OUTF("ERROR, buffer to small!!!\n"); + OUTF("buf: %p, ptr %p, filled: %d len %d\n", conptr->buf, conptr->ptr, conptr->ptr - conptr->buf, end - from); + } + } + + if (conptr->ptr > conptr->buf) + { + if (nfo.flags & GSMSP_NFO_SEGMENTATION) + { + OUTF("-------- [SEGMENTED MESSAGE. MORE DATA FOLLOWS...]\n"); + /* More fragments follow. No need to decode yet */ + return; + } else if (logicalchannel == conptr->logicalchannel) + OUTF("-------- [SEGMENTED MESSAGE. LAST...]\n"); + } + + /* Here: segmentation == No */ + /* See if we get an SMS message and if this was the last fragment */ + /* Currently only 1 logical channel can contain segmented data. + * If there are two channels that both send segmented data + * then it's gettin muddled up. + */ + if ((logicalchannel == conptr->logicalchannel) && (conptr->ptr > conptr->buf)) + { + start = conptr->buf; + data = conptr->buf; + end = conptr->ptr; + + if (nfo.flags & GSMSP_NFO_SMS) + HEXDUMPF(data, end - data, "Format SMS data\n"); + else + HEXDUMPF(data, end - data, "Format Bbis (RR, MM or CC)\n"); + + l2_Bbis(); + conptr->ptr = conptr->buf; + return; + } + + l2_Bbis(); +} + +static void +dcch_control() +{ + if ((data[0] & 0x03) != 3) + { + if ((data[0] & 1) == 0) + { + OUTF("-------0 Information Frame\n"); + OUTF("%s N(S), Sequence counter: %u\n", BitRowFill(data[0], 0x0e), (data[0] >> 1) & 0x07); + nfo.seq_counter = ((data[0] >> 1) & 0x07); + OUTF("%s P\n", BitRow(data[0], 4)); + } else if ((data[0] & 0x03) == 1) { + OUTF("------01 Supvervisory Frame\n"); + if (((data[0] >> 2) & 0x03) == 0) + OUTF("----00-- RR Frame (Receive ready)\n"); + else if (((data[0] >> 2) & 0x03) == 1) + OUTF("----01-- RNR Frame (Receive not ready)\n"); + else if (((data[0] >> 2) & 0x03) == 2) + OUTF("----10-- REJ Frame (REJect)\n"); + else + OUTF("----11-- UNKNOWN\n"); + OUTF("%s Poll/Final bit (P/F)\n", BitRow(data[0], 4)); + } + OUTF("%s N(R), Retransmission counter: %u\n", BitRowFill(data[0], 0xe0), (data[0] >> 5) & 0x07); + return; + } + OUTF("------11 Unnumbered Frame\n"); + switch (data[0] & 0xec) /* 11101100 */ + { + case 0x2c: /* 001-11-- According to J.Goeller this is SABM */ + case 0x6c: /* 011-11-- */ + OUTF("%s P\n", BitRow(data[0], 4)); + OUTF("011-11-- SABM frame (Set asynchonous balance mode)\n"); + break; + case 0x0c: /* 000-11-- */ + OUTF("%s F\n", BitRow(data[0], 4)); + OUTF("000-11-- DM frame (Disconnected mode)\n"); + break; + case 0x00: + OUTF("%s P\n", BitRow(data[0], 4)); + OUTF("000-00-- UI frame (Unnumbered information)\n"); + break; + case 0x40: + OUTF("%s P\n", BitRow(data[0], 4)); + OUTF("010-00-- DISC frame (DISConnect)\n"); + break; + case 0x60: + OUTF("%s P\n", BitRow(data[0], 4)); + OUTF("011-00-- UA frame (Unnumbered acknowledgement)\n"); + break; + default: + OUTF("%s P/F\n", BitRow(data[0], 4)); + OUTF("%s UNKNOWN\n", BitRowFill(data[0], 0xec)); + break; + } +} + +static void +dcch_address() +{ + if (data[0] & 1) + OUTF("-------1 Extended Address: 1 octet long\n"); + else + OUTF("-------0 Extended Address: more octets follow\n"); + + if ((data[0] >> 1) & 1) + OUTF("------1- C/R: Command\n"); + else + OUTF("------0- C/R: Response\n"); + + if (data[0] & 1) + { + /* SAPI */ + nfo.sapi = (data[0] >> 2) & 0x07; + if (nfo.direction == 1) + { + conptr = &conuplink[nfo.sapi]; + } else { + conptr = &con[nfo.sapi]; + } + + switch ((data[0] >> 2) & 0x07) + { + case 0x03: + nfo.flags |= GSMSP_NFO_SMS; + OUTF("---011-- SAPI: SMS and SS\n"); + break; + case 0x00: + OUTF("---000-- SAPI: RR, MM and CC\n"); + break; + default: + OUTF("%s SAPI: UNKNWON\n", BitRowFill(data[0], 0x1c)); + break; + } + + switch ((data[0] >> 4 ) & 0x03) + { + case 0x00: + OUTF("%s Link Protocol Disciminator: GSM (not Cell Broadcasting)\n", BitRowFill(data[0], 0x60)); + break; + case 0x01: + OUTF("%s Link Protocol Disciminator: Cell Broadcasting (CBS)\n", BitRowFill(data[0], 0x60)); + break; + default: + OUTF("%s Link Protocol Disciminator: UNKNOWN %u\n", BitRowFill(data[0], 0x60), (data[0] >> 5) & 0x03); + } + } else { + switch ((data[0] >> 2)) + { + case 0x03: + nfo.flags |= GSMSP_NFO_SMS; + OUTF("000011-- SAPI: SMS and SS\n"); + break; + case 0x00: + OUTF("000000-- SAPI: RR, MM and CC\n"); + break; + default: + OUTF("%s SAPI: UNKNOWN\n", BitRowFill(data[0], 0xfc)); + break; + } + data++; + if (data >= end) + RETTRUNK(); + if (data[0] & 1) + OUTF("-------1 Extended Address: 1 octet long\n"); + else + OUTF("-------0 Extended Address: more octets follow [ERROR]\n"); + OUTF("%s Terminal Endpoint Identifier (TEI): %u\n", BitRowFill(data[0], 0xfe), data[0] >> 1); + } +} + +void +l2_data_out_Bbis(int fn, const unsigned char *input_data, int len) +{ + int i; + + memset(&nfo, 0, sizeof nfo); + if (len <= 0) + return; + + data = input_data; + start = data; + + /* 2008-01-05: Motorola output has Length field wrongly set.. */ + if (opt.flags & FL_MOTOROLA) + i = data[0]; + else + i = data[0] >> 2; + if (len - 1 < i) + OUTF("WARN: packet to short\n"); + + len = MIN(len - 1, i); + + /* len = number of octets following the length field */ + end = data + len + 1; + + HEXDUMPF(data, 23 /*len*/, "Format Bbis DATA\n"); + if (len <= 0) + return; + + OUTF("%s Pseudo Length: %d\n", BitRowFill(data[0], 0xfc), data[0] >> 2); + data++; + l2_Bbis(); +} + +static void +l2_Bbis() /* GSM 04.07 11.2.3.2.1 */ +{ + if (data >= end) + RETTRUNK(); + + switch (data[0] >> 7) + { + case 1: + OUTF("1------- Direction: To originating site\n"); + break; + default: + OUTF("0------- Direction: From originating site\n"); + } + + OUTF("%s %d TransactionID\n", BitRowFill(data[0], 0x70), (data[0] >> 4) & 7); + + switch (data[0] & 0x0f) + { + case 0: + OUTF("----0000 Group Call Control [FIXME]\n"); + break; + case 1: + OUTF("----0001 Broadcast call control [FIXME]\n"); + data++; + l2_bcc(); + /* TS GSM 04.69 */ + break; + case 2: + OUTF("----0010 PDSS1 [FIXME]\n"); + break; + case 3: + OUTF("----0011 Call control. call related SS messages\n"); + data++; + l2_cc(); + /* TS 24.008 */ + break; + case 4: + OUTF("----01-- PDSS2 [FIXME]\n"); + break; + case 5: + OUTF("----0101 Mobile Management Message (non GPRS)\n"); + data++; + /* TS 24.008 */ + l2_mmm(); + break; + case 6: + OUTF("----0110 Radio Resouce Management\n"); + data++; + l2_rrm(); + break; + case 7: + OUTF("----0111 RFU [FIXME]\n"); + break; + case 8: + OUTF("----1000 GPRS Mobile Management\n"); + /* in GMMattachAccept */ + /* in GMMidentityRequest */ + OUTF("FIXME: possible IMEI in here\n"); + break; + case 9: + OUTF("----1001 SMS messages\n"); + data++; + l2_sms(); + /* TS 04.11 */ + break; + case 0x0a: + OUTF("----1011 GRPS session management messages [FIXME]\n"); + break; + case 0x0b: + OUTF("----1011 Non-call related SS message\n"); + data++; + l2_NonCallSS(); + /* GSM 04.80 */ + break; + case 0x0c: + OUTF("----1100 Location services [FIXME]\n"); + break; + case 0x0d: + OUTF("----1101 RFU [FIXME]\n"); + break; + case 0x0e: + OUTF("----1110 Extension of the PD to one octet length [FIXME]\n"); + break; + case 0x0f: + OUTF("----1111 Tests procedures describe in TS GSM 11.10 [FIXME]\n"); + break; + default: + OUTF("%s 0x%02x UNKNOWN\n", BitRowFill(data[0], 0x0f), data[0] & 0x0f); + } + if (data < end) + OUTF("XXXXXXXX UNKNOWN DATA (%d bytes)\n", end - data); + if (data > end) + { + OUTF("INTERNAL ERROR. Processed to many data\n"); + return; + } + + while (1) + { + if (end >= start + 23) + break; + if (*end == 0x2b) + break; + end++; + } + if (end > data) + { + OUTF("YYYYYYYY REST OCTETS (%d)\n", end - data); + } +} + +/* + * Extract up to 24 bit from a data field and return as integer. + */ +static unsigned int +Bit_extract_val(unsigned char *data, int bit_pos, int numbits) +{ + unsigned int ofs; + unsigned int val = 0; + unsigned int bit_ofs; + char len; + char overlap; + int i; + + ofs = bit_pos / 8; + bit_ofs = bit_pos % 8; + + len = ((7 - bit_ofs) + numbits + 7) / 8; + //OUTF("len = %u\n", len); + + i = 0; + while (i < len) + { + val = val << 8; + val = val | data[i + ofs]; + i++; + } + overlap = (numbits + (7 - bit_ofs)) % 8; + //OUTF("overlap = %u bit\n", overlap); + if (overlap != 0) + { + val = val >> (8 - overlap); + } + val = val & (((unsigned int)1 << numbits) - 1); + + return val; +} + +/* + * Broadcast Call Control (04.69) + */ +static void +l2_bcc() +{ + if (data >= end) + RETTRUNK(); + + /* Message type 04.69:9.3*/ + switch (data[0] & 0x3f) + { + case 0x06: /* 0-000110 */ + OUTF("--000110 ???\n"); + break; + default: + OUTF("--?????? UNKNOWN [FIXME]\n"); + return; + } + + /* Call reference 04.69:9.4.1*/ + + /* Orig indication 04.69:9.5.5*/ + /* Spare half octet 04.69:9.4.5*/ + +} + +/* + * ProtDisc3 + */ +static void +l2_cc() +{ + if (data >= end) + RETTRUNK(); + OUTF("%s Send Sequence Number: %u\n", BitRowFill(data[0], 0xc0), data[0] >> 6); + + if ((data[0] & 0x3f) == 0x01) + { + OUTF("--000001 Call Alerting\n"); + data++; + CCalerting(); + } else if ((data[0] & 0x3f) == 0x02) { + OUTF("--000010 Call Proceesing\n"); + if (++data >= end) + return; + OUTF("FIXME %s\n", __func__); + } else if ((data[0] & 0x3f) == 0x07) { + OUTF("--000111 Call Connect\n"); + if (++data >= end) + return; + OUTF("FIXME %s\n", __func__); + } else if ((data[0] & 0x3f) == 0x08) { + OUTF("--001000 Call Confirmed\n"); + if (++data >= end) + return; + if (data[0] != 0x04) + return; + OUTF("--000010 Bearer Capability\n"); + data++; + BearerCap(); + } else if ((data[0] & 0x3f) == 0x05) { + OUTF("--000101 Call Setup\n"); + data++; + CCsetup(); + } else if ((data[0] & 0x3f) == 0x03) { + OUTF("--000011 Call Progress\n"); + data++; + ProgressIndicator(); + } else if ((data[0] & 0x3f) == 0x0f) { + OUTF("--001111 Connect Acknowledge\n"); + } else if ((data[0] & 0x3f) == 0x25) { + OUTF("--100101 Disconnect\n"); + data++; + Cause(); + } else if ((data[0] & 0x3f) == 0x2d) { + OUTF("--101101 CC Release\n"); + if (++data >= end) + RETTRUNK(); + if (data[0] == 0x08) + { + data++; + Cause(); + } + } else if ((data[0] & 0x3f) == 0x2a) { + OUTF("--101010 CC Release Complete\n"); + if (++data >= end) + RETTRUNK(); + if (data[0] == 0x08) + { + data++; + Cause(); + } + if (data >= end) + RETTRUNK(); + if (data[0] == 0x1c) + { + /* facility */ + OUTF("FIXME\n"); + } + } else { + OUTF("%s FIXME %s\n", BitRowFill(data[0], 0xff), __func__); + } +} + +/* + * ----0101 + * ProtDisc5 - Mobile Management message (non GPRS) + */ +static void +l2_mmm() +{ + if (data >= end) + return; + OUTF("%s SendSequenceNumber: %d\n", BitRowFill(data[0], 0xc0), data[0] >> 6); + switch (data[0] & 0x3f) + { + case 1: + //l2_MMimsiDetIndication(data + 1, end); + OUTF("--000001 Imsi Det Indication\n"); /* FIXME */ + OUTF("FIXME: Possible IMSI in here\n"); + OUTF("FIXME: Possible cipher mode here\n"); + break; + case 2: + OUTF("--000010 Location Update Accept\n"); /* FIXME */ + break; + case 4: + OUTF("--000100 Message Type: Location Updating Reject\n"); + break; + case 8: + OUTF("--001000 MM Location Update Request\n"); /* FIXME */ + data++; + LocationUpdateRequest(); + break; + case 0x12: + OUTF("--010010 Authentication Request\n"); + data++; + AuthenticationRequest(); + break; + case 0x14: + OUTF("--010100 Authentication Response\n"); + data++; + AuthenticationResponse(); + break; + case 0x18: + OUTF("--011000 MMIdentityRequest\n"); + data++; + TypeOfIdentity(); + break; + case 0x19: + OUTF("--011001 MMidentityResponse\n"); + data++; + l2_MobId(); + break; + case 0x1a: + OUTF("--011010 TMSI Realloc Command\n"); + data++; + l2_TmsiReallocCommand(); + break; + case 0x21: + OUTF("--100001 CM Service Accept\n"); + data++; + break; + case 0x24: /* --100100 */ + OUTF("--100100 MMcmServiceRequest\n"); + data++; + l2_MMcmServiceRequest(); + /* in multisupport2 and others! */ + break; + default: + OUTF("UNKNOWN\n"); + } +} + +/* + * ProtDisc6 - Radio Resource Management Messages + */ +static void +l2_rrm() +{ + if (data >= end) + return; + + switch (data[0] & 0x3f) + { + case 0x00: + OUTF("00000000 System Information Type 13\n"); + data++; + l2_RRsystemInfo13C(); + break; + case 0x02: + OUTF("00000010 System Information Type 2bis\n"); + data++; + l2_RRsystemInfo2bis(); + break; + case 0x03: + OUTF("00000011 System Information Type 2ter\n"); + data++; + l2_RRsystemInfo2ter(); + break; + case 0x05: + OUTF("00000101 System Information Type 5bis\n"); + data++; + l2_BcchAllocation(); + break; + case 0x06: + OUTF("00000110 System Information Type 5ter\n"); + data++; + l2_BcchAllocation(); + break; + case 0x0d: + OUTF("00001101 Channel Release\n"); + data++; + l2_ChannelRelease(); + break; + case 0x15: + OUTF("00010101 RR Measurement Report C\n"); + data++; + MeasurmentReport(); + break; + case 0x16: + OUTF("00010110 RRclassmarkChange\n"); + data++; + l2_RRclassmarkChange(); + break; + case 0x19: + OUTF("00011001 RRsystemInfo1\n"); + data++; + l2_RRsystemInfo1(); + break; + case 0x1a: + OUTF("00011010 RRsystemInfo2\n"); + data++; + l2_RRsystemInfo2(); + break; + case 0x1B: /* 0001 1011 */ + OUTF("00011011 RRsystemInfo3C\n"); + data++; + l2_RRsystemInfo3C(); + break; + case 0x1c: + OUTF("00011100 RRsystemInfo4-C\n"); + data++; + l2_RRsystemInfo4C(); + break; + case 0x1d: + /* From SDCCH */ + OUTF("00011101 Neighbour Cells Description\n"); + data++; + l2_NeighbourCellDescription(); + break; + case 0x1e: + /* From SDCCH */ + OUTF("00011110 System Information Type 6\n"); + data++; + l2_RRsystemInfo6(); + break; + case 0x21: + OUTF("00100001 Paging Request Type 1\n"); + data++; + l2_RRpagingrequest1(); + break; + case 0x22: + OUTF("00100010 Paging Request Type 2\n"); + data++; + l2_RRpagingrequest2(); + break; + case 0x24: + OUTF("00100100 Paging Request Type 3\n"); + data++; + l2_RRpagingrequest3(); + break; + case 0x27: + OUTF("0-100111 RRpagingResponse\n"); + OUTF("-x------ Send sequence number: %d\n", (data[0] >> 7) & 0x01); + data++; + l2_RRpagingresponse(); + break; + case 0x29: + OUTF("0-101001 RR Assign Complete\n"); + data++; + l2_RRassignComplete(); + break; + case 0x2e: + OUTF("00101110 RR Assign Command\n"); + data++; + l2_RRassignCommand(); + break; + case 0x32: + OUTF("00110010 RR Cipher Mode Complete\n"); + data++; + l2_RRciphModCompl(); + break; + case 0x35: + OUTF("00110101 RR Cipher Mode Command\n"); + data++; + l2_RRciphModCmd(); + break; + case 0x3f: + OUTF("0-111111 RRimmediateAssignment\n"); + OUTF("-x------ Send sequence number: %d\n", (data[0] >> 7) & 0x01); + data++; + l2_RRimmediateAssignment(); + break; + default: + OUTF("???????? UNKNOWN. FIXME\n"); + } +} +static void +l2_RRsystemInfo13C() +{ + if (data >= end); + return; + if (data[0] >> 7) + OUTF("1------- SI 13 Restoctet present\n"); + else + OUTF("0------- SI 13 Restoctet NOT present\n"); + OUTF("%s BCCH_CHANGE_MARK : %d\n", BitRowFill(data[0], 0x70), (data[0] >> 4) & 0x07); + switch (data[0] & 0x0f) + { + case 0x00: + OUTF("----0000 SI_CHANGE_FIELD : Update of unspecified SI messages\n"); + break; + case 0x01: + OUTF("----00001 SI_CHANGE_FIELD : Update of unspecified SI1 messages\n"); + break; + case 0x02: + OUTF("----0010 SI_CHANGE_FIELD : Update of unspecified SI2 messages\n"); + break; + case 0x03: + OUTF("----0011 SI_CHANGE_FIELD : Update of unspecified SI3,4,7,8 messages\n"); + break; + case 0x04: + OUTF("----0100 SI_CHANGE_FIELD : Update of unspecified SI9 messages\n"); + break; + default: + OUTF("----???? Unknown %d\n", data[0] & 0x0f); + break; + } + OUTF("FIXME: implement me\n"); + +} + +static void +l2_RRimmediateAssignment() +{ + if (data >= end) + return; + + /* Octect 4, 0x79 */ + OUTF("%s\n", PageMode(data[0] & 0x03)); + + if ((data[0] >> 6) & 0x01) + OUTF("-1------ Two messages assign.: 1. message of..(continue)\n"); + else + OUTF("-0------ No meaning\n"); + if ((data[0] >> 5) & 0x01) + OUTF("--1----- Assigns a resource identified in the IA rest octets.\n"); + else + OUTF("--0----- Downlink assign to MS: No meaning\n"); + if ((data[0] >> 4) & 0x01) + { + OUTF("---1---- Temporary Block Flow (TBF)\n"); + data++; + l2_RRimmediateAssTBFC(); + return; + } + else + OUTF("---0---- This messages assigns a dedicated mode resource\n"); + data++; + if (data >= end) + return; + + /* Channel Description */ + ChannelDescriptionTwo(); + + if (data >= end) + return; + if (((data[0] >> 2) & 0x07) == 0) + l2_SingleChannel(); + else if (((data[0] >> 4) & 0x01) == 1) + { + l2_HoppingChannel(); + } else { + OUTF("xxx0??xxx UNKNOWN %d\n", (data[0] >> 3) & 0x3); + } +} + +static void +l2_SingleChannel() +{ + l2_SingleChannelC(); + RequestReference(); + TimingAdvance(); + l2_MobileAllocation(); + if (data >= end) + return; +} + +static void +l2_SingleChannelC() +{ + int freq; + if (data + 1 >= end) + RETTRUNK(); + OUTF("%s Training seq. code: %d\n", BitRowFill(data[0], 0xe0), data[0] >> 5); + OUTF("---0---- Single channel\n"); + freq = (data[0] & 0x03) << 8; + data++; + freq |= data[0]; + OUTF("........ Absolute RF channel number: %u\n", freq); + data++; +} + +static void +l2_HoppingChannel() +{ + OUTF("%s Training seq. code : %d\n", BitRowFill(data[0], 0xe0), data[0] >> 5); + + maio(); + RequestReference(); + TimingAdvance(); + l2_MobileAllocation(); + if (data >= end) + return; /* finished. not truncated! */ + + OUTF("FIXME, more data left here???\n"); +} + +static void +maio() +{ + unsigned char maio = 0; + + OUTF("---1---- HoppingChannel\n"); + maio = (data[0] & 0x0f) << 2; + data++; + if (data >= end) + RETTRUNK(); + maio |= (data[0] >> 6); + OUTF("........ Mobile Allocation Index Offset (MAIO) %d\n", maio); + OUTF("%s Hopping Seq. Number: %d\n", BitRowFill(data[0], 0x3f), data[0] & 0x3f); + + data++; +} + +static void +l2_HoppingChannelC() +{ + OUTF("FIXME-2\n"); +} + +static void +l2_MobileAllocation() +{ + int pos; + const unsigned char *thisend; + int len; + + if (data >= end) + RETTRUNK(); + OUTF("%s Length of Mobile Allocation: %d\n", BitRowFill(data[0], 0xff), data[0]); + + len = data[0]; + + thisend = data + len + 1; + if (thisend > end) + { + OUTF("xxxxxxxx ERROR: Packet to short or length to long\n"); + thisend = end; + } + + data++; + /* If mobile allocation has length 0 */ + if (data >= thisend) + return; + + /* This is the index into the list of arfcn's */ + pos = 7; + while (data < thisend) + { + while (pos >= 0) + { + if ((data[0] >> pos) & 1) + { + OUTF("%s Mobile Allocation ARFCN #%d\n", BitRow(data[0], pos), 8 * len - (7 - pos)); + + } + pos--; + } + pos = 7; + len--; + data++; + } +} + +/* + * From RRsystemInfo2 + */ +static void +l2_BcchAllocation() +{ + OUTF("---x---- BCCH alloc. seq. num: %d\n", (data[0] >> 4) & 1); + CellAllocation(data[0], "BCCH Allocation : ARFCN"); +} + +static void +l2_RRimmediateAssTBFC() +{ + if (data >= end) + return; + + /* GPRS Packet Channel Description */ + OUTF("%s Channel Type : %d\n", BitRowFill(data[0], 0xf8), data[0] >> 3); + OUTF("%s Time Slot Number : %d\n", BitRowFill(data[0], 0x07), data[0] & 0x07); + data++; + if (data >= end) + return; + + OUTF("%s Tranining Sequence Code: %d\n", BitRowFill(data[0], 0xe0), data[0] >> 5); + if ((data[0] >> 4) & 0x01) + { + OUTF("---1---- Direct Encoding of Hopping Channels\n"); + l2_RRimmAssTBFDirEncHoChaC(); + return; + } else { + OUTF("---0---- non-hopping RF channel config or indirect encoding of hopping RFCC\n"); + } + + if ((data[0] >> 3) & 0x01) + { + OUTF("----1--- indirect encoding of hopping RF channel config\n"); + } else { + OUTF("----0--- RRimmAssTBFaRFCN-C FIXME\n"); + return; + } + + data++; + if (data >= end) + RETTRUNK(); + OUTF("xxxxxxxx MAIO [FIXME]\n"); + + data++; + RequestReference(); + TimingAdvance(); + l2_MobileAllocation(); + if (data == end) + return; + /* FIXME: rest octets?? */ + OUTF("FIXME: implenet\n"); +} + +static void +CellAllocationBitmapZero(char *str) +{ + int ca; + + if ((data[0] >> 3) & 1) + OUTF("----1--- %s 124\n", str); + if ((data[0] >> 2) & 1) + OUTF("-----1-- %s 123\n", str); + if ((data[0] >> 1) & 1) + OUTF("------1- %s 122\n", str); + if (data[0] & 1) + OUTF("-------1 %s 121\n", str); + + ca = 120; + while (ca > 0) + { + data++; + if (data >= end) + return; + if ((data[0] >> 7) & 1) + OUTF("1------- %s %d\n", str, ca); + if ((data[0] >> 6) & 1) + OUTF("-1------ %s %d\n", str, ca - 1); + if ((data[0] >> 5) & 1) + OUTF("--1----- %s %d\n", str, ca - 2); + if ((data[0] >> 4) & 1) + OUTF("---1---- %s %d\n", str, ca - 3); + if ((data[0] >> 3) & 1) + OUTF("----1--- %s %d\n", str, ca - 4); + if ((data[0] >> 2) & 1) + OUTF("-----1-- %s %d\n", str, ca - 5); + if ((data[0] >> 1) & 1) + OUTF("------1- %s %d\n", str, ca - 6); + if (data[0] & 1) + OUTF("-------1 %s %d\n", str, ca - 7); + + ca -= 8; + } + data++; +} + +/* + * Return number of bits required to store val. + */ +static int +num_bits(unsigned int val) +{ + int i = 32; + + while (1) + { + i--; + if (i <= 0) + break; + if ((((unsigned int)1) << i) <= val) + break; + } + + return i + 1; +} + +static int +Bitmap256_extract_frequency(unsigned short *w, int index) +{ + int j; + int n = w[index]; + + j = 1 << (num_bits(index) - 1); + //OUTF("j = %d\n", j); + while (index > 1) + { + if (2 * index < 3 * j) + { + index = index - j / 2; + n = (n + w[index] - 256 / j - 1) % (512 / j - 1) + 1; + } else { + index = index - j; + n = (n + w[index] - 1) % (512 / j - 1) + 1; + } + j = j / 2; + } + //OUTF("freq %d\n", (w[0] + n) % 1024); + + return (w[0] + n) % 1024; +} + + +static void +CellAllocationBitmap256(char *str) +{ + int arfcn = 0; + int i; + unsigned short w[30]; + int pos, len, border; + int ii; + + memset(w, 0, sizeof w); + + arfcn = (data[0] & 1) << 9; + data++; + arfcn |= (data[0] << 1); + data++; + arfcn |= (data[0] >> 7); + w[0] = arfcn; + +#if 0 + w[0] = 0xff; + w[1] = 0x00; + w[2] = 0xff; + w[3] = 0x00; + OUTF("XXX 6,8 254 %u\n", Bit_extract_val(w, 6, 8)); + OUTF("XXX 7,7 127 %u\n", Bit_extract_val(w, 7, 7)); + OUTF("XXX 7,8 255 %u\n", Bit_extract_val(w, 7, 8)); + OUTF("XXX 6,7 127 %u\n", Bit_extract_val(w, 6, 7)); + OUTF("XXX 0,8 128 %u\n", Bit_extract_val(w, 0, 8)); + OUTF("XXX 7,16 65280 %u\n", Bit_extract_val(w, 7, 16)); + OUTF("XXX 7,1 1 %u\n", Bit_extract_val(w, 7, 1)); + OUTF("XXX 8,1 0 %u\n", Bit_extract_val(w, 8, 1)); +#endif + + pos = 6; + len = 8; + border = 2; + for (i = 1; i <= 29; i++) + { + if (i == border) + { + border = border * 2; + len--; + if (len <= 0) + { + i--; + break; + } + } + w[i] = Bit_extract_val((unsigned char *)data, pos, len); + if (w[i] == 0) + break; + pos += len; + } + //OUTF("%d entries\n", i); + + OUTF("xxxxxxxx %s %d (original)\n", str, w[0]); + for (ii = 1; ii <= i; ii++) + { + OUTF("xxxxxxxx %s %d\n", str, Bitmap256_extract_frequency(w, ii)); + } + data += (pos + 7) / 8; + +} + +static void +CellAllocationBitmapVariable(char *str) +{ + int arfcn = 0; + int i; + const unsigned char *thisend; + + arfcn = (data[0] & 1) << 9; + data++; + arfcn |= (data[0] << 1); + data++; + arfcn |= (data[0] >> 7); + + OUTF("........ %s %d (original)\n", str, arfcn); + + for (i = 1; i < 8; i++) + { + if (BIT(data[0], 7-i)) + OUTF("%s %s %d\n", BitRow(data[0], 7-i), str, (arfcn + i) % 1024); + } + data++; + + thisend = data + 13; + while (data < thisend) + { + for (i = 0; i < 8; i++) + { + if (BIT(data[0], 7 - i)) + OUTF("%s %s %d\n", BitRow(data[0], 7-i), str, (arfcn + (104 + i)) % 1024); + } + data++; + } +} + +/* + * Return 0 on success (e.g. caller continues processing). + * Cell Channel Description (for example SystemInformationType 1) + */ +static int +CellAllocation(unsigned char format, char *str) +{ + const unsigned char *orig_data = data; + + if ((format >> 6) == 0x00) + { + OUTF("00------ Bitmap 0 format\n"); + CellAllocationBitmapZero(str); + data = orig_data + 16; + return 0; + } + if (((format >> 3) & 1) == 0x00) + { + OUTF("-------- Bitmap format: 1024 Range (FIXME)\n"); + data = orig_data + 16; + return -1; + } + + switch ((format >> 1) & 0x07) + { + case 0x04: + OUTF("10--100- Bitmap format: 512 Range (FIXME)\n"); + data = orig_data + 16; + return -1; + case 0x05: + OUTF("10--101- Bitmap format: 256 Range\n"); + CellAllocationBitmap256(str); + data = orig_data + 16; + return 0; + case 0x06: + OUTF("10--110- Bitmap format: 128 Range (FIXME)\n"); + data = orig_data + 16; + return -1; + case 0x07: + OUTF("10--111- Bitmap format: Variable Range\n"); + CellAllocationBitmapVariable(str); + data = orig_data + 16; + return 0; + } + + return -1; +} + +static void +l2_RRsystemInfo1() +{ + + if (data + 1 >= end) + return; + + if (CellAllocation(data[0], "Cell Allocation : ARFCN") != 0) + return; + + l2_RachControlParameters(); + if (data >= end) + return; + OUTF("FIXME: NCH Position\n"); +} + +static void +l2_RachControlParameters() +{ + int ca = -1; + + if (data >= end) + return; + + if (((data[0] >> 6) & 0x03) == 0) + ca = 1; + else if (((data[0] >> 6) & 0x03) == 0x01) + ca = 2; + else if (((data[0] >> 6) & 0x03) == 0x02) + ca = 4; + else if (((data[0] >> 6) & 0x03) == 0x03) + ca = 7; + OUTF("%s Max. of retransmiss : %u\n", BitRowFill(data[0], 0xc0), ca); + if (((data[0] >> 2) & 0x0f) <= 9) + { + ca = ((data[0] >> 2) & 0x0f) + 3; + } else { + switch ((data[0] >> 2) & 0x0f) + { + case 10: /* --1010-- */ + ca = 14; + break; + case 11: + ca = 16; + break; + case 12: + ca = 20; + break; + case 13: + ca = 25; + break; + case 14: + ca = 32; + break; + case 15: + ca = 50; + break; + default: + ca = -1; + break; + } + } + OUTF("%s slots to spread TX : %u\n", BitRowFill(data[0], 0x3c), ca); + switch ((data[0] >> 1) & 0x01) + { + case 0: + OUTF("------0- The cell is barred : no\n"); + break; + case 1: + OUTF("------1- The cell is barred : yes\n"); + break; + } + + switch (data[0] & 0x01) + { + case 0: + OUTF("-------0 Call reestabl.i.cell: allowed\n"); + break; + case 1: + OUTF("-------1 Cell reestabl.i.cell: not allowed\n"); + } + + data++; + if (data >= end) + return; + switch ((data[0] >> 2) & 0x01) + { + case 0: + OUTF("-----0-- Emergency call EC 10: allowed\n"); + break; + case 1: + OUTF("-----1-- Emergency call EC 10: not allowed\n"); + break; + } + OUTF("%s Acc ctrl cl 11-15: 0 = permitted, 1 = forbidden\n", BitRowFill(data[0], 0xf8)); + OUTF("%s Acc ctrl cl 8- 9: 0 = permitted, 1 = forbidden\n", BitRowFill(data[0], 0x03)); + OUTF("%s Ordinary subscribers (8)\n", BitRowFill(data[0], 0x01)); + OUTF("%s Ordinary subscribers (9)\n", BitRowFill(data[0], 0x02)); + OUTF("%s Emergency call (10): %s\n", BitRowFill(data[0], 0x04), ((data[0] >> 4) & 1)?"Class 11-15 only":"Everyone"); + OUTF("%s Operator Specific (11)\n", BitRowFill(data[0], 0x08)); + OUTF("%s Security service (12)\n", BitRowFill(data[0], 0x10)); + OUTF("%s Public service (13)\n", BitRowFill(data[0], 0x20)); + OUTF("%s Emergency service (14)\n", BitRowFill(data[0], 0x40)); + OUTF("%s Network Operator (15)\n", BitRowFill(data[0], 0x80)); + data++; + if (data >= end) + RETTRUNK(); + OUTF("%s Acc ctrl cl 0- 7: 0 = permitted, 1 = forbidden\n", BitRowFill(data[0], 0xff)); + OUTF("%s Ordinary subscribers (0-7)\n", BitRowFill(data[0], 0xff)); + data++; +} + +static char * +BitRow(unsigned char c, int pos) +{ + unsigned char bit = 0; + static char buf[9]; + + if ((c >> pos) & 1) + bit = 1; + + if (pos == 0) + snprintf(buf, sizeof buf, "-------%d", bit); + else if (pos == 1) + snprintf(buf, sizeof buf, "------%d-", bit); + else if (pos == 2) + snprintf(buf, sizeof buf, "-----%d--", bit); + else if (pos == 3) + snprintf(buf, sizeof buf, "----%d---", bit); + else if (pos == 4) + snprintf(buf, sizeof buf, "---%d----", bit); + else if (pos == 5) + snprintf(buf, sizeof buf, "--%d-----", bit); + else if (pos == 6) + snprintf(buf, sizeof buf, "-%d------", bit); + else if (pos == 7) + snprintf(buf, sizeof buf, "%d-------", bit); + + return buf; +} + +static char * +BitRowFill(unsigned char c, unsigned char mask) +{ + static char buf[9]; + + memset(buf, '-', sizeof buf); + buf[sizeof buf - 1] = '\0'; + int i = 0; + while (i < 8) + { + if ((mask >> i) & 1) + { + if ((c >> i) & 1) + buf[7 - i] = '1'; + else + buf[7 - i] = '0'; + } + i++; + } + + return buf; +} + +/* + * GSM 04.08-9.1.32 + */ +static void +l2_RRsystemInfo2() +{ + if (data >= end) + RETTRUNK(); + + /* Neighbour Cell Description. 16 octets */ + l2_BcchAllocation(); + if (data >= end) + RETTRUNK(); + + int c = 7; + while (c >= 0) + { + if ((data[0] >> c) & 1) + OUTF("%s BCCH carrier with NCC = %d is permitted for monitoring\n", BitRow(data[0], c), c); + c--; + } + data++; + if (data >= end) + RETTRUNK(); + + l2_RachControlParameters(); + + if (data > end) /* Note: not >= */ + RETTRUNK(); +} + +static void +l2_RRsystemInfo2bis() +{ + if (data >= end) + RETTRUNK(); + + /* Extended BCCH Frequency List. 16 octets */ + /* Neighbour Cell Description. 10.5.2.22 */ + l2_BcchAllocation(); + + /* 3 octets */ + l2_RachControlParameters(); +} + +static void +l2_RRsystemInfo2ter() +{ + if (data >= end) + RETTRUNK(); + + /* Neighbour Cell Description 2 */ + l2_BcchAllocation(); +} + + +/* + * RRsystemInfo4-C + */ +static void +l2_RRsystemInfo4C() +{ + if (data + 2 >= end) + RETTRUNK(); + l2_MccMncLac(); + CellSelectionParameters(); + l2_RachControlParameters(); + if (data + 1 >= end) + RETTRUNK(); + + if (data[0] != 0x64) + { + OUTF("UNKNWON\n"); + return; + } + OUTF("01100100 Channel Description\n"); + data++; + ChannelDescriptionTwo(); + if (data >= end) + RETTRUNK(); + //OUTF("%s Training sequence code: %d\n", BitRowFill(data[0], 0xe0), data[0] >> 5); + if (((data[0] >> 3) & 0x1) == 0) + { + l2_SingleChannelC(); + } else { + l2_HoppingChannelC(); + } + + if (data >= end) + return; + + if (data[0] != 0x72) + { + OUTF("UNKNOWN\n"); + return; + } + OUTF("01110010 CBCH Mobile Allocation\n"); + data++; + if (data >= end) + RETTRUNK(); + l2_MobileAllocation(); + +// OUTF("FIXME\n"); +} + +/* + * Output MCC, MNC and LAC. consume 5 bytes. + */ +static void +l2_MccMncLac() +{ + int mcc; + + if (data + 2 >= end) + return; + unsigned short lac; + + mcc = l2_MNCC(0, data[0] & 0x0f, (data[0] >> 4) & 0x0f, data[1] & 0x0f); + data++; + l2_MNCC(mcc, data[1] & 0x0f, (data[1] >> 4) & 0x0f, (data[0] >> 4) & 0x0f); + data += 2; + + if (data + 1 >= end) + return; + + lac = data[0]; + lac = (lac << 8) | data[1]; + OUTF("%-8u [0x%02x%02x] Local Area Code\n", lac, data[0], data[1]); + data += 2; +} +/* + * RRsystemINfo3-C + */ +static void +l2_RRsystemInfo3C() +{ + CellIdentity(); + l2_MccMncLac(); + + ControlChannelDescription(); + CellOptionsBcch(); + CellSelectionParameters(); + l2_RachControlParameters(); + + /* FIXME: complete here */ +} + +static void +l2_RRsystemInfo6() +{ + CellIdentity(); + l2_MccMncLac(); + CellOptionsBcch(); + if (data >= end) + RETTRUNK(); + OUTF("%s Network Colour Code: %u\n", BitRowFill(data[0], 0xff), data[0]); + data++; +} + +static void +CellIdentity() +{ + unsigned short id; + + if (data + 1 >= end) + return; + + id = data[0]; + id = (id << 8) | data[1]; + OUTF("%-8u [0x%02x%02x] Cell identity\n", id, data[0], data[1]); + data += 2; +} + +static void +ControlChannelDescription() +{ + if (data >= end) + RETTRUNK(); + OUTF("%s Spare bit (should be 0)\n", BitRow(data[0], 7)); + if ((data[0] >> 6) & 1) + OUTF("-1------ MSs in the cell shall apply IMSI attach/detach procedure\n"); + else + OUTF("-0------ MSs in cell are not allowed attach/detach procedure\n"); + OUTF("%s Number of blocks: %u\n", BitRowFill(data[0], 0x38), (data[0] >> 3) & 0x07); + + switch (data[0] & 0x07) + { + case 0x00: + OUTF("-----000 1 basic physical channel for CCCH, not combined with SDCCHs\n"); + break; + case 0x01: + OUTF("-----001 1 basic physical channel for CCCH, combined with SDCCHs\n"); + break; + case 0x02: + OUTF("-----010 2 basic physical channel for CCCH, not combined with SDCCHs\n"); + break; + case 0x04: + OUTF("-----100 3 basic physical channel for CCCH, not combined with SDCCHs\n"); + break; + case 0x06: + OUTF("-----110 4 basic physical channel for CCCH, not combined with SDCCHs\n"); + break; + default: + OUTF("%s Unknown CCCH config (ERROR)\n", BitRowFill(data[0], 0x07)); + break; + } + + data++; + if (data >= end) + RETTRUNK(); + + OUTF("%s spare bits (should be 0)\n", BitRowFill(data[0], 0xf8)); + OUTF("%s %u multi frames period for paging request\n", BitRowFill(data[0], 0x07), (data[0] & 0x07) + 2); + + data++; + if (data >= end) + RETTRUNK(); + OUTF("%s T3212 TimeOut value: %u\n", BitRowFill(data[0], 0xff), data[0]); + data++; +} + +static void +CellOptionsBcch() +{ + if (data >= end) + RETTRUNK(); + OUTF("%s spare bit (should be 0)\n", BitRowFill(data[0], 0x80)); + if ((data[0] >> 6) & 1) + OUTF("-1------ Power control indicator is set\n"); + else + OUTF("-0------ Power control indicator is not set\n"); + + if (((data[0] >> 4) & 0x03) == 0x00) + OUTF("--00---- MSs may use uplink DTX\n"); + else if (((data[0] >> 4) & 0x03) == 0x01) + OUTF("--01---- MSs shall use uplink DTX\n"); + else if (((data[0] >> 4) & 0x03) == 0x02) + OUTF("--10---- MSs shall not use uplink DTX\n"); + else + OUTF("%s DTX UNKNOWN [ERROR]\n", BitRowFill(data[0], 0x30)); + + OUTF("%s Radio Link Timeout: %u\n", BitRowFill(data[0], 0x0f), ((data[0] & 0x0f) + 1 ) * 4); + data++; +} + +/* + * If mcc is 0 then output MCC and return MCC as value. + * Otherwise output MNC. + */ +static int +l2_MNCC(int mcc, unsigned char a, unsigned char b, unsigned char c) +{ + char buf[128]; + char f[12]; + const char *country; + const char *mnc; + + snprintf(f, sizeof f, "%x%x%x", a, b, c); + /* Nokia netmonitor shows NC's like '30F' and '10F' */ + if (mcc == 0) + { + /* Find out MCC */ + mcc = atoi(f); + country = mcc_get(mcc); + if (country == NULL) + country = "UNKNOWN"; + snprintf(buf, sizeof buf, "%-8s %s (%s)\n", f, "Mobile Country Code", country); + } else { + mnc = mnc_get(mcc, atoi(f)); + snprintf(buf, sizeof buf, "%-8s %s (%s)\n", f, "Mobile Network Code", mnc); + } + +#if 0 + buf[0] = '\0'; + if (a != 0x0f) + { + snprintf(buf, sizeof buf, "%x", a); + if (b != 0x0f) + { + snprintf(buf + 1, sizeof buf - 1, "%x", b); + if (c != 0x0f) + snprintf(buf + 2, sizeof buf - 2, "%x", c); + } + } + snprintf(buf + strlen(buf), sizeof buf - strlen(buf), " - %s\n", str); +#endif + + OUTF(buf); + + return mcc; +} + +static char * +PageMode(unsigned char mode) +{ + switch (mode) + { + case 0: + return "------00 Page Mode: Normal paging"; + case 1: + return "------01 Page Mode: Extended paging"; + case 2: + return "------10 Page Mode: Paging reorganisation"; + case 3: + return "------11 Page Mode: reserved / same as before"; + } + + return "------?? UNKNOWN\n"; +} + +static void +l2_RRpagingrequest1() +{ + if (data >= end) + return; + + OUTF("%s\n", PageMode(data[0] & 0x3)); + + /* FIXME complete here */ + + data++; + if (data >= end) + return; + + l2_MobId(); + if (data >= end) + return; /* sometimes it's end here */ + if (data[0] == 0x17) + { + data++; + l2_MobId(); + return; + } + OUTF("ERR: wrong data\n"); +} + +static void +l2_ChannelNeeded(char *str, unsigned char ch) +{ + switch (ch) + { + case 0x00: + OUTF("%s Channel Needed: Any channel\n", str); + break; + case 0x01: + OUTF("%s Channel Needed: SDCCH\n", str); + break; + case 0x02: + OUTF("%s Channel Needed: TCH/F (Full rate)\n", str); + break; + case 0x03: + OUTF("%s Channel Needed: TCH/H or TCH/F (Dual rate)\n", str); + break; + } + +} + +static void +l2_RRpagingrequest2() +{ + if (data >= end) + return; + OUTF("%s\n", PageMode(data[0] & 0x03)); + + l2_ChannelNeeded("--xx---- (first)", (data[0] >> 4) & 0x03); + l2_ChannelNeeded("xx------ (second)", data[0] >> 6); + + data++; + if (data + 3 >= end) + RETTRUNK(); + OUTF("........ Mob. Ident 1 (P)TMSI: %02X%02X%02X%02X\n", data[0], data[1], data[2], data[3]); + data += 4; + if (data + 3 >= end) + RETTRUNK(); + OUTF("........ Mob. Ident 2 (P)TMSI: %02X%02X%02X%02X\n", data[0], data[1], data[2], data[3]); + data += 4; + if (data >= end) + RETTRUNK(); + + if (data[0] == 0x17) + { + data++; + l2_MobId(); + return; + } + + OUTF("FIXME, unknown\n"); +} + +static void +l2_RRpagingrequest3() +{ + if (data >= end) + RETTRUNK(); + OUTF("%s\n", PageMode(data[0] & 0x03)); + l2_ChannelNeeded("--xx---- (first)", (data[0] >> 4) & 0x03); + l2_ChannelNeeded("xx------ (second)", data[0] >> 6); + data++; + + int c = 0; + while (c++ < 4) + { + if (data + 3 >= end) + RETTRUNK(); + OUTF("........ Mob. Ident %u (P)TMSI: %02X%02X%02X%02X\n", c, data[0], data[1], data[2], data[3]); + data += 4; + } +} + +static void +l2_MobId() +{ + const unsigned char *thisend = end; + unsigned char len = data[0]; + char odd = 0; + int bcd = 0; + + data++; + if (data >= end) + return; + + if ((data[0] >> 3) & 1) + odd = 1; + + switch (data[0] & 0x07) + { + case 0: + OUTF("-----000 Type of identity: No Identity\n"); + break; + case 1: + OUTF("-----001 Type of identity: IMSI\n"); + bcd = 1; + break; + case 2: + OUTF("-----010 Type of identity: IMEI\n"); + bcd = 1; + break; + case 3: + OUTF("-----011 Type of identity: IMEISV\n"); + bcd = 1; + break; + case 4: + OUTF("-----100 Type of identity: TMSI/P-TMSI\n"); + break; + default: + OUTF("-----000 Type of identity: UNKNOWN\n"); + return; + } + if (len <= 0) + return; + + /* Nokia Netmonitor never outputs the first value */ + //OUTF("%x", data[0] >> 4); + unsigned char c; + c = data[0] >> 4; + len--; + data++; + if (len <= 0) + return; + + OUTF("-------- ID(%d/%s): ", len, odd?"odd":"even"); + + if (data + len < thisend) + thisend = data + len; + if (bcd) + { + OUT("%X", c); + while (data < thisend) + { + if ((data + 1 == thisend) && (!odd)) + OUT("%X", data[0] & 0x0f); + else + OUT("%X%X", data[0] & 0x0f, (data[0] >> 4) & 0x0f); + data++; + } + } else { + while (data < thisend) + { + if ((data + 1 == thisend) && (odd)) + OUT("%X", (data[0] >> 4 ) & 0x0f); + else + OUT("%X%X", (data[0] >> 4) & 0x0f, data[0] & 0x0f); + data++; + } + } + OUT("\n"); +} + + +static void CellSelectionParameters() +{ + if (data >= end) + RETTRUNK(); + + switch (data[0] >> 5) + { + case 0: + OUTF("000----- Cell Reselect Hyst. : 0 db RXLEV\n"); + break; + case 1: + OUTF("001----- Cell Reselect Hyst. : 2 db RXLEV\n"); + break; + case 2: + OUTF("010----- Cell Reselect Hyst. : 4 db RXLEV\n"); + break; + case 3: + OUTF("011----- Cell Reselect Hyst. : 6 db RXLEV\n"); + break; + case 4: + OUTF("100----- Cell Reselect Hyst. : 8 db RXLEV\n"); + break; + case 5: + OUTF("101----- Cell Reselect Hyst. : 10 db RXLEV\n"); + break; + case 6: + OUTF("110----- Cell Reselect Hyst. : 12 db RXLEV\n"); + break; + case 7: + OUTF("111----- Cell Reselect Hyst. : 14 db RXLEV\n"); + break; + } + OUTF("---xxxxx Max Tx power level: %d\n", data[0] & 0x1f); + data++; + if (data >= end) + RETTRUNK(); + + if (data[0] >> 7) + OUTF("1------- Additional cells in SysInfo 16,17\n"); + else + OUTF("0------- No additional cells in SysInfo 7-8\n"); + if ((data[0] >> 6) & 1) + OUTF("-1------ New establishm cause: supported\n"); + else + OUTF("-0------ New establishm cause: not supported\n"); + OUTF("--xxxxxx RXLEV Access Min permitted = -110 + %ddB\n", data[0] & 0x3f); + data++; +} + +static void +l2_RRimmAssTBFDirEncHoChaC() +{ + unsigned char maio = (data[0] & 0x0f) << 4; + + data++; + if (data >= end) + RETTRUNK(); + maio |= (data[0] >> 6); + OUTF("xxxxxxxx Mobile Allocation Index Offset (MAIO): %u\n", maio); + OUTF("%s Hopping Sequence Number: %u\n", BitRowFill(data[0], 0x3f), data[0] & 0x3f); + data++; + + RequestReference(); + + TimingAdvance(); + l2_MobileAllocation(); + + if (data >= end) + return; + if (data[0] == 0x7c) + { + StartingTime(); + return; + } + OUTF("FIXME: implement me\n"); +} + +static void +RequestReference() +{ + if (data >= end) + RETTRUNK(); + + /* Request Reference */ + if ((data[0] >> 5) == 0) + OUTF("000----- Establishing Cause : All other cases\n"); + else if ((data[0] >> 5) == 0x01) + OUTF("001----- Establishing Cause : All other cases\n"); + else if ((data[0] >> 5) == 0x02) + OUTF("010----- Establishing Cause : All other cases\n"); + else if ((data[0] >> 5) == 0x03) + OUTF("011----- Establishing Cause : All other cases\n"); + else if ((data[0] >> 5) == 0x04) + OUTF("100----- Establishing Cause: Answer to paging\n"); + else if ((data[0] >> 5) == 0x05) + OUTF("101----- Establishing Cause: Emergency call\n"); + else if ((data[0] >> 5) == 0x07) + OUTF("111----- Establishing Cause: Other services req. by user\n"); +/* Random refernce must be 5 bit long ?! */ +// else if ((data[0] >> 4) == 0x05) +// OUTF("0101---- Establishing Cause: Originating data call from dual rate mobile station\n"); +// else if ((data[0] >> 4) == 0x02) +// OUTF("0010---- Establishing Cause: Answer to paging\n"); + else + OUTF("%s Establishing Cause: UNKNOWN [FIXME}\n", BitRowFill(data[0], 0xe0)); + + OUTF("---xxxxx Random Reference : %d\n", data[0] & 0x1f); + + data++; + if (data + 1>= end) + RETTRUNK(); + + OUTF("xxxxxxxx T1/T2/T3\n"); + data++; + OUTF("xxxxxxxx T1/T2/T3\n"); + data++; + /* END Request Reference */ +} + +static void +TimingAdvance() +{ + if (data >= end) + RETTRUNK(); + OUTF("--xxxxxx Timing advance value: %d\n", data[0] & 0x3f); + data++; +} + +static void +StartingTime() +{ + if (data >= end) + RETTRUNK(); + OUTF("01111100 Starting Time block\n"); + data++; + if (data >= end) + RETTRUNK(); + unsigned char t3; + OUTF("%s T1 Frame Number: %u\n", BitRowFill(data[0], 0xf8), data[0] >> 3); + t3 = (data[0] & 0x07) << 5; + data++; + if (data >= end) + RETTRUNK(); + t3 |= (data[0] >> 5); + OUTF("%s T2 Frame Number: %u\n", BitRowFill(data[0], 0x1f), data[0] & 0x1f); + OUTF("........ T3 Frame Number: %u\n", t3); +} + +/* + * RRsystemInfo5 + */ +static void +l2_NeighbourCellDescription() +{ + if (data >= end) + RETTRUNK(); + l2_BcchAllocation(); +} + + +static void +l2_ChannelRelease() +{ + if (data >= end) + RETTRUNK(); + OUTF("%s\n", id_list_get(list_ChannelRelease, data[0])); + data++; +} + +static void +l2_MMcmServiceRequest() +{ + if (data >= end) + RETTRUNK(); + + OUTF("%s Ciphering key sequence: %u\n", BitRowFill(data[0], 0x70), (data[0] >> 4) & 0x07); + OUTF("%s\n", id_list_get(list_RequestServiceType, data[0] & 0x0f)); + data++; + MSClassMarkTwo(); + if (data >= end) + RETTRUNK(); + + if (data[0] == 0x20) + { + OUTF("FIXME: classmark3\n"); + return; + } + + l2_MobId(); +} + + +static void +MSClassMarkOne() +{ + if (data >= end) + RETTRUNK(); + + if (((data[0] >> 5) & 0x03) == 0) + OUTF("-00----- Revision Level: Phase 1\n"); + else if (((data[0] >> 5) & 0x03) == 1) + OUTF("-01----- Revision Level: Phase 2\n"); + else + OUTF("-xx----- Revision Level: Unknown\n"); + if (((data[0] >> 4) & 1) == 0) + OUTF("---0---- Controlled early classmark sending: Not implemented\n"); + else + OUTF("---1---- Controlled early classmark sending: Implemented\n"); + if ((data[0] >> 3) & 1) + OUTF("----1--- A5/1 not available\n"); + else + OUTF("----0--- A5/1 available\n"); + + OUTF("%s RF power class capability: Class %u\n", BitRowFill(data[0], 0x07), (data[0] & 0x07) + 1); + + data++; +} + +static void +MSClassMarkTwo() +{ + if (data >= end) + RETTRUNK(); + + OUTF("%s MS Classmark 2 length: %u\n", BitRowFill(data[0], 0xff), data[0]); + data++; + MSClassMarkOne(); + + if ((data[0] >> 6) & 1) + OUTF("-1------ Pseudo Sync Capability: present\n"); + else + OUTF("-1------ Pseudo Sync Capability: not present\n"); + + if (((data[0] >> 4) & 0x03) == 0) + OUTF("--00---- SS Screening: Phase 1 default value\n"); + else if (((data[0] >> 4) & 0x03) == 1) + OUTF("--01---- SS Screening: Phase 2 error handling\n"); + else + OUTF("--xx---- SS Screening: UNKNOWN\n"); + + if ((data[0] >> 3) & 1) + OUTF("----1--- Mobile Terminated Point to Point SMS: supported\n"); + else + OUTF("----0--- Mobile Terminated Point to Point SMS: not supported\n"); + + if ((data[0] >> 2) & 1) + OUTF("-----1-- VoiceBroadcastService: supported\n"); + else + OUTF("-----0-- VoiceBroadcastService: not supported\n"); + + if ((data[0] >> 1) & 1) + OUTF("------1- VoiceGroupCallService: supported\n"); + else + OUTF("------0- VoiceGroupCallService: not supported\n"); + + if (data[0] & 1) + OUTF("-------1 MS supports E-GSM or R-GSM: supported\n"); + else + OUTF("-------0 MS supports E-GSM or R-GSM: not supported\n"); + + data++; + if (data >= end) + RETTRUNK(); + + + if ((data[0] >> 7) & 1) + OUTF("1------- CM3 option: supported\n"); + else + OUTF("0------- CM3 option: not supported\n"); + + if ((data[0] >> 5) & 1) + OUTF("--1----- LocationServiceValueAdded Capability: supported\n"); + else + OUTF("--0----- LocationServiceValueAdded Capability: not supported\n"); + + if ((data[0] >> 3) & 1) + OUTF("----1--- SoLSA Capability: supported\n"); + else + OUTF("----0--- SoLSA Capability: not supported\n"); + + if ((data[0] >> 1) & 1) + OUTF("------1- A5/3 available\n"); + else + OUTF("------0- A5/3 not available\n"); + + if (data[0] & 1) + OUTF("-------1 A5/2: available\n"); + else + OUTF("-------0 A5/2: not available\n"); + data++; +} + +static void +l2_RRciphModCmd() +{ + if (data >= end) + RETTRUNK(); + if (((data[0] >> 1) & 0x07) == 0x07) + OUTF("----111- Cipher: reserved [UNKNOWN]\n"); + else + OUTF("%s Cipher: A5/%u\n", BitRowFill(data[0], 0x0e), ((data[0] >> 1) & 0x07) + 1); + + + if (data[0] & 1) + OUTF("-------1 Start ciphering\n"); + else + OUTF("-------0 No ciphering\n"); + + if ((data[0] >> 4) & 1) + OUTF("---1---- Cipher Response: IMEISV shall be included\n"); + else + OUTF("---0---- Cipher Response: IMEISV shall not be included\n"); + data++; +} + +static void +l2_RRciphModCompl() +{ + if (data >= end) + RETTRUNK(); + + if (data[0] != 0x17) + return; + if (++data >= end) + RETTRUNK(); + l2_MobId(); +} + +static void +l2_TmsiReallocCommand() +{ + if (data >= end) + RETTRUNK(); + + l2_MccMncLac(); + l2_MobId(); +} + +static void +l2_sms() +{ + if (data >= end) + RETTRUNK(); + + if ((data[0] == 0x04)) + OUTF("00000100 Type: CP-ACK\n"); + else if (data[0] == 0x10) + OUTF("00010000 Type: CP-ERROR\n"); + else if (data[0] == 1) { + OUTF("00000001 Type: CP-DATA\n"); + cpData(); + } else + OUTF("%s UNKNOWN\n", BitRowFill(data[0], 0xff)); + data++; +} + +static void +cpDataUp() +{ + if (data >= end) + RETTRUNK(); + OUTF("%s Parameter %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + OUTF("%s Parameter %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + OUTF("%s Parameter %u\n", BitRowFill(data[0], 0xff), data[0]); + data++; + Address("SMSC"); + if (data >= end) + RETTRUNK(); + + /* FIXME: Be more detailed here about message flags */ + OUTF("%s Message Flags: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data + 1 >= end) + RETTRUNK(); + int num = data[0] << 8; + OUTF("%s Reference Number [continue]\n", BitRowFill(data[0], 0xff)); + data++; + num |= data[0]; + OUTF("%s Reference Number: %u\n", BitRowFill(data[0], 0xff), num); + data++; + + /* Destination address */ + Address("Destination"); + SmsProtocolDataValidity(); + if (data >= end) + RETTRUNK(); +} + +/* From Network to MS */ +/* Called when a full 140 byte SMS is received */ +static void +cpData() +{ + int n_symbols; + if (data >= end) + RETTRUNK(); + OUTF("%s Length: %u\n", BitRowFill(data[0], 0xff), data[0]); + data++; + if (data >= end) + RETTRUNK(); + if ((data[0] & 1) == 0) + { + //OUTF("xxxxxxx0 cpDataUp FIXME\n"); + //data++; + cpDataUp(); + return; + } + OUTF("%s reserved\n", BitRowFill(data[0], 0xf8)); + OUTF("%s Message Type Indicator(MTI): %s\n", BitRowFill(data[0], 0x07), id_list_get(list_MTI, data[0] & 0x07)); + if (++data >= end) + RETTRUNK(); + OUTF("%s Message Reference: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + return; /* Can happen that msg terminated here... */ + + /* RP-address */ + Address("SMSC"); + if (data >= end) + RETTRUNK(); + +#if 0 + OUTF("%s TP-MTI, TP-MMS, TP-SRI, TP-UDIH, TP-RP: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + OUTF("%s Reference number: %u\n", BitRowFill(data[0], 0xff), data[0]); + if ((data[0]) == 0x44) + { + OUTF("FIXME: ems_type\n"); + return; + } + if (++data >= end) + RETTRUNK(); + + OUTF("%s Parameter\n", BitRowFill(data[0], 0xff)); + data++; +#endif + + TPAddress("Destination"); + OUTF("%s TP-MTI: %s\n", BitRowFill(data[0], 0x03), id_list_get(list_TP_MTI, data[0] & 0x03)); + + /* SMS-DELIVER and SMS-STATUS-REPORT. + * This may be different for other SMS-types! (FIXME) */ + if ((data[0] >> 2) & 1) + OUTF("-----1-- More Messages (TP-MMS): No\n"); + else + OUTF("-----0-- More Messages (TP-MMS): Yes\n"); + OUTF("%s Status Report Indication (TP-SRI)\n", BitRowFill(data[0], 0x20)); + if ((data[0] >> 6) & 1) + { + OUTF("-1------ User Data Header Indicator (TP-UDHI): Yes\n"); + nfo.flags |= GSMSP_NFO_UDHI; + } else { + OUTF("-0------ User Data Header Indicator (TP-UDHI): No\n"); + } + OUTF("%s Reply Path (TP-RP)\n", BitRowFill(data[0], 0x80)); + /* SMS-DELIVER and SMS-STATUS-REPORT end */ + data++; + + /* FIXME: Why is TPAddress differently encoded as SMSC address? + * Am i doing something wrong or are the GSM people nuts? + */ + TPAddress("Originating (TP-OA)"); + + SmsProtocolDataValidity(); + + SmscTimestamp(); + if (data >= end) + RETTRUNK(); + n_symbols = data[0]; + OUTF("%s User Data Length (TP-UDL): %u symbols\n", BitRowFill(data[0], 0xff), data[0]); + + data++; +#if 0 + if ((data[0] >> 6) & 1) + { + OUTF("-1------ TP User Data Header Indicator (TP-UDHI): yes\n"); + data++; + OUTF("-------- FIXME: Decode header\n"); + data += (data[0] + 1); + /* FIXME: Skip over fill bits as well. GSM 03.40 9.2.3.24 */ + } else { + OUTF("-0------ TP User Data Header Indicator (TP-UDHI): no\n"); + //data++; /* Contains directly the data!!! */ + } +#endif + + if (sms_con.ptr == NULL) + sms_con.ptr = sms_con.buf; + + if (nfo.flags & GSMSP_NFO_UDHI) + sms_udh(); + if ((nfo.flags & GSMSP_NFO_SMSCON) && (!(nfo.flags & GSMSP_NFO_LASTSMSCHUNK))) + { + HEXDUMPF(data, end - data, "TP-UD\n"); + /* If this is a concatendated SMS then wait for rest of data */ + return; + } + if (sms_con.ptr > sms_con.buf) + { + /* was a concatenated sms. output concatendated TP-UD */ + data = sms_con.buf; + start = data; + end = sms_con.ptr; + } + + if (nfo.flags & GSMSP_NFO_DEFAULTALPHABET) + { + if (((end - data) * 8 ) / 7 < n_symbols) + n_symbols = ((end - data) * 8) / 7; + sms_default_alphabet(n_symbols); + } else if (nfo.flags & GSMSP_NFO_SIMDATADL) { + HEXDUMPF(data, end - data, "Format Sim Data Download\n"); + simdatadownload(); + } else { + HEXDUMPF(data, end - data, "TP-UD\n"); + } + /* Reset concatendating sms counter again */ + if ((sms_con.ptr > sms_con.buf) && (nfo.flags & GSMSP_NFO_LASTSMSCHUNK)) + { + memset(&sms_con, 0, sizeof sms_con); + } +} + +static unsigned char sms_default_alpha[] = "" +"@_$__________\r__" +"________________" +" !\"#_%&`()*+,-./" +"0123456789:;<=>?" +"_ABCDEFGHIJKLMNO" +"PQRSTUVWXYZ_____" +"_abcdefghijklmno" +"pqrstuvwxyz_____"; + +/* + * Len is the number of symbols (not number of bytes) + */ +static void +sms_default_alphabet(int len) +{ + unsigned char buf[512]; + unsigned char *ptr = buf; + unsigned char *buf_end = buf + sizeof buf; + + while (ptr < buf_end) + { + *ptr++ = sms_default_alpha[data[0] & 0x7f]; + if (--len <= 0) break; + *ptr++ = sms_default_alpha[((data[0] >> 7) & 0x01) | ((data[1] & 0x3f) << 1)]; + if (--len <= 0) break; + *ptr++ = sms_default_alpha[((data[1] >> 6) & 0x03) | ((data[2] & 0x1f) << 2)]; + if (--len <= 0) break; + *ptr++ = sms_default_alpha[((data[2] >> 5) & 0x07) | ((data[3] & 0x0f) << 3)]; + if (--len <= 0) break; + *ptr++ = sms_default_alpha[((data[3] >> 4) & 0x0f) | ((data[4] & 0x07) << 4)]; + if (--len <= 0) break; + *ptr++ = sms_default_alpha[((data[4] >> 3) & 0x1f) | ((data[5] & 0x03) << 5)]; + if (--len <= 0) break; + *ptr++ = sms_default_alpha[((data[5] >> 2) & 0x3f) | ((data[6] & 0x01) << 6)]; + if (--len <= 0) break; + *ptr++ = sms_default_alpha[((data[6] >> 1) & 0x7f)]; + if (--len <= 0) break; + data += 7; + } + data = end; + *ptr = '\0'; + OUTF("-------- Content: %s\n", buf); +} + +/* User Data Header (GSM 03.40:9.2.3.24) */ +static void +sms_udh() +{ + int len_udh; + int len; + int seq_total; + const unsigned char *end_udh; + const unsigned char *next; + + if (data >= end) + RETTRUNK(); + len_udh = data[0]; + end_udh = data + data[0] + 1; + OUTF("%s User Data Header Length: %u octets\n", BitRowFill(data[0], 0xff), data[0]); + data++; + + if (end_udh > end) + end_udh = end; + + while (data < end_udh) + { + if ((data + 1 >= end_udh) || (data + data[1] + 2 > end_udh)) + { + OUTF("ERR: Short data\n"); + break; + } + next = data + data[1] + 2; + len = data[1]; + + if (data[0] == 0) { + OUTF("00000000 Concatenated short messages, 8-bit reference number\n"); + data++; + OUTF("-------- Length: %u\n", data[0]); + data++; + OUTF("-------- Message Reference Number: %.2X\n", data[0]); + data++; + OUTF("-------- Number of Segments: %.2X\n", data[0]); + seq_total = data[0]; + data++; + OUTF("-------- Seq Number: %.2X\n", data[0]); + //OUTF("DEBUG: %u += memcpy(%p, %p, %u)\n", sms_con.ptr - sms_con.buf, sms_con.ptr, end_udh, end-end_udh); + memcpy(sms_con.ptr, end_udh, end - end_udh); + sms_con.ptr += (end - end_udh); + + nfo.flags |= GSMSP_NFO_SMSCON; + if (data[0] == seq_total) + nfo.flags |= GSMSP_NFO_LASTSMSCHUNK; + data++; + } else if (data[0] == 1) + OUTF("00000001 Special SMS Message Indication\n"); + else if (data[0] == 4) { + OUTF("00000100 Application port address, 8 bit\n"); + OUTF("-------- Desitnation Port: %u (0x%.2X)\n", data[1], data[1]); + OUTF("-------- Source Port: %u (0x%.2X)\n", data[2], data[2]); + data += 3; + } else if (data[0] == 5) { + unsigned short dport, sport; + dport = (data[2] << 8) + data[3]; + sport = (data[4] << 8) + data[5]; + OUTF("00000101 Application port address, 16 bit\n"); + data++; + OUTF("-------- Length: %u\n", data[0]); + data++; + /* 0 - 15999 allocated by IANA + * 16000 - 16999 Available for allocation by application + * 17000 - 65535 reserved + */ + OUTF("-------- Destination Port: %u\n", dport); + data += 2; + OUTF("-------- Source Port: %u\n", sport); + data += 2; + } else if (data[0] == 6) + OUTF("00000110 SMSC Control Parameters\n"); + else if (data[0] == 7) + OUTF("00000111 UDH Source Indicator\n"); + else if (data[0] == 8) { + OUTF("00001000 Concatenated short messages, 16-bit reference number\n"); + data++; + OUTF("-------- Message Reference Number: %.4X\n", (data[0]<<8) + data[1]); + data += 2; + OUTF("-------- Number of Segments: %.2X\n", data[0]); + seq_total = data[0]; + data++; + OUTF("-------- Seq Number: %.2X\n", data[0]); + memcpy(sms_con.ptr, end_udh, end - end_udh); + sms_con.ptr += (end - end_udh); + + nfo.flags |= GSMSP_NFO_SMSCON; + if (data[0] == seq_total) + nfo.flags |= GSMSP_NFO_LASTSMSCHUNK; + data++; + } else if (data[0] == 9) + OUTF("00001001 Wireless Control Message Protocol\n"); + else if ((data[0] >= 0x70) && (data[0] <= 0x7f)) + OUTF("%s SIM Toolkit Security Header\n", BitRowFill(data[0], 0xff)); + else if ((data[0] >= 0x80) && (data[0] <= 0x9f)) + OUTF("%s SME to SME specific use\n", BitRowFill(data[0], 0xff)); + else if ((data[0] >= 0xc0) && (data[0] <= 0xdf)) + OUTF("%s SC specific use\n", BitRowFill(data[0], 0xff)); + else + OUTF("%s reserved\n", BitRowFill(data[0], 0xff)); + + data = next; + } + +} + +static void +TPAddress(const char *str) +{ + int len; + + if (data >= end) + RETTRUNK(); + + len = data[0]; + OUTF("%s %s Address Length: %u\n", BitRowFill(data[0], 0xff), str, data[0]); + data++; + if (len <= 0) + { + data++; + return; + } + if (data >= end) + RETTRUNK(); + if (data[0] >> 7) + OUTF("1------- Extension\n"); + + OUTF("%s\n", id_list_get(list_SMSCAddressType, (data[0] >> 4) & 0x07)); + OUTF("%s\n", id_list_get(list_SMSCAddressNumberingPlan, data[0] & 0x0f)); + data++; + Number(len); +} + +static void +Address(const char *str) +{ + int len; + + if (data >= end) + RETTRUNK(); + len = data[0]; + OUTF("%s %s Address Length: %u\n", BitRowFill(data[0], 0xff), str, data[0]); + data++; + if (len <= 0) + { + data++; + return; + } + if (data >= end) + RETTRUNK(); + if (data[0] >> 7) + OUTF("1------- Extension\n"); + + OUTF("%s\n", id_list_get(list_SMSCAddressType, (data[0] >> 4) & 0x07)); + OUTF("%s\n", id_list_get(list_SMSCAddressNumberingPlan, data[0] & 0x0f)); + len--; + data++; + if (len <= 0) + return; + const unsigned char *thisend = data + len; + if (thisend > end) + thisend = end; + + OUTF("-------- Number(%d): ", len); + while (data < thisend) + { + if ((data[0] >> 4) == 0x0f) + OUT("%X", data[0] & 0x0f); + else + OUT("%X%X", data[0] & 0x0f, data[0] >> 4); + data++; + } + OUT("\n"); +} + + +static void +l2_RRpagingresponse() +{ + if (data >= end) + RETTRUNK(); + + if ((data[0] & 0x07) == 0x07) + OUTF("-----111 Cipher key sequence: Key not available!\n"); + else + OUTF("%s Ciphering key sequence: %u\n", BitRowFill(data[0], 0x07), data[0] & 0x07); + + OUTF("%s Ciphering key sequence: %u\n", BitRowFill(data[0], 0x70), (data[0] >> 4) & 0x07); + + data++; + MSClassMarkTwo(); + if (data >= end) + RETTRUNK(); + l2_MobId(); +} + +/* + * 04.08-9.1.2 + */ +static void +l2_RRassignCommand() +{ + ChannelDescriptionTwo(); + if (data >= end) + RETTRUNK(); + + OUTF("%s Training seq. code: %d\n", BitRowFill(data[0], 0xe0), data[0] >> 5); + + /* Power Command 10.5.2.28 */ + /* Frequency List 10.5.2.13 */ + /* Cell Channel Description 10.5.2.1b */ + /* Multislot allocation... */ + if (((data[0] >> 2) & 0x07) == 0x00) + l2_SingleChannelAssCom(); + else if (((data[0] >> 4) & 1) == 0x01) + l2_HoppingChannelAssCom(); + else + OUTF("xxx0??xxx UNKNOWN %d\n", (data[0] >> 3) & 0x3); +} + +static void +l2_RRassignComplete() +{ + if (data >= end) + RETTRUNK(); + + OUTF("%s\n", id_list_get(list_ChannelRelease, data[0])); + data++; +} + +static void +ChannelDescriptionTwo() +{ + if (data >= end) + RETTRUNK(); + OUTF("%s Timeslot number: %d\n", BitRowFill(data[0], 0x07), data[0] & 0x07); + OUTF("%s Channel Description: %s\n", BitRowFill(data[0], 0xf8), id_list_get(list_ChannelDescriptionTwo, data[0] >> 3)); + + data++; +} + +static void +PowerLevel() +{ + OUTF("%s Power Level: %u\n", BitRowFill(data[0], 0x1f), data[0] & 0x1f); + data++; +} + +static void +l2_SingleChannelAssCom() +{ + int freq = (data[0] & 0x03) << 8; + + data++; + if (data >= end) + RETTRUNK(); + freq |= data[0]; + OUTF("........ Absolute RF channel number: %u\n", freq); + if (++data >= end) + RETTRUNK(); + PowerLevel(); + if (data[0] != 0x63) + return; + if (++data >= end) + RETTRUNK(); + ChannelMode(); +} + +static void +FrequencyList() +{ + /* Should be 16 */ + OUTF("%s Length: %d\n", BitRowFill(data[0], 0xff), data[0]); + data++; + CellAllocation(data[0], "Cell Allocation : ARFCN"); +} + +static void +ChannelMode() +{ + OUTF("%s\n", id_list_get(list_ChannelMode, data[0])); + data++; +} + +static void +l2_HoppingChannelAssCom() +{ + maio(); + PowerLevel(); + while (data < end) + { + if (data[0] == 0x05) + { + data++; + FrequencyList(); + } else if (data[0] == 0x63) { + data++; + ChannelMode(); + } else { + OUTF("UNKNOWN. FIXME\n"); + break; + } + + } +} + +static void +CCalerting() +{ + if (data >= end) + RETTRUNK(); + if (data[0] != 0x1e) + return; + + data++; + ProgressIndicator(); +} + +static void +ProgressIndicator() +{ + if (data >= end) + RETTRUNK(); + + OUTF("%s Length of IE Progress Indicator: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + OUTF("%s Coding: %s\n", BitRowFill(data[0], 0x60), id_list_get(list_CodingStandard, (data[0] >> 5) & 0x03)); + OUTF("%s Location: %s\n", BitRowFill(data[0], 0x0f), id_list_get(list_Location, data[0] & 0x0f)); + if (++data >= end) + RETTRUNK(); + OUTF("%s\n", id_list_get(list_Progress, data[0] & 0x7f)); + data++; +} + +static void +CCsetup() +{ + if (data >= end) + RETTRUNK(); + + while (data < end) + { + if (data[0] == 0x04) + { + OUTF("00000100 Bearer Capability\n"); + data++; + BearerCap(); + } else if (data[0] == 0x1e) { + OUTF("00011110 Progress Indicator\n"); + ProgressIndicator(); + return; + } else if (data[0] == 0x5e) { + OUTF("01011110 Called Party BCD Number\n"); + data++; + BCDNumber(); + } else if (data[0] == 0xa1) { + OUTF("10100001 CLIR supression\n"); + data++; + } else if (data[0] == 0xa2) { + OUTF("10100010 CLIR invocation\n"); + data++; + } else { + OUTF("%s FIXME\n", BitRowFill(data[0], 0xff)); + break; + } + } + + data++; +} + +static void +Cause() +{ + if (data >= end) + RETTRUNK(); + + OUTF("%s Length of Cause: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + + OUTF("%s Coding: %s\n", BitRowFill(data[0], 0x60), id_list_get(list_CodingStandard, (data[0] >> 5) & 0x03)); + OUTF("%s Location: %s\n", BitRowFill(data[0], 0x0f), id_list_get(list_Location, data[0] & 0x0f)); + if (++data >= end) + RETTRUNK(); + + OUTF("%s Cause: %s\n", BitRowFill(data[0], 0x7f), id_list_get(list_Cause, data[0] & 0x7f)); + data++; +} + +static void +l2_RRclassmarkChange() +{ + if (data >= end) + RETTRUNK(); + MSClassMarkTwo(); + if (data >= end) + RETTRUNK(); + if (data[0] == 0x20) + { + OUTF("00100000 Class Mark 3\n"); + data++; + ClassMarkThree(); + } +} + +static void +MultiSupportTwo() +{ + int c = 0; + if (data + 1 >= end) + RETTRUNK(); + OUTF("0110---- P-GSM, E-GSM, R-GSM supported, DSC 1800 not supported\n"); + + for (c = 3; c >= 0; c--) + { + if ((data[0] >> c) & 0x1) + OUTF("%s A5/%d available\n", BitRowFill(data[0], 1<<c), 4+c); + else + OUTF("%s A5/%d not available\n", BitRowFill(data[0], 1<<c), 4+c); + } + data++; + OUTF("%s Associated Radio capability 1 Power Class: %d\n", BitRowFill(data[0], 0xf), data[0] & 0xf); + OUTF("%s Associated Radio capability 2 Power Class: %d\n", BitRowFill(data[0], 0xf0), data[0] >> 4); + data++; +} + +static void +ClassMarkThree() +{ + unsigned char c; + + if (data + 1 >= end) + RETTRUNK(); + OUTF("%s Length: %d\n", BitRowFill(data[0], 0xff), data[0]); + data++; + + c = data[0] >> 4; + if ((c == 0x5) || (c == 0x6)) + MultiSupportTwo(); + else + OUTF("FIXME\n"); +} + +static void +SmsProtocolDataValidity() +{ + unsigned char b7,b6,b5,b4; + + if (data >= end) + RETTRUNK(); + OUTF("%s Protocol Identifier: 0x%.2X\n", BitRowFill(data[0], 0xff), data[0]); + + b7 = (data[0] >> 7) & 0x1; + b6 = (data[0] >> 6) & 0x1; + b5 = (data[0] >> 5) & 0x1; + b4 = (data[0] >> 4) & 0x1; + + if ( !b7 && !b6 && b5) { + OUTF("001----- Telematic Interworking\n"); + } + if ( !b7 && b6 ) { + switch ( (data[0] & 0x3f ) ) { + case 0x1f: + OUTF("01011111 Return Call Message\n"); + break; + case 0x3d: + OUTF("01111101 ME Data Download\n"); + break; + case 0x3e: + OUTF("01111110 ME De-personalization SMS\n"); + break; + case 0x3f: + OUTF("01111111 SIM Data download\n"); + break; + default:break; + } + + } + + if (data[0] == 0x00) + OUTF("00000000 normal\n"); + + if (data[0] == 0x40) + OUTF("00101000 SMS PING\n"); + + if (data[0] == 0x7f) { + nfo.flags |= GSMSP_NFO_SIMDATADL; + // printf("set GSMSP_NFO_SIMDATADL=1\n"); + } else + nfo.flags &= ~GSMSP_NFO_SIMDATADL; + + data++; + sms_dcs(); +} + +static void +BearerCap() +{ + int len; + char extension = 0; + + if (data >= end) + RETTRUNK(); + + len = data[0]; + OUTF("%s Length: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (data + len > end) + len = end - data; + if (++data >= end) + RETTRUNK(); + + if ((data[0] >> 7) & 0x1) + { + extension = 1; + OUTF("1------- Extension: yes\n"); + } else { + OUTF("0------- Extension: no\n"); + // extenstion = 0; + } + + OUTF("%s Radio Channel: %s\n", BitRowFill(data[0], 0x60), id_list_get(list_RadioChannelReq, (data[0] >> 5) & 0x03)); + if ((data[0] >> 4) & 1) + OUTF("---1---- Coding Standard: reserved\n"); + else + OUTF("---0---- Coding Standard: GSM\n"); + if ((data[0] >> 3) & 1) + OUTF("----1--- Transfer Mode: Packet\n"); + else + OUTF("----0--- Transfer Mode: Circuit\n"); + + OUTF("%s Transfer Capability: %s\n", BitRowFill(data[0], 0x07), id_list_get(list_TransferCap, data[0] & 0x07)); + data++; + + if (extension) + { + OUTF("FIXME: Stuff missing here\n"); + /* FIXME: can be followed by antoher estension etc!*/ + } + + if ((data[0] >> 7) & 0x1) + { + extension = 1; + OUTF("1------- Extension: yes\n"); + } else { + OUTF("0------- Extension: no\n"); + // extenstion = 0; + } + + if ((data[0] >> 6) & 0x01) + OUTF("-1------ Compression: yes\n"); + else + OUTF("-0------ Compression: no\n"); + + OUTF("%s Duplex Mode: %s\n", BitRowFill(data[0], 0x8), id_list_get(list_Duplex, data[0] & 0x8)); + if ((data[0] >> 1) & 0x1) + OUTF("------1- Rate Request: Data 4.8 kb/s, full rate, n. transp. 6kb req\n"); + data++; + + if ((data[0] >> 7) & 0x1) + { + extension = 1; + OUTF("1------- Extension: yes\n"); + } else { + OUTF("0------- Extension: no\n"); + // extenstion = 0; + } + OUTF("%s Rate Adaptation: %s\n", BitRowFill(data[0], 0x18), id_list_get(list_Rate, data[0] & 0x18)); + OUTF("%s Signalling Access Protocol: %s\n", BitRowFill(data[0], 0x7), id_list_get(list_Signalling, data[0] & 0x7)); + data++; + if ((data[0] & 0x1) == 1) + OUTF("-------1 Asynchronous\n"); + else + OUTF("-------0 Synchronous\n"); + data++; + /* FIXME: some octets might continue here, depending + * on extension */ + OUTF("FIXME: some data might be in extentions\n"); +} + +static void +AuthenticationRequest() +{ + char rand[16 * 2 + 1]; + + if (data >= end) + RETTRUNK(); + + OUTF("%s Cipher Key Sequence Number: %u\n", BitRowFill(data[0], 0x07), data[0] & 0x07); + data++; + if (data + 16 > end) + RETTRUNK(); + + snprintf(rand, sizeof rand, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7], data[8], data[9], data[10], data[11], data[12], data[13], data[14], data[15]); + OUTF("-------- RAND: %s\n", rand); + data += 16; +} + +static void +LocationUpdateRequest() +{ + if (data >= end) + RETTRUNK(); + OUTF("%s Cipher Key Sequence Number: %d\n", BitRowFill(data[0], 0x70), (data[0] >> 4) & 0x7); + if (data[0] & 0x8) + OUTF("----1--- Follow-on request pending\n"); + else + OUTF("----0--- No follow-on request pending\n"); + OUTF("%s Location Update: %s\n", BitRowFill(data[0], 0x3), id_list_get(list_TypeOfLocationUpdate, data[0] & 0x03)); + data++; + l2_MccMncLac(); + MSClassMarkOne(); + l2_MobId(); +} + + +static void +AuthenticationResponse() +{ + char sres[4 * 2 + 1]; + + if (data + 4 > end) + RETTRUNK(); + snprintf(sres, sizeof sres, "%02x%02x%02x%02x", data[0], data[1], data[2], data[3]); + OUTF("-------- SRES: %s\n", sres); + data += 4; +} + + +static void +sms_dcs() +{ + if (data >= end) + RETTRUNK(); + + if (data[0] == 0) + { + OUTF("00000000 Default Data Coding Scheme (default Alphabet)\n"); + nfo.flags |= GSMSP_NFO_DEFAULTALPHABET; + data++; + return; + } + + if (((data[0] >> 6) & 0x03) == 0) + { + OUTF("00------ General Data Coding\n"); + if ((data[0] >> 5) & 1) + OUTF("--1----- Compressed (TS 03.42)\n"); + else + OUTF("--0----- Not compressed\n"); + if ((data[0] >> 4) & 1) + OUTF("---1---- Message class meaning: yes\n"); + else + OUTF("---0---- Message class meaning: no\n"); + + + OUTF("%s Coding: %s\n", BitRowFill(data[0], 0x0c), id_list_get(list_alphabet, (data[0] >> 5) & 0x03)); + /* If bit 4 is set then bit 0..1 have a Message Class meaning */ + if ((data[0] >> 4) & 1) + { + OUTF("%s Message Class: %s\n", BitRowFill(data[0], 0x03), id_list_get(list_MessageClassMeaning, data[0] & 0x03)); + } else { + + OUTF("%s Message Class: No meaning (see bit4)\n", BitRowFill(data[0], 0x03)); + } + } else if ((((data[0] >> 6) & 0x03) == 0x03) && (((data[0] >> 4) & 0x03) != 0x03)) { + if (((data[0] >> 4) & 0x0f) == 0x0c) { + OUTF("1100---- Message Waiting Indicator Group: Discard Message\n"); + } else if (((data[0] >> 4) & 0x0f) == 0x0d) { + OUTF("1101---- Message Waiting Indicator Group: Store Message\n"); + } else if (((data[0] >> 4) & 0x0f) == 0x0e) { + OUTF("1110---- Message Waiting Indicator Group: Store Message\n"); + } + OUTF("FIXME GSM 03.38\n"); + } else if (((data[0] >> 4) & 0x0f) == 0x0f) { + OUTF("1111---- Data Coding/Message Class\n"); + OUTF("%s reserved\n", BitRowFill(data[0], 0x08)); + if ((data[0] >> 2) & 1) + OUTF("-----1-- Message coding: 8 bit\n"); + else { + OUTF("-----0-- Message coding: default alphabet\n"); + nfo.flags |= GSMSP_NFO_DEFAULTALPHABET; + } + OUTF("%s Message Class: %s\n", BitRowFill(data[0], 0x03), id_list_get(list_MessageClassMeaning, data[0] & 0x03)); + } else { + OUTF("%s reserved\n", BitRowFill(data[0], 0xff)); + } + + data++; +} + +#define FlipBCD(val) ((val & 0x0f) << 4) | (val >> 4) + +static void +SmscTimestamp() +{ + if (data + 6 >= end) + RETTRUNK(); + + OUTF("-------- SMSC Timestamp: %02x-%02x-%02x %02x:%02x:%02x (TZ %02x)\n", FlipBCD(data[0]), FlipBCD(data[1]), FlipBCD(data[2]), FlipBCD(data[3]), FlipBCD(data[4]), FlipBCD(data[5]), FlipBCD(data[6])); + + data += 7; +} + + +static void +simdatadownload() +{ + unsigned char chl; /* command header length */ + int i; + + OUTF("-------- Length of CPL: 0x%.4X (%u)\n", (data[0]<<8)+data[1],(data[0]<<8)+data[1]); + data+=2; + chl = data[0]; + OUTF("-------- Command Header Length: 0x%.2X (%u)\n",chl,chl); + data++; + // SPI + OUTF("%s SPI : 0x%.2X\n",BitRowFill(data[0], 0xff), data[0]); + switch (data[0] & 0x3) { + case 0x00: + OUTF("------00 No RC, CC or DS\n"); + break; + case 0x01: + OUTF("------01 Redudancy Check\n"); + break; + case 0x02: + OUTF("------10 Cryptographic Checksum\n"); + break; + case 0x03: + OUTF("------11 Digital Signature\n"); + break; + default: break; + } + if ( ((data[0]>>2)& 0x01) ) + OUTF("-----1-- Ciphering\n"); + else + OUTF("-----0-- No Ciphering\n"); + + switch ( (data[0]>>3) & 0x03 ) { + case 0x00: + OUTF("---00--- No counter available\n"); + break; + case 0x01: + OUTF("---01--- Counter available; no replay or sequence checking\n"); + break; + case 0x02: + OUTF("---10--- Process if counter is higher\n"); + break; + case 0x03: + OUTF("---11--- Process if counter is 1 higher\n"); + break; + default:break; + } + data++; + OUTF("%s PoR : 0x%.2X\n", BitRowFill(data[0], 0xff), data[0]); //FIXME:implement me + switch (data[0] & 0x03) { + case 0x00: + OUTF("------00 No PoR-reply to sending entity\n"); + break; + case 0x01: + OUTF("------01 PoR required to be send to sending entity\n"); + break; + case 0x02: + OUTF("------10 PoR required only on error\n"); + break; + case 0x03: + OUTF("-------- reserved\n"); + break; + default:break; + } + switch ( (data[0]>>2) & 0x03) { + case 0x00: + OUTF("----00-- No RC/CC/DS applied to PoR\n"); + break; + case 0x01: + OUTF("----01-- PoR with simple RC\n"); + break; + case 0x02: + OUTF("----10-- PoR with CC\n"); + break; + case 0x03: + OUTF("----11-- PoR with DS\n"); + break; + default:break; + } + if ( (data[0]>>4) & 0x01 ) + OUTF("---1---- PoR via SMS-SUBMIT\n"); + else + OUTF("---0---- PoR via SMS-Deliver-Report\n"); + + + data++; + + // KIc + OUTF("%s KIc: 0x%.2X\n",BitRowFill(data[0], 0xff), data[0]); + + switch(data[0] & 0x03) { + case 0x00: + OUTF("------00 Algorithm known implicitly\n"); + break; + case 0x01: + OUTF("------01 DES\n"); + break; + case 0x02: + OUTF("------10 Reserved.\n"); + break; + case 0x03: + OUTF("------11 properietary Implementation\n"); + break; + default:break; + } + + switch ( (data[0]>>2) & 0x03) { + case 0x00: + OUTF("----00-- DES-CBC\n"); + break; + case 0x01: + OUTF("----01-- 3DES-outer-CBC 2 different Keys\n"); + break; + case 0x02: + OUTF("----10-- 3DES-outer-CBC 3 different Keys\n"); + break; + case 0x03: + OUTF("----11-- DES-ECB\n"); + break; + default:break; + } + OUTF("XXX----- Key Number: %.2X\n", data[0]>>4 ); + data++; + + // KId + OUTF("%s KId: 0x%.2X\n",BitRowFill(data[0], 0xff), data[0]); + + switch(data[0] & 0x03) { + case 0x00: + OUTF("------00 Algorithm known implicitly\n"); + break; + case 0x01: + OUTF("------01 DES\n"); + break; + case 0x02: + OUTF("------10 Reserved.\n"); + break; + case 0x03: + OUTF("------11 properietary Implementation\n"); + break; + default:break; + } + + switch ( (data[0]>>2) & 0x03) { + case 0x00: + OUTF("----00-- DES-CBC\n"); + break; + case 0x01: + OUTF("----01-- 3DES-outer-CBC 2 different Keys\n"); + break; + case 0x02: + OUTF("----10-- 3DES-outer-CBC 3 different Keys\n"); + break; + case 0x03: + OUTF("----11-- DES-ECB\n"); + break; + default:break; + } + OUTF("XXX----- Key Number: %.2X\n", data[0]>>5 ); + data++; + + OUTF("-------- Toolkit Application Reference (TAR): 0x%.2X 0x%.2X 0x%.2X\n", data[0],data[1],data[2]); + data+=3; + OUTF("-------- Counter (CNTR): 0x%.2X 0x%.2X 0x%.2X 0x%.2X 0x%.2X\n",data[0], data[1], data[2], data[3], data[4]); + data+=5; + + // print the remaining bytes of the header, may be redudancy check eg + for (i=0; i<chl-12;i++) { + OUTF("%s %.2X\n",BitRowFill(data[0], 0xff), data[0]); + data++; + } + +} + + +static void +TypeOfIdentity() +{ + if (data >= end) + RETTRUNK(); + + OUTF("%s Type of Identity: %s\n", BitRowFill(data[0], 0x07), id_list_get(list_TypeOfIdentity, data[0] & 0x07)); + data++; +} + +static void +l2_NonCallSS() +{ + if (data >= end) + RETTRUNK(); + + OUTF("%s SendSequenceNumber: %u\n", BitRowFill(data[0], 0xc0), data[0] >> 6); + if ((data[0] & 0x3f) == 0x3b) + { + OUTF("--111011 Facility Register\n"); + data++; + l2_FacilityRegister(); + } else if ((data[0] & 0x3f) == 0x2a) { + OUTF("--101010 CCReleaseComplete\n"); + data++; + l2_CCReleaseComplete(); + } else { + OUTF("%s UNKNOWN\n", BitRowFill(data[0], 0x3f)); + data++; + } +} + +static void +l2_FacilityRegister() +{ + if (data >= end) + RETTRUNK(); + + if (data[0] != 0x1c) + { + OUTF("%s UNKNOWN\n", BitRowFill(data[0], 0xff)); + return; + } + OUTF("00011100 Information Element: Facility\n"); + data++; + l2_Facility(); +} + +static void +l2_Facility() +{ + if (data >= end) + RETTRUNK(); + OUTF("%s Length: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + switch (data[0]) + { + case 0xa1: /* 10100001 */ + OUTF("10100001 Invoke\n"); + data++; + l2_FacilityInvoke(); + break; + case 0xa2: /* 10100010 */ + OUTF("10100010 ReturnResult\n"); + data++; + l2_FacilityReturnResult(); + break; + default: + OUTF("%s UNKNOWN\n", BitRowFill(data[0], 0xff)); + break; + } +} + +static void +l2_FacilityHeader() +{ + if (data >= end) + RETTRUNK(); + OUTF("%s Length: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + if (data[0] != 0x02) + { + OUTF("%s Type: UNKNOWN\n", BitRowFill(data[0], 0xff)); + return; + } + OUTF("00000010 Type: Integer\n"); + if (++data >= end) + RETTRUNK(); + OUTF("%s Length: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + OUTF("%s Invoke ID: %u\n", BitRowFill(data[0], 0xff), data[0]); + data++; +} + +static void +l2_FacilityInvoke() +{ + l2_FacilityHeader(); + if (data >= end) + RETTRUNK(); + if (data[0] != 0x02) + { + OUTF("%s Type: UNKNOWN\n", BitRowFill(data[0], 0xff)); + return; + } + OUTF("00000010 Type: Integer\n"); + if (++data >= end) + RETTRUNK(); + OUTF("%s Length: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + + switch (data[0]) + { + case 0x3b: + OUTF("00111011 Unstructured SS Request\n"); + data++; + l2_UssRequest(); + break; + case 0x13: + OUTF("00010011 Unsturcutred SS Data\n"); + data++; + l2_UssData(); + break; + default: + OUTF("%s UNKNOWN\n", BitRowFill(data[0], 0xff)); + break; + } +} + +static void +l2_UssRequest() +{ + if (data >= end) + RETTRUNK(); + + if (data[0] != 0x30) + { + OUTF("%s Sequence: UNKNOWN\n", BitRowFill(data[0], 0xff)); + return; + } + OUTF("00110000 Sequence: ussd-Arg\n"); + if (++data >= end) + RETTRUNK(); + OUTF("%s Length: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + if (data[0] != 0x04) + { + OUTF("%s Octet String: UNKNOWN\n", BitRowFill(data[0], 0xff)); + return; + } + OUTF("00000100 Octet String\n"); + if (++data >= end) + RETTRUNK(); + OUTF("%s Length: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + + OUTF("%s Coding Sheme Number: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + if (data[0] != 0x04) + { + OUTF("%s Octet String: UNKNOWN\n", BitRowFill(data[0], 0xff)); + return; + } + OUTF("00000100 Octet String\n"); + if (++data >= end) + RETTRUNK(); + OUTF("%s Length: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); +} + +static void +l2_UssData() +{ + char buf[32]; + int len; + + if (data >= end) + RETTRUNK(); + if (data[0] != 0x16) + { + OUTF("%s UNKNWON\n", BitRowFill(data[0], 0xff)); + return; + } + if (++data >= end) + RETTRUNK(); + len = data[0]; + OUTF("%s Length: %d\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + if (data + len > end) + RETTRUNK(); + snprintf(buf, sizeof buf, "%s", data); + buf[len] = '\0'; + OUTF("-------- String: %s\n", buf); + data += len; +} + +static void +l2_CCReleaseComplete() +{ + if (data >= end) + RETTRUNK(); + if (data[0] == 0x08) + { + OUTF("00001000 Cause [FIXME]\n"); + data++; + return; + } else if (data[0] == 0x1c) { /* 00011100 */ + OUTF("00011100 Facility\n"); + data++; + l2_Facility(); + } else { + OUTF("%s UNKNOWN\n", BitRowFill(data[0], 0xff)); + data++; + return; + } +} + +static void +l2_FacilityReturnResult() +{ + l2_FacilityHeader(); + if (data >= end) + RETTRUNK(); + if (data[0] != 0x30) /* 00110000 */ + goto err; + OUTF("00110000 Sequence: Result Info\n"); + if (++data >= end) + RETTRUNK(); + OUTF("%s Length: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + if (data[0] != 2) + goto err; + OUTF("00000010 Integer\n"); + if (++data >= end) + RETTRUNK(); + if (data[0] != 1) + goto err; + OUTF("00000001 Length: 1\n"); + if (++data >= end) + RETTRUNK(); + switch (data[0]) + { + case 0x13: + OUTF("00010011 Unsturcutred SS Data\n"); + data++; + l2_UssData(); + break; + default: + goto err; + } + + return; +err: + OUTF("%s UNKNOWN\n", BitRowFill(data[0], 0xff)); + data++; +} + +static void +MeasurmentReport() +{ + int c, max; + + if (data + 1 >= end) + RETTRUNK(); + + if ((data[0] >> 7) & 0x1) + OUTF("1------- BA used: yes\n"); + else + OUTF("0------- BA used: no\n"); + + if ((data[0] >> 6) & 0x1) + OUTF("-1------ Discontinous Transmission: yes\n"); + else + OUTF("-0------ Discontinous Transmission: no\n"); + OUTF("%s RxLev Full Serving Cell: %d dB\n", BitRowFill(data[0], 0x3f), -110 + (data[0] & 0x3f)); + data++; + if ((data[0] >> 7) & 0x1) + OUTF("1------- BA used: yes\n"); + else + OUTF("0------- BA used: no\n"); + if ((data[0] >> 6) & 0x1) + OUTF("-1------ MEAS Valid: no\n"); + else + OUTF("-0------ MEAS Valid: yes\n"); + OUTF("%s RxLev Sub Serving Cell: %d dB\n", BitRowFill(data[0], 0x3f), -110 + (data[0] & 0x3f)); + data++; + + OUTF("%s Rx Quality Full Serving Cell: %s\n", BitRowFill(data[0], 0x70), id_list_get(list_RxQual, (data[0] >> 3) & 0x07)); + OUTF("%s Rx Quality Sub Serving Cell: %s\n", BitRowFill(data[0], 0x7), id_list_get(list_RxQual, data[0] & 0x07)); + data++; + if (data >= end) + RETTRUNK(); + max = data[0] & 0x7; + OUTF("%s Number of neighbouring cell measurements: %d\n", BitRowFill(data[0], 0x7), data[0] & 0x7); + c = 1; + data++; + while (c <= max) + { + if (data + 2 >= end) + RETTRUNK(); + OUTF("%s RxLev Neighbour Cell %d: %d dB\n", BitRowFill(data[0], 0x3f), c, -100 + (data[0] & 0x3f)); + data++; + OUTF("%s Bcch Freq MCell %d: %d\n", BitRowFill(data[0], 0x1f), c, data[0] & 0x1f); + data++; + OUTF("%s BTS Identity Code: %d\n", BitRowFill(data[0], 0x3f), data[0] & 0x3f); + data++; + c++; + } + /* FIXME: I think something iswrong here */ + OUTF("FIXME\n"); +} + +static void +Number(int len) +{ + OUTF("-------- Number(%u): ", len); + while (len > 0) + { + if ((data[0] >> 4) == 0x0f) + OUT("%X", data[0] & 0x0f); + else + OUT("%X%X", data[0] & 0x0f, data[0] >> 4); + len -= 2; + data++; + } + OUT("\n"); +} + +static void +BCDNumber() +{ + int len; + + if (data >= end) + RETTRUNK(); + + len = data[0]; + OUTF("%s Length: %u\n", BitRowFill(data[0], 0xff), data[0]); + data++; + OUTF("%s Type of number: %s\n", BitRowFill(data[0], 0x70), id_list_get(list_TypeNumber, (data[0] & 0x70) >> 4)); + data++; + len--; + Number(len * 2); +} + diff --git a/gsmdecode/src/data_out.h b/gsmdecode/src/data_out.h new file mode 100644 index 0000000..6d3f740 --- /dev/null +++ b/gsmdecode/src/data_out.h @@ -0,0 +1,5 @@ + + +void l2_data_out_Bbis(int fn, const unsigned char *data, int len); +void l2_data_out_B(int fn, const unsigned char *data, int len, int logicalchannel, int direction); + diff --git a/gsmdecode/src/gsm_desc.h b/gsmdecode/src/gsm_desc.h new file mode 100644 index 0000000..ccaac17 --- /dev/null +++ b/gsmdecode/src/gsm_desc.h @@ -0,0 +1,262 @@ + + +struct _id_list list_ChannelRelease[] = { +{0, "00000000 RR-Cause (reason of event) = Normal event"}, +{1, "00000001 RR-Cause (reason of event) = Abnormal release, unspecified"}, +{2, "00000010 RR-Cause (reason of event) = Abnormal release, channel unacceptable"}, +{3, "00000011 RR-Cause (reason of event) = Abnormal release, timer expired"}, +{4, "00000100 RR-Cause (reason of event) = Abnormal release, no activity on the radio path"}, +{5, "00000101 RR-Cause (reason of event) = Preemptive release"}, +{8, "00001000 RR-Cause (reason of event) = Handover impossible, timing advance out of range"}, +{9, "00001001 RR-Cause (reason of event) = Channel mode unacceptable"}, +{10, "00001010 RR-Cause (reason of event) = Frequency not implemented"}, +{0x81, "01000001 RR-Cause (reason of event) = Call already cleared"}, +{0x5f, "01011111 RR-Cause (reason of event) = Semantically incorrect message"}, +{0x60, "01100000 RR-Cause (reason of event) = Invalid mandatory information"}, +{0x61, "01100001 RR-Cause (reason of event) = Message type non-existent or not implemented"}, +{0x62, "01100010 RR-Cause (reason of event) = Message type not compatible with protocol state"}, +{0x64, "01100100 RR-Cause (reason of event) = Conditional IE error"}, +{0x65, "01100101 RR-Cause (reason of event) = Nocell allocation available"}, +{0x6f, "01101111 RR-Cause (reason of event) = Protocol error unspecified"}, +{-1, NULL} +}; + +struct _id_list list_RequestServiceType[] = { +{1, "----0001 Request Service Type: MS originated call"}, +{2, "----0010 Request Service Type: Emergency call"}, +{4, "----0100 Request Service Type: SMS"}, +{8, "----1000 Request Service Type: Supplementary Service Activation"}, +{9, "----1001 Request Service Type: Voice Group call"}, +{10, "----1010 Request Service Type: Voice Broadcast call"}, +{11, "----1011 Request Service Type: Location Services"}, +{-1, NULL} +}; + +struct _id_list list_SMSCAddressType[] = { +{0, "-000---- Unknown Number Type"}, +{1, "-001---- International Number"}, +{2, "-010---- National Number"}, +{3, "-011---- Network specific number"}, +{4, "-100---- Subscriber number"}, +{5, "-101---- Alphanumeric number"}, +{6, "-110---- Abbreviated number"}, +{-1, NULL} +}; + +struct _id_list list_SMSCAddressNumberingPlan[] = { +{0, "----0000 Numbering plan: Unknown"}, +{1, "----0001 Numbering plan: ISDN/telephone (E164/E.163)"}, +{3, "----0011 Numbering plan: Data(X.121)"}, +{4, "----0100 Numbering plan: Telex"}, +{8, "----1000 Numbering plan: National"}, +{9, "----1001 Numbering plan: Private"}, +{10, "----1010 Numbering plan: ERMES (ESTI DE/PS3 01-3)"}, +{15, "----1111 Numbering plan: Unknown"}, +{-1, NULL} +}; + +struct _id_list list_ChannelDescriptionTwo[] = { +{0x01, "TCH/F + ACCHs"}, +{0x02, "TCH/H + ACCHs, subchannel 0"}, +{0x03, "TCH/H + ACCHs, subchannel 1"}, +{0x04, "SDCCH/4 + SACCH/C4 or CBCH (SDCCH/4), SC0"}, +{0x05, "SDCCH/4 + SACCH/C4 or CBCH (SDCCH/4), SC1"}, +{0x06, "SDCCH/4 + SACCH/C4 or CBCH (SDCCH/4), SC2"}, +{0x07, "SDCCH/4 + SACCH/C4 or CBCH (SDCCH/4), SC3"}, +{0x08, "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), SC0"}, +{0x09, "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), SC1"}, +{0x0a, "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), SC2"}, +{0x0b, "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), SC3"}, +{0x0c, "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), SC4"}, +{0x0d, "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), SC5"}, +{0x0e, "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), SC6"}, +{0x0f, "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), SC7"}, +{-1, NULL} +}; + +struct _id_list list_ChannelMode[] = { +{0x00, "00000000 Channel Mode: signaling only"}, +{0x01, "00000001 Channel Mode: TCH/F or TCH/H rev 1"}, +{0x21, "00100001 Channel Mode: TCH/F or TCH/H rev 2"}, +{0x41, "01000001 Channel Mode: TCH/F or TCH/H rev 3"}, +{0x0f, "00001111 Channel Mode: Data, 14.5 kbit/s"}, +{0x03, "00000011 Channel Mode: Data, 12.0 kbit/s"}, +{0x0b, "00001011 Channel Mode: Data, 6.0 kbit/s"}, +{0x13, "00010011 Channel Mode: Data, 3.6 kbit/s"}, +{-1, NULL} +}; + +struct _id_list list_CodingStandard[] = { +{0x00, "CCITT"}, +{0x01, "Reserved for international standards"}, +{0x02, "National standard"}, +{0x03, "GSM-PLMNS"}, +{-1, NULL} +}; + + +struct _id_list list_Location[] = { +{0x00, "User"}, +{0x01, "Private network serving local user"}, +{0x02, "Public network serving local user"}, +{0x04, "Public network serving remote user"}, +{0x05, "Private network serving remote user"}, +{0x0a, "Network beyong interworking point"}, +{-1, NULL} +}; + +struct _id_list list_Progress[] = { +{0x01, "-0000001 Progress: Call is not end-to-end PLMN/ISDN"}, +{0x02, "-0000010 Progress: Destination address in non-PLMN/ISDN"}, +{0x03, "-0000011 Progress: Origination address in non-PLMN/ISDN"}, +{0x04, "-0000100 Progress: Call has returned to the PLMN/ISDN"}, +{0x08, "-0001000 Progress: In-band information or appr. pattern available"}, +{0x20, "-0100000 Progress: Call is end-to-end PLMN/ISDN"}, +{0x40, "-1000000 Progress: Queueing"}, +{-1, NULL} +}; + +struct _id_list list_Cause[] = { +{0x01, "Unassigned number"}, +{0x03, "No route to destination"}, +{0x06, "Channel unacceptable"}, +{0x08, "Operator determined barring"}, +{0x10, "Normal call clearing"}, +{0x11, "User busy"}, +{0x12, "No user responding"}, +{0x13, "User alerting, no answer"}, +{0x15, "Call rejected"}, +{0x16, "Number changed, New destination"}, +{0x19, "Pre-emption"}, +{0x1a, "Non selected user clearing"}, +{0x1b, "Destination out of order"}, +{0x1c, "Invalid number format (incomplete number)"}, +{0x1d, "Fascility rejected"}, +{0x1e, "Response to Status Enquiry"}, +{0x1f, "Normal"}, +{0x22, "No channel available"}, +{0x26, "Network out of order"}, +/* FIXME: fill in others.. */ +{-1, NULL} +}; + +struct _id_list list_RadioChannelReq[] = { +{0x00, "reserved"}, +{0x01, "full rate MS"}, +{0x02, "dual rate MS/half rate preferred"}, +{0x03, "dual rate MS/full rate preferred"}, +{-1, NULL} +}; + +struct _id_list list_TransferCap[] = { +{0x00, "speech"}, +{0x01, "unrestricted digital information"}, +{0x02, "3.1 kHz audio, exx PLMN"}, +{0x03, "facsimile group 3"}, +{0x05, "Other ITC"}, +{-1, NULL} +}; + +struct _id_list list_alphabet[] = { +{0x00, "default"}, +{0x01, "8 bit data"}, +{0x02, "UCS2 (16 bit)"}, +{0x03, "reserved"}, +{-1, NULL} +}; + +struct _id_list list_MessageClassMeaning[] = { +{0x00, "Class 0"}, +{0x01, "Class 1: Default meaning: ME-specific"}, +{0x02, "Class 2: SIM specific message"}, +{0x03, "Class 3: Default meaning: TE specific (GSM 07.05[8])"}, +{-1, NULL} +}; + +struct _id_list list_MTI[] = { +{0x00, "RP-DATA (ms->network)"}, +{0x01, "RP-DATA (network->ms)"}, +{0x02, "RP-ACK (ms->network)"}, +{0x03, "RP-ACK (network->ms)"}, +{0x04, "RP-ERROR (ms->network)"}, +{0x05, "RP-ERROR (network->ms)"}, +{0x06, "RP-SMMA (ms->network)"}, +{-1, NULL} +}; + + +struct _id_list list_TP_MTI[] = { +{0x00, "SMS-DELIVER (->MS) or SMS-DELIVER-REPORT (->SC)"}, +{0x01, "SMS-SUBMIT (->SC) or SMS-SUBMIT-REPORT (->MS)"}, +{0x02, "SMS-STATUS-REPORT (->MS) or SMS-COMMAND (->SC)"}, +{0x03, "reserved"}, +{-1, NULL} +}; + +struct _id_list list_TypeOfIdentity[] = { +{0x01, "IMSI"}, +{0x02, "IMEI"}, +{0x03, "IMEISV"}, +{0x04, "TMSI"}, +{-1, NULL} +}; + +struct _id_list list_TypeOfLocationUpdate[] = { +{0x00, "Normal"}, +{0x01, "Periodic"}, +{0x02, "IMSI attach"}, +{0x03, "reserved"}, +{-1, NULL} +}; + +struct _id_list list_RxQual[] = { +{0x00, "~0.14%% error bit"}, +{0x01, "~0.s28%% error bit"}, +{0x02, "~0.57%% error bit"}, +{0x03, "~1.13%% error bit"}, +{0x04, "~2.25%% error bit"}, +{0x05, "~4.53%% error bit"}, +{0x06, "~9.05%% error bit"}, +{0x07, "~18.10%% error bit"}, +{-1, NULL} +}; + +struct _id_list list_Duplex[] = { +{0x00, "half"}, +{0x01, "full"}, +{-1, NULL} +}; + +struct _id_list list_Rate[] = { +{0x00, "no rate adaption"}, +{0x01, "V.100/X.30"}, +{0x02, "CCITT X.31 falg stuffing"}, +{0x03, "other"}, +{-1, NULL} +}; + +struct _id_list list_Signalling[] = { +{0x01, "I.440/450"}, +{0x02, "X.21"}, +{0x03, "X.28 - dedicated PAD, individual NUI"}, +{0x04, "X.28 - dedicated PAD, universal NUI"}, +{0x05, "X.28 - non dedicated PAD"}, +{0x06, "X.32"}, +{-1, NULL} +}; + +struct _id_list list_Extension[] = { +{0x00, "no"}, +{0x01, "yes"}, +{-1, NULL} +}; + +struct _id_list list_TypeNumber[] = { +{0x00, "unknown"}, +{0x01, "international"}, +{0x02, "national"}, +{0x03, "network specifc number"}, +{-1, NULL} +}; + + diff --git a/gsmdecode/src/gsmdecode.c b/gsmdecode/src/gsmdecode.c new file mode 100644 index 0000000..04d30ab --- /dev/null +++ b/gsmdecode/src/gsmdecode.c @@ -0,0 +1,289 @@ +#include "common.h" +#include <stdio.h> +#include <ctype.h> +#include <string.h> +#include <unistd.h> +#include <stdlib.h> +#include "data_out.h" + +/* + * B: 112, 176, 128 + * Bbis: 96, 80, + */ + +#if 0 +- if there is layer 2 always use layer 2 (BBIS!) +- if there is layer 1 but no layer 2 then generate layer2 from l1! (BBIS!) + +or + +- if there is layer1 use layer 1 +- if there is layer2 but no layer 1 generate layer1 msg +#endif + +struct _opt opt; + +struct _ch_info +{ + unsigned char flags; + int logical; + int physical; + int direction; + int fn; + unsigned char data[23]; + int data_len; +}; + +#define FL_CH_UP (0x01) +#define FL_CH_DOWN (0x02) + +static int hex2bin(unsigned char *out, unsigned char *in); + +static void +usage(char *str) +{ + fprintf(stderr, +"Usage: gsmdecode [ options ]\n" +" Raw hex input: It decodes one line at a time. The input format should look\n" +" like this:\n" +" 00 01 02 03 04 05 2b 2b 2b 2b 2b 2b 2b ...\n" +" Nokia DCT3 trace debug input (XML) is supported with the -x option.\n" +"\n" +" Options:\n" +" -h This message\n" +" -b Force Format B (e.g. raw hex SDCCH)\n" +" -i Force Format Bbis (e.g. raw hex BCCH)\n" +" -x Force OpenGPA xml input format [default]\n" +" -m Accept Motorola input (experimental)\n" +""); + + if (str) + { + fprintf(stderr, str); + exit(-1); + } + exit(0); +} + +static int +xml_get_int(int *val, const unsigned char *str, const unsigned char *pattern) +{ + char *ptr; + char *start, *end; + char buf[32]; + + ptr = strstr((char *)str, (char *)pattern); + if (ptr == NULL) + return -1; + start = strchr(ptr, '"'); + if (start == NULL) + return -2; + start++; + end = strchr(start, '"'); + if (end == NULL) + return -3; + + memcpy(buf, start, end - start); + buf[end - start] = '\0'; + *val = atoi(buf); + return 0; +} + +/* + * - if there is layer1 use layer 1 + * - if there is layer2 but no layer 1 generate layer1 msg + * Return -1 if no structure has been found. + */ +static int +xml_in(struct _ch_info *chinfo, unsigned char *str) +{ + unsigned char *dst; + char *ptr; + int len; + int layer = 0; + + if (memcmp(str, "<l1 ", 4) == 0) + { + memset(chinfo, 0, sizeof *chinfo); + memset(chinfo->data, 0x2b, sizeof chinfo->data); + layer = 1; + } else if (memcmp(str, "<l2 ", 4) == 0) { + /* If layer2 exists but layer1 also then do not decode + * layer2 again. + */ + if (chinfo->data_len > 0) + return -1; + layer = 2; + } else + return -1; + + /* First read all kind of meta information (logical channel, fn, ..) */ + xml_get_int(&chinfo->logical, str, (const unsigned char *)"logicalchannel"); +// fprintf(stderr, "logical %u\n", chinfo->logical); + + if (strstr((char *)str, "direction=\"up\"") != NULL) + { + chinfo->direction = 1; + } else if (strstr((char *)str, "direction=\"down\"") != NULL) { + chinfo->direction = 0; + } + + /* Last see if there is a data="..." section. if so convert it into + * binary and prefix it with pseudo length and up/down indicator + * if required + */ + ptr = strstr((char *)str, "data=\""); + /* Return 0 (true) here so that caller can decide if data_len + * contains other data to decode them... + * (This can happen if there is l1 but no l2 data) + */ + if (ptr == NULL) + return 0; + + ptr += 6; + dst = chinfo->data; + /* For layer 2 the xml input is missing the length data */ + /* We prefix it! */ + if (layer == 2) + { + /* HERE: Layer 1 missing, layer 2 available */ + if ((chinfo->logical == 112) || (chinfo->logical == 176) || (chinfo->logical == 128)) + { + /* B header */ + memcpy(dst, "\x01\x01", 3); + chinfo->data_len = 3; + } else { + /* BBis header */ + chinfo->data_len = 1; + } + dst += chinfo->data_len; + } + + len = hex2bin(dst, (unsigned char *)ptr); + if (len <= 0) + return -3; + chinfo->data_len += len; + /* If layer 2 exist but not layer1 then we add a fake header */ + if (layer == 2) + *(dst - 1) = len << 2; + + return 0; +} + +static void +init_defaults() +{ + opt.format = MSG_FORMAT_XML; +} + +static void +do_getopt(int argc, char *argv[]) +{ + int c; + + while ((c = getopt(argc, argv, "hbixm")) != -1) + { + switch (c) + { + case 'm': + opt.flags |= FL_MOTOROLA; + break; + case 'x': + opt.format = MSG_FORMAT_XML; + break; + case 'b': + opt.format = MSG_FORMAT_B; + break; + case 'i': + opt.format = MSG_FORMAT_BBIS; + break; + case 'h': + default: + usage(NULL); + } + + } +} + +static int +hc2b(unsigned char hex) +{ + hex = tolower(hex); + if ((hex >= '0') && (hex <= '9')) + return hex - '0'; + if ((hex >= 'a') && (hex <= 'f')) + return hex - 'a' + 10; + return -1; +} + +static int +hex2bin(unsigned char *out, unsigned char *in) +{ + unsigned char *out_start = out; + unsigned char *end = in + strlen((char *)in); + int is_low = 0; + int c; + + while (in < end) + { + c = hc2b(in[0]); + if (c < 0) + { + in++; + continue; + } + if (is_low == 0) + { + out[0] = c << 4; + is_low = 1; + } else { + out[0] |= (c & 0x0f); + is_low = 0; + out++; + } + in++; + } + + return out - out_start; +} + +int +main(int argc, char *argv[]) +{ + unsigned char buf[1024]; + unsigned char bin[sizeof buf / 2 + 1]; + int len; + struct _ch_info chi; + + init_defaults(); + do_getopt(argc, argv); + while (fgets((char *)buf, sizeof buf, stdin) != NULL) + { + if (opt.format == MSG_FORMAT_XML) + { + if (xml_in(&chi, buf) != 0) + continue; + if (chi.data_len <= 0) + continue; + if ((chi.logical == 112) || (chi.logical == 176) || (chi.logical == 128)) + { + l2_data_out_B(0, chi.data, chi.data_len, chi.logical, chi.direction); + } else { + l2_data_out_Bbis(0, chi.data, chi.data_len); + } + + memset(buf, 0, sizeof buf); + continue; + } + memset(bin, 0, sizeof bin); + len = hex2bin(bin, buf); + if (opt.format == MSG_FORMAT_B) + l2_data_out_B(0, bin, len, chi.logical, chi.direction); + else + l2_data_out_Bbis(0, bin, len); + } + + exit(0); + return 0; +} + diff --git a/gsmdecode/src/id_list.c b/gsmdecode/src/id_list.c new file mode 100644 index 0000000..6736993 --- /dev/null +++ b/gsmdecode/src/id_list.c @@ -0,0 +1,19 @@ +#include "common.h" +#include <string.h> +#include "id_list.h" + +const char * +id_list_get(struct _id_list *id_list, int id) +{ + struct _id_list *idptr = id_list; + + while (idptr->string != NULL) + { + if (idptr->id == id) + return idptr->string; + idptr++; + } + + return "UNKNOWN"; +} + diff --git a/gsmdecode/src/id_list.h b/gsmdecode/src/id_list.h new file mode 100644 index 0000000..4493687 --- /dev/null +++ b/gsmdecode/src/id_list.h @@ -0,0 +1,15 @@ + +#ifndef __GSMSP_ID_LIST_H__ +#define __GSMSP_ID_LIST_H__ 1 + +struct _id_list +{ + int id; + const char *string; +}; + +const char *id_list_get(struct _id_list *id_list, int id); + +#endif /* !__GSMSP_COMMON_H__ */ + + diff --git a/gsmdecode/src/mcc_list.c b/gsmdecode/src/mcc_list.c new file mode 100644 index 0000000..f9e6f28 --- /dev/null +++ b/gsmdecode/src/mcc_list.c @@ -0,0 +1,1433 @@ + +#include "common.h" + +struct _mnc +{ + int mcc; + int mnc; + char *data; +}; + +struct _mcc +{ + int mcc; + char *data; +}; + +static struct _mcc mcc_list[] = { +{202 , "Greece"}, +{204 , "Netherlands"}, +{206 , "Belgium"}, +{208 , "France"}, +{212 , "Monaco"}, +{213 , "Andorra"}, +{214 , "Spain"}, +{216 , "Hungary"}, +{218 , "Bosnia and Herzegovina"}, +{219 , "Croatia"}, +{220 , "Serbia and Montenegro"}, +{222 , "Italy"}, +{225 , "Vatican City State"}, +{226 , "Romania"}, +{228 , "Switzerland"}, +{230 , "Czech Republic"}, +{231 , "Slovakia"}, +{232 , "Austria"}, +{234 , "United Kingdom"}, +{235 , "United Kingdom"}, +{238 , "Denmark"}, +{240 , "Sweden"}, +{242 , "Norway"}, +{244 , "Finland"}, +{246 , "Lithuania"}, +{247 , "Latvia"}, +{248 , "Estonia"}, +{250 , "Russian Federation"}, +{255 , "Ukraine"}, +{257 , "Belarus"}, +{259 , "Moldova"}, +{260 , "Poland"}, +{262 , "Germany"}, +{266 , "Gibraltar (UK)"}, +{268 , "Portugal"}, +{270 , "Luxembourg"}, +{272 , "Ireland"}, +{274 , "Iceland"}, +{276 , "Albania"}, +{278 , "Malta"}, +{280 , "Cyprus"}, +{282 , "Georgia"}, +{283 , "Armenia"}, +{284 , "Bulgaria"}, +{286 , "Turkey"}, +{288 , "Faroe Islands (Denmark)"}, +{290 , "Greenland (Denmark)"}, +{292 , "San Marino"}, +{293 , "Slovenia"}, +{294 , "Republic of Macedonia"}, +{295 , "Liechtenstein"}, +{302 , "Canada"}, +{308 , "Saint Pierre and Miquelon (France)"}, +{310 , "United States of America"}, +{311 , "United States of America"}, +{312 , "United States of America"}, +{313 , "United States of America"}, +{314 , "United States of America"}, +{315 , "United States of America"}, +{316 , "United States of America"}, +{330 , "Puerto Rico (US)"}, +{332 , "United States Virgin Islands (US)"}, +{334 , "Mexico"}, +{338 , "Jamaica"}, +{340 , "Guadeloupe (France)"}, +{340 , "Martinique (France)"}, +{342 , "Barbados"}, +{344 , "Antigua and Barbuda"}, +{346 , "Cayman Islands (UK)"}, +{348 , "British Virgin Islands (UK)"}, +{350 , "Bermuda (UK)"}, +{352 , "Grenada"}, +{354 , "Montserrat (UK)"}, +{356 , "Saint Kitts and Nevis"}, +{358 , "Saint Lucia"}, +{360 , "Saint Vincent and the Grenadines"}, +{362 , "Netherlands Antilles (Netherlands)"}, +{363 , "Aruba (Netherlands)"}, +{364 , "Bahamas"}, +{365 , "Anguilla"}, +{366 , "Dominica"}, +{368 , "Cuba"}, +{370 , "Dominican Republic"}, +{372 , "Haiti"}, +{374 , "Trinidad and Tobago"}, +{376 , "Turks and Caicos Islands (UK)"}, +{400 , "Azerbaijani Republic"}, +{401 , "Kazakhstan"}, +{402 , "Bhutan"}, +{404 , "India"}, +{405 , "India"}, +{410 , "Pakistan"}, +{412 , "Afghanistan"}, +{413 , "Sri Lanka"}, +{414 , "Myanmar"}, +{415 , "Lebanon"}, +{416 , "Jordan"}, +{417 , "Syria"}, +{418 , "Iraq"}, +{419 , "Kuwait"}, +{420 , "Saudi Arabia"}, +{421 , "Yemen"}, +{422 , "Oman"}, +{424 , "United Arab Emirates"}, +{425 , "Israel"}, +{426 , "Bahrain"}, +{427 , "Qatar"}, +{428 , "Mongolia"}, +{429 , "Nepal"}, +{430 , "United Arab Emirates (Abu Dhabi)"}, +{431 , "United Arab Emirates (Dubai)"}, +{432 , "Iran"}, +{434 , "Uzbekistan"}, +{436 , "Tajikistan"}, +{437 , "Kyrgyz Republic"}, +{438 , "Turkmenistan"}, +{440 , "Japan"}, +{441 , "Japan"}, +{450 , "Korea, South"}, +{452 , "Viet Nam"}, +{454 , "Hong Kong (PRC)"}, +{455 , "Macao (PRC)"}, +{456 , "Cambodia"}, +{457 , "Laos"}, +{460 , "China"}, +{466 , "Taiwan"}, +{467 , "Korea, North"}, +{470 , "Bangladesh"}, +{472 , "Maldives"}, +{502 , "Malaysia"}, +{505 , "Australia"}, +{510 , "Indonesia"}, +{514 , "East Timor"}, +{515 , "Philippines"}, +{520 , "Thailand"}, +{525 , "Singapore"}, +{528 , "Brunei Darussalam"}, +{530 , "New Zealand"}, +{534 , "Northern Mariana Islands (US)"}, +{535 , "Guam (US)"}, +{536 , "Nauru"}, +{537 , "Papua New Guinea"}, +{539 , "Tonga"}, +{540 , "Solomon Islands"}, +{541 , "Vanuatu"}, +{542 , "Fiji"}, +{543 , "Wallis and Futuna (France)"}, +{544 , "American Samoa (US)"}, +{545 , "Kiribati"}, +{546 , "New Caledonia (France)"}, +{547 , "French Polynesia (France)"}, +{548 , "Cook Islands (NZ)"}, +{549 , "Samoa"}, +{550 , "Federated States of Micronesia"}, +{551 , "Marshall Islands"}, +{552 , "Palau"}, +{602 , "Egypt"}, +{603 , "Algeria"}, +{604 , "Morocco"}, +{605 , "Tunisia"}, +{606 , "Libya"}, +{607 , "Gambia"}, +{608 , "Senegal"}, +{609 , "Mauritania"}, +{610 , "Mali"}, +{611 , "Guinea"}, +{612 , "Cte d'Ivoire"}, +{613 , "Burkina Faso"}, +{614 , "Niger"}, +{615 , "Togolese Republic"}, +{616 , "Benin"}, +{617 , "Mauritius"}, +{618 , "Liberia"}, +{619 , "Sierra Leone"}, +{620 , "Ghana"}, +{621 , "Nigeria"}, +{622 , "Chad"}, +{623 , "Central African Republic"}, +{624 , "Cameroon"}, +{625 , "Cape Verde"}, +{626 , "So Tom and Prncipe"}, +{627 , "Equatorial Guinea"}, +{628 , "Gabonese Republic"}, +{629 , "Republic of the Congo"}, +{630 , "Democratic Republic of the Congo"}, +{631 , "Angola"}, +{632 , "Guinea-Bissau"}, +{633 , "Seychelles"}, +{634 , "Sudan"}, +{635 , "Rwandese Republic"}, +{636 , "Ethiopia"}, +{637 , "Somalia"}, +{638 , "Djibouti"}, +{639 , "Kenya"}, +{640 , "Tanzania"}, +{641 , "Uganda"}, +{642 , "Burundi"}, +{643 , "Mozambique"}, +{645 , "Zambia"}, +{646 , "Madagascar"}, +{647 , "Runion (France)"}, +{648 , "Zimbabwe"}, +{649 , "Namibia"}, +{650 , "Malawi"}, +{651 , "Lesotho"}, +{652 , "Botswana"}, +{653 , "Swaziland"}, +{654 , "Comoros"}, +{655 , "South Africa"}, +{657 , "Eritrea"}, +{702 , "Belize"}, +{704 , "Guatemala"}, +{706 , "El Salvador"}, +{708 , "Honduras"}, +{710 , "Nicaragua"}, +{712 , "Costa Rica"}, +{714 , "Panama"}, +{716 , "Peru"}, +{722 , "Argentine Republic"}, +{724 , "Brazil"}, +{730 , "Chile"}, +{732 , "Colombia"}, +{734 , "Venezuela"}, +{736 , "Bolivia"}, +{738 , "Guyana"}, +{740 , "Ecuador"}, +{742 , "French Guiana (France)"}, +{744 , "Paraguay"}, +{746 , "Suriname"}, +{748 , "Uruguay"}, +{901, "SATALITE"}, +}; + +static struct _mnc mnc_list[] = { +{202, 10, "Telestet"}, +{202, 1, "Cosmote"}, +{202, 5, "Vodafone - Panafon"}, +{202, 9, "Info Quest S.A."}, +{204, 12, "BT Ignite Nederland B.V."}, +{204, 16, "BEN Nederland B.V."}, +{204, 20, "Dutchtone N.V."}, +{204, 21, "NS Railinfrabeheer B.V."}, +{204, 2, "Tele2 (Netherlands) B.V."}, +{204, 4, "Vodafone Libertel N.V."}, +{204, 8, "KPN Telecom B.V."}, +{206, 10, "Mobistar"}, +{206, 1, "Proximus"}, +{206, 20, "Base"}, +{208, 10, "S.F.R."}, +{208, 11, "S.F.R. (UMTS)"}, +{208, 13, "SFR (Zones Blanches)"}, +{208, 1, "Orange France"}, +{208, 20, "Bouygues Telecom"}, +{208, 21, "Bouygues Telecom"}, +{208, 2, "Orange France"}, +{208, 5, "Globalstar Europe"}, +{208, 6, "Globalstar Europe"}, +{208, 7, "Globalstar Europe"}, +{208, 88, "Bouygues Telecom (Zones Blanches)"}, +{213, 3, "Mobiland"}, +{214, 1, "Vodafone"}, +{214, 3, "Amena"}, +{214, 4, "Xfera"}, +{214, 7, "Movistar"}, +{216, 1, "Pannon GSM"}, +{216, 30, "Westel Mobile"}, +{216, 70, "Vodafone"}, +{218, 3, "Eronet Mobile Communications Ltd."}, +{218, 5, "MOBI'S (Mobilina Srpske)"}, +{218, 90, "GSMBIH"}, +{219, 10, "VIPnet/VIPnet d.o.o."}, +{219, 1, "T-Mobile Hrvatska d.o.o./T-Mobile Croatia LLC"}, +{219, 2, "Tele2/Tele2 d.o.o."}, +{220, 1, "Telenor d.o.o."}, +{220, 3, "Telekom Srbija a.d."}, +{220, 5, "Vip mobile d.o.o."}, +{222, 10, "Omnitel Pronto Italia (OPI)"}, +{222, 1, "Telecom Italia Mobile (TIM)"}, +{222, 2, "Elsacom"}, +{222, 77, "IPSE 2000"}, +{222, 88, "Wind"}, +{222, 98, "Blu"}, +{222, 99, "H3G"}, +{226, 10, "Orange Romania"}, +{226, 1, "Vodafone Romania SA"}, +{226, 3, "Cosmorom"}, +{228, 12, "TDC Switzerland AG"}, +{228, 1, "Swisscom Mobile AG"}, +{228, 2, "TDC Switzerland AG"}, +{228, 3, "Orange Communications SA"}, +{228, 51, "Bebbicell AG"}, +{228, 5, "Comfone AG"}, +{228, 6, "SBB AG"}, +{228, 7, "IN&Phone SA"}, +{228, 8, "Tele2 Telecommunications AG"}, +{230, 1, "T-Mobile Czech Republic a.s."}, +{230, 2, "Telefnica O2 Czech Republic a.s."}, +{230, 3, "Vodafone Czech Republic a.s."}, +{230, 4, "Mobilkom a.s."}, +{230, 98, "Sprava Zeleznicni Dopravni Cesty"}, +{230, 99, "Vodafone Czech Republic a.s. R&D Centre"}, +{231, 1, "Orange, GSM"}, +{231, 2, "Eurotel, GSM & NMT"}, +{231, 4, "Eurotel, UMTS"}, +{231, 5, "Orange, UMTS"}, +{232, 10, "Hutchison 3G Austria"}, +{232, 1, "A1"}, +{232, 3, "T-Mobile"}, +{232, 5, "One"}, +{232, 7, "tele.ring"}, +{232, 8, "Telefonica Austria"}, +{232, 9, "One"}, +{234, 0, "British Telecom"}, +{234, 10, "O2 UK Ltd."}, +{234, 11, "O2 UK Ltd."}, +{234, 12, "Ntework Rail Infrastructure Ltd"}, +{234, 13, "Ntework Rail Infrastructure Ltd"}, +{234, 14, "Hay Systems Ltd"}, +{234, 15, "Vodafone Ltd."}, +{234, 16, "Opal Telecom Ltd"}, +{234, 17, "Flextel Ltd"}, +{234, 18, "Wire9 Telecom plc"}, +{234, 19, "Teleware plc"}, +{234, 1, "Mapesbury Communications Ltd."}, +{234, 20, "Hutchison 3G UK Ltd."}, +{234, 2, "O2 UK Ltd."}, +{234, 30, "T-Mobile UK"}, +{234, 31, "T-Mobile UK"}, +{234, 32, "T-Mobile UK"}, +{234, 33, "Orange"}, +{234, 34, "Orange"}, +{234, 3, "Jersey Telenet Ltd"}, +{234, 4, "FMS Solutions Ltd"}, +{234, 50, "Jersey Telecom"}, +{234, 55, "Cable and Wireless Guensey Ltd"}, +{234, 58, "Manx Telecom"}, +{234, 5, "Colt Mobile Telecommunications Ltd"}, +{234, 6, "Internet One Ltd"}, +{234, 75, "Inquam Telecom (Holdings) Ltd."}, +{234, 76, "British Telecom"}, +{234, 78, "Airwave mmO2 Ltd"}, +{234, 7, "Cable and Wireless plc"}, +{234, 9, "Wire9 Telecom plc"}, +{238, 10, "TDC Mobil"}, +{238, 1, "TDC Mobil"}, +{238, 20, "Telia"}, +{238, 2, "Sonofon"}, +{238, 30, "Telia Mobile"}, +{238, 3, "MIGway A/S"}, +{238, 6, "Hi3G"}, +{238, 77, "Tele2"}, +{238, 7, "Barablu Mobile Ltd."}, +{240, 10, "Spring Mobil AB"}, +{240, 11, "Linholmen Science Park AB"}, +{240, 12, "Barablu Mobile Scandinavia Ltd"}, +{240, 13, "Ventelo Sverige AB"}, +{240, 14, "TDC Mobil A/S"}, +{240, 15, "Wireless Maingate Nordic AB"}, +{240, 16, "42IT AB"}, +{240, 1, "Telia Sonera AB"}, +{240, 20, "Wireless Maingate Message Services AB"}, +{240, 21, "Banverket"}, +{240, 2, "H3G Access AB"}, +{240, 3, "Nordisk Mobiltelefon AS"}, +{240, 4, "3G Infrastructure Services AB"}, +{240, 5, "Svenska UMTS-Nt AB"}, +{240, 6, "Telenor Sverige AB"}, +{240, 7, "Tele2 Sverige AB"}, +{240, 8, "Telenor Sverige AB"}, +{240, 9, "Telenor Mobile Sverige"}, +{242, 1, "Telenor Mobil AS"}, +{242, 2, "Netcom GSM AS"}, +{242, 3, "Teletopia Mobile Communications AS"}, +{242, 4, "Tele2 Norge AS"}, +{244, 12, "Finnet Networks Ltd."}, +{244, 14, "Alands Mobiltelefon AB"}, +{244, 16, "Oy Finland Tele2 AB"}, +{244, 21, "Saunalahti Group Ltd."}, +{244, 4, "Finnet Networks Ltd."}, +{244, 5, "Elisa Matkapuhelinpalvelut Ltd."}, +{244, 91, "Sonera Carrier Networks Oy"}, +{244, 9, "Finnet Group"}, +{246, 1, "Omnitel"}, +{246, 2, "Bit GSM"}, +{246, 3, "Tele2"}, +{247, 1, "Latvian Mobile Phone"}, +{247, 2, "Tele2"}, +{247, 3, "Telekom Baltija"}, +{247, 4, "Beta Telecom"}, +{248, 1, "EMT GSM"}, +{248, 2, "RLE"}, +{248, 3, "Tele2"}, +{248, 4, "OY Top Connect"}, +{248, 5, "AS Bravocom Mobiil"}, +{248, 6, "OY ViaTel"}, +{248, 71, "Siseministeerium (Ministry of Interior)"}, +{248, 7, "Televrgu AS"}, +{250, 10, "Don Telecom"}, +{250, 11, "Orensot"}, +{250, 12, "Baykal Westcom"}, +{250, 13, "Kuban GSM"}, +{250, 16, "New Telephone Company"}, +{250, 17, "Ermak RMS"}, +{250, 19, "Volgograd Mobile"}, +{250, 1, "Mobile Telesystems"}, +{250, 20, "ECC"}, +{250, 28, "Extel"}, +{250, 2, "Megafon"}, +{250, 39, "Uralsvyazinform"}, +{250, 3, "Nizhegorodskaya Cellular Communications"}, +{250, 44, "Stuvtelesot"}, +{250, 4, "Sibchallenge"}, +{250, 5, "Mobile Comms System"}, +{250, 7, "BM Telecom"}, +{250, 92, "Printelefone"}, +{250, 93, "Telecom XXI"}, +{250, 99, "Bec Line GSM"}, +{255, 1, "Ukrainian Mobile Communication, UMC"}, +{255, 21, "CJSC - Telesystems of Ukraine"}, +{255, 2, "Ukranian Radio Systems, URS"}, +{255, 3, "Kyivstar GSM"}, +{255, 4, "International Telecommunications Ltd."}, +{255, 5, "Golden Telecom"}, +{255, 6, "Astelit"}, +{255, 7, "Ukrtelecom"}, +{257, 1, "MDC Velcom"}, +{257, 2, "MTS"}, +{259, 1, "Orange Moldova GSM"}, +{259, 2, "Moldcell GSM"}, +{259, 4, "Eventis Mobile GSM"}, +{260, 10, "Telefony Opalenickie"}, +{260, 1, "Plus GSM (Polkomtel S.A.)"}, +{260, 2, "ERA GSM (Polska Telefonia Cyfrowa Sp. Z.o.o.)"}, +{260, 3, "Idea (Polska Telefonia Komrkowa Centertel Sp. Z.o.o)"}, +{260, 4, "Tele2 Polska (Tele2 Polska Sp. Z.o.o.)"}, +{260, 5, "IDEA (UMTS)/PTK Centertel sp. Z.o.o."}, +{260, 6, "Netia Mobile"}, +{260, 7, "Premium internet"}, +{260, 8, "E-Telko"}, +{260, 9, "Telekomunikacja Kolejowa (GSM-R)"}, +{262, 10, "Arcor AG & Co."}, +{262, 11, "O2 (Germany) GmbH & Co. OHG"}, +{262, 12, "Dolphin Telecom (Deutschland) GmbH"}, +{262, 13, "Mobilcom Multimedia GmbH"}, +{262, 14, "Group 3G UMTS GmbH (Quam)"}, +{262, 15, "Airdata AG"}, +{262, 1, "T-Mobile Deutschland GmbH"}, +{262, 2, "Vodafone D2 GmbH"}, +{262, 3, "E-Plus Mobilfunk GmbH & Co. KG"}, +{262, 4, "Vodafone D2 GmbH"}, +{262, 5, "E-Plus Mobilfunk GmbH & Co. KG"}, +{262, 6, "T-Mobile Deutschland GmbH"}, +{262, 76, "Siemens AG, ICMNPGUSTA"}, +{262, 77, "E-Plus Mobilfunk GmbH & Co. KG"}, +{262, 7, "O2 (Germany) GmbH & Co. OHG"}, +{262, 8, "O2 (Germany) GmbH & Co. OHG"}, +{262, 9, "Vodafone D2 GmbH"}, +{266, 1, "Gibtelecom GSM"}, +{266, 9, "Cloud9 Mobile Communications"}, +{268, 1, "Vodafone Telecel - Comunicaes Pessoais, S.A."}, +{268, 3, "Optimus - Telecomunicaes, S.A."}, +{268, 5, "Oniway - Inforcomunicaes, S.A."}, +{268, 6, "TMN - Telecomunicaes Movis Nacionais, S.A."}, +{270, 1, "P&T Luxembourg"}, +{270, 77, "Tango"}, +{270, 99, "Voxmobile S.A."}, +{272, 1, "Vodafone Ireland Plc"}, +{272, 2, "Digifone mm02 Ltd."}, +{272, 3, "Meteor Mobile Communications Ltd."}, +{272, 7, "Eircom"}, +{272, 9, "Clever Communications Ltd."}, +{274, 1, "Iceland Telecom Ltd."}, +{274, 2, "Tal hf"}, +{274, 3, "Islandssimi GSM ehf"}, +{274, 4, "IMC Islande ehf"}, +{274, 7, "IceCell ehf"}, +{276, 1, "AMC"}, +{276, 2, "Vodafone Albania"}, +{276, 3, "Eagle Mobile"}, +{278, 1, "Vodafone Malta"}, +{278, 21, "go mobile"}, +{280, 10, "Scancom (Cyprus) Ltd."}, +{280, 1, "CYTA"}, +{282, 1, "Geocell Ltd."}, +{282, 2, "Magti GSM Ltd."}, +{282, 3, "Iberiatel Ltd."}, +{282, 4, "Mobitel Ltd."}, +{284, 1, "M-Tel GSM BG"}, +{284, 5, "Globul"}, +{286, 1, "Turkcell"}, +{286, 2, "Telsim GSM"}, +{286, 3, "Aria"}, +{286, 4, "Aycell"}, +{288, 1, "Faroese Telecom - GSM"}, +{288, 2, "Kall GSM"}, +{290, 1, "Tele Greenland"}, +{292, 1, "SMT - San Marino Telecom"}, +{293, 40, "SI Mobil"}, +{293, 41, "Mobitel"}, +{293, 64, "T-2 d.o.o."}, +{293, 70, "Tusmobil d.o.o."}, +{294, 1, "T-Mobile"}, +{294, 2, "Cosmofon"}, +{294, 3, "Nov Operator"}, +{295, 1, "Telecom FL AG"}, +{295, 2, "Viag Europlatform AG"}, +{295, 5, "Mobilkom (Liechstein) AG"}, +{295, 77, "Tele2 AG"}, +{297, 3, "MTEL d.o.o. Podgorica"}, +{302, 36, "Clearnet"}, +{302, 37, "Microcell"}, +{302, 62, "Ice Wireless"}, +{302, 63, "Aliant Mobility"}, +{302, 64, "Bell Mobility"}, +{302, 656, "Tbay Mobility"}, +{302, 66, "MTS Mobility"}, +{302, 67, "CityTel Mobility"}, +{302, 68, "Sask Tel Mobility"}, +{302, 71, "Globalstar"}, +{302, 72, "Rogers Wireless"}, +{302, 86, "Telus Mobility"}, +{308, 1, "St. Pierre-et-Miquelon Tlcom"}, +{310, 100, "New Mexico RSA 4 East Ltd. Partnership"}, +{310, 10, "MCI"}, +{310, 110, "Pacific Telecom Inc"}, +{310, 120, "Sprint"}, +{310, 12, "Verizon Wireless"}, +{310, 130, "Carolina West Wireless"}, +{310, 13, "Mobile Tel Inc."}, +{310, 140, "GTA Wireless LLC"}, +{310, 150, "Cingular Wireless"}, +{310, 160, "T-Mobile USA"}, +{310, 16, "Cricket Communications"}, +{310, 170, "Cingular Wireless"}, +{310, 17, "North Sight Communications Inc."}, +{310, 180, "West Central Wireless"}, +{310, 190, "Alaska Wireless Communications LLC"}, +{310, 200, "T-Mobile USA"}, +{310, 20, "Union Telephone Company"}, +{310, 210, "T-Mobile USA"}, +{310, 220, "T-Mobile USA"}, +{310, 230, "T-Mobile USA"}, +{310, 240, "T-Mobile USA"}, +{310, 250, "T-Mobile USA"}, +{310, 260, "T-Mobile USA"}, +{310, 270, "T-Mobile USA"}, +{310, 280, "Contennial Puerto Rio License Corp."}, +{310, 290, "Nep Cellcorp Inc."}, +{310, 30, "Centennial Communications"}, +{310, 310, "T-Mobile USA"}, +{310, 320, "Smith Bagley Inc, dba Cellular One"}, +{310, 330, "AN Subsidiary LLC"}, +{310, 340, "High Plains Midwest LLC, dba Wetlink Communications"}, +{310, 34, "Nevada Wireless LLC"}, +{310, 350, "Mohave Cellular L.P."}, +{310, 360, "Cellular Network Partnership dba Pioneer Cellular"}, +{310, 370, "Guamcell Cellular and Paging"}, +{310, 380, "New Cingular Wireless PCS, LLC"}, +{310, 390, "TX-11 Acquistion LLC"}, +{310, 400, "Wave Runner LLC"}, +{310, 40, "MTA Communications dba MTA Wireless"}, +{310, 410, "Cingular Wireless"}, +{310, 420, "Cincinnati Bell Wireless LLC"}, +{310, 430, "Alaska Digitel LLC"}, +{310, 440, "Numerex Corp."}, +{310, 450, "North East Cellular Inc."}, +{310, 460, "TMP Corporation"}, +{310, 480, "Choice Phone LLC"}, +{310, 490, "SunCom Wireless"}, +{310, 500, "Public Service Cellular, Inc."}, +{310, 50, "ACS Wireless Inc."}, +{310, 510, "Airtel Wireless LLC"}, +{310, 520, "VeriSign"}, +{310, 540, "Oklahoma Western Telephone Company"}, +{310, 550, "Wireless Solutions International"}, +{310, 560, "American Cellular Corporation"}, +{310, 570, "MTPCS LLC"}, +{310, 580, "Inland Cellular Telephone Company"}, +{310, 590, "Western Wireless Corporation"}, +{310, 600, "New Cell Inc. dba Cellcom"}, +{310, 60, "Consolidated Telcom"}, +{310, 610, "Elkhart Telephone Co. Inc. dba Epic Touch Co."}, +{310, 620, "Coleman County Telecommunications Inc. (Trans Texas PCS)"}, +{310, 640, "Airadigm Communications"}, +{310, 650, "Jasper Wireless Inc."}, +{310, 660, "T-Mobile USA"}, +{310, 670, "AT&T Mobility Vanguard Services"}, +{310, 690, "Conestoga Wireless Company"}, +{310, 700, "Cross Valiant Cellular Partnership"}, +{310, 70, "Highland Cellular, Inc."}, +{310, 710, "Arctic Slopo Telephone Association Cooperative"}, +{310, 720, "Wireless Solutions International Inc."}, +{310, 730, "Sea Mobile"}, +{310, 750, "East Kentucky Network LLC dba Appalachian Wireless"}, +{310, 760, "Panhandle Telecommunications Systems Inc."}, +{310, 770, "Iowa Wireless Services LLC dba I Wireless"}, +{310, 780, "Connect Net Inc"}, +{310, 790, "PinPoint Communications Inc."}, +{310, 800, "T-Mobile USA"}, +{310, 80, "Corr Wireless Communications LLC"}, +{310, 810, "Brazos Cellular Communications Ltd."}, +{310, 820, "South Canaan Cellular Communications Co. LP"}, +{310, 830, "Caprock Cellular Ltd. Partnership"}, +{310, 840, "Edge Mobile LLC"}, +{310, 850, "Aeris Communications, Inc."}, +{310, 860, "TX RSA 15B2, LP dba Five Star Wireless"}, +{310, 870, "Kaplan Telephone Company Inc."}, +{310, 880, "Advantage Cellular Systems, Inc."}, +{310, 890, "Rural Cellular Corporation"}, +{310, 900, "Taylor Telecommunications Ltd."}, +{310, 90, "Edge Wireless LLC"}, +{310, 910, "Southern IL RSA Partnership dba First Cellular of Southern Illinois"}, +{310, 920, "Get Mobile"}, +{310, 930, "Copper Valley Wireless"}, +{310, 950, "Texas RSA 1 dba XIT Cellular"}, +{310, 960, "UBET Wireless"}, +{310, 970, "Globalstar USA"}, +{310, 980, "New Cingular Wireless PCS LLC"}, +{311, 0, "Mid-Tex Cellular Ltd."}, +{311, 10, "Chariton Valley Communications Corp., Inc."}, +{311, 110, "Alltel Communications Inc"}, +{311, 120, "Choice Phone LLC"}, +{311, 140, "MBO Wireless Inc./Cross Telephone Company"}, +{311, 150, "Wilkes Cellular Inc."}, +{311, 170, "PetroCom LLC"}, +{311, 180, "Cingular Wireless, Licensee Pacific Telesis Mobile "}, +{311, 190, "Cellular Properties Inc."}, +{311, 200, "ARINC"}, +{311, 20, "Missouri RSA No. 5 Partnership"}, +{311, 210, "Farmers Cellular Telephone"}, +{311, 230, "Cellular South Inc."}, +{311, 240, "Cordova Wireless Communications Inc"}, +{311, 250, "Wave Runner LLC"}, +{311, 260, "SLO Cellular Inc. dba CellularOne of San Luis Obispo"}, +{311, 270, "Alltel Communications Inc."}, +{311, 271, "Alltel Communications Inc."}, +{311, 272, "Alltel Communications Inc."}, +{311, 273, "Alltel Communications Inc."}, +{311, 274, "Alltel Communications Inc."}, +{311, 275, "Alltel Communications Inc."}, +{311, 276, "Alltel Communications Inc."}, +{311, 277, "Alltel Communications Inc."}, +{311, 278, "Alltel Communications Inc."}, +{311, 279, "Alltel Communications Inc."}, +{311, 280, "Verizon Wireless"}, +{311, 281, "Verizon Wireless"}, +{311, 282, "Verizon Wireless"}, +{311, 283, "Verizon Wireless"}, +{311, 284, "Verizon Wireless"}, +{311, 285, "Verizon Wireless"}, +{311, 286, "Verizon Wireless"}, +{311, 287, "Verizon Wireless"}, +{311, 288, "Verizon Wireless"}, +{311, 289, "Verizon Wireless"}, +{311, 290, "Pinpoint Wireless Inc."}, +{311, 300, "Rutal Cellular Corporation"}, +{311, 30, "Indigo Wireless, Inc."}, +{311, 310, "Leaco Rural Telephone Company Inc"}, +{311, 320, "Commnet Wireless LLC"}, +{311, 330, "Bag Tussel Wireless LLC"}, +{311, 340, "Illinois Valley Cellular"}, +{311, 350, "Torrestar Networks Inc"}, +{311, 360, "Stelera Wireless LLC"}, +{311, 370, "GCI Communications Corp."}, +{311, 380, "GreenFly LLC"}, +{311, 390, "Midwest Wireless Holdings LLC"}, +{311, 400, "New Cingular Wireless PCS LLC"}, +{311, 40, "Commet Wireless, LLC"}, +{311, 410, "Iowa RSA No.2 Ltd Partnership"}, +{311, 420, "Northwest Missouri Cellular Limited Partnership"}, +{311, 430, "RSA 1 Limited Partnership dba Cellular 29 Plus"}, +{311, 440, "Bluegrass Cellular LLC"}, +{311, 450, "Panhandle Telecommunication Systems Inc."}, +{311, 460, "Fisher Wireless Services Inc"}, +{311, 470, "Vitelcom Cellular Inc dba Innovative Wireless"}, +{311, 480, "Verizon Wireless"}, +{311, 481, "Verizon Wireless"}, +{311, 482, "Verizon Wireless"}, +{311, 483, "Verizon Wireless"}, +{311, 484, "Verizon Wireless"}, +{311, 485, "Verizon Wireless"}, +{311, 486, "Verizon Wireless"}, +{311, 487, "Verizon Wireless"}, +{311, 488, "Verizon Wireless"}, +{311, 489, "Verizon Wireless"}, +{311, 490, "Strata8 Networks Inc/Wirefree Partners LLC"}, +{311, 500, "CTC Telecom Inc"}, +{311, 50, "Thumb Cellular Limited Partnership"}, +{311, 510, "Benton-Lian Wireless"}, +{311, 520, "Crossroads Wireless Inc"}, +{311, 530, "Wireless Communications Venture"}, +{311, 540, "Keystone Wireless Inc"}, +{311, 550, "Commnet Midwest LLC"}, +{311, 60, "Space Data Corporation"}, +{311, 70, "Easterbrooke Cellular Corporation"}, +{311, 80, "Pine Telephone Company dba Pine Cellular"}, +{311, 90, "Siouxland PCS"}, +{316, 10, "Nextel Communications Inc."}, +{316, 11, "Southern Communications Services Inc."}, +{334, 20, "Telcel"}, +{338, 20, "Cable & Wireless Jamaica Ltd."}, +{338, 50, "Mossel (Jamaica) Ltd."}, +{340, 1, "Orange Carabe Mobiles"}, +{340, 20, "Bouygues Telecom Carabe"}, +{340, 2, "Outremer Telecom"}, +{340, 3, "Saint Martin et Saint Barthelemy Telcell Sarl"}, +{342, 600, "Cable & Wireless (Barbados) Ltd."}, +{342, 820, "Sunbeach Communications"}, +{344, 30, "APUA PCS"}, +{344, 920, "Cable & Wireless (Antigua)"}, +{344, 930, "AT&T Wireless (Antigua)"}, +{346, 140, "Cable & Wireless (Cayman)"}, +{348, 570, "Caribbean Cellular Telephone, Boatphone Ltd."}, +{362, 51, "TELCELL GSM"}, +{362, 69, "CT GSM"}, +{362, 91, "SETEL GSM"}, +{363, 1, "Setar GSM"}, +{365, 10, "Weblinks Limited"}, +{368, 1, "ETECSA"}, +{370, 1, "Orange Dominicana, S.A."}, +{370, 2, "Verizon Dominicana S.A."}, +{370, 3, "Tricom S.A."}, +{370, 4, "CentennialDominicana"}, +{372, 1, "Comcel"}, +{372, 2, "Digicel"}, +{372, 3, "Rectel"}, +{374, 12, "TSTT Mobile"}, +{374, 130, "Digicel Trinidad and Tobago Ltd."}, +{374, 140, "LaqTel Ltd."}, +{376, 352, "IslandCom Communications Ltd."}, +{400, 1, "Azercell Limited Liability Joint Venture"}, +{400, 2, "Bakcell Limited Liabil ity Company"}, +{400, 3, "Catel JV"}, +{400, 4, "Azerphone LLC"}, +{401, 1, "Kar-Tel llc"}, +{401, 2, "TSC Kazak Telecom"}, +{402, 11, "Bhutan Telecom Ltd"}, +{402, 17, "B-Mobile of Bhutan Telecom"}, +{404, 10, "Bharti Cellular Ltd."}, +{404, 11, "Sterling Cellular Ltd."}, +{404, 12, "Escotel Mobile Communications Pvt Ltd."}, +{404, 13, "Hutchinson Essar South Ltd."}, +{404, 14, "Spice Communications Ltd."}, +{404, 15, "Aircell Digilink India Ltd."}, +{404, 16, "Hexcom India"}, +{404, 18, "Reliance Telecom Private Ltd."}, +{404, 19, "Escotel Mobile Communications Pvt Ltd."}, +{404, 1, "Aircell Digilink India Ltd.,"}, +{404, 20, "Hutchinson Max Telecom"}, +{404, 21, "BPL Mobile Communications Ltd."}, +{404, 22, "Idea Cellular Ltd."}, +{404, 24, "Idea Cellular Ltd."}, +{404, 27, "BPL Cellular Ltd."}, +{404, 2, "Bharti Mobile Ltd."}, +{404, 30, "Usha Martin Telecom Ltd."}, +{404, 31, "Bharti Mobinet Ltd."}, +{404, 34, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 36, "Reliance Telecom Private Ltd."}, +{404, 38, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 3, "Bharti Telenet Ltd."}, +{404, 40, "Bharti Mobinet Ltd."}, +{404, 41, "RPG Cellular"}, +{404, 42, "Aircel Ltd."}, +{404, 43, "BPL Mobile Cellular Ltd."}, +{404, 44, "Spice Communications Ltd."}, +{404, 46, "BPL Cellular Ltd."}, +{404, 49, "Bharti Mobile Ltd."}, +{404, 4, "Idea Cellular Ltd."}, +{404, 50, "Reliance Telecom Private Ltd."}, +{404, 51, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 52, "Reliance Telecom Private Ltd."}, +{404, 53, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 54, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 55, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 56, "Escotel Mobile Communications Pvt Ltd."}, +{404, 57, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 58, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 59, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 5, "Fascel Ltd."}, +{404, 60, "Aircell Digilink India Ltd."}, +{404, 62, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 64, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 66, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 67, "Reliance Telecom Private Ltd."}, +{404, 68, "Mahanagar Telephone Nigam Ltd."}, +{404, 69, "Mahanagar Telephone Nigam Ltd."}, +{404, 6, "Bharti Mobile Ltd."}, +{404, 70, "Hexicom India"}, +{404, 71, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 72, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 73, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 74, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 75, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 76, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 77, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 78, "BTA Cellcom Ltd."}, +{404, 7, "Idea Cellular Ltd."}, +{404, 80, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 81, "Bharat Sanchar Nigam Ltd. (BSNL)"}, +{404, 82, "Escorts Telecom Ltd."}, +{404, 83, "Reliable Internet Services Ltd."}, +{404, 84, "Hutchinson Essar South Ltd."}, +{404, 85, "Reliance Telecom Private Ltd."}, +{404, 86, "Hutchinson Essar South Ltd."}, +{404, 87, "Escorts Telecom Ltd."}, +{404, 88, "Escorts Telecom Ltd."}, +{404, 89, "Escorts Telecom Ltd."}, +{404, 90, "Bharti Cellular Ltd."}, +{404, 92, "Bharti Cellular Ltd."}, +{404, 93, "Bharti Cellular Ltd."}, +{404, 94, "Bharti Cellular Ltd."}, +{404, 95, "Bharti Cellular Ltd."}, +{404, 96, "Bharti Cellular Ltd."}, +{404, 97, "Bharti Cellular Ltd."}, +{404, 98, "Bharti Cellular Ltd."}, +{404, 9, "Reliance Telecom Private Ltd."}, +{410, 1, "Mobilink"}, +{410, 3, "PAK Telecom Mobile Ltd. (UFONE)"}, +{412, 1, "AWCC"}, +{412, 20, "Roshan"}, +{412, 30, "New1"}, +{412, 40, "Areeba Afghanistan"}, +{412, 88, "Afghan Telecom"}, +{413, 2, "MTN Network Ltd."}, +{413, 3, "Celtel Lanka Ltd."}, +{414, 1, "Myanmar Post and Telecommunication"}, +{415, 32, "Cellis"}, +{415, 33, "Cellis"}, +{415, 34, "Cellis"}, +{415, 35, "Cellis"}, +{415, 36, "Libancell"}, +{415, 37, "Libancell"}, +{415, 38, "Libancell"}, +{415, 39, "Libancell"}, +{416, 1, "Fastlink"}, +{416, 2, "Xpress"}, +{416, 3, "Umniah"}, +{416, 77, "Mobilecom"}, +{417, 1, "Syriatel"}, +{417, 2, "Spacetel Syria"}, +{417, 9, "Syrian Telecom"}, +{419, 2, "Mobile Telecommunications Company"}, +{419, 3, "Wataniya Telecom"}, +{420, 1, "Saudi Telecom"}, +{420, 3, "Etihad Etisalat Company (Mobily)"}, +{421, 1, "Yemen Mobile Phone Company"}, +{421, 2, "Spacetel Yemen"}, +{422, 2, "Oman Mobile Telecommunications Company (Oman Mobile)"}, +{422, 3, "Oman Qatari Telecommunications Company (Nawras)"}, +{422, 4, "Oman Telecommunications Company (Omantel)"}, +{424, 2, "Etisalat"}, +{425, 1, "Partner Communications Co. Ltd."}, +{425, 2, "Cellcom Israel Ltd."}, +{425, 3, "Pelephone Communications Ltd."}, +{426, 1, "BHR Mobile Plus"}, +{427, 1, "QATARNET"}, +{428, 99, "Mobicom"}, +{429, 1, "Nepal Telecommunications"}, +{432, 11, "Telecommunication Company of Iran (TCI)"}, +{432, 14, "Telecommunication Kish Co. (KIFZO)"}, +{432, 19, "Telecommunication Company of Iran (TCI) - Isfahan Celcom "}, +{434, 1, "Buztel"}, +{434, 2, "Uzmacom"}, +{434, 4, "Daewoo Unitel"}, +{434, 5, "Coscom"}, +{434, 7, "Uzdunrobita"}, +{436, 1, "JC Somoncom"}, +{436, 2, "CJSC Indigo Tajikistan"}, +{436, 3, "TT mobile"}, +{436, 4, "Josa Babilon-T"}, +{436, 5, "CTJTHSC Tajik-tel"}, +{437, 1, "Bitel GSM"}, +{438, 1, "Barash Communication Technologies (BCTI)"}, +{438, 2, "TM-Cell"}, +{440, 10, "NTT DoCoMo Kansai Inc."}, +{440, 11, "NTT DoCoMo Tokai Inc."}, +{440, 12, "NTT DoCoMo Inc."}, +{440, 13, "NTT DoCoMo Inc."}, +{440, 14, "NTT DoCoMo Tohoku Inc."}, +{440, 15, "NTT DoCoMo Inc."}, +{440, 16, "NTT DoCoMo Inc."}, +{440, 17, "NTT DoCoMo Inc."}, +{440, 18, "NTT DoCoMo Tokai Inc."}, +{440, 19, "NTT DoCoMo Hokkaido"}, +{440, 1, "NTT DoCoMo, Inc."}, +{440, 20, "NTT DoCoMo Hokuriku Inc."}, +{440, 21, "NTT DoCoMo Inc."}, +{440, 22, "NTT DoCoMo Kansai Inc."}, +{440, 23, "NTT DoCoMo Tokai Inc."}, +{440, 24, "NTT DoCoMo Chugoku Inc."}, +{440, 25, "NTT DoCoMo Hokkaido Inc."}, +{440, 26, "NTT DoCoMo Kyushu Inc."}, +{440, 27, "NTT DoCoMoTohoku Inc."}, +{440, 28, "NTT DoCoMo Shikoku Inc."}, +{440, 29, "NTT DoCoMo Inc."}, +{440, 2, "NTT DoCoMo Kansai, Inc."}, +{440, 30, "NTT DoCoMo Inc."}, +{440, 31, "NTT DoCoMo Kansai Inc."}, +{440, 32, "NTT DoCoMo Inc."}, +{440, 33, "NTT DoCoMo Tokai Inc."}, +{440, 34, "NTT DoCoMo Kyushu Inc."}, +{440, 35, "NTT DoCoMo Kansai Inc."}, +{440, 36, "NTT DoCoMo Inc."}, +{440, 37, "NTT DoCoMo Inc."}, +{440, 38, "NTT DoCoMo Inc."}, +{440, 39, "NTT DoCoMo Inc."}, +{440, 3, "NTT DoCoMo Hokuriku, Inc."}, +{440, 40, "Vodafone"}, +{440, 41, "Vodafone"}, +{440, 42, "Vodafone"}, +{440, 43, "Vodafone"}, +{440, 44, "Vodafone"}, +{440, 45, "Vodafone"}, +{440, 46, "Vodafone"}, +{440, 47, "Vodafone"}, +{440, 48, "Vodafone"}, +{440, 49, "NTT DoCoMo Inc."}, +{440, 4, "Vodafone"}, +{440, 50, "KDDI Corporation"}, +{440, 51, "KDDI Corporation"}, +{440, 52, "KDDI Corporation"}, +{440, 53, "KDDI Corporation"}, +{440, 54, "KDDI Corporation"}, +{440, 55, "KDDI Corporation"}, +{440, 56, "KDDI Corporation"}, +{440, 58, "NTT DoCoMo Kansai Inc."}, +{440, 60, "NTT DoCoMo Kansai Inc."}, +{440, 61, "NTT DoCoMo Chugoku Inc."}, +{440, 62, "NTT DoCoMo Kyushu Inc."}, +{440, 63, "NTT DoCoMo Inc."}, +{440, 64, "NTT DoCoMo Inc."}, +{440, 65, "NTT DoCoMo Shikoku Inc."}, +{440, 66, "NTT DoCoMo Inc."}, +{440, 67, "NTT DoCoMo Tohoku Inc."}, +{440, 68, "NTT DoCoMo Kyushu Inc."}, +{440, 69, "NTT DoCoMo Inc."}, +{440, 6, "Vodafone"}, +{440, 70, "KDDI Corporation"}, +{440, 71, "KDDI Corporation"}, +{440, 72, "KDDI Corporation"}, +{440, 73, "KDDI Corporation"}, +{440, 74, "KDDI Corporation"}, +{440, 75, "KDDI Corporation"}, +{440, 76, "KDDI Corporation"}, +{440, 77, "KDDI Corporation"}, +{440, 78, "Okinawa Cellular Telephone"}, +{440, 79, "KDDI Corporation"}, +{440, 7, "KDDI Corporation"}, +{440, 80, "TU-KA Cellular Tokyo Inc."}, +{440, 81, "TU-KA Cellular Tokyo Inc."}, +{440, 82, "TU-KA Phone Kansai Inc."}, +{440, 83, "TU-KA Cellular Tokai Inc."}, +{440, 84, "TU-KA Phone Kansai Inc."}, +{440, 85, "TU-KA Cellular Tokai Inc."}, +{440, 86, "TU-KA Cellular Tokyo Inc."}, +{440, 87, "NTT DoCoMo Chugoku Inc."}, +{440, 88, "KDDI Corporation"}, +{440, 89, "KDDI Corporation"}, +{440, 8, "KDDI Corporation"}, +{440, 90, "Vodafone"}, +{440, 92, "Vodafone"}, +{440, 93, "Vodafone"}, +{440, 94, "Vodafone"}, +{440, 95, "Vodafone"}, +{440, 96, "Vodafone"}, +{440, 97, "Vodafone"}, +{440, 98, "Vodafone"}, +{440, 99, "NTT DoCoMo Inc."}, +{440, 9, "NTT DoCoMo Kansai Inc."}, +{441, 40, "NTT DoCoMo Inc."}, +{441, 41, "NTT DoCoMo Inc."}, +{441, 42, "NTT DoCoMo Inc."}, +{441, 43, "NTT DoCoMo Kansai Inc."}, +{441, 44, "NTT DoCoMo Chugoku Inc."}, +{441, 45, "NTT DoCoMo Shikoku Inc."}, +{441, 50, "TU-KA Cellular Tokyo Inc."}, +{441, 51, "TU-KA Phone Kansai Inc."}, +{441, 61, "Vodafone"}, +{441, 62, "Vodafone"}, +{441, 63, "Vodafone"}, +{441, 64, "Vodafone"}, +{441, 65, "Vodafone"}, +{441, 70, "KDDI Corporation"}, +{441, 90, "NTT DoCoMo Inc."}, +{441, 91, "NTT DoCoMo Inc."}, +{441, 92, "NTT DoCoMo Inc."}, +{441, 93, "NTT DoCoMo Hokkaido Inc."}, +{441, 94, "NTT DoCoMo Tohoku Inc."}, +{441, 98, "NTT DoCoMo Kyushu Inc."}, +{441, 99, "NTT DoCoMo Kyushu Inc."}, +{452, 1, "Mobifone"}, +{452, 2, "Vinaphone"}, +{454, 0, "GSM900/HKCSL"}, +{454, 10, "GSM1800New World PCS Ltd."}, +{454, 11, "MVNO/CHKTL"}, +{454, 12, "GSM1800/Peoples Telephone Company Ltd."}, +{454, 15, "3G Radio System/SMT3G"}, +{454, 16, "GSM1800/Mandarin Communications Ltd."}, +{454, 18, "GSM7800/Hong Kong CSL Ltd."}, +{454, 19, "3G Radio System/Sunday3G"}, +{454, 1, "MVNO/CITIC"}, +{454, 2, "3G Radio System/HKCSL3G"}, +{454, 20, "Public Mobile Networks/Reserved"}, +{454, 21, "Public Mobile Networks/Reserved"}, +{454, 22, "Public Mobile Networks/Reserved"}, +{454, 23, "Public Mobile Networks/Reserved"}, +{454, 24, "Public Mobile Networks/Reserved"}, +{454, 25, "Public Mobile Networks/Reserved"}, +{454, 26, "Public Mobile Networks/Reserved"}, +{454, 27, "Public Mobile Networks/Reserved"}, +{454, 28, "Public Mobile Networks/Reserved"}, +{454, 29, "Public Mobile Networks/Reserved"}, +{454, 3, "3G Radio System/Hutchison 3G"}, +{454, 30, "Public Mobile Networks/Reserved"}, +{454, 31, "Public Mobile Networks/Reserved"}, +{454, 32, "Public Mobile Networks/Reserved"}, +{454, 33, "Public Mobile Networks/Reserved"}, +{454, 34, "Public Mobile Networks/Reserved"}, +{454, 35, "Public Mobile Networks/Reserved"}, +{454, 36, "Public Mobile Networks/Reserved"}, +{454, 37, "Public Mobile Networks/Reserved"}, +{454, 38, "Public Mobile Networks/Reserved"}, +{454, 39, "Public Mobile Networks/Reserved"}, +{454, 4, "GSM900/GSM1800/Hutchison"}, +{454, 5, "CDMA/Hutchison"}, +{454, 6, "GSM900/SmarTone"}, +{454, 7, "MVNO/China Unicom International Ltd."}, +{454, 8, "MVNO/Trident"}, +{454, 9, "MVNO/China Motion Telecom (HK) Ltd."}, +{455, 0, "Smartone Mobile Communications (Macao) Ltd."}, +{455, 1, "CTM GSM"}, +{455, 3, "Hutchison Telecom"}, +{456, 18, "Camshin (Shinawatra)"}, +{456, 1, "Mobitel (Cam GSM)"}, +{456, 2, "Samart (Casacom)"}, +{456, 3, "S Telecom (CDMA) (reserved)"}, +{457, 1, "Lao Telecommunications"}, +{457, 2, "ETL Mobile"}, +{457, 8, "Millicom"}, +{460, 0, "China Mobile"}, +{460, 1, "China Unicom"}, +{460, 3, "China Unicom CDMA"}, +{460, 4, "China Satellite Global Star Network"}, +{470, 1, "GramenPhone"}, +{470, 2, "Aktel"}, +{470, 3, "Mobile 2000"}, +{472, 1, "DhiMobile"}, +{502, 0, "Art900"}, +{502, 12, "Maxis"}, +{502, 13, "TM Touch"}, +{502, 16, "DIGI"}, +{502, 17, "TimeCel"}, +{502, 18, "MITV Corporation Sdn. Bhd."}, +{502, 19, "CelCom"}, +{505, 11, "Telstra Corporation Ltd."}, +{505, 12, "Hutchison Telecommunications (Australia) Pty. Ltd."}, +{505, 14, "AAPT Ltd."}, +{505, 15, "3GIS Pty Ltd. (Telstra & Hutchison 3G)"}, +{505, 1, "Telstra Corporation Ltd."}, +{505, 24, "Advanced Communications Technologies Pty. Ltd."}, +{505, 2, "Optus Mobile Pty. Ltd."}, +{505, 3, "Vodafone Network Pty. Ltd."}, +{505, 4, "Department of Defence"}, +{505, 5, "The Ozitel Network Pty. Ltd."}, +{505, 6, "Hutchison 3G Australia Pty. Ltd."}, +{505, 71, "Telstra Corporation Ltd."}, +{505, 72, "Telstra Corporation Ltd."}, +{505, 7, "Vodafone Network Pty. Ltd."}, +{505, 88, "Localstar Holding Pty. Ltd."}, +{505, 8, "One.Tel GSM 1800 Pty. Ltd."}, +{505, 90, "Optus Ltd."}, +{505, 99, "One.Tel GSM 1800 Pty. Ltd."}, +{505, 9, "Airnet Commercial Australia Ltd."}, +{510, 0, "PSN"}, +{510, 10, "Telkomsel"}, +{510, 11, "Excelcomindo"}, +{510, 1, "Satelindo"}, +{510, 21, "Indosat - M3"}, +{510, 28, "Komselindo"}, +{510, 8, "Natrindo (Lippo Telecom)"}, +{515, 1, "Islacom"}, +{515, 2, "Globe Telecom"}, +{515, 3, "Smart Communications"}, +{515, 5, "Digitel"}, +{520, 0, "CAT CDMA"}, +{520, 15, "ACT Mobile"}, +{520, 1, "AIS GSM"}, +{525, 12, "Digital Trunked Radio Network"}, +{525, 1, "SingTel ST GSM900"}, +{525, 2, "SingTel ST GSM1800"}, +{525, 3, "MobileOne"}, +{525, 5, "Starhub"}, +{528, 11, "DST Com"}, +{530, 0, "Reserved for AMPS MIN based IMSI's"}, +{530, 1, "Vodafone New Zealand GSM Network"}, +{530, 24, "NZ Communications - UMTS Network"}, +{530, 2, "Teleom New Zealand CDMA Network"}, +{530, 3, "Woosh Wireless - CDMA Network"}, +{530, 4, "TelstraClear - GSM Network"}, +{530, 5, "Telecom New Zealand - UMTS Ntework"}, +{537, 1, "Bmobile"}, +{537, 2, "Greencom"}, +{537, 3, "Digicel Ltd"}, +{539, 1, "Tonga Communications Corporation"}, +{539, 43, "Shoreline Communication"}, +{541, 1, "SMILE"}, +{542, 1, "Vodafone"}, +{546, 1, "OPT Mobilis"}, +{547, 20, "Tikiphone"}, +{548, 1, "Telecom Cook"}, +{549, 1, "Telecom Samoa Cellular Ltd."}, +{549, 27, "GoMobile SamoaTel Ltd"}, +{550, 1, "FSM Telecom"}, +{552, 1, "Palau National Communications Corp. (a.k.a. PNCC)"}, +{602, 1, "EMS - Mobinil"}, +{602, 2, "Vodafone Egypt"}, +{603, 1, "Algrie Telecom"}, +{603, 2, "Orascom Telecom Algrie"}, +{604, 0, "Mditlcom (GSM)"}, +{604, 1, "Ittissalat Al Maghrid"}, +{605, 2, "Tunisie Telecom"}, +{605, 3, "Orascom Telecom"}, +{607, 1, "Gamcel"}, +{607, 2, "Africell"}, +{607, 3, "Comium Services Ltd"}, +{608, 1, "Sonatel"}, +{608, 2, "Sentel GSM"}, +{609, 10, "Mauritel Mobiles"}, +{609, 1, "Mattel S.A."}, +{609, 2, "Chinguitel S.A."}, +{610, 1, "Malitel"}, +{611, 1, "Spacetel"}, +{611, 2, "Sotelgui"}, +{611, 5, "Cellcom Guine SA"}, +{612, 2, "Atlantique Cellulaire"}, +{612, 3, "Orange Cte d'Ivoire"}, +{612, 4, "Comium Cte d'Ivoire"}, +{612, 5, "Loteny Telecom"}, +{612, 6, "Oricel Cte d'Ivoire"}, +{612, 7, "Aircomm Cte d'Ivoire"}, +{613, 2, "Celtel"}, +{613, 3, "Telecel"}, +{614, 1, "Sahel.Com"}, +{614, 2, "Celtel"}, +{614, 3, "Telecel"}, +{615, 1, "Togo Telecom"}, +{616, 1, "Libercom"}, +{616, 2, "Telecel"}, +{616, 3, "Spacetel Benin"}, +{617, 10, "Emtel"}, +{617, 1, "Cellplus"}, +{617, 2, "Mahanagar Telephone (Mauritius) Ltd."}, +{618, 4, "Comium Liberia"}, +{619, 1, "Celtel"}, +{619, 25, "Mobitel"}, +{619, 2, "Millicom"}, +{619, 3, "Africell"}, +{619, 40, "Datatel (SL) Ltd GSM"}, +{619, 4, "Comium (Sierra Leone) Ltd."}, +{619, 50, "Dtatel (SL) Ltd CDMA"}, +{619, 5, "Lintel (Sierra Leone) Ltd."}, +{620, 1, "Spacefon"}, +{620, 2, "Ghana Telecom Mobile"}, +{620, 3, "Mobitel"}, +{620, 4, "Kasapa Telecom Ltd."}, +{621, 20, "Econet Wireless Nigeria Ltd."}, +{621, 30, "MTN Nigeria Communications"}, +{621, 40, "Nigeria Telecommunications Ltd."}, +{622, 1, "Celtel"}, +{622, 2, "Tchad Mobile"}, +{623, 1, "Centrafrique Telecom Plus (CTP)"}, +{623, 2, "Telecel Centrafrique (TC)"}, +{623, 3, "Celca (Socatel)"}, +{624, 1, "Mobile Telephone Networks Cameroon"}, +{624, 2, "Orange Cameroun"}, +{625, 1, "Cabo Verde Telecom"}, +{625, 2, "T+Telecomunicaes"}, +{626, 1, "Companhia Santomese de Telecomunicaes"}, +{627, 1, "Guinea Ecuatorial de Telecomunicaciones Sociedad Annima "}, +{628, 1, "Libertis S.A."}, +{628, 2, "Telecel Gabon S.A."}, +{628, 3, "Celtel Gabon S.A."}, +{629, 10, "Libertis Telecom"}, +{629, 1, "Celtel"}, +{630, 1, "Vodacom Congo RDC sprl"}, +{630, 5, "Supercell Sprl"}, +{630, 86, "Congo-Chine Telecom s.a.r.l."}, +{631, 2, "Unitel"}, +{632, 1, "Guintel S.A."}, +{632, 2, "Spacetel Guin-Bissau S.A."}, +{633, 10, "Telecom (Seychelles) Ltd."}, +{633, 1, "Cable & Wireless (Seychelles) Ltd."}, +{633, 2, "Mediatech International Ltd."}, +{634, 1, "SD Mobitel"}, +{634, 2, "Areeba-Sudan"}, +{635, 10, "MTN Rwandacell"}, +{636, 1, "ETH MTN"}, +{637, 30, "Golis Telecommunications Company"}, +{638, 1, "Evatis"}, +{639, 2, "Safaricom Ltd."}, +{639, 3, "Kencell Communications Ltd."}, +{640, 2, "MIC (T) Ltd."}, +{640, 3, "Zantel"}, +{640, 4, "Vodacom (T) Ltd."}, +{640, 5, "Celtel (T) Ltd."}, +{641, 10, "MTN Uganda Ltd."}, +{641, 11, "Uganda Telecom Ltd."}, +{641, 14, "House of Integrated Technology and Systems Uganda Ltd "}, +{641, 1, "Celtel Uganda"}, +{641, 22, "Warid Telecom Uganda Ltd."}, +{642, 1, "Spacetel Burundi"}, +{642, 2, "Safaris"}, +{642, 3, "Telecel Burundi Company"}, +{643, 1, "T.D.M. GSM"}, +{643, 4, "VM Sarl"}, +{645, 1, "Celtel Zambia Ltd."}, +{645, 2, "Telecel Zambia Ltd."}, +{645, 3, "Zamtel"}, +{646, 1, "MADACOM"}, +{646, 2, "Orange Madagascar"}, +{646, 4, "Telecom Malagasy Mobile"}, +{647, 0, "Orange La Runion"}, +{647, 10, "Socit Runionnaise du Radiotlphone"}, +{647, 2, "Outremer Telecom"}, +{648, 1, "Net One"}, +{648, 3, "Telecel"}, +{648, 4, "Econet"}, +{649, 1, "Mobile Telecommunications Ltd."}, +{649, 3, "Powercom Pty Ltd"}, +{650, 10, "Celtel ltd."}, +{650, 1, "Telekom Network Ltd."}, +{651, 1, "Vodacom Lesotho (pty) Ltd."}, +{651, 2, "Econet Ezin-cel"}, +{652, 1, "Mascom Wireless (Pty) Ltd."}, +{652, 2, "Orange Botswana (Pty) Ltd."}, +{653, 10, "Swazi MTN"}, +{654, 1, "HURI - SNPT"}, +{655, 10, "Mobile Telephone Networks"}, +{655, 11, "SAPS Gauteng"}, +{655, 1, "Vodacom (Pty) Ltd."}, +{655, 21, "Cape Town Metropolitan Council"}, +{655, 30, "Bokamoso Consortium"}, +{655, 31, "Karabo Telecoms (Pty) Ltd."}, +{655, 32, "Ilizwi Telecommunications"}, +{655, 33, "Thinta Thinta Telecommunications"}, +{655, 34, "Bokone Telecoms"}, +{655, 35, "Kingdom Communications"}, +{655, 36, "Amatole Telecommunication Services"}, +{655, 6, "Sentech (Pty) Ltd."}, +{655, 7, "Cell C (Pty) Ltd."}, +{702, 67, "Belize Telecommunications Ltd., GSM 1900"}, +{702, 68, "International Telecommunications Ltd. (INTELCO)"}, +{704, 1, "Servicios de Comunicaciones Personales Inalmbricas, S.A. "}, +{704, 2, "Comunicaciones Celulares S.A."}, +{704, 3, "Telefnica Centroamrica Guatemala S.A."}, +{706, 1, "CTE Telecom Personal, S.A. de C.V."}, +{706, 2, "Digicel, S.A. de C.V."}, +{706, 3, "Telemvil El Salvador, S.A."}, +{708, 1, "Megatel"}, +{708, 2, "Celtel"}, +{710, 21, "Empresa Nicaragense de Telecomunicaciones, S.A. (ENITEL)"}, +{710, 73, "Servicios de Comunicaciones, S.A. (SERCOM)"}, +{712, 1, "Instituto Costarricense de Electricidad - ICE"}, +{714, 1, "Cable & Wireless Panama S.A."}, +{714, 2, "BSC de Panama S.A."}, +{716, 10, "TIM Peru"}, +{722, 10, "Compaia de Radiocomunicaciones Moviles S.A."}, +{722, 20, "Nextel Argentina srl"}, +{722, 310, "CTI PCS S.A."}, +{722, 320, "Compaia de Telefonos del Interior Norte S.A."}, +{722, 330, "Compaia de Telefonos del Interior S.A."}, +{722, 341, "Telecom Personal S.A."}, +{722, 70, "Telefonica Comunicaciones Personales S.A."}, +{724, 0, "Telet"}, +{724, 10, "ATL Algar"}, +{724, 11, "Telems Cel"}, +{724, 12, "Americel"}, +{724, 13, "Telesp Cel"}, +{724, 14, "Maxitel BA"}, +{724, 15, "CTBC Cel"}, +{724, 16, "BSE"}, +{724, 17, "Ceterp Cel"}, +{724, 18, "Norte Brasil Tel"}, +{724, 19, "Telemig Cel"}, +{724, 1, "CRT Cellular"}, +{724, 21, "Telerj Cel"}, +{724, 23, "Telest Cel"}, +{724, 25, "Telebrasilia Cel"}, +{724, 27, "Telegoias Cel"}, +{724, 29, "Telemat Cel"}, +{724, 2, "Global Telecom"}, +{724, 31, "Teleacre Cel"}, +{724, 33, "Teleron Cel"}, +{724, 35, "Telebahia Cel"}, +{724, 37, "Telergipe Cel"}, +{724, 39, "Telasa Cel"}, +{724, 3, "CTMR Cel"}, +{724, 41, "Telpe Cel"}, +{724, 43, "Telepisa Cel"}, +{724, 45, "Telpa Cel"}, +{724, 47, "Telern Cel"}, +{724, 48, "Teleceara Cel"}, +{724, 4, "BCP"}, +{724, 51, "Telma Cel"}, +{724, 53, "Telepara Cel"}, +{724, 55, "Teleamazon Cel"}, +{724, 57, "Teleamapa Cel"}, +{724, 59, "Telaima Cel"}, +{724, 5, "Telesc Cel"}, +{724, 6, "Tess"}, +{724, 7, "Sercontel Cel"}, +{724, 8, "Maxitel MG"}, +{724, 9, "Telepar Cel"}, +{730, 10, "Entel"}, +{730, 1, "Entel Telefonica Movl"}, +{730, 2, "Telefnica Mvil"}, +{730, 3, "Smartcom"}, +{730, 4, "Centennial Cayman Corp. Chile S.A."}, +{730, 5, "Multikom S.A."}, +{732, 1, "Colombia Telecomunicaciones S.A. - Telecom"}, +{732, 2, "Edatel S.A."}, +{732, 101, "Comcel S.A. Occel S.A./Celcaribe"}, +{732, 102, "Bellsouth Colombia S.A."}, +{732, 103, "Colombia Mvil S.A."}, +{732, 111, "Colombia Mvil S.A."}, +{732, 123, "Telfnica Mviles Colombia S.A."}, +{732, 130, "Avantel"}, +{732, 20, "Emtelsa"}, +{732, 99, "Emcali"}, +{734, 1, "Infonet"}, +{734, 2, "Corporacin Digitel"}, +{734, 3, "Digicel"}, +{734, 4, "Telcel, C.A."}, +{734, 6, "Telecomunicaciones Movilnet, C.A."}, +{736, 1, "Nuevatel S.A."}, +{736, 2, "ENTEL S.A."}, +{736, 3, "Telecel S.A."}, +{738, 1, "Cel*Star (Guyana) Inc."}, +{740, 0, "Otecel S.A. - Bellsouth"}, +{740, 1, "Porta GSM"}, +{740, 2, "Telecsa S.A."}, +{744, 1, "Hola Paraguay S.A."}, +{744, 2, "Hutchison Telecom S.A."}, +{744, 3, "Compaia Privada de Comunicaciones S.A."}, +{746, 2, "Telesur"}, +{746, 3, "Digicel"}, +{746, 4, "Intelsur"}, +{748, 0, "Ancel - TDMA"}, +{748, 10, "CTI Mvil"}, +{748, 1, "Ancel - GSM"}, +{748, 3, "Ancel"}, +{748, 7, "Movistar"}, +{901, 10, "Asia Cellular Satellite (AceS)"}, +{901, 11, "Inmarsat Ltd."}, +{901, 12, "Maritime Communications Partner AS (MCP network)"}, +{901, 13, "Global Networks, Inc."}, +{901, 14, "Telenor GSM - services in aircraft"}, +{901, 15, "SITA GSM services in aircraft (On Air)"}, +{901, 16, "Jasper Systems, Inc."}, +{901, 17, "Jersey Telecom"}, +{901, 18, "Cingular Wireless"}, +{901, 19, "Vodaphone Malta"}, +{901, 1, "ICO Global Communications"}, +{901, 20, "Intermatica"}, +{901, 21, "Seanet Maritime Communications"}, +{901, 22, "Denver Consultants Ltd"}, +{901, 2, "Sense Communications International AS"}, +{901, 3, "Iridium Satellite, LLC (GMSS)"}, +{901, 4, "Globalstar"}, +{901, 5, "Thuraya RMSS Network"}, +{901, 6, "Thuraya Satellite Telecommunications Company"}, +{901, 7, "Ellipso"}, +{901, 88, "Telecommunications for Disaster Relief (TDR) (OCHA)"}, +{901, 9, "Tele1 Europe"}, +{-1, -1, NULL} +}; + +/* + * Return Mobile Country Code string by code. + * Return NULL if not exists. + */ +const char * +mcc_get(int mcc) +{ + int i = 0; + + for (i = 0; i < sizeof mcc_list / sizeof *mcc_list; i++) + { + if (mcc_list[i].mcc == mcc) + return mcc_list[i].data; + } + + return NULL; +} + +const char * +mnc_get(int mcc, int mnc) +{ + int i = 0; + + for (i = 0; i < sizeof mnc_list / sizeof *mnc_list; i++) + { + if (mnc_list[i].mcc != mcc) + continue; + for (; mnc_list[i].mcc == mcc; i++) + { + if (mnc_list[i].mnc == mnc) + return mnc_list[i].data; + } + + break; + } + + return NULL; +} + diff --git a/gsmdecode/src/mcc_list.h b/gsmdecode/src/mcc_list.h new file mode 100644 index 0000000..ad8c54f --- /dev/null +++ b/gsmdecode/src/mcc_list.h @@ -0,0 +1,5 @@ + + +const char *mcc_get(int mcc); +const char *mnc_get(int mcc, int mnc); + diff --git a/gsmsp/INSTALL b/gsmsp/INSTALL new file mode 100644 index 0000000..be7aca4 --- /dev/null +++ b/gsmsp/INSTALL @@ -0,0 +1,59 @@ + + +A gnu radio implementation to receive and decode GSM packets. + +Install +======= + +./configure +make +# The release comes with a example capture file. Test if it works: +./run.sh + +Analyzing GSM data +================== + +The release does not support live captures (yet). + + 1. Search for a base station in your area. See "BTS searching by Robert" + or use the Nokia Field Tester (NetMonitor) to find the channel number + of you operator and calculate the frequency from it. + + 2. From the gnu-radio installation use usr_rx_cfile.py to capture data: + Example of capturing 10seconds of gsm data on 940.8Mhz: + + # samples=`expr 64000000 / 118 '*' 10` + # ./usrp_rx_cfile.py -d 118 -f 940.8M -N $samples 940.8Mhz_118.cfile + + 3. Make the file available to gsmsp: + # cd ~/gsmsp + # ln -sf /wherever/the/cfile/is/940.8Mhz_118.cfile signal.data + # ./run.sh + +Requirements +============ + + * gnu radio (tested with 3.0.2 and 3.0.3) + * python (tested with 2.4.4) + * python-numeric (tested with 23.7) + +Supported Platforms +=================== + + * gentoo linux + * cygwin + +Limitations +=========== + + * receiving only + * only BTS -> MS traffic. + * no channel hopping + +Your sincerly, + +THE GSM SCANNER PROJECT +http://wiki.thc.org/gsm + + + diff --git a/gsmsp/Makefile.am b/gsmsp/Makefile.am new file mode 100644 index 0000000..373cc48 --- /dev/null +++ b/gsmsp/Makefile.am @@ -0,0 +1,2 @@ +SUBDIRS = gsm python resources +EXTRA_DIST = VERSION bootstrap config run.sh INSTALL diff --git a/gsmsp/Makefile.in b/gsmsp/Makefile.in new file mode 100644 index 0000000..a99ef08 --- /dev/null +++ b/gsmsp/Makefile.in @@ -0,0 +1,558 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = . +DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/configure INSTALL \ + config/install-sh config/missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +subdirs = @subdirs@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = gsm python resources +EXTRA_DIST = VERSION bootstrap config run.sh INSTALL +all: all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ + cd $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ + dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-generic distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ + tags-recursive uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/gsmsp/VERSION b/gsmsp/VERSION new file mode 100644 index 0000000..54f9596 --- /dev/null +++ b/gsmsp/VERSION @@ -0,0 +1 @@ +0.2a diff --git a/gsmsp/aclocal.m4 b/gsmsp/aclocal.m4 new file mode 100644 index 0000000..2981344 --- /dev/null +++ b/gsmsp/aclocal.m4 @@ -0,0 +1,548 @@ +# generated automatically by aclocal 1.10 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_if(m4_PACKAGE_VERSION, [2.61],, +[m4_fatal([this file was generated for autoconf 2.61. +You have another version of autoconf. If you want to use that, +you should regenerate the build system entirely.], [63])]) + +# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.10])dnl +_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.60])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar <conftest.tar]) + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + diff --git a/gsmsp/bootstrap b/gsmsp/bootstrap new file mode 100755 index 0000000..fa9a564 --- /dev/null +++ b/gsmsp/bootstrap @@ -0,0 +1,12 @@ +#! /bin/bash + +source resources/tools/chk_bootstrap_prg.sh + +cd gsm +./bootstrap +cd .. + +aclocal -I config +automake --foreign --add-missing +autoconf + diff --git a/gsmsp/config/install-sh b/gsmsp/config/install-sh new file mode 100755 index 0000000..4fbbae7 --- /dev/null +++ b/gsmsp/config/install-sh @@ -0,0 +1,507 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2006-10-14.15 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment 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}" + +posix_glob= +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chmodcmd=$chmodprog +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= +dstarg= +no_target_directory= + +usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: +-c (ignored) +-d create directories instead of installing files. +-g GROUP $chgrpprog installed files to GROUP. +-m MODE $chmodprog installed files to MODE. +-o USER $chownprog installed files to USER. +-s $stripprog installed files. +-t DIRECTORY install into DIRECTORY. +-T report an error if DSTFILE is a directory. +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + shift + shift + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t) dstarg=$2 + shift + shift + continue;; + + -T) no_target_directory=true + shift + continue;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac +done + +if test $# -ne 0 && test -z "$dir_arg$dstarg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src ;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dstarg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix=/ ;; + -*) prefix=./ ;; + *) prefix= ;; + esac + + case $posix_glob in + '') + if (set -f) 2>/dev/null; then + posix_glob=true + else + posix_glob=false + fi ;; + esac + + oIFS=$IFS + IFS=/ + $posix_glob && set -f + set fnord $dstdir + shift + $posix_glob && set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # Now rename the file to the real destination. + { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ + || { + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + if test -f "$dst"; then + $doit $rmcmd -f "$dst" 2>/dev/null \ + || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ + && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ + || { + echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + } || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/gsmsp/config/missing b/gsmsp/config/missing new file mode 100755 index 0000000..1c8ff70 --- /dev/null +++ b/gsmsp/config/missing @@ -0,0 +1,367 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2006-05-10.23 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to <bug-automake@gnu.org>." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). +case $1 in + lex|yacc) + # Not GNU programs, they don't have --version. + ;; + + tar) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $1 in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case $firstarg in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case $firstarg in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/gsmsp/configure b/gsmsp/configure new file mode 100755 index 0000000..749a2fb --- /dev/null +++ b/gsmsp/configure @@ -0,0 +1,3345 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.61. +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# 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" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +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 +IFS=$as_save_IFS + + ;; +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_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$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'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + 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=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # 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 after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, 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 + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\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 sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +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$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval 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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + +exec 7<&0 </dev/null 6>&1 + +# 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` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="INSTALL" +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +am__isrc +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +install_sh +STRIP +INSTALL_STRIP_PROGRAM +mkdir_p +AWK +SET_MAKE +am__leading_dot +AMTAR +am__tar +am__untar +subdirs +LIBOBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias' +ac_subdirs_all='gsm' + +# 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. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +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 + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -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) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$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 ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -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'` + 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 ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$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 ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + 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 ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$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'` + 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; }; } + 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 directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +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 + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# 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 the parent directory. + ac_confdir=`$as_dirname -- "$0" || +$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 + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# 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 this package 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 \`..'] + +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] + --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] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested 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 + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +configure +generated by GNU Autoconf 2.61 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 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 +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.61. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +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` +/usr/bin/hostinfo = `(/usr/bin/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 +IFS=$as_save_IFS + +} >&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. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# 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: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +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, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat 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.conftest.* && + rm -f -r 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 -f -r conftest* 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 -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" +fi +shift +for ac_site_file +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 $ac_precious_vars; 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 + + + +VER=`cat ${srcdir}/VERSION` +{ echo "$as_me:$LINENO: result: Begining autoconfiguration process for gsmsp-$VER..." >&5 +echo "${ECHO_T}Begining autoconfiguration process for gsmsp-$VER..." >&6; } + +ac_aux_dir= +for ac_dir in config "$srcdir"/config; 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 config \"$srcdir\"/config" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +am__api_version='1.10' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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 +IFS=$as_save_IFS + + +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. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + 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' + +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm -f conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +echo "${ECHO_T}$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +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_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE=gsmsp + VERSION=$VER + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +IFS=$as_save_IFS + +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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +IFS=$as_save_IFS + +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 + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + +subdirs="$subdirs gsm" + + +ac_config_files="$ac_config_files Makefile python/Makefile resources/Makefile resources/data/Makefile resources/tools/Makefile" + +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 overridden 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, we kill variables containing newlines. +# 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. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} + 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}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: ${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 +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# 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" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +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 +IFS=$as_save_IFS + + ;; +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_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$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'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # 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 after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, 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 + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\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 sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +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$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval 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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by $as_me, which was +generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# Files that config.status was made for. +config_files="$ac_config_files" + +_ACEOF + +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 and configuration settings, then exit + -q, --quiet do not print progress messages + -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 + +Configuration files: +$config_files + +Report bugs to <bug-autoconf@gnu.org>." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2006 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +_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[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { 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" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "python/Makefile") CONFIG_FILES="$CONFIG_FILES python/Makefile" ;; + "resources/Makefile") CONFIG_FILES="$CONFIG_FILES resources/Makefile" ;; + "resources/data/Makefile") CONFIG_FILES="$CONFIG_FILES resources/data/Makefile" ;; + "resources/tools/Makefile") CONFIG_FILES="$CONFIG_FILES resources/tools/Makefile" ;; + + *) { { 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 +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for 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 + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +am__isrc!$am__isrc$ac_delim +CYGPATH_W!$CYGPATH_W$ac_delim +PACKAGE!$PACKAGE$ac_delim +VERSION!$VERSION$ac_delim +ACLOCAL!$ACLOCAL$ac_delim +AUTOCONF!$AUTOCONF$ac_delim +AUTOMAKE!$AUTOMAKE$ac_delim +AUTOHEADER!$AUTOHEADER$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +install_sh!$install_sh$ac_delim +STRIP!$STRIP$ac_delim +INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim +mkdir_p!$mkdir_p$ac_delim +AWK!$AWK$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +am__leading_dot!$am__leading_dot$ac_delim +AMTAR!$AMTAR$ac_delim +am__tar!$am__tar$ac_delim +am__untar!$am__untar$ac_delim +subdirs!$subdirs$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 62; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS <conf$$subs.sed +rm -f conf$$subs.sed +cat >>$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# 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 + +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # 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. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$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'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; + + + + esac + +done # for ac_tag + + +{ (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=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || 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 + +# +# CONFIG_SUBDIRS section. +# +if test "$no_recursion" != yes; then + + # Remove --cache-file and --srcdir arguments so they do not pile up. + ac_sub_configure_args= + ac_prev= + eval "set x $ac_configure_args" + shift + for ac_arg + do + if test -n "$ac_prev"; then + ac_prev= + continue + fi + case $ac_arg in + -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=*) + ;; + --config-cache | -C) + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + ;; + *) + case $ac_arg in + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;; + esac + done + + # Always prepend --prefix to ensure using the same prefix + # in subdir configurations. + ac_arg="--prefix=$prefix" + case $ac_arg in + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" + + # Pass --silent + if test "$silent" = yes; then + ac_sub_configure_args="--silent $ac_sub_configure_args" + fi + + ac_popdir=`pwd` + for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue + + # Do not complain, so a configure script can configure whichever + # parts of a large source tree are present. + test -d "$srcdir/$ac_dir" || continue + + ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" + echo "$as_me:$LINENO: $ac_msg" >&5 + echo "$ac_msg" >&6 + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + cd "$ac_dir" + + # Check for guested configure; otherwise get Cygnus style configure. + if test -f "$ac_srcdir/configure.gnu"; then + ac_sub_configure=$ac_srcdir/configure.gnu + elif test -f "$ac_srcdir/configure"; then + ac_sub_configure=$ac_srcdir/configure + elif test -f "$ac_srcdir/configure.in"; then + # This should be Cygnus configure. + ac_sub_configure=$ac_aux_dir/configure + else + { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 +echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} + ac_sub_configure= + fi + + # The recursion is here. + if test -n "$ac_sub_configure"; then + # Make the cache file name correct relative to the subdirectory. + case $cache_file in + [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; + *) # Relative name. + ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; + esac + + { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 +echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} + # The eval makes quoting arguments work. + eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ + --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || + { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 +echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} + { (exit 1); exit 1; }; } + fi + + cd "$ac_popdir" + done +fi + + diff --git a/gsmsp/configure.in b/gsmsp/configure.in new file mode 100644 index 0000000..da9f73a --- /dev/null +++ b/gsmsp/configure.in @@ -0,0 +1,13 @@ + +AC_INIT(INSTALL) + +VER=`cat ${srcdir}/VERSION` +AC_MSG_RESULT(Begining autoconfiguration process for gsmsp-$VER...) + +AC_CONFIG_AUX_DIR(config) +AM_INIT_AUTOMAKE(gsmsp, $VER) + +AC_CONFIG_SUBDIRS(gsm) + +AC_OUTPUT(Makefile python/Makefile resources/Makefile resources/data/Makefile resources/tools/Makefile) + diff --git a/gsmsp/gsm/COPYING b/gsmsp/gsm/COPYING new file mode 100755 index 0000000..623b625 --- /dev/null +++ b/gsmsp/gsm/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/gsmsp/gsm/INSTALL b/gsmsp/gsm/INSTALL new file mode 100755 index 0000000..5458714 --- /dev/null +++ b/gsmsp/gsm/INSTALL @@ -0,0 +1,234 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006 Free Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + +Installation Names +================== + +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + +Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/gsmsp/gsm/Makefile.am b/gsmsp/gsm/Makefile.am new file mode 100644 index 0000000..fd29f24 --- /dev/null +++ b/gsmsp/gsm/Makefile.am @@ -0,0 +1,10 @@ + +include $(top_srcdir)/Makefile.common + +EXTRA_DIST = configure config.h.in +SUBDIRS = config src +DIST_SUBDIRS = config src + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = + diff --git a/gsmsp/gsm/Makefile.common b/gsmsp/gsm/Makefile.common new file mode 100644 index 0000000..0160c35 --- /dev/null +++ b/gsmsp/gsm/Makefile.common @@ -0,0 +1,43 @@ +# -*- Makefile -*- +# +# Copyright 2004,2006 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +# includes +grincludedir = $(includedir)/gnuradio + +# swig includes +swigincludedir = $(grincludedir)/swig + +# Install this stuff in the appropriate subdirectory +# This usually ends up at: +# ${prefix}/lib/python${python_version}/site-packages/gnuradio + +grpythondir = $(pythondir)/gnuradio +grpyexecdir = $(pyexecdir)/gnuradio + +# swig flags +SWIGPYTHONFLAGS = -fvirtual -python -modern +SWIGGRFLAGS = -I$(GNURADIO_CORE_INCLUDEDIR)/swig -I$(GNURADIO_CORE_INCLUDEDIR) + +# Don't assume that make predefines $(RM), because BSD make does +# not. We define it now in configure.ac using AM_PATH_PROG, but now +# here have to add a -f to be like GNU make. +RM=$(RM_PROG) -f diff --git a/gsmsp/gsm/Makefile.in b/gsmsp/gsm/Makefile.in new file mode 100644 index 0000000..59e5bb6 --- /dev/null +++ b/gsmsp/gsm/Makefile.in @@ -0,0 +1,753 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# -*- Makefile -*- +# +# Copyright 2004,2006 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/Makefile.common $(top_srcdir)/configure COPYING \ + INSTALL config.guess config.sub depcomp install-sh ltmain.sh \ + missing py-compile +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/acx_pthread.m4 \ + $(top_srcdir)/config/gr_boost.m4 \ + $(top_srcdir)/config/gr_gprof.m4 \ + $(top_srcdir)/config/gr_no_undefined.m4 \ + $(top_srcdir)/config/gr_omnithread.m4 \ + $(top_srcdir)/config/gr_pwin32.m4 \ + $(top_srcdir)/config/gr_python.m4 \ + $(top_srcdir)/config/gr_scripting.m4 \ + $(top_srcdir)/config/gr_swig.m4 \ + $(top_srcdir)/config/gr_x86_64.m4 \ + $(top_srcdir)/config/lf_cxx.m4 \ + $(top_srcdir)/config/lf_warnings.m4 \ + $(top_srcdir)/config/pkg.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkgconfigdir)" +pkgconfigDATA_INSTALL = $(INSTALL_DATA) +DATA = $(pkgconfig_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXX_FOR_BUILD = @CXX_FOR_BUILD@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GNURADIO_CORE_CFLAGS = @GNURADIO_CORE_CFLAGS@ +GNURADIO_CORE_INCLUDEDIR = @GNURADIO_CORE_INCLUDEDIR@ +GNURADIO_CORE_LIBS = @GNURADIO_CORE_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NO_UNDEFINED = @NO_UNDEFINED@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +PYTHON = @PYTHON@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RM_PROG = @RM_PROG@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STD_DEFINES_AND_INCLUDES = @STD_DEFINES_AND_INCLUDES@ +STRIP = @STRIP@ +SWIG = @SWIG@ +SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ +SWIG_PYTHON_LIB = @SWIG_PYTHON_LIB@ +SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# includes +grincludedir = $(includedir)/gnuradio + +# swig includes +swigincludedir = $(grincludedir)/swig + +# Install this stuff in the appropriate subdirectory +# This usually ends up at: +# ${prefix}/lib/python${python_version}/site-packages/gnuradio +grpythondir = $(pythondir)/gnuradio +grpyexecdir = $(pyexecdir)/gnuradio + +# swig flags +SWIGPYTHONFLAGS = -fvirtual -python -modern +SWIGGRFLAGS = -I$(GNURADIO_CORE_INCLUDEDIR)/swig -I$(GNURADIO_CORE_INCLUDEDIR) + +# Don't assume that make predefines $(RM), because BSD make does +# not. We define it now in configure.ac using AM_PATH_PROG, but now +# here have to add a -f to be like GNU make. +RM = $(RM_PROG) -f +EXTRA_DIST = configure config.h.in +SUBDIRS = config src +DIST_SUBDIRS = config src +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.common $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ + cd $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(DATA) config.h +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: install-pkgconfigDATA + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-pkgconfigDATA + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-pkgconfigDATA + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/gsmsp/gsm/aclocal.m4 b/gsmsp/gsm/aclocal.m4 new file mode 100644 index 0000000..0d111ad --- /dev/null +++ b/gsmsp/gsm/aclocal.m4 @@ -0,0 +1,7558 @@ +# generated automatically by aclocal 1.10 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_if(m4_PACKAGE_VERSION, [2.61],, +[m4_fatal([this file was generated for autoconf 2.61. +You have another version of autoconf. If you want to use that, +you should regenerate the build system entirely.], [63])]) + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + +# serial 49 AC_PROG_LIBTOOL + + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])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_PROG_LIBTOOL + + +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)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 +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])dnl +dnl + +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +_LT_AC_PROG_ECHO_BACKSLASH + +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 + +# 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='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' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_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 MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +AC_CHECK_TOOL(AR, ar, false) +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + +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 "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# 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="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +_LT_CC_BASENAME([$compiler]) + +# 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_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +AC_ARG_WITH([pic], + [AC_HELP_STRING([--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 + +# Use C for the default configuration in the libtool script +tagname= +AC_LIBTOOL_LANG_C_CONFIG +_LT_AC_TAGCONFIG +])# AC_LIBTOOL_SETUP + + +# _LT_AC_SYS_COMPILER +# ------------------- +AC_DEFUN([_LT_AC_SYS_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_AC_SYS_COMPILER + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +AC_DEFUN([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +AC_DEFUN([_LT_COMPILER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +AC_DEFUN([_LT_LINKER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_LINKER_BOILERPLATE + + +# _LT_AC_SYS_LIBPATH_AIX +# ---------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], +[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_AC_SYS_LIBPATH_AIX + + +# _LT_AC_SHELL_INIT(ARG) +# ---------------------- +AC_DEFUN([_LT_AC_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_AC_SHELL_INIT + + +# _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], +[_LT_AC_SHELL_INIT([ +# 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 <<EOF +[$]* +EOF + exit 0 +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/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. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + 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="$lt_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) +])])# _LT_AC_PROG_ECHO_BACKSLASH + + +# _LT_AC_LOCK +# ----------- +AC_DEFUN([_LT_AC_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--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 +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-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_PUSH(C) + AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + 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 + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +AC_PROVIDE_IFELSE([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) + ;; + ]) +esac + +need_locks="$enable_libtool_lock" + +])# _LT_AC_LOCK + + +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED]) +AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $rm conftest* +]) + +if test x"[$]$2" = xyes; then + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi +])# AC_LIBTOOL_COMPILER_OPTION + + +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ------------------------------------------------------------ +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], +[AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + ifelse([$4], , :, [$4]) +else + ifelse([$5], , :, [$5]) +fi +])# AC_LIBTOOL_LINKER_OPTION + + +# AC_LIBTOOL_SYS_MAX_CMD_LEN +# -------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], +[# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +])# AC_LIBTOOL_SYS_MAX_CMD_LEN + + +# _LT_AC_CHECK_DLFCN +# ------------------ +AC_DEFUN([_LT_AC_CHECK_DLFCN], +[AC_CHECK_HEADERS(dlfcn.h)dnl +])# _LT_AC_CHECK_DLFCN + + +# _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], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<EOF +[#line __oline__ "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include <dlfcn.h> +#endif + +#include <stdio.h> + +#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); */ + } + else + puts (dlerror ()); + + exit (status); +}] +EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|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], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + 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" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl 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 + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + 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_LIBTOOL_PROG_CC_C_O([TAGNAME]) +# --------------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* +]) +])# AC_LIBTOOL_PROG_CC_C_O + + +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) +# ----------------------------------------- +# Check to see if we can do hard links to lock some files if needed +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], +[AC_REQUIRE([_LT_AC_LOCK])dnl + +hard_links="nottested" +if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = 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 +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS + + +# AC_LIBTOOL_OBJDIR +# ----------------- +AC_DEFUN([AC_LIBTOOL_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +])# AC_LIBTOOL_OBJDIR + + +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +# ---------------------------------------------- +# Check hardcoding attributes. +AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_AC_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ + test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_AC_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_AC_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = 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 +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH + + +# AC_LIBTOOL_SYS_LIB_STRIP +# ------------------------ +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], +[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 +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) +fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +])# AC_LIBTOOL_SYS_LIB_STRIP + + +# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# ----------------------------- +# PORTME Fill in your ld.so characteristics +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], +[AC_MSG_CHECKING([dynamic linker characteristics]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib<name>.so + # instead of lib<name>.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi +])# AC_LIBTOOL_SYS_DYNAMIC_LINKER + + +# _LT_AC_TAGCONFIG +# ---------------- +AC_DEFUN([_LT_AC_TAGCONFIG], +[AC_ARG_WITH([tags], + [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], + [include additional configurations @<:@automatic@:>@])], + [tagnames="$withval"]) + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + AC_MSG_WARN([output file `$ofile' does not exist]) + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in + "") ;; + *) AC_MSG_ERROR([invalid tag name: $tagname]) + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + AC_MSG_ERROR([tag name \"$tagname\" already exists]) + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_LIBTOOL_LANG_CXX_CONFIG + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + AC_LIBTOOL_LANG_F77_CONFIG + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + AC_LIBTOOL_LANG_GCJ_CONFIG + else + tagname="" + fi + ;; + + RC) + AC_LIBTOOL_LANG_RC_CONFIG + ;; + + *) + AC_MSG_ERROR([Unsupported tag name: $tagname]) + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + AC_MSG_ERROR([unable to update list of available tagged configurations.]) + fi +fi +])# _LT_AC_TAGCONFIG + + +# AC_LIBTOOL_DLOPEN +# ----------------- +# enable checks for dlopen support +AC_DEFUN([AC_LIBTOOL_DLOPEN], + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_DLOPEN + + +# AC_LIBTOOL_WIN32_DLL +# -------------------- +# declare package support for building win32 DLLs +AC_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_WIN32_DLL + + +# AC_ENABLE_SHARED([DEFAULT]) +# --------------------------- +# implement the --enable-shared flag +# 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], + [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]AC_ENABLE_SHARED_DEFAULT) +])# AC_ENABLE_SHARED + + +# 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_DISABLE_SHARED + + +# AC_ENABLE_STATIC([DEFAULT]) +# --------------------------- +# implement the --enable-static flag +# 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], + [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]AC_ENABLE_STATIC_DEFAULT) +])# AC_ENABLE_STATIC + + +# 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_DISABLE_STATIC + + +# AC_ENABLE_FAST_INSTALL([DEFAULT]) +# --------------------------------- +# implement the --enable-fast-install flag +# 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], + [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) +])# AC_ENABLE_FAST_INSTALL + + +# 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_DISABLE_FAST_INSTALL + + +# AC_LIBTOOL_PICMODE([MODE]) +# -------------------------- +# implement the --with-pic flag +# 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_LIBTOOL_PICMODE + + +# AC_PROG_EGREP +# ------------- +# This is predefined starting with Autoconf 2.54, so this conditional +# definition can be removed once we require Autoconf 2.54 or later. +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], + [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi]) + EGREP=$ac_cv_prog_egrep + AC_SUBST([EGREP]) +])]) + + +# AC_PATH_TOOL_PREFIX +# ------------------- +# find a file program which can recognize shared library +AC_DEFUN([AC_PATH_TOOL_PREFIX], +[AC_REQUIRE([AC_PROG_EGREP])dnl +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_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +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 + IFS="$lt_save_ifs" + 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 <<EOF 1>&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@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_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_TOOL_PREFIX + + +# AC_PATH_MAGIC +# ------------- +# find a file program which can recognize a shared library +AC_DEFUN([AC_PATH_MAGIC], +[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$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_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# AC_PATH_MAGIC + + +# AC_PROG_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([AC_PROG_LD], +[AC_ARG_WITH([gnu-ld], + [AC_HELP_STRING([--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([LT_AC_PROG_SED])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])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 $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + 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 + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break + ;; + *) + test "$with_gnu_ld" != yes && break + ;; + esac + fi + done + IFS="$lt_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 + + +# AC_PROG_LD_GNU +# -------------- +AC_DEFUN([AC_PROG_LD_GNU], +[AC_REQUIRE([AC_PROG_EGREP])dnl +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 lds only accept -v. +case `$LD -v 2>&1 </dev/null` in +*GNU* | *'with BFD'*) + lt_cv_prog_gnu_ld=yes + ;; +*) + lt_cv_prog_gnu_ld=no + ;; +esac]) +with_gnu_ld=$lt_cv_prog_gnu_ld +])# AC_PROG_LD_GNU + + +# 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 +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac +])# AC_PROG_LD_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 recognize dependent 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 extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix4* | aix5*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[[45]]*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + 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|DragonFly)/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_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix3*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +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 + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown +])# AC_DEPLIBS_CHECK_METHOD + + +# AC_PROG_NM +# ---------- +# find the pathname to a BSD-compatible name lister +AC_DEFUN([AC_PROG_NM], +[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi]) +NM="$lt_cv_path_NM" +])# AC_PROG_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* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +])# AC_CHECK_LIBM + + +# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl convenience library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-convenience to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# it is assumed to be `libltdl'. LIBLTDL will be prefixed with +# '${top_builddir}/' and LTDLINCL 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 + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_CONVENIENCE + + +# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl installable library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-install to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# and an installed libltdl is not found, it is assumed to be `libltdl'. +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL 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, lt_dlinit, + [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 + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + LTDLINCL= + fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_INSTALLABLE + + +# AC_LIBTOOL_CXX +# -------------- +# enable support for C++ libraries +AC_DEFUN([AC_LIBTOOL_CXX], +[AC_REQUIRE([_LT_AC_LANG_CXX]) +])# AC_LIBTOOL_CXX + + +# _LT_AC_LANG_CXX +# --------------- +AC_DEFUN([_LT_AC_LANG_CXX], +[AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +])# _LT_AC_LANG_CXX + +# _LT_AC_PROG_CXXCPP +# ------------------ +AC_DEFUN([_LT_AC_PROG_CXXCPP], +[ +AC_REQUIRE([AC_PROG_CXX]) +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +fi +])# _LT_AC_PROG_CXXCPP + +# AC_LIBTOOL_F77 +# -------------- +# enable support for Fortran 77 libraries +AC_DEFUN([AC_LIBTOOL_F77], +[AC_REQUIRE([_LT_AC_LANG_F77]) +])# AC_LIBTOOL_F77 + + +# _LT_AC_LANG_F77 +# --------------- +AC_DEFUN([_LT_AC_LANG_F77], +[AC_REQUIRE([AC_PROG_F77]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +])# _LT_AC_LANG_F77 + + +# AC_LIBTOOL_GCJ +# -------------- +# enable support for GCJ libraries +AC_DEFUN([AC_LIBTOOL_GCJ], +[AC_REQUIRE([_LT_AC_LANG_GCJ]) +])# AC_LIBTOOL_GCJ + + +# _LT_AC_LANG_GCJ +# --------------- +AC_DEFUN([_LT_AC_LANG_GCJ], +[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], + [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], + [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], + [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +])# _LT_AC_LANG_GCJ + + +# AC_LIBTOOL_RC +# ------------- +# enable support for Windows resource files +AC_DEFUN([AC_LIBTOOL_RC], +[AC_REQUIRE([LT_AC_PROG_RC]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +])# AC_LIBTOOL_RC + + +# AC_LIBTOOL_LANG_C_CONFIG +# ------------------------ +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) +AC_DEFUN([_LT_AC_LANG_C_CONFIG], +[lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF + +# Report which library types will actually be built +AC_MSG_CHECKING([if libtool supports shared libraries]) +AC_MSG_RESULT([$can_build_shared]) + +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* | aix5*) + 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]) + +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]) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_C_CONFIG + + +# AC_LIBTOOL_LANG_CXX_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) +AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], +[AC_LANG_PUSH(C++) +AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Dependencies to place before and after the object being linked: +_LT_AC_TAGVAR(predep_objects, $1)= +_LT_AC_TAGVAR(postdep_objects, $1)= +_LT_AC_TAGVAR(predeps, $1)= +_LT_AC_TAGVAR(postdeps, $1)= +_LT_AC_TAGVAR(compiler_lib_search_path, $1)= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +else + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + AC_PROG_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +_LT_AC_TAGVAR(ld_shlibs, $1)=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=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 + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=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. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) ;; + *) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + openbsd*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; +esac +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_AC_TAGVAR(GCC, $1)="$GXX" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_POSTDEP_PREDEP($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +])# AC_LIBTOOL_LANG_CXX_CONFIG + +# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) +# ------------------------------------ +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +ifelse([$1],[],[cat > conftest.$ac_ext <<EOF +int a; +void foo (void) { a = 0; } +EOF +],[$1],[CXX],[cat > conftest.$ac_ext <<EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +EOF +],[$1],[F77],[cat > conftest.$ac_ext <<EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +EOF +],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +EOF +]) +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` + + for p in `eval $output_verbose_link_cmd`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" \ + || test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then + _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then + _LT_AC_TAGVAR(predep_objects, $1)="$p" + else + _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then + _LT_AC_TAGVAR(postdep_objects, $1)="$p" + else + _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$rm -f confest.$objext + +# PORTME: override above test on systems where it is broken +ifelse([$1],[CXX], +[case $host_os in +interix3*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_AC_TAGVAR(predep_objects,$1)= + _LT_AC_TAGVAR(postdep_objects,$1)= + _LT_AC_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + # + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + if test "$solaris_use_stlport4" != yes; then + _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_AC_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac +])# AC_LIBTOOL_POSTDEP_PREDEP + +# AC_LIBTOOL_LANG_F77_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) +AC_DEFUN([_LT_AC_LANG_F77_CONFIG], +[AC_REQUIRE([AC_PROG_F77]) +AC_LANG_PUSH(Fortran 77) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="\ + subroutine t + return + end +" + +# Code to be used in simple link tests +lt_simple_link_test_code="\ + program t + end +" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +AC_MSG_CHECKING([if libtool supports shared libraries]) +AC_MSG_RESULT([$can_build_shared]) + +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* | aix5*) + 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]) + +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]) + +_LT_AC_TAGVAR(GCC, $1)="$G77" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_F77_CONFIG + + +# AC_LIBTOOL_LANG_GCJ_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) +AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], +[AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_RESTORE +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_GCJ_CONFIG + + +# AC_LIBTOOL_LANG_RC_CONFIG +# ------------------------- +# Ensure that the configuration vars for the Windows resource compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) +AC_DEFUN([_LT_AC_LANG_RC_CONFIG], +[AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_RESTORE +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_RC_CONFIG + + +# AC_LIBTOOL_CONFIG([TAGNAME]) +# ---------------------------- +# If TAGNAME is not passed, then create an initial libtool script +# with a default configuration from the untagged config vars. Otherwise +# add code to config.status for appending the configuration named by +# TAGNAME from the matching tagged config vars. +AC_DEFUN([AC_LIBTOOL_CONFIG], +[# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + _LT_AC_TAGVAR(compiler, $1) \ + _LT_AC_TAGVAR(CC, $1) \ + _LT_AC_TAGVAR(LD, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ + _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ + _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ + _LT_AC_TAGVAR(old_archive_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ + _LT_AC_TAGVAR(predep_objects, $1) \ + _LT_AC_TAGVAR(postdep_objects, $1) \ + _LT_AC_TAGVAR(predeps, $1) \ + _LT_AC_TAGVAR(postdeps, $1) \ + _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ + _LT_AC_TAGVAR(archive_cmds, $1) \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ + _LT_AC_TAGVAR(postinstall_cmds, $1) \ + _LT_AC_TAGVAR(postuninstall_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ + _LT_AC_TAGVAR(allow_undefined_flag, $1) \ + _LT_AC_TAGVAR(no_undefined_flag, $1) \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ + _LT_AC_TAGVAR(hardcode_automatic, $1) \ + _LT_AC_TAGVAR(module_cmds, $1) \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) \ + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ + _LT_AC_TAGVAR(exclude_expsyms, $1) \ + _LT_AC_TAGVAR(include_expsyms, $1); do + + case $var in + _LT_AC_TAGVAR(old_archive_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ + _LT_AC_TAGVAR(archive_cmds, $1) | \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(module_cmds, $1) | \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\[$]0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` + ;; + esac + +ifelse([$1], [], + [cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + AC_MSG_NOTICE([creating $ofile])], + [cfgfile="$ofile"]) + + cat <<__EOF__ >> "$cfgfile" +ifelse([$1], [], +[#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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. + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG], +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) + +# Is the compiler the GNU C compiler? +with_gcc=$_LT_AC_TAGVAR(GCC, $1) + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_[]_LT_AC_TAGVAR(LD, $1) + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# 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_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) + +# 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_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) + +# 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_[]_LT_AC_TAGVAR(old_archive_cmds, $1) +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_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) + +# Commands used to build and install a shared archive. +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) + +# 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_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) + +# 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_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) + +# 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=$_LT_AC_TAGVAR(link_all_deplibs, $1) + +# 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="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" + +# Set to yes if exported symbols are required. +always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) + +# The commands to list exported symbols. +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) + +# 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_[]_LT_AC_TAGVAR(exclude_expsyms, $1) + +# Symbols that must always be exported. +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) + +ifelse([$1],[], +[# ### END LIBTOOL CONFIG], +[# ### END LIBTOOL TAG CONFIG: $tagname]) + +__EOF__ + +ifelse([$1],[], [ + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +]) +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi +])# AC_LIBTOOL_CONFIG + + +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI + + +# 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 from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# 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 an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux* | k*bsd*-gnu) + if test "$host_cpu" = ia64; then + symcode='[[ABCDGIRSTW]]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # 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 <<EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $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 grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat <<EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <<EOF >> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[[]] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + 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 +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + + +# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) +# --------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], +[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) + ifelse([$1],[CXX],[ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | 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). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + newsos6) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then + AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), + [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) +]) + + +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) +# ------------------------------------ +# See if the linker supports building shared libraries. +AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], +[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +ifelse([$1],[CXX],[ + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + ;; + *) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +],[ + runpath_var= + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)= + _LT_AC_TAGVAR(archive_expsym_cmds, $1)= + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown + _LT_AC_TAGVAR(hardcode_automatic, $1)=no + _LT_AC_TAGVAR(module_cmds, $1)= + _LT_AC_TAGVAR(module_expsym_cmds, $1)= + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$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 + _LT_AC_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_AC_TAGVAR(exclude_expsyms, $1)="_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= + # Just being paranoid about ensuring that cc_basename is set. + _LT_CC_BASENAME([$compiler]) + 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 + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <<EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$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)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + + # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive /dev/null' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <<EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=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 + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=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. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$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)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + # see comment about different semantics on the GNU ld section + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + bsdi[[45]]*) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_AC_TAGVAR(archive_cmds, $1)='$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. + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_AC_TAGVAR(ld_shlibs, $1)=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*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$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 + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + openbsd*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(archive_cmds, $1)='$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' + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$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 + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$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 + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$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' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$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' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=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. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_AC_TAGVAR(archive_cmds, $1) 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]) + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac +])# AC_LIBTOOL_PROG_LD_SHLIBS + + +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include <windows.h> +# #undef WIN32_LEAN_AND_MEAN +# #include <stdio.h> +# +# #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 <cygwin/cygwin_dll.h> +# 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 */ +])# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) + + +# 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]) + +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) + +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) +]) + +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +# LT_AC_PROG_SED +# -------------- +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +AC_DEFUN([LT_AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +]) + +# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.10])dnl +_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) + +# Figure out how to run the assembler. -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_PROG_AS +# ---------- +AC_DEFUN([AM_PROG_AS], +[# By default we simply use the C compiler to build assembly code. +AC_REQUIRE([AC_PROG_CC]) +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS +AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) +AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) +_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl +]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 3 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.60])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# --------------------------------------------------------------------------- +# Adds support for distributing Python modules and packages. To +# install modules, copy them to $(pythondir), using the python_PYTHON +# automake variable. To install a package with the same name as the +# automake package, install to $(pkgpythondir), or use the +# pkgpython_PYTHON automake variable. +# +# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as +# locations to install python extension modules (shared libraries). +# Another macro is required to find the appropriate flags to compile +# extension modules. +# +# If your package is configured with a different prefix to python, +# users will have to add the install directory to the PYTHONPATH +# environment variable, or create a .pth file (see the python +# documentation for details). +# +# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will +# cause an error if the version of python installed on the system +# doesn't meet the requirement. MINIMUM-VERSION should consist of +# numbers and dots only. +AC_DEFUN([AM_PATH_PYTHON], + [ + dnl Find a Python interpreter. Python versions prior to 1.5 are not + dnl supported because the default installation locations changed from + dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages + dnl in 1.5. + m4_define_default([_AM_PYTHON_INTERPRETER_LIST], + [python python2 python2.5 python2.4 python2.3 python2.2 dnl +python2.1 python2.0 python1.6 python1.5]) + + m4_if([$1],[],[ + dnl No version check is needed. + # Find any Python interpreter. + if test -z "$PYTHON"; then + AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) + fi + am_display_PYTHON=python + ], [ + dnl A version check is needed. + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. + AC_MSG_CHECKING([whether $PYTHON version >= $1]) + AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], + [AC_MSG_RESULT(yes)], + [AC_MSG_ERROR(too old)]) + am_display_PYTHON=$PYTHON + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. + AC_CACHE_CHECK([for a Python interpreter with version >= $1], + [am_cv_pathless_PYTHON],[ + for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do + test "$am_cv_pathless_PYTHON" = none && break + AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) + done]) + # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. + if test "$am_cv_pathless_PYTHON" = none; then + PYTHON=: + else + AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) + fi + am_display_PYTHON=$am_cv_pathless_PYTHON + fi + ]) + + if test "$PYTHON" = :; then + dnl Run any user-specified action, or abort. + m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) + else + + dnl Query Python for its version number. Getting [:3] seems to be + dnl the best way to do this; it's what "site.py" does in the standard + dnl library. + + AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], + [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`]) + AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) + + dnl Use the values of $prefix and $exec_prefix for the corresponding + dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made + dnl distinct variables so they can be overridden if need be. However, + dnl general consensus is that you shouldn't need this ability. + + AC_SUBST([PYTHON_PREFIX], ['${prefix}']) + AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) + + dnl At times (like when building shared libraries) you may want + dnl to know which OS platform Python thinks this is. + + AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], + [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`]) + AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) + + + dnl Set up 4 directories: + + dnl pythondir -- where to install python scripts. This is the + dnl site-packages directory, not the python standard library + dnl directory like in previous automake betas. This behavior + dnl is more consistent with lispdir.m4 for example. + dnl Query distutils for this directory. distutils does not exist in + dnl Python 1.5, so we fall back to the hardcoded directory if it + dnl doesn't work. + AC_CACHE_CHECK([for $am_display_PYTHON script directory], + [am_cv_python_pythondir], + [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || + echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`]) + AC_SUBST([pythondir], [$am_cv_python_pythondir]) + + dnl pkgpythondir -- $PACKAGE directory under pythondir. Was + dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is + dnl more consistent with the rest of automake. + + AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) + + dnl pyexecdir -- directory for installing python extension modules + dnl (shared libraries) + dnl Query distutils for this directory. distutils does not exist in + dnl Python 1.5, so we fall back to the hardcoded directory if it + dnl doesn't work. + AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], + [am_cv_python_pyexecdir], + [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || + echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`]) + AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) + + dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) + + AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) + + dnl Run any user-specified action. + $2 + fi + +]) + + +# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) +# --------------------------------------------------------------------------- +# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. +# Run ACTION-IF-FALSE otherwise. +# This test uses sys.hexversion instead of the string equivalent (first +# word of sys.version), in order to cope with versions such as 2.2c1. +# hexversion has been introduced in Python 1.5.2; it's probably not +# worth to support older versions (1.5.1 was released on October 31, 1998). +AC_DEFUN([AM_PYTHON_CHECK_VERSION], + [prog="import sys, string +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +minver = map(int, string.split('$2', '.')) + [[0, 0, 0]] +minverhex = 0 +for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]] +sys.exit(sys.hexversion < minverhex)" + AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar <conftest.tar]) + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([config/acx_pthread.m4]) +m4_include([config/gr_boost.m4]) +m4_include([config/gr_gprof.m4]) +m4_include([config/gr_no_undefined.m4]) +m4_include([config/gr_omnithread.m4]) +m4_include([config/gr_pwin32.m4]) +m4_include([config/gr_python.m4]) +m4_include([config/gr_scripting.m4]) +m4_include([config/gr_swig.m4]) +m4_include([config/gr_x86_64.m4]) +m4_include([config/lf_cxx.m4]) +m4_include([config/lf_warnings.m4]) +m4_include([config/pkg.m4]) diff --git a/gsmsp/gsm/config.guess b/gsmsp/gsm/config.guess new file mode 100755 index 0000000..c085f4f --- /dev/null +++ b/gsmsp/gsm/config.guess @@ -0,0 +1,1497 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2006-05-13' + +# 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., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, 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. + + +# Originally written by Per Bothner <per@bothner.com>. +# Please send patches to <config-patches@gnu.org>. Submit a context +# diff and a properly formatted ChangeLog entry. +# +# 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 <config-patches@gnu.org>." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +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 ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # 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 + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + 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 ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@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. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + 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 + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # 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 ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerppc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # 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. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + 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 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@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 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + 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 ;; + 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 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /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 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # 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 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include <stdio.h> /* 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 -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + 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 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????: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 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + 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 ;; + *: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 <sys/systemcfg.h> + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + 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 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | 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 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 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]) + 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" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include <stdlib.h> + #include <unistd.h> + + 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 -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <unistd.h> + 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 -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + 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 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + 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 ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + x86:Interix*:[345]*) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T:Interix*:[345]*) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 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 i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + 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 ;; + 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 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + 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. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C 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 ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit ;; + "") + # 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 ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <features.h> + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + 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 ;; + 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 ;; + 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 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + 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 ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + 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 ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` + echo ${UNAME_MACHINE}-pc-isc$UNAME_REL + elif /bin/uname -X 2>/dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + 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 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + 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 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*: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; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *: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 ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says <Richard.M.Bartel@ccMail.Census.GOV> + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes <hewes@openmarket.com>. + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + 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 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *: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 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; +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 <<EOF +#ifdef _SEQUENT_ +# include <sys/types.h> +# include <sys/utsname.h> +#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 <sys/param.h> + 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\n"); 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 <sys/param.h> +# 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 -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# 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 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 <<EOF +$0: unable to guess system type + +This script, last modified $timestamp, has failed to recognize +the operating system you are using. It is advised that you +download the most up to date version of the config scripts from + + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess +and + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub + +If the version you run ($0) is already up to date, please +send the following data and any information you think might be +pertinent to <config-patches@gnu.org> 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: diff --git a/gsmsp/gsm/config.h.in b/gsmsp/gsm/config.h.in new file mode 100644 index 0000000..2aadfb5 --- /dev/null +++ b/gsmsp/gsm/config.h.in @@ -0,0 +1,269 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if for loop scoping is broken */ +#undef CXX_HAS_BUGGY_FOR_LOOPS + +/* Define if C++ is missing bool type */ +#undef CXX_HAS_NO_BOOL + +/* Define if has std::isnan */ +#undef CXX_HAS_STD_ISNAN + +/* Define to 1 if you have the `clock_gettime' function. */ +#undef HAVE_CLOCK_GETTIME + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the <fcntl.h> header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `getopt' function. */ +#undef HAVE_GETOPT + +/* Define to 1 if you have the `gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the <inttypes.h> header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the <io.h> header file. */ +#undef HAVE_IO_H + +/* Define to 1 if you have the <limits.h> header file. */ +#undef HAVE_LIMITS_H + +/* Define to 1 if you have the <memory.h> header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `nanosleep' function. */ +#undef HAVE_NANOSLEEP + +/* Define if you have POSIX threads libraries and header files. */ +#undef HAVE_PTHREAD + +/* Define to 1 if you have the <Python.h> header file. */ +#undef HAVE_PYTHON_H + +/* Define to 1 if you have the `rand' function. */ +#undef HAVE_RAND + +/* Define to 1 if you have the `random' function. */ +#undef HAVE_RANDOM + +/* Define to 1 if you have the `sigaction' function. */ +#undef HAVE_SIGACTION + +/* Define to 1 if you have the `sleep' function. */ +#undef HAVE_SLEEP + +/* Define to 1 if you have the `srand' function. */ +#undef HAVE_SRAND + +/* Define to 1 if you have the `srandom' function. */ +#undef HAVE_SRANDOM + +/* Define to 1 if the system has the type `ssize_t'. */ +#undef HAVE_SSIZE_T + +/* Define to 1 if you have win32 Sleep */ +#undef HAVE_SSLEEP + +/* Define to 1 if you have the <stdint.h> header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the <strings.h> header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the <string.h> header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if the system has the type `struct timespec'. */ +#undef HAVE_STRUCT_TIMESPEC + +/* Define to 1 if the system has the type `struct timezone'. */ +#undef HAVE_STRUCT_TIMEZONE + +/* Define to 1 if you have the <sys/ioctl.h> header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define to 1 if you have the <sys/mman.h> header file. */ +#undef HAVE_SYS_MMAN_H + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the <sys/time.h> header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define to 1 if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `usleep' function. */ +#undef HAVE_USLEEP + +/* Define to 1 if you have the <winbase.h> header file. */ +#undef HAVE_WINBASE_H + +/* Define to 1 if you have the <windows.h> header file. */ +#undef HAVE_WINDOWS_H + +/* Define to 1 if you have the <winioctl.h> header file. */ +#undef HAVE_WINIOCTL_H + +/* Define if mkdir accepts only one arg */ +#undef MKDIR_TAKES_ONE_ARG + +/* Define to disable asserts (don't doit!) */ +#undef NDEBUG + +/* Define to 1 to enable NT thread */ +#undef OMNITHREAD_NT + +/* Define to 1 to enable pthread */ +#undef OMNITHREAD_POSIX + +/* Name of package */ +#undef PACKAGE + +/* 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 to the necessary symbol if this constant uses a non-standard name on + your system. */ +#undef PTHREAD_CREATE_JOINABLE + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ +#undef TIME_WITH_SYS_TIME + +/* Version number of package */ +#undef VERSION + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define to `unsigned int' if <sys/types.h> does not define. */ +#undef size_t + +// Workaround for compilers with buggy for-loop scoping +// That's quite a few compilers actually including recent versions of +// Dec Alpha cxx, HP-UX CC and SGI CC. +// The trivial "if" statement provides the correct scoping to the +// for loop + +#ifdef CXX_HAS_BUGGY_FOR_LOOPS +#undef for +#define for if(1) for +#endif + + +// If the C++ compiler we use doesn't have bool, then +// the following is a near-perfect work-around. +// You must make sure your code does not depend on "int" and "bool" +// being two different types, in overloading for instance. + +#ifdef CXX_HAS_NO_BOOL +#define bool int +#define true 1 +#define false 0 +#endif + + + +/* Define missing prototypes, implemented in replacement lib */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef HAVE_GETOPT +int getopt (int argc, char * const argv[], const char * optstring); +extern char * optarg; +extern int optind, opterr, optopt; +#endif + +#ifndef HAVE_USLEEP +int usleep(unsigned long usec); /* SUSv2 */ +#endif + +#ifndef HAVE_NANOSLEEP +#ifndef HAVE_STRUCT_TIMESPEC +#if HAVE_SYS_TYPES_H +# include <sys/types.h> /* need time_t */ +#endif +struct timespec { + time_t tv_sec; + long tv_nsec; +}; +#endif +static inline int nanosleep(const struct timespec *req, struct timespec *rem) { return usleep(req->tv_sec*1000000+req->tv_nsec/1000); } +#endif + +#if defined(HAVE_SSLEEP) && !defined(HAVE_SLEEP) +#ifdef HAVE_WINBASE_H +#include <windows.h> +#include <winbase.h> +#endif +/* TODO: what about SleepEx? */ +static inline unsigned int sleep (unsigned int nb_sec) { Sleep(nb_sec*1000); return 0; } +#endif + +#ifndef HAVE_GETTIMEOFDAY +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif +#ifndef HAVE_STRUCT_TIMEZONE +struct timezone { + int tz_minuteswest; + int tz_dsttime; +}; +#endif +int gettimeofday(struct timeval *tv, struct timezone *tz); +#endif + +#if !defined(HAVE_RANDOM) && defined(HAVE_RAND) +#include <stdlib.h> +static inline long int random (void) { return rand(); } +#endif + +#if !defined(HAVE_SRANDOM) && defined(HAVE_SRAND) +static inline void srandom (unsigned int seed) { srand(seed); } +#endif + +#ifndef HAVE_SSIZE_T +typedef size_t ssize_t; +#endif + +#ifdef __cplusplus +} +#endif + diff --git a/gsmsp/gsm/config.sub b/gsmsp/gsm/config.sub new file mode 100755 index 0000000..4d936e2 --- /dev/null +++ b/gsmsp/gsm/config.sub @@ -0,0 +1,1608 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2006-05-13' + +# 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., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, 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 <config-patches@gnu.org>. Submit a context +# diff and a properly formatted ChangeLog entry. +# +# 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 <config-patches@gnu.org>." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +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 ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # 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 ;; + + * ) + 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* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + 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 | -knuth | -cray) + 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 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -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/'` + ;; + -sco5v6*) + # 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] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ + | 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) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # 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]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ + | 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 + ;; + abacus) + basic_machine=abacus-unknown + ;; + 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 + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + 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 + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + 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 | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16c) + basic_machine=cr16c-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + 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 + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + 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 + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + 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 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`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 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-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=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + 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 + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + 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 + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + 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 + ;; + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + 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 + ;; + *-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* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -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* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -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 + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -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 + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -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 + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + 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 + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-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 + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + 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 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/gsmsp/gsm/config/Makefile.am b/gsmsp/gsm/config/Makefile.am new file mode 100644 index 0000000..5f336fa --- /dev/null +++ b/gsmsp/gsm/config/Makefile.am @@ -0,0 +1,65 @@ +# +# Copyright 2001 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +include $(top_srcdir)/Makefile.common + +# Install m4 macros in this directory +m4datadir = $(datadir)/aclocal + +# List your m4 macros here +m4macros = \ + acx_pthread.m4 \ + bnv_have_qt.m4 \ + cppunit.m4 \ + gr_boost.m4 \ + gr_check_createfilemapping.m4 \ + gr_check_usrp.m4 \ + gr_check_mc4020.m4 \ + gr_check_shm_open.m4 \ + gr_doxygen.m4 \ + gr_gprof.m4 \ + gr_libgnuradio_core_extra_ldflags.m4 \ + gr_no_undefined.m4 \ + gr_omnithread.m4 \ + gr_pwin32.m4 \ + gr_python.m4 \ + gr_require_mc4020.m4 \ + gr_scripting.m4 \ + gr_set_md_cpu.m4 \ + gr_swig.m4 \ + gr_sysv_shm.m4 \ + gr_x86_64.m4 \ + lf_cc.m4 \ + lf_cxx.m4 \ + lf_warnings.m4 \ + lf_x11.m4 \ + mkstemp.m4 \ + onceonly.m4 \ + pkg.m4 \ + usrp_fusb_tech.m4 \ + usrp_libusb.m4 \ + usrp_sdcc.m4 + + +# Don't install m4 macros anymore +# m4data_DATA = $(m4macros) + +EXTRA_DIST = $(m4macros) diff --git a/gsmsp/gsm/config/Makefile.in b/gsmsp/gsm/config/Makefile.in new file mode 100644 index 0000000..dbe9ebb --- /dev/null +++ b/gsmsp/gsm/config/Makefile.in @@ -0,0 +1,477 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Copyright 2001 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +# -*- Makefile -*- +# +# Copyright 2004,2006 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/Makefile.common +subdir = config +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/acx_pthread.m4 \ + $(top_srcdir)/config/gr_boost.m4 \ + $(top_srcdir)/config/gr_gprof.m4 \ + $(top_srcdir)/config/gr_no_undefined.m4 \ + $(top_srcdir)/config/gr_omnithread.m4 \ + $(top_srcdir)/config/gr_pwin32.m4 \ + $(top_srcdir)/config/gr_python.m4 \ + $(top_srcdir)/config/gr_scripting.m4 \ + $(top_srcdir)/config/gr_swig.m4 \ + $(top_srcdir)/config/gr_x86_64.m4 \ + $(top_srcdir)/config/lf_cxx.m4 \ + $(top_srcdir)/config/lf_warnings.m4 \ + $(top_srcdir)/config/pkg.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXX_FOR_BUILD = @CXX_FOR_BUILD@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GNURADIO_CORE_CFLAGS = @GNURADIO_CORE_CFLAGS@ +GNURADIO_CORE_INCLUDEDIR = @GNURADIO_CORE_INCLUDEDIR@ +GNURADIO_CORE_LIBS = @GNURADIO_CORE_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NO_UNDEFINED = @NO_UNDEFINED@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +PYTHON = @PYTHON@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RM_PROG = @RM_PROG@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STD_DEFINES_AND_INCLUDES = @STD_DEFINES_AND_INCLUDES@ +STRIP = @STRIP@ +SWIG = @SWIG@ +SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ +SWIG_PYTHON_LIB = @SWIG_PYTHON_LIB@ +SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# includes +grincludedir = $(includedir)/gnuradio + +# swig includes +swigincludedir = $(grincludedir)/swig + +# Install this stuff in the appropriate subdirectory +# This usually ends up at: +# ${prefix}/lib/python${python_version}/site-packages/gnuradio +grpythondir = $(pythondir)/gnuradio +grpyexecdir = $(pyexecdir)/gnuradio + +# swig flags +SWIGPYTHONFLAGS = -fvirtual -python -modern +SWIGGRFLAGS = -I$(GNURADIO_CORE_INCLUDEDIR)/swig -I$(GNURADIO_CORE_INCLUDEDIR) + +# Don't assume that make predefines $(RM), because BSD make does +# not. We define it now in configure.ac using AM_PATH_PROG, but now +# here have to add a -f to be like GNU make. +RM = $(RM_PROG) -f + +# Install m4 macros in this directory +m4datadir = $(datadir)/aclocal + +# List your m4 macros here +m4macros = \ + acx_pthread.m4 \ + bnv_have_qt.m4 \ + cppunit.m4 \ + gr_boost.m4 \ + gr_check_createfilemapping.m4 \ + gr_check_usrp.m4 \ + gr_check_mc4020.m4 \ + gr_check_shm_open.m4 \ + gr_doxygen.m4 \ + gr_gprof.m4 \ + gr_libgnuradio_core_extra_ldflags.m4 \ + gr_no_undefined.m4 \ + gr_omnithread.m4 \ + gr_pwin32.m4 \ + gr_python.m4 \ + gr_require_mc4020.m4 \ + gr_scripting.m4 \ + gr_set_md_cpu.m4 \ + gr_swig.m4 \ + gr_sysv_shm.m4 \ + gr_x86_64.m4 \ + lf_cc.m4 \ + lf_cxx.m4 \ + lf_warnings.m4 \ + lf_x11.m4 \ + mkstemp.m4 \ + onceonly.m4 \ + pkg.m4 \ + usrp_fusb_tech.m4 \ + usrp_libusb.m4 \ + usrp_sdcc.m4 + + +# Don't install m4 macros anymore +# m4data_DATA = $(m4macros) +EXTRA_DIST = $(m4macros) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.common $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign config/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign config/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/gsmsp/gsm/config/acx_pthread.m4 b/gsmsp/gsm/config/acx_pthread.m4 new file mode 100644 index 0000000..d318ab0 --- /dev/null +++ b/gsmsp/gsm/config/acx_pthread.m4 @@ -0,0 +1,190 @@ +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/htmldoc/acx_pthread.html +dnl +AC_DEFUN([ACX_PTHREAD], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_LANG_SAVE +AC_LANG_C +acx_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) + AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) + AC_MSG_RESULT($acx_pthread_ok) + if test x"$acx_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all. + +acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# pthread: Linux, etcetera +# --thread-safe: KAI C++ + +case "${host_cpu}-${host_os}" in + *solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthread or + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" + ;; +esac + +if test x"$acx_pthread_ok" = xno; then +for flag in $acx_pthread_flags; do + + case $flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $flag]) + PTHREAD_CFLAGS="$flag" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$flag]) + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + AC_TRY_LINK([#include <pthread.h>], + [pthread_t th; pthread_join(th, 0); + pthread_attr_init(0); pthread_cleanup_push(0, 0); + pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], + [acx_pthread_ok=yes]) + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + AC_MSG_RESULT($acx_pthread_ok) + if test "x$acx_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$acx_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: threads are created detached by default + # and the JOINABLE attribute has a nonstandard name (UNDETACHED). + AC_MSG_CHECKING([for joinable pthread attribute]) + AC_TRY_LINK([#include <pthread.h>], + [int attr=PTHREAD_CREATE_JOINABLE;], + ok=PTHREAD_CREATE_JOINABLE, ok=unknown) + if test x"$ok" = xunknown; then + AC_TRY_LINK([#include <pthread.h>], + [int attr=PTHREAD_CREATE_UNDETACHED;], + ok=PTHREAD_CREATE_UNDETACHED, ok=unknown) + fi + if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then + AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok, + [Define to the necessary symbol if this constant + uses a non-standard name on your system.]) + fi + AC_MSG_RESULT(${ok}) + if test x"$ok" = xunknown; then + AC_MSG_WARN([we do not know how to create joinable pthreads]) + fi + + AC_MSG_CHECKING([if more special flags are required for pthreads]) + flag=no + case "${host_cpu}-${host_os}" in + *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; + *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; + esac + AC_MSG_RESULT(${flag}) + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + # More AIX lossage: must compile with cc_r + AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC}) +else + PTHREAD_CC="$CC" +fi + +AC_SUBST(PTHREAD_LIBS) +AC_SUBST(PTHREAD_CFLAGS) +AC_SUBST(PTHREAD_CC) + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$acx_pthread_ok" = xyes; then + ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) + : +else + acx_pthread_ok=no + $2 +fi +AC_LANG_RESTORE +])dnl ACX_PTHREAD diff --git a/gsmsp/gsm/config/bnv_have_qt.m4 b/gsmsp/gsm/config/bnv_have_qt.m4 new file mode 100644 index 0000000..1469bfb --- /dev/null +++ b/gsmsp/gsm/config/bnv_have_qt.m4 @@ -0,0 +1,404 @@ +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/htmldoc/bnv_have_qt.html +dnl +AC_DEFUN([BNV_HAVE_QT], +[ + dnl THANKS! This code includes bug fixes by: + dnl Tim McClarren. + + AC_REQUIRE([AC_PROG_CXX]) + AC_REQUIRE([AC_PATH_X]) + AC_REQUIRE([AC_PATH_XTRA]) + + AC_MSG_CHECKING(for Qt) + + AC_ARG_WITH([Qt-dir], + [ --with-Qt-dir=DIR DIR is equal to \$QTDIR if you have followed the + installation instructions of Trolltech. Header + files are in DIR/include, binary utilities are + in DIR/bin and the library is in DIR/lib]) + AC_ARG_WITH([Qt-include-dir], + [ --with-Qt-include-dir=DIR + Qt header files are in DIR]) + AC_ARG_WITH([Qt-bin-dir], + [ --with-Qt-bin-dir=DIR Qt utilities such as moc and uic are in DIR]) + AC_ARG_WITH([Qt-lib-dir], + [ --with-Qt-lib-dir=DIR The Qt library is in DIR]) + AC_ARG_WITH([Qt-lib], + [ --with-Qt-lib=LIB Use -lLIB to link with the Qt library]) + if test x"$with_Qt_dir" = x"no" || + test x"$with_Qt_include-dir" = x"no" || + test x"$with_Qt_bin_dir" = x"no" || + test x"$with_Qt_lib_dir" = x"no" || + test x"$with_Qt_lib" = x"no"; then + # user disabled Qt. Leave cache alone. + have_qt="User disabled Qt." + else + # "yes" is a bogus option + if test x"$with_Qt_dir" = xyes; then + with_Qt_dir= + fi + if test x"$with_Qt_include_dir" = xyes; then + with_Qt_include_dir= + fi + if test x"$with_Qt_bin_dir" = xyes; then + with_Qt_bin_dir= + fi + if test x"$with_Qt_lib_dir" = xyes; then + with_Qt_lib_dir= + fi + if test x"$with_Qt_lib" = xyes; then + with_Qt_lib= + fi + # No Qt unless we discover otherwise + have_qt=no + # Check whether we are requested to link with a specific version + if test x"$with_Qt_lib" != x; then + bnv_qt_lib="$with_Qt_lib" + fi + # Check whether we were supplied with an answer already + if test x"$with_Qt_dir" != x; then + have_qt=yes + bnv_qt_dir="$with_Qt_dir" + bnv_qt_include_dir="$with_Qt_dir/include" + bnv_qt_bin_dir="$with_Qt_dir/bin" + bnv_qt_lib_dir="$with_Qt_dir/lib" + # Only search for the lib if the user did not define one already + if test x"$bnv_qt_lib" = x; then + bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p | + sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`" + fi + bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + else + # Use cached value or do search, starting with suggestions from + # the command line + AC_CACHE_VAL(bnv_cv_have_qt, + [ + # We are not given a solution and there is no cached value. + bnv_qt_dir=NO + bnv_qt_include_dir=NO + bnv_qt_lib_dir=NO + if test x"$bnv_qt_lib" = x; then + bnv_qt_lib=NO + fi + BNV_PATH_QT_DIRECT + if test "$bnv_qt_dir" = NO || + test "$bnv_qt_include_dir" = NO || + test "$bnv_qt_lib_dir" = NO || + test "$bnv_qt_lib" = NO; then + # Problem with finding complete Qt. Cache the known absence of Qt. + bnv_cv_have_qt="have_qt=no" + else + # Record where we found Qt for the cache. + bnv_cv_have_qt="have_qt=yes \ + bnv_qt_dir=$bnv_qt_dir \ + bnv_qt_include_dir=$bnv_qt_include_dir \ + bnv_qt_bin_dir=$bnv_qt_bin_dir \ + bnv_qt_LIBS=\"$bnv_qt_LIBS\"" + fi + ])dnl + eval "$bnv_cv_have_qt" + fi # all $bnv_qt_* are set + fi # $have_qt reflects the system status + if test x"$have_qt" = xyes; then + QT_CXXFLAGS="-I$bnv_qt_include_dir" + QT_DIR="$bnv_qt_dir" + QT_LIBS="$bnv_qt_LIBS" + # If bnv_qt_dir is defined, utilities are expected to be in the + # bin subdirectory + if test x"$bnv_qt_dir" != x; then + if test -x "$bnv_qt_dir/bin/uic"; then + QT_UIC="$bnv_qt_dir/bin/uic" + else + # Old versions of Qt don't have uic + QT_UIC= + fi + QT_MOC="$bnv_qt_dir/bin/moc" + else + # Or maybe we are told where to look for the utilities + if test x"$bnv_qt_bin_dir" != x; then + if test -x "$bnv_qt_bin_dir/uic"; then + QT_UIC="$bnv_qt_bin_dir/uic" + else + # Old versions of Qt don't have uic + QT_UIC= + fi + QT_MOC="$bnv_qt_bin_dir/moc" + else + # Last possibility is that they are in $PATH + QT_UIC="`which uic`" + QT_MOC="`which moc`" + fi + fi + # All variables are defined, report the result + AC_MSG_RESULT([$have_qt: + QT_CXXFLAGS=$QT_CXXFLAGS + QT_DIR=$QT_DIR + QT_LIBS=$QT_LIBS + QT_UIC=$QT_UIC + QT_MOC=$QT_MOC]) + else + # Qt was not found + QT_CXXFLAGS= + QT_DIR= + QT_LIBS= + QT_UIC= + QT_MOC= + AC_MSG_RESULT($have_qt) + fi + AC_SUBST(QT_CXXFLAGS) + AC_SUBST(QT_DIR) + AC_SUBST(QT_LIBS) + AC_SUBST(QT_UIC) + AC_SUBST(QT_MOC) + + #### Being paranoid: + if test x"$have_qt" = xyes; then + AC_MSG_CHECKING(correct functioning of Qt installation) + AC_CACHE_VAL(bnv_cv_qt_test_result, + [ + cat > bnv_qt_test.h << EOF +#include <qobject.h> +class Test : public QObject +{ +Q_OBJECT +public: + Test() {} + ~Test() {} +public slots: + void receive() {} +signals: + void send(); +}; +EOF + + cat > bnv_qt_main.$ac_ext << EOF +#include "bnv_qt_test.h" +#include <qapplication.h> +int main( int argc, char **argv ) +{ + QApplication app( argc, argv ); + Test t; + QObject::connect( &t, SIGNAL(send()), &t, SLOT(receive()) ); +} +EOF + + bnv_cv_qt_test_result="failure" + bnv_try_1="$QT_MOC bnv_qt_test.h -o moc_bnv_qt_test.$ac_ext >/dev/null 2>bnv_qt_test_1.out" + AC_TRY_EVAL(bnv_try_1) + bnv_err_1=`grep -v '^ *+' bnv_qt_test_1.out | grep -v "^bnv_qt_test.h\$"` + if test x"$bnv_err_1" != x; then + echo "$bnv_err_1" >&AC_FD_CC + echo "configure: could not run $QT_MOC on:" >&AC_FD_CC + cat bnv_qt_test.h >&AC_FD_CC + else + bnv_try_2="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o moc_bnv_qt_test.o moc_bnv_qt_test.$ac_ext >/dev/null 2>bnv_qt_test_2.out" + AC_TRY_EVAL(bnv_try_2) + bnv_err_2=`grep -v '^ *+' bnv_qt_test_2.out | grep -v "^bnv_qt_test.{$ac_ext}\$"` + if test x"$bnv_err_2" != x; then + echo "$bnv_err_2" >&AC_FD_CC + echo "configure: could not compile:" >&AC_FD_CC + cat bnv_qt_test.$ac_ext >&AC_FD_CC + else + bnv_try_3="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o bnv_qt_main.o bnv_qt_main.$ac_ext >/dev/null 2>bnv_qt_test_3.out" + AC_TRY_EVAL(bnv_try_3) + bnv_err_3=`grep -v '^ *+' bnv_qt_test_3.out | grep -v "^bnv_qt_main.{$ac_ext}\$"` + if test x"$bnv_err_3" != x; then + echo "$bnv_err_3" >&AC_FD_CC + echo "configure: could not compile:" >&AC_FD_CC + cat bnv_qt_main.$ac_ext >&AC_FD_CC + else + bnv_try_4="$CXX $QT_LIBS $LIBS -o bnv_qt_main bnv_qt_main.o moc_bnv_qt_test.o >/dev/null 2>bnv_qt_test_4.out" + AC_TRY_EVAL(bnv_try_4) + bnv_err_4=`grep -v '^ *+' bnv_qt_test_4.out` + if test x"$bnv_err_4" != x; then + echo "$bnv_err_4" >&AC_FD_CC + else + bnv_cv_qt_test_result="success" + fi + fi + fi + fi + ])dnl AC_CACHE_VAL bnv_cv_qt_test_result + AC_MSG_RESULT([$bnv_cv_qt_test_result]); + if test x"$bnv_cv_qt_test_result" = "xfailure"; then + # working Qt was not found + QT_CXXFLAGS= + QT_DIR= + QT_LIBS= + QT_UIC= + QT_MOC= + have_qt=no + AC_MSG_WARN([Failed to find matching components of a complete + Qt installation. Try using more options, + see ./configure --help.]) + fi + + rm -f bnv_qt_test.h moc_bnv_qt_test.$ac_ext moc_bnv_qt_test.o \ + bnv_qt_main.$ac_ext bnv_qt_main.o bnv_qt_main \ + bnv_qt_test_1.out bnv_qt_test_2.out bnv_qt_test_3.out bnv_qt_test_4.out + fi +]) + +dnl Internal subroutine of BNV_HAVE_QT +dnl Set bnv_qt_dir bnv_qt_include_dir bnv_qt_bin_dir bnv_qt_lib_dir bnv_qt_lib +dnl Copyright 2001 Bastiaan N. Veelo <Bastiaan.N.Veelo@immtek.ntnu.no> +AC_DEFUN([BNV_PATH_QT_DIRECT], +[ + ## Binary utilities ## + if test x"$with_Qt_bin_dir" != x; then + bnv_qt_bin_dir=$with_Qt_bin_dir + fi + ## Look for header files ## + if test x"$with_Qt_include_dir" != x; then + bnv_qt_include_dir="$with_Qt_include_dir" + else + # The following header file is expected to define QT_VERSION. + qt_direct_test_header=qglobal.h + # Look for the header file in a standard set of common directories. + bnv_include_path_list=" + /usr/include + `ls -dr /usr/include/qt* 2>/dev/null` + `ls -dr /usr/lib/qt*/include 2>/dev/null` + `ls -dr /usr/local/qt*/include 2>/dev/null` + `ls -dr /opt/qt*/include 2>/dev/null` + " + for bnv_dir in $bnv_include_path_list; do + if test -r "$bnv_dir/$qt_direct_test_header"; then + bnv_dirs="$bnv_dirs $bnv_dir" + fi + done + # Now look for the newest in this list + bnv_prev_ver=0 + for bnv_dir in $bnv_dirs; do + bnv_this_ver=`egrep -w '#define QT_VERSION' $bnv_dir/$qt_direct_test_header | sed s/'#define QT_VERSION'//` + if expr $bnv_this_ver '>' $bnv_prev_ver > /dev/null; then + bnv_qt_include_dir=$bnv_dir + bnv_prev_ver=$bnv_this_ver + fi + done + fi dnl Found header files. + + # Are these headers located in a traditional Trolltech installation? + # That would be $bnv_qt_include_dir stripped from its last element: + bnv_possible_qt_dir=`dirname $bnv_qt_include_dir` + if test -x $bnv_possible_qt_dir/bin/moc && + ls $bnv_possible_qt_dir/lib/libqt* > /dev/null; then + # Then the rest is a piece of cake + bnv_qt_dir=$bnv_possible_qt_dir + bnv_qt_bin_dir="$bnv_qt_dir/bin" + bnv_qt_lib_dir="$bnv_qt_dir/lib" + # Only look for lib if the user did not supply it already + if test x"$bnv_qt_lib" = xNO; then + bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p | + sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`" + fi + bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + else + # There is no valid definition for $QTDIR as Trolltech likes to see it + bnv_qt_dir= + ## Look for Qt library ## + if test x"$with_Qt_lib_dir" != x; then + bnv_qt_lib_dir="$with_Qt_lib_dir" + # Only look for lib if the user did not supply it already + if test x"$bnv_qt_lib" = xNO; then + bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p | + sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`" + fi + bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + else + # Normally, when there is no traditional Trolltech installation, + # the library is installed in a place where the linker finds it + # automatically. + # If the user did not define the library name, try with qt + if test x"$bnv_qt_lib" = xNO; then + bnv_qt_lib=qt + fi + qt_direct_test_header=qapplication.h + qt_direct_test_main=" + int argc; + char ** argv; + QApplication app(argc,argv); + " + # See if we find the library without any special options. + # Don't add top $LIBS permanently yet + bnv_save_LIBS="$LIBS" + LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + bnv_qt_LIBS="$LIBS" + bnv_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="-I$bnv_qt_include_dir" + AC_TRY_LINK([#include <$qt_direct_test_header>], + $qt_direct_test_main, + [ + # Success. + # We can link with no special library directory. + bnv_qt_lib_dir= + ], [ + # That did not work. Try the multi-threaded version + echo "Non-critical error, please neglect the above." >&AC_FD_CC + bnv_qt_lib=qt-mt + LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + AC_TRY_LINK([#include <$qt_direct_test_header>], + $qt_direct_test_main, + [ + # Success. + # We can link with no special library directory. + bnv_qt_lib_dir= + ], [ + # That did not work. Try the OpenGL version + echo "Non-critical error, please neglect the above." >&AC_FD_CC + bnv_qt_lib=qt-gl + LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + AC_TRY_LINK([#include <$qt_direct_test_header>], + $qt_direct_test_main, + [ + # Succes. + # We can link with no special library directory. + bnv_qt_lib_dir= + ], [ + # That did not work. Maybe a library version I don't know about? + echo "Non-critical error, please neglect the above." >&AC_FD_CC + # Look for some Qt lib in a standard set of common directories. + bnv_dir_list=" + `echo $bnv_qt_includes | sed ss/includess` + /lib + /usr/lib + /usr/local/lib + /opt/lib + `ls -dr /usr/lib/qt* 2>/dev/null` + `ls -dr /usr/local/qt* 2>/dev/null` + `ls -dr /opt/qt* 2>/dev/null` + " + for bnv_dir in $bnv_dir_list; do + if ls $bnv_dir/libqt*; then + # Gamble that it's the first one... + bnv_qt_lib="`ls $bnv_dir/libqt* | sed -n 1p | + sed s@$bnv_dir/lib@@ | sed s/[.].*//`" + bnv_qt_lib_dir="$bnv_dir" + break + fi + done + # Try with that one + LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + AC_TRY_LINK([#include <$qt_direct_test_header>], + $qt_direct_test_main, + [ + # Succes. + # We can link with no special library directory. + bnv_qt_lib_dir= + ], [ + # Leave bnv_qt_lib_dir defined + ]) + ]) + ]) + ]) + if test x"$bnv_qt_lib_dir" != x; then + bnv_qt_LIBS="-l$bnv_qt_lib_dir $LIBS" + else + bnv_qt_LIBS="$LIBS" + fi + LIBS="$bnv_save_LIBS" + CXXFLAGS="$bnv_save_CXXFLAGS" + fi dnl $with_Qt_lib_dir was not given + fi dnl Done setting up for non-traditional Trolltech installation +]) diff --git a/gsmsp/gsm/config/cppunit.m4 b/gsmsp/gsm/config/cppunit.m4 new file mode 100644 index 0000000..0991d51 --- /dev/null +++ b/gsmsp/gsm/config/cppunit.m4 @@ -0,0 +1,80 @@ +dnl +dnl AM_PATH_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +dnl +AC_DEFUN([AM_PATH_CPPUNIT], +[ + +AC_ARG_WITH(cppunit-prefix,[ --with-cppunit-prefix=PFX Prefix where CppUnit is installed (optional)], + cppunit_config_prefix="$withval", cppunit_config_prefix="") +AC_ARG_WITH(cppunit-exec-prefix,[ --with-cppunit-exec-prefix=PFX Exec prefix where CppUnit is installed (optional)], + cppunit_config_exec_prefix="$withval", cppunit_config_exec_prefix="") + + if test x$cppunit_config_exec_prefix != x ; then + cppunit_config_args="$cppunit_config_args --exec-prefix=$cppunit_config_exec_prefix" + if test x${CPPUNIT_CONFIG+set} != xset ; then + CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config + fi + fi + if test x$cppunit_config_prefix != x ; then + cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix" + if test x${CPPUNIT_CONFIG+set} != xset ; then + CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config + fi + fi + + AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no) + cppunit_version_min=$1 + + AC_MSG_CHECKING(for Cppunit - version >= $cppunit_version_min) + no_cppunit="" + if test "$CPPUNIT_CONFIG" = "no" ; then + no_cppunit=yes + else + CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags` + CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs` + cppunit_version=`$CPPUNIT_CONFIG --version` + + cppunit_major_version=`echo $cppunit_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + cppunit_minor_version=`echo $cppunit_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + cppunit_micro_version=`echo $cppunit_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + cppunit_major_min=`echo $cppunit_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + cppunit_minor_min=`echo $cppunit_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + cppunit_micro_min=`echo $cppunit_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + cppunit_version_proper=`expr \ + $cppunit_major_version \> $cppunit_major_min \| \ + $cppunit_major_version \= $cppunit_major_min \& \ + $cppunit_minor_version \> $cppunit_minor_min \| \ + $cppunit_major_version \= $cppunit_major_min \& \ + $cppunit_minor_version \= $cppunit_minor_min \& \ + $cppunit_micro_version \>= $cppunit_micro_min ` + + if test "$cppunit_version_proper" = "1" ; then + AC_MSG_RESULT([$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version]) + else + AC_MSG_RESULT(no) + no_cppunit=yes + fi + fi + + if test "x$no_cppunit" = x ; then + ifelse([$2], , :, [$2]) + else + CPPUNIT_CFLAGS="" + CPPUNIT_LIBS="" + ifelse([$3], , :, [$3]) + fi + + AC_SUBST(CPPUNIT_CFLAGS) + AC_SUBST(CPPUNIT_LIBS) +]) + + + diff --git a/gsmsp/gsm/config/gr_boost.m4 b/gsmsp/gsm/config/gr_boost.m4 new file mode 100644 index 0000000..7236cbb --- /dev/null +++ b/gsmsp/gsm/config/gr_boost.m4 @@ -0,0 +1,111 @@ +dnl +dnl Copyright 2004,2005 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +dnl This tries to do the "right thing" to locate the boost include files. +dnl If the user explicitly specified --with-boost-include-dir=<foo> +dnl we believe them and use it. Otherwise, +dnl +dnl We look for boost/shared_ptr.hpp in the "normal places". That is, +dnl wherever AC_CHECK_HEADER looks. If the boost includes are in /usr/local/include +dnl this step will find them. +dnl +dnl Otherwise, we check to see if the boost stuff was installed in a version-specific +dnl directory under /usr/local/include. These look like: /usr/local/include/boost-1_33_1 +dnl If there's more than one version installed, we select the +dnl lexicographically greatest one. +dnl +dnl If none of these work, we bail. + +AC_DEFUN([GR_REQUIRE_BOOST_INCLUDES], +[ + AC_LANG_PUSH(C++) + gr_boost_include_dir= + AC_ARG_WITH([boost-include-dir], + AC_HELP_STRING([--with-boost-include-dir=<path>], + [path to boost c++ include files]), + [ + # "yes" and "no" are bogus answers + if test x"$with_boost_include_dir" = xyes || + test x"$with_boost_include_dir" = xno; then + gr_boost_include_dir= + else + gr_boost_include_dir=$with_boost_include_dir + fi + ]) + echo "gr_boost_include_dir = $gr_boost_include_dir" + if test x$gr_boost_include_dir != x; then + # + # If the user specified a directory, then we use it + # + OLD_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$gr_boost_include_dir" + AC_CHECK_HEADER([boost/shared_ptr.hpp], + [BOOST_CFLAGS="-I$gr_boost_include_dir"], + [AC_MSG_ERROR( + [Failed to locate boost/shared_ptr.hpp. +Try using --with-boost-include-dir=<path>, +E.g., --with-boost-include-dir=/usr/local/include/boost-1_33_1])]) + CPPFLAGS=$OLD_CPPFLAGS + else + # + # Otherwise we check in the default places + # + AC_CHECK_HEADER([boost/shared_ptr.hpp], + [BOOST_CFLAGS=""], + [ # Nope, look for latest version if any in $prefix/include/boost-* + + # Wipe out cached value. KLUDGE: AC should have API for this + unset AS_TR_SH([ac_cv_header_boost/shared_ptr.hpp]) + + boost_last_match(){ + #echo "boost_last_match: [$]*" + pattern="[$]1" + shift + if test "[$]pattern" = "[$]1" + then + LM='' + else + shift `expr [$]# - 1` + LM=[$]1 + fi + #echo "LM(1)='[$]LM'" + } + + pattern="/usr/local/include/boost-*" + boost_last_match "$pattern" $pattern + #echo "LM(2)='$LM'" + + OLD_CPPFLAGS=$CPP_FLAGS + CPPFLAGS="$CPPFLAGS -I$LM" + AC_CHECK_HEADER([boost/shared_ptr.hpp], + [BOOST_CFLAGS="-I$LM"], + [AC_MSG_ERROR( + [Failed to locate boost/shared_ptr.hpp. +Try using --with-boost-include-dir=<path>, +E.g., --with-boost-include-dir=/usr/local/include/boost-1_33_1])]) + CPPFLAGS=$OLD_CPPFLAGS + ]) + + fi + unset boost_last_match LM + AC_LANG_POP + AC_SUBST(BOOST_CFLAGS) +]) diff --git a/gsmsp/gsm/config/gr_check_createfilemapping.m4 b/gsmsp/gsm/config/gr_check_createfilemapping.m4 new file mode 100644 index 0000000..681847a --- /dev/null +++ b/gsmsp/gsm/config/gr_check_createfilemapping.m4 @@ -0,0 +1,52 @@ +dnl +dnl Copyright 2005 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. + +dnl AC_DEFUN([GR_CHECK_CREATEFILEMAPPING], +dnl [ +dnl AC_CHECK_FUNCS([CreateFileMapping]) +dnl ]) + +AC_DEFUN([GR_CHECK_CREATEFILEMAPPING],[ + AC_MSG_CHECKING([for CreateFileMapping function]) + AC_COMPILE_IFELSE([ +#include <windows.h> +int main (int argc, char **argv) +{ + HANDLE handle; + int size; + char seg_name[[1024]]; + handle = CreateFileMapping( + INVALID_HANDLE_VALUE, // use paging file + NULL, // default security + PAGE_READWRITE, // read/write access + 0, // max. object size + size, // buffer size + seg_name); // name of mapping object + return 0; +} +],[HAVE_CREATEFILEMAPPING=yes + AC_DEFINE(HAVE_CREATEFILEMAPPING,[1],[Define if you have the CreateFilemapping function(win32).])], + [HAVE_CREATEFILEMAPPING=no]) + + AC_MSG_RESULT($HAVE_CREATEFILEMAPPING) + AM_CONDITIONAL(HAVE_CREATEFILEMAPPING, test x$HAVE_CREATEFILEMAPPING = xyes) +]) + + diff --git a/gsmsp/gsm/config/gr_check_mc4020.m4 b/gsmsp/gsm/config/gr_check_mc4020.m4 new file mode 100644 index 0000000..f518c3c --- /dev/null +++ b/gsmsp/gsm/config/gr_check_mc4020.m4 @@ -0,0 +1,37 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +AC_DEFUN([GR_CHECK_MC4020],[ + AC_MSG_CHECKING([for mc4020 A/D driver include file]) + AC_COMPILE_IFELSE([ +#include <mc4020.h> +int main (int argc, char **argv) +{ + return 0; +} +],[HAVE_MC4020=yes + AC_DEFINE(HAVE_MC4020,[1],[Define if you have a Measurement Computing PCI-DAS4020/12 A/D])], + [HAVE_MC4020=no]) + + AC_MSG_RESULT($HAVE_MC4020) + AM_CONDITIONAL(HAVE_MC4020, test x$HAVE_MC4020 = xyes) +]) + diff --git a/gsmsp/gsm/config/gr_check_shm_open.m4 b/gsmsp/gsm/config/gr_check_shm_open.m4 new file mode 100644 index 0000000..71638cf --- /dev/null +++ b/gsmsp/gsm/config/gr_check_shm_open.m4 @@ -0,0 +1,29 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. + +AC_DEFUN([GR_CHECK_SHM_OPEN], +[ + SHM_OPEN_LIBS="" + save_LIBS="$LIBS" + AC_SEARCH_LIBS([shm_open], [rt], [SHM_OPEN_LIBS="$LIBS"]) + AC_CHECK_FUNCS([shm_open]) + LIBS="$save_LIBS" + AC_SUBST(SHM_OPEN_LIBS) +]) diff --git a/gsmsp/gsm/config/gr_check_usrp.m4 b/gsmsp/gsm/config/gr_check_usrp.m4 new file mode 100644 index 0000000..79759a3 --- /dev/null +++ b/gsmsp/gsm/config/gr_check_usrp.m4 @@ -0,0 +1,32 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +dnl Check for Universal Software Radio Peripheral + +AC_DEFUN([GR_CHECK_USRP],[ + PKG_CHECK_MODULES(USRP, usrp >= 0.2, + [HAVE_USRP=yes + AC_DEFINE(HAVE_USRP,[1],[Define if you have a USRP])], + [HAVE_USRP=no]) + + AM_CONDITIONAL(HAVE_USRP, test x$HAVE_USRP = xyes) +]) + diff --git a/gsmsp/gsm/config/gr_doxygen.m4 b/gsmsp/gsm/config/gr_doxygen.m4 new file mode 100644 index 0000000..775be89 --- /dev/null +++ b/gsmsp/gsm/config/gr_doxygen.m4 @@ -0,0 +1,59 @@ +dnl +dnl Copyright 2003,2005 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +AC_DEFUN([GR_CHECK_DOXYGEN],[ + AC_ARG_ENABLE(doxygen, [ --enable-doxygen enable documentation generation with doxygen (no)]) + AC_ARG_ENABLE(dot, [ --enable-dot use 'dot' to generate graphs in doxygen (auto)]) + AC_ARG_ENABLE(html-docs, [ --enable-html-docs enable HTML generation with doxygen (yes)], [], [ enable_html_docs=yes]) + AC_ARG_ENABLE(latex-docs, [ --enable-latex-docs enable LaTeX doc generation with doxygen (no)], [], [ enable_latex_docs=no]) + + if test "x$enable_doxygen" = xyes; then + AC_PATH_PROG(DOXYGEN, doxygen, , $PATH) + if test x$DOXYGEN = x; then + if test "x$enable_doxygen" = xyes; then + AC_MSG_ERROR([could not find doxygen]) + fi + enable_doc=no + generate_docs= + else + enable_doc=yes + generate_docs=docs + AC_PATH_PROG(DOT, dot, , $PATH) + fi + else + enable_doc=no + fi + + AM_CONDITIONAL(DOC, test x$enable_doc = xyes) + + if test x$DOT = x; then + if test "x$enable_dot" = xyes; then + AC_MSG_ERROR([could not find dot]) + fi + enable_dot=no + else + enable_dot=yes + fi + AC_SUBST(enable_dot) + AC_SUBST(enable_html_docs) + AC_SUBST(enable_latex_docs) + AC_SUBST(generate_docs) +]) diff --git a/gsmsp/gsm/config/gr_gprof.m4 b/gsmsp/gsm/config/gr_gprof.m4 new file mode 100644 index 0000000..c03c469 --- /dev/null +++ b/gsmsp/gsm/config/gr_gprof.m4 @@ -0,0 +1,72 @@ +dnl +dnl Copyright 2002 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +dnl FIXME probably need to add linker flag too... + +AC_DEFUN([GR_SET_GPROF],[ + dnl Check for --with-gprof + AC_MSG_CHECKING([whether user wants gprof]) + AC_ARG_WITH(gprof, + [ --with-gprof Turn on gprof profiling], + [], [ with_gprof=no ]) + AC_MSG_RESULT($with_gprof) + + dnl gprof profiling flags for the two main compilers + cc_profiling_flags="-pg" + cxx_profiling_flags="-pg" + ld_profiling_flags="-pg" + if test $with_gprof = yes + then + if test -n "${CC}" + then + LF_CHECK_CC_FLAG($cc_profiling_flags) + fi + if test -n "${CXX}" + then + LF_CHECK_CXX_FLAG($cxx_profiling_flags) + fi + fi +]) + +AC_DEFUN([GR_SET_PROF],[ + dnl Check for --with-prof + AC_MSG_CHECKING([whether user wants prof]) + AC_ARG_WITH(prof, + [ --with-prof Turn on prof profiling], + [], [ with_prof=no ]) + AC_MSG_RESULT($with_prof) + + dnl prof profiling flags for the two main compilers + cc_profiling_flags="-p" + cxx_profiling_flags="-p" + ld_profiling_flags="-p" + if test $with_prof = yes + then + if test -n "${CC}" + then + LF_CHECK_CC_FLAG($cc_profiling_flags) + fi + if test -n "${CXX}" + then + LF_CHECK_CXX_FLAG($cxx_profiling_flags) + fi + fi +]) diff --git a/gsmsp/gsm/config/gr_libgnuradio_core_extra_ldflags.m4 b/gsmsp/gsm/config/gr_libgnuradio_core_extra_ldflags.m4 new file mode 100644 index 0000000..b581d19 --- /dev/null +++ b/gsmsp/gsm/config/gr_libgnuradio_core_extra_ldflags.m4 @@ -0,0 +1,40 @@ +# Check for (MinGW)win32 extra ld options. -*- Autoconf -*- + +# Copyright 2003,2004,2005 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. + +dnl +AC_DEFUN([GR_LIBGNURADIO_CORE_EXTRA_LDFLAGS], [ +AC_REQUIRE([AC_PROG_LD]) +# on Mingw32 extra LDFLAGS are required to ease global variable linking +LIBGNURADIO_CORE_EXTRA_LDFLAGS="" + +AC_MSG_CHECKING([whether $LD accepts --enable-runtime-pseudo-reloc]) +if ${LD} --enable-runtime-pseudo-reloc --version >/dev/null 2>&1 +then + # libtool requires the quotes + LIBGNURADIO_CORE_EXTRA_LDFLAGS="\"-Wl,--enable-runtime-pseudo-reloc\"" + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + +AC_SUBST(LIBGNURADIO_CORE_EXTRA_LDFLAGS) + +]) diff --git a/gsmsp/gsm/config/gr_no_undefined.m4 b/gsmsp/gsm/config/gr_no_undefined.m4 new file mode 100644 index 0000000..a2bb6d3 --- /dev/null +++ b/gsmsp/gsm/config/gr_no_undefined.m4 @@ -0,0 +1,44 @@ +dnl +dnl Copyright 2005 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +# GR_NO_UNDEFINED() +# +# Detemine whether we need to use the -no-undefined linker flag +# when building shared libraries. +# Sets NO_UNDEFINED to "" or "-no-undefined" +# +# As far as I can tell, we need -no-undefined only when building +# windows DLLs. This occurs when using MinGW and Cygwin. +# +# For now, we stub this out. + +AC_DEFUN([GR_NO_UNDEFINED],[ + AC_REQUIRE([AC_CANONICAL_HOST]) + no_undefined="" + case "${host_os}" in + *mingw* | *cygwin*) + + # on MinGW/Cygwin extra LDFLAGS are required + no_undefined="-no-undefined" + ;; + esac + AC_SUBST(NO_UNDEFINED,[$no_undefined]) +]) diff --git a/gsmsp/gsm/config/gr_omnithread.m4 b/gsmsp/gsm/config/gr_omnithread.m4 new file mode 100644 index 0000000..bdf1ece --- /dev/null +++ b/gsmsp/gsm/config/gr_omnithread.m4 @@ -0,0 +1,51 @@ +# Check for Omnithread (pthread/NT) thread support. -*- Autoconf -*- + +# Copyright 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, 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., 51 Franklin Street, Boston, MA +# 02110-1301, USA. + +AC_DEFUN([GR_OMNITHREAD], +[ + # Check first for POSIX + ACX_PTHREAD( + [ ot_posix="yes" + AC_DEFINE(OMNITHREAD_POSIX,[1],[Define to 1 to enable pthread]) + ],[ + # If no POSIX support found, then check for NT threads + AC_MSG_CHECKING([for NT threads]) + + AC_LINK_IFELSE([ + #include <windows.h> + #include <winbase.h> + int main() { InitializeCriticalSection(NULL); return 0; } + ], + [ + ot_nt="yes" + AC_DEFINE(OMNITHREAD_NT,[1],[Define to 1 to enable NT thread]) + ], + [AC_MSG_FAILURE([GNU Radio requires POSIX threads. pthreads not found.])] + ) + AC_MSG_RESULT(yes) + ]) + AM_CONDITIONAL(OMNITHREAD_POSIX, test "x$ot_posix" = xyes) + AM_CONDITIONAL(OMNITHREAD_NT, test "x$ot_nt" = xyes) + + save_LIBS="$LIBS" + AC_SEARCH_LIBS([clock_gettime], [rt], [PTHREAD_LIBS="$PTHREAD_LIBS $LIBS"]) + AC_CHECK_FUNCS([clock_gettime gettimeofday nanosleep]) + LIBS="$save_LIBS" +]) + diff --git a/gsmsp/gsm/config/gr_pwin32.m4 b/gsmsp/gsm/config/gr_pwin32.m4 new file mode 100644 index 0000000..23347e1 --- /dev/null +++ b/gsmsp/gsm/config/gr_pwin32.m4 @@ -0,0 +1,146 @@ +# Check for (mingw)win32 POSIX replacements. -*- Autoconf -*- + +# Copyright 2003,2004,2005 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. + + +AC_DEFUN([GR_PWIN32], +[ +AC_REQUIRE([AC_HEADER_TIME]) +AC_CHECK_HEADERS([sys/types.h fcntl.h io.h]) +AC_CHECK_HEADERS([windows.h]) +AC_CHECK_HEADERS([winioctl.h winbase.h], [], [], [ + #if HAVE_WINDOWS_H + #include <windows.h> + #endif +]) + +AC_CHECK_FUNCS([getopt usleep gettimeofday nanosleep rand srand random srandom sleep sigaction]) +AC_CHECK_TYPES([struct timezone, struct timespec, ssize_t],[],[],[ + #if HAVE_SYS_TYPES_H + # include <sys/types.h> + #endif + #if TIME_WITH_SYS_TIME + # include <sys/time.h> + # include <time.h> + #else + # if HAVE_SYS_TIME_H + # include <sys/time.h> + # else + # include <time.h> + # endif + #endif +]) + +dnl Checks for replacements +AC_REPLACE_FUNCS([getopt usleep gettimeofday]) + + +AC_MSG_CHECKING(for Sleep) +AC_TRY_LINK([ #include <windows.h> + #include <winbase.h> + ], [ Sleep(0); ], + [AC_DEFINE(HAVE_SSLEEP,1,[Define to 1 if you have win32 Sleep]) + AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no) + ) + +dnl Under Win32, mkdir prototype in io.h has only one arg +AC_MSG_CHECKING(whether mkdir accepts only one arg) +AC_TRY_COMPILE([#include <sys/types.h> + #include <sys/stat.h> + #include <fcntl.h>], [ + mkdir("") + ], [ AC_MSG_RESULT(yes) + AC_DEFINE(MKDIR_TAKES_ONE_ARG,[],[Define if mkdir accepts only one arg]) ], + [ AC_MSG_RESULT(no) + ]) + +AH_BOTTOM( +[ +/* Define missing prototypes, implemented in replacement lib */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef HAVE_GETOPT +int getopt (int argc, char * const argv[], const char * optstring); +extern char * optarg; +extern int optind, opterr, optopt; +#endif + +#ifndef HAVE_USLEEP +int usleep(unsigned long usec); /* SUSv2 */ +#endif + +#ifndef HAVE_NANOSLEEP +#ifndef HAVE_STRUCT_TIMESPEC +#if HAVE_SYS_TYPES_H +# include <sys/types.h> /* need time_t */ +#endif +struct timespec { + time_t tv_sec; + long tv_nsec; +}; +#endif +static inline int nanosleep(const struct timespec *req, struct timespec *rem) { return usleep(req->tv_sec*1000000+req->tv_nsec/1000); } +#endif + +#if defined(HAVE_SSLEEP) && !defined(HAVE_SLEEP) +#ifdef HAVE_WINBASE_H +#include <windows.h> +#include <winbase.h> +#endif +/* TODO: what about SleepEx? */ +static inline unsigned int sleep (unsigned int nb_sec) { Sleep(nb_sec*1000); return 0; } +#endif + +#ifndef HAVE_GETTIMEOFDAY +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif +#ifndef HAVE_STRUCT_TIMEZONE +struct timezone { + int tz_minuteswest; + int tz_dsttime; +}; +#endif +int gettimeofday(struct timeval *tv, struct timezone *tz); +#endif + +#if !defined(HAVE_RANDOM) && defined(HAVE_RAND) +#include <stdlib.h> +static inline long int random (void) { return rand(); } +#endif + +#if !defined(HAVE_SRANDOM) && defined(HAVE_SRAND) +static inline void srandom (unsigned int seed) { srand(seed); } +#endif + +#ifndef HAVE_SSIZE_T +typedef size_t ssize_t; +#endif + +#ifdef __cplusplus +} +#endif +]) + + +]) diff --git a/gsmsp/gsm/config/gr_python.m4 b/gsmsp/gsm/config/gr_python.m4 new file mode 100644 index 0000000..b2acbbb --- /dev/null +++ b/gsmsp/gsm/config/gr_python.m4 @@ -0,0 +1,116 @@ +dnl +dnl Copyright 2003,2004,2005 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +# PYTHON_DEVEL() +# +# Checks for Python and tries to get the include path to 'Python.h'. +# It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LDFLAGS) output variables. +# +AC_DEFUN([PYTHON_DEVEL],[ + AC_REQUIRE([AM_PATH_PYTHON]) + AC_REQUIRE([AC_CANONICAL_HOST]) + + # Check for Python include path + AC_MSG_CHECKING([for Python include path]) + if test -z "$PYTHON" ; then + AC_MSG_ERROR([cannot find Python path]) + fi + + # ask distutils which include path we should use + python_cmd=' +import distutils.sysconfig +import os +path = distutils.sysconfig.get_python_inc(plat_specific=False) +if os.sep == "\\": + path = path.replace("\\", "/") +print path +' + python_path=`$PYTHON -c "$python_cmd"` + AC_MSG_RESULT([$python_path]) + if test -z "$python_path" ; then + AC_MSG_ERROR([cannot find Python include path]) + fi + + AC_SUBST(PYTHON_CPPFLAGS,[-I$python_path]) + + # Check for Python headers usability + python_save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" + AC_CHECK_HEADERS([Python.h], [], + [AC_MSG_ERROR([cannot find usable Python headers])]) + CPPFLAGS="$python_save_CPPFLAGS" + + # Only set this on mingw and cygwin hosts, (only implemented + # for mingw host, for crosscompiling you need to trick this) + + PYTHON_LDFLAGS="" + case $host_os in + *mingw* | *cygwin* ) + AC_MSG_CHECKING([for Python LDFLAGS]) + + python_cmd=' +import distutils.sysconfig +import os +path = distutils.sysconfig.get_config_var("LIBPL") +if path == None: + path = distutils.sysconfig.PREFIX + "/libs" +if os.sep == "\\": + path = path.replace("\\", "/") +print path +' + python_stdlib_path=`$PYTHON -c "$python_cmd"` + + python_version_nodot=`echo $PYTHON_VERSION | sed "s,\.,,"` + libpython_name="python$PYTHON_VERSION" + + # Standard install of python for win32 has libpython24.a + # instead of libpython2.4.a so we check for the library + # without the dot in the version number. + + python_stdlib_filename=`find $python_stdlib_path -type f -name libpython$python_version_nodot.* -print | sed "1q"` + if test -n "$python_stdlib_filename" ; then + libpython_name="python$python_version_nodot" + fi + + PYTHON_LDFLAGS="-L$python_stdlib_path -l$libpython_name" + AC_MSG_RESULT($PYTHON_LDFLAGS) + # Replace all backslashes in PYTHON Paths with forward slashes + AC_MSG_CHECKING([for pythondir]) + pythondir=`echo $pythondir |sed 's,\\\\,/,g'` + AC_MSG_RESULT($pythondir) + AC_SUBST([pythondir]) + AC_MSG_CHECKING([for pkgpythondir]) + pkgpythondir=`echo $pkgpythondir |sed 's,\\\\,/,g'` + AC_MSG_RESULT($pkgpythondir) + AC_SUBST([pkgpythondir]) + AC_MSG_CHECKING([for pyexecdir]) + pyexecdir=`echo $pyexecdir |sed 's,\\\\,/,g'` + AC_MSG_RESULT($pyexecdir) + AC_SUBST([pyexecdir]) + AC_MSG_CHECKING([for pkgpyexecdir]) + pkgpyexecdir=`echo $pkgpyexecdir |sed 's,\\\\,/,g'` + AC_MSG_RESULT($pkgpyexecdir) + AC_SUBST([pkgpyexecdir]) + ;; + esac + + AC_SUBST([PYTHON_LDFLAGS]) +]) diff --git a/gsmsp/gsm/config/gr_require_mc4020.m4 b/gsmsp/gsm/config/gr_require_mc4020.m4 new file mode 100644 index 0000000..fa78943 --- /dev/null +++ b/gsmsp/gsm/config/gr_require_mc4020.m4 @@ -0,0 +1,33 @@ +dnl +dnl Copyright 2003,2004 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +AC_DEFUN([GR_REQUIRE_MC4020],[ + AC_MSG_CHECKING([for mc4020 A/D driver include file]) + AC_COMPILE_IFELSE([ +#include <mc4020.h> +int main (int argc, char **argv) +{ + return 0; +} +],[AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([mc4020.h not found.])]) +]) diff --git a/gsmsp/gsm/config/gr_scripting.m4 b/gsmsp/gsm/config/gr_scripting.m4 new file mode 100644 index 0000000..a6fd114 --- /dev/null +++ b/gsmsp/gsm/config/gr_scripting.m4 @@ -0,0 +1,30 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +AC_DEFUN([GR_SCRIPTING],[ + AC_REQUIRE([AC_PROG_LN_S]) + AC_REQUIRE([AC_PROG_CXX]) + AC_REQUIRE([AC_PROG_LIBTOOL]) + + SWIG_PROG(1.3.23) + SWIG_ENABLE_CXX + SWIG_PYTHON +]) diff --git a/gsmsp/gsm/config/gr_set_md_cpu.m4 b/gsmsp/gsm/config/gr_set_md_cpu.m4 new file mode 100644 index 0000000..b5ba2fe --- /dev/null +++ b/gsmsp/gsm/config/gr_set_md_cpu.m4 @@ -0,0 +1,43 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +AC_DEFUN([GR_SET_MD_CPU],[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_ARG_WITH(md-cpu, + [ --with-md-cpu=ARCH set machine dependent speedups (auto)], + [cf_with_md_cpu="$withval"], + [cf_with_md_cpu="$host_cpu"]) + + AC_MSG_CHECKING([for machine dependent speedups]) + case "$cf_with_md_cpu" in + x86 | i[[3-7]]86) MD_CPU=x86 MD_SUBCPU=x86 ;; + x86_64) MD_CPU=x86 MD_SUBCPU=x86_64 ;; +# sparc) MD_CPU=sparc ;; + *) MD_CPU=generic ;; + esac + AC_MSG_RESULT($MD_CPU) + AC_SUBST(MD_CPU) + AC_SUBST(MD_SUBCPU) + + AM_CONDITIONAL(MD_CPU_x86, test "$MD_CPU" = "x86") + AM_CONDITIONAL(MD_SUBCPU_x86_64, test "$MD_SUBCPU" = "x86_64") + AM_CONDITIONAL(MD_CPU_generic, test "$MD_CPU" = "generic") +]) diff --git a/gsmsp/gsm/config/gr_swig.m4 b/gsmsp/gsm/config/gr_swig.m4 new file mode 100644 index 0000000..2f9d755 --- /dev/null +++ b/gsmsp/gsm/config/gr_swig.m4 @@ -0,0 +1,85 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +# SWIG_PROG([required-version]) +# +# Checks for the SWIG program. If found you can (and should) call SWIG via $(SWIG). +# You can use the optional first argument to check if the version of the available SWIG +# is greater or equal to the value of the argument. It should have the format: +# N[.N[.N]] (N is a number between 0 and 999. Only the first N is mandatory.) +AC_DEFUN([SWIG_PROG],[ + AC_REQUIRE([AC_PROG_MAKE_SET]) + AC_CHECK_PROG(SWIG,swig,[`which swig`]) + if test -z "$SWIG" ; then + AC_MSG_ERROR([Cannot find 'swig' program. SWIG version >= $1 required]) + SWIG=false + elif test -n "$1" ; then + AC_MSG_CHECKING([for SWIG version]) + swig_version=`$SWIG -version 2>&1 | \ + awk '/^SWIG Version [[0-9]+\.[0-9]+\.[0-9]]+.*$/ { split($[3],a,"[[^.0-9]]"); print a[[1]] }'` + AC_MSG_RESULT([$swig_version]) + if test -n "$swig_version" ; then + swig_version=`echo $swig_version | \ + awk '{ split($[1],a,"\."); print [a[1]*1000000+a[2]*1000+a[3]] }' 2>/dev/null` + swig_required_version=`echo $1 | \ + awk '{ split($[1],a,"\."); print [a[1]*1000000+a[2]*1000+a[3]] }' 2>/dev/null` + if test $swig_required_version -gt $swig_version ; then + AC_MSG_ERROR([SWIG version >= $1 required]) + fi + else + AC_MSG_ERROR([cannot determine SWIG version]) + fi + fi +]) + +# SWIG_ENABLE_CXX() +# +# Enable swig C++ support. This effects all invocations of $(SWIG). +AC_DEFUN([SWIG_ENABLE_CXX],[ + AC_REQUIRE([SWIG_PROG]) + AC_REQUIRE([AC_PROG_CXX]) + if test "$SWIG" != "false" ; then + SWIG="$SWIG -c++" + fi +]) + +# SWIG_PYTHON([use-shadow-classes]) +# +# Checks for Python and provides the $(SWIG_PYTHON_CPPFLAGS), +# $(SWIG_PYTHON_LIB) and $(SWIG_PYTHON_OPT) output variables. +# $(SWIG_PYTHON_OPT) contains all necessary swig options to generate +# code for Python. If you need multi module support use +# $(SWIG_PYTHON_LIB) (provided by the SWIG_MULTI_MODULE_SUPPORT() +# macro) to link against the appropriate library. It contains the +# SWIG Python runtime library that is needed by the type check system +# for example. + +AC_DEFUN([SWIG_PYTHON],[ + AC_REQUIRE([SWIG_PROG]) + AC_REQUIRE([PYTHON_DEVEL]) + if test "$SWIG" != "false" ; then + AC_SUBST(SWIG_PYTHON_LIB,[-lswigpy]) +dnl test ! "x$1" = "xno" && swig_shadow=" -shadow" || swig_shadow="" +dnl AC_SUBST(SWIG_PYTHON_OPT,[-python$swig_shadow]) + AC_SUBST(SWIG_PYTHON_OPT,[-python]) + fi + AC_SUBST(SWIG_PYTHON_CPPFLAGS,[$PYTHON_CPPFLAGS]) +]) diff --git a/gsmsp/gsm/config/gr_sysv_shm.m4 b/gsmsp/gsm/config/gr_sysv_shm.m4 new file mode 100644 index 0000000..7d5d6f4 --- /dev/null +++ b/gsmsp/gsm/config/gr_sysv_shm.m4 @@ -0,0 +1,36 @@ +# Check for IPC System V shm support. -*- Autoconf -*- + +# Copyright 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, 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., 51 Franklin Street, Boston, MA +# 02110-1301, USA. + +AC_DEFUN([GR_SYSV_SHM], +[ + AC_LANG_SAVE + AC_LANG_C + + AC_CHECK_HEADERS([sys/ipc.h sys/shm.h]) + + save_LIBS="$LIBS" + AC_SEARCH_LIBS(shmat, [cygipc ipc], + [ IPC_LIBS="$LIBS" ], + [ AC_MSG_WARN([SystemV IPC support not found. ]) ] + ) + LIBS="$save_LIBS" + + AC_LANG_RESTORE + AC_SUBST(IPC_LIBS) +]) diff --git a/gsmsp/gsm/config/gr_x86_64.m4 b/gsmsp/gsm/config/gr_x86_64.m4 new file mode 100644 index 0000000..21a5266 --- /dev/null +++ b/gsmsp/gsm/config/gr_x86_64.m4 @@ -0,0 +1,39 @@ +dnl +dnl Copyright 2005 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +# GR_X86_64() +# +# Checks to see if we're on a x86_64 machine, and if so, ensure +# that libdir ends in "64" +# +AC_DEFUN([GR_X86_64],[ + AC_REQUIRE([AC_CANONICAL_HOST]) + if test "$host_cpu" = "x86_64"; then + AC_MSG_CHECKING([libdir for lib64 suffix]) + t=${libdir##*/lib} + if test "$t" != 64 && test -d /lib64 && ! test -L /lib64; then + libdir=${libdir}64 + AC_MSG_RESULT([no. Setting libdir to $libdir]) + else + AC_MSG_RESULT([yes]) + fi + fi +]) diff --git a/gsmsp/gsm/config/lf_cc.m4 b/gsmsp/gsm/config/lf_cc.m4 new file mode 100644 index 0000000..4f38596 --- /dev/null +++ b/gsmsp/gsm/config/lf_cc.m4 @@ -0,0 +1,42 @@ +dnl Autoconf support for C++ +dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a configuration +dnl script generated by Autoconf, you may include it under the same +dnl distribution terms that you use for the rest of that program. + +# ------------------------------------------------------------------------- +# Use this macro to configure your C compiler +# When called the macro does the following things: +# 1. It finds an appropriate C compiler. +# If you passed the flag --with-cc=foo then it uses that +# particular compiler +# 2. Check whether the compiler works. +# 3. Checks whether the compiler accepts the -g +# ------------------------------------------------------------------------- + +AC_DEFUN([LF_CONFIGURE_CC],[ + dnl Sing the song + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_PROG_CPP])dnl + AC_REQUIRE([AC_AIX])dnl + AC_REQUIRE([AC_ISC_POSIX])dnl + AC_REQUIRE([AC_MINIX])dnl + AC_REQUIRE([AC_HEADER_STDC])dnl +]) + diff --git a/gsmsp/gsm/config/lf_cxx.m4 b/gsmsp/gsm/config/lf_cxx.m4 new file mode 100644 index 0000000..c2b3cd5 --- /dev/null +++ b/gsmsp/gsm/config/lf_cxx.m4 @@ -0,0 +1,121 @@ +dnl Autoconf support for C++ +dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a configuration +dnl script generated by Autoconf, you may include it under the same +dnl distribution terms that you use for the rest of that program. + +# ----------------------------------------------------------------- +# This macro should be called to configure your C++ compiler. +# When called, the macro does the following things: +# 1. It finds an appropriate C++ compiler +# If you passed the flag --with-cxx=foo, then it uses that +# particular compiler +# 2. Checks whether the compiler accepts the -g +# ------------------------------------------------------------------ + +AC_DEFUN([LF_CONFIGURE_CXX],[ + AC_REQUIRE([AC_PROG_CXX])dnl + AC_REQUIRE([AC_PROG_CXXCPP])dnl + LF_CXX_PORTABILITY +]) + +# ----------------------------------------------------------------------- +# This macro tests the C++ compiler for various portability problem. +# 1. Defines CXX_HAS_NO_BOOL if the compiler does not support the bool +# data type +# 2. Defines CXX_HAS_BUGGY_FOR_LOOPS if the compiler has buggy +# scoping for the for-loop +# 3. Defines USE_ASSERT if the user wants to use assertions +# ----------------------------------------------------------------------- + + +AC_DEFUN([LF_CXX_PORTABILITY],[ + + dnl + dnl Check for common C++ portability problems + dnl + + dnl AC_LANG_PUSH + dnl AC_LANG_CPLUSPLUS + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + + dnl Check whether we have bool + AC_MSG_CHECKING(whether C++ has bool) + AC_TRY_RUN([main() { bool b1=true; bool b2=false; }], + [ AC_MSG_RESULT(yes) ], + [ AC_MSG_RESULT(no) + AC_DEFINE(CXX_HAS_NO_BOOL,[],[Define if C++ is missing bool type]) ], + [ AC_MSG_WARN(Don't cross-compile)] + ) + + dnl Test whether C++ has buggy for-loops + AC_MSG_CHECKING(whether C++ has buggy scoping in for-loops) + AC_TRY_COMPILE([#include <iostream.h>], [ + for (int i=0;i<10;i++) { } + for (int i=0;i<10;i++) { } +], [ AC_MSG_RESULT(no) ], + [ AC_MSG_RESULT(yes) + AC_DEFINE(CXX_HAS_BUGGY_FOR_LOOPS,[],[Define if for loop scoping is broken]) ]) + + dnl Test whether the user wants to enable assertions + AC_MSG_CHECKING(whether user wants assertions) + AC_ARG_ENABLE(assert, + [ --disable-assert don't use cpp.h assert], + [ AC_DEFINE(NDEBUG,[],[Define to disable asserts (don't doit!)]) + AC_MSG_RESULT(no) ], + [ AC_MSG_RESULT(yes) ], + ) + + dnl Test whether C++ has std::isnan + AC_MSG_CHECKING(whether C++ has std::isnan) + AC_TRY_COMPILE([#include <math.h>], [ + std::isnan(0); +], [ AC_MSG_RESULT(yes) + AC_DEFINE(CXX_HAS_STD_ISNAN,[],[Define if has std::isnan]) ], + [ AC_MSG_RESULT(no) ]) + + dnl Done with the portability checks + dnl AC_LANG_POP([C++]) + AC_LANG_RESTORE +]) + +AH_BOTTOM([// Workaround for compilers with buggy for-loop scoping +// That's quite a few compilers actually including recent versions of +// Dec Alpha cxx, HP-UX CC and SGI CC. +// The trivial "if" statement provides the correct scoping to the +// for loop + +#ifdef CXX_HAS_BUGGY_FOR_LOOPS +#undef for +#define for if(1) for +#endif +]) + +AH_BOTTOM([// If the C++ compiler we use doesn't have bool, then +// the following is a near-perfect work-around. +// You must make sure your code does not depend on "int" and "bool" +// being two different types, in overloading for instance. + +#ifdef CXX_HAS_NO_BOOL +#define bool int +#define true 1 +#define false 0 +#endif +]) diff --git a/gsmsp/gsm/config/lf_warnings.m4 b/gsmsp/gsm/config/lf_warnings.m4 new file mode 100644 index 0000000..a58aac1 --- /dev/null +++ b/gsmsp/gsm/config/lf_warnings.m4 @@ -0,0 +1,128 @@ +dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a configuration +dnl script generated by Autoconf, you may include it under the same +dnl distribution terms that you use for the rest of that program. + +# -------------------------------------------------------------------------- +# Check whether the C++ compiler accepts a certain flag +# If it does it adds the flag to CXXFLAGS +# If it does not then it returns an error to lf_ok +# Usage: +# LF_CHECK_CXX_FLAG(-flag1 -flag2 -flag3 ...) +# ------------------------------------------------------------------------- + +AC_DEFUN([LF_CHECK_CXX_FLAG],[ + echo 'void f(){}' > conftest.cc + for i in $1 + do + AC_MSG_CHECKING([whether $CXX accepts $i]) + if test -z "`${CXX} $i -c conftest.cc 2>&1`" + then + CXXFLAGS="${CXXFLAGS} $i" + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + done + rm -f conftest.cc conftest.o +]) + +# -------------------------------------------------------------------------- +# Check whether the C compiler accepts a certain flag +# If it does it adds the flag to CFLAGS +# If it does not then it returns an error to lf_ok +# Usage: +# LF_CHECK_CC_FLAG(-flag1 -flag2 -flag3 ...) +# ------------------------------------------------------------------------- + +AC_DEFUN([LF_CHECK_CC_FLAG],[ + echo 'void f(){}' > conftest.c + for i in $1 + do + AC_MSG_CHECKING([whether $CC accepts $i]) + if test -z "`${CC} $i -c conftest.c 2>&1`" + then + CFLAGS="${CFLAGS} $i" + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + done + rm -f conftest.c conftest.o +]) + +# -------------------------------------------------------------------------- +# Check whether the Fortran compiler accepts a certain flag +# If it does it adds the flag to FFLAGS +# If it does not then it returns an error to lf_ok +# Usage: +# LF_CHECK_F77_FLAG(-flag1 -flag2 -flag3 ...) +# ------------------------------------------------------------------------- + +AC_DEFUN([LF_CHECK_F77_FLAG],[ + cat << EOF > conftest.f +c....:++++++++++++++++++++++++ + PROGRAM MAIN + PRINT*,'Hello World!' + END +EOF + for i in $1 + do + AC_MSG_CHECKING([whether $F77 accepts $i]) + if test -z "`${F77} $i -c conftest.f 2>&1`" + then + FFLAGS="${FFLAGS} $i" + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + done + rm -f conftest.f conftest.o +]) + +# ---------------------------------------------------------------------- +# Provide the configure script with an --with-warnings option that +# turns on warnings. Call this command AFTER you have configured ALL your +# compilers. +# ---------------------------------------------------------------------- + +AC_DEFUN([LF_SET_WARNINGS],[ + dnl Check for --with-warnings + AC_MSG_CHECKING([whether user wants warnings]) + AC_ARG_WITH(warnings, + [ --with-warnings Turn on warnings], + [ lf_warnings=yes ], [ lf_warnings=no ]) + lf_warnings=yes # hard code for now -eb + AC_MSG_RESULT($lf_warnings) + + dnl Warnings for the two main compilers + cc_warning_flags="-Wall" + cxx_warning_flags="-Wall -Woverloaded-virtual" + if test $lf_warnings = yes + then + if test -n "${CC}" + then + LF_CHECK_CC_FLAG($cc_warning_flags) + fi + if test -n "${CXX}" + then + LF_CHECK_CXX_FLAG($cxx_warning_flags) + fi + fi +]) diff --git a/gsmsp/gsm/config/lf_x11.m4 b/gsmsp/gsm/config/lf_x11.m4 new file mode 100644 index 0000000..fd548bd --- /dev/null +++ b/gsmsp/gsm/config/lf_x11.m4 @@ -0,0 +1,39 @@ +dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a configuration +dnl script generated by Autoconf, you may include it under the same +dnl distribution terms that you use for the rest of that program. + + +#----------------------------------------------------------------------- +# This macro searches for Xlib and when it finds it it adds the +# appropriate flags to CXXFLAGS and export the link sequence to +# the variable XLIB. +# In your configure.in file add: +# LF_PATH_XLIB +# In your Makefile.am add +# program_LDADD = .... $(XLIB) +#------------------------------------------------------------------------ + +AC_DEFUN([LF_PATH_XLIB],[ + AC_PATH_XTRA + CXXFLAGS="$CXXFLAGS $X_CFLAGS" + XLIB="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" + AC_SUBST(XLIB) +]) + diff --git a/gsmsp/gsm/config/mkstemp.m4 b/gsmsp/gsm/config/mkstemp.m4 new file mode 100644 index 0000000..4af0f0a --- /dev/null +++ b/gsmsp/gsm/config/mkstemp.m4 @@ -0,0 +1,89 @@ +#serial 4 + +# On some hosts (e.g., HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a +# silly limit that it can create no more than 26 files from a given template. +# Other systems lack mkstemp altogether. +# On OSF1/Tru64 V4.0F, the system-provided mkstemp function can create +# only 32 files per process. +# On systems like the above, arrange to use the replacement function. +AC_DEFUN([UTILS_FUNC_MKSTEMP], +[dnl + AC_REPLACE_FUNCS(mkstemp) + if test $ac_cv_func_mkstemp = no; then + utils_cv_func_mkstemp_limitations=yes + else + AC_CACHE_CHECK([for mkstemp limitations], + utils_cv_func_mkstemp_limitations, + [ + AC_TRY_RUN([ +# include <stdlib.h> + int main () + { + int i; + for (i = 0; i < 70; i++) + { + char template[] = "conftestXXXXXX"; + int fd = mkstemp (template); + if (fd == -1) + exit (1); + close (fd); + } + exit (0); + } + ], + utils_cv_func_mkstemp_limitations=no, + utils_cv_func_mkstemp_limitations=yes, + utils_cv_func_mkstemp_limitations=yes + ) + ] + ) + fi + + if test $utils_cv_func_mkstemp_limitations = yes; then + AC_LIBOBJ(mkstemp) + AC_LIBOBJ(tempname) + AC_DEFINE(mkstemp, rpl_mkstemp, + [Define to rpl_mkstemp if the replacement function should be used.]) + gl_PREREQ_MKSTEMP + jm_PREREQ_TEMPNAME + fi +]) + +# Prerequisites of lib/mkstemp.c. +AC_DEFUN([gl_PREREQ_MKSTEMP], +[ + AH_BOTTOM( + [ + #ifndef HAVE_MKSTEMP + #ifdef __cplusplus + extern "C" { + #endif + int rpl_mkstemp (char *templ); + #ifdef __cplusplus + } + #endif + #endif + ]) +]) + +# Prerequisites of lib/tempname.c. +AC_DEFUN([jm_PREREQ_TEMPNAME], +[ + AC_REQUIRE([AC_HEADER_STAT]) + AC_CHECK_HEADERS_ONCE(fcntl.h sys/time.h unistd.h) + AC_CHECK_HEADERS(stdint.h) + AC_CHECK_FUNCS(__secure_getenv gettimeofday lstat) + AC_CHECK_DECLS_ONCE(getenv) + # AC_REQUIRE([jm_AC_TYPE_UINTMAX_T]) + + dnl Under Win32, mkdir prototype in io.h has only one arg + AC_MSG_CHECKING(whether mkdir accepts only one arg) + AC_TRY_COMPILE([#include <sys/types.h> + #include <sys/stat.h> + #include <fcntl.h>], [ + mkdir("") + ], [ AC_MSG_RESULT(yes) + AC_DEFINE(MKDIR_TAKES_ONE_ARG,[],[Define if mkdir accepts only one arg]) ], + [ AC_MSG_RESULT(no) + ]) +]) diff --git a/gsmsp/gsm/config/onceonly.m4 b/gsmsp/gsm/config/onceonly.m4 new file mode 100644 index 0000000..f6fec37 --- /dev/null +++ b/gsmsp/gsm/config/onceonly.m4 @@ -0,0 +1,63 @@ +# onceonly.m4 serial 3 +dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl This file defines some "once only" variants of standard autoconf macros. +dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS +dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS +dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS +dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC +dnl The advantage is that the check for each of the headers/functions/decls +dnl will be put only once into the 'configure' file. It keeps the size of +dnl the 'configure' file down, and avoids redundant output when 'configure' +dnl is run. +dnl The drawback is that the checks cannot be conditionalized. If you write +dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi +dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to +dnl empty, and the check will be inserted before the body of the AC_DEFUNed +dnl function. + +dnl Autoconf version 2.57 or newer is recommended. +AC_PREREQ(2.54) + +# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of +# AC_CHECK_HEADERS(HEADER1 HEADER2 ...). +AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ + : + AC_FOREACH([gl_HEADER_NAME], [$1], [ + AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(defn([gl_HEADER_NAME]), + [-./], [___])), [ + AC_CHECK_HEADERS(gl_HEADER_NAME) + ]) + AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME, + [-./], [___]))) + ]) +]) + +# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of +# AC_CHECK_FUNCS(FUNC1 FUNC2 ...). +AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ + : + AC_FOREACH([gl_FUNC_NAME], [$1], [ + AC_DEFUN([gl_CHECK_FUNC_]defn([gl_FUNC_NAME]), [ + AC_CHECK_FUNCS(defn([gl_FUNC_NAME])) + ]) + AC_REQUIRE([gl_CHECK_FUNC_]defn([gl_FUNC_NAME])) + ]) +]) + +# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of +# AC_CHECK_DECLS(DECL1, DECL2, ...). +AC_DEFUN([AC_CHECK_DECLS_ONCE], [ + : + AC_FOREACH([gl_DECL_NAME], [$1], [ + AC_DEFUN([gl_CHECK_DECL_]defn([gl_DECL_NAME]), [ + AC_CHECK_DECLS(defn([gl_DECL_NAME])) + ]) + AC_REQUIRE([gl_CHECK_DECL_]defn([gl_DECL_NAME])) + ]) +]) diff --git a/gsmsp/gsm/config/pkg.m4 b/gsmsp/gsm/config/pkg.m4 new file mode 100644 index 0000000..770f062 --- /dev/null +++ b/gsmsp/gsm/config/pkg.m4 @@ -0,0 +1,68 @@ +dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) +dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page +dnl also defines GSTUFF_PKG_ERRORS on error +AC_DEFUN([PKG_CHECK_MODULES], [ + succeeded=no + + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + dnl If PKG_CONFIG_PATH is not already set, add /usr/local/lib/pkgconfig. + dnl If it's set, assume the user knows what they're doing. + dnl This should help avoid failures while looking for fftw3f + if test -z "$PKG_CONFIG_PATH"; then + export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" + fi + + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + AC_MSG_CHECKING(for $2) + + if $PKG_CONFIG --exists "$2" ; then + AC_MSG_RESULT(yes) + succeeded=yes + + AC_MSG_CHECKING($1_CFLAGS) + $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` + AC_MSG_RESULT($$1_CFLAGS) + + AC_MSG_CHECKING($1_LIBS) + $1_LIBS=`$PKG_CONFIG --libs "$2"` + AC_MSG_RESULT($$1_LIBS) + + AC_MSG_CHECKING($1_INCLUDEDIR) + $1_INCLUDEDIR=`$PKG_CONFIG --variable=includedir "$2"` + AC_MSG_RESULT($$1_INCLUDEDIR) + else + $1_CFLAGS="" + $1_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + ifelse([$4], ,echo $$1_PKG_ERRORS,) + fi + + AC_SUBST($1_CFLAGS) + AC_SUBST($1_LIBS) + AC_SUBST($1_INCLUDEDIR) + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + ifelse([$3], , :, [$3]) + else + ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) + fi +]) + + diff --git a/gsmsp/gsm/config/usrp_fusb_tech.m4 b/gsmsp/gsm/config/usrp_fusb_tech.m4 new file mode 100644 index 0000000..bb1f73c --- /dev/null +++ b/gsmsp/gsm/config/usrp_fusb_tech.m4 @@ -0,0 +1,63 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +AC_DEFUN([USRP_SET_FUSB_TECHNIQUE],[ + AC_ARG_WITH(fusb-tech, + [ --with-fusb-tech=OS set fast usb technique (auto)], + [cf_with_fusb_tech="$withval"], + [cf_with_fusb_tech="$host_os"]) + + + AC_CHECK_HEADER([linux/usbdevice_fs.h], + [x_have_usbdevice_fs_h=yes], + [x_have_usbdevice_fs_h=no]) + + AC_MSG_CHECKING([for fast usb technique to use]) + case "$cf_with_fusb_tech" in + linux*) if test x${x_have_usbdevice_fs_h} = xyes; + then + FUSB_TECH=linux + else + FUSB_TECH=generic + fi ;; + + darwin*) FUSB_TECH=darwin ;; + cygwin*|win*|mingw*) FUSB_TECH=win32 ;; + *bsd*) + AC_MSG_CHECKING([for RA/WB]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <dev/usb/usb.h>]], + [[struct usb_bulk_ra_wb_opt o; + ioctl(0, USB_SET_BULK_RA, &o);]])], + [FUSB_TECH=ra_wb], + [FUSB_TECH=generic]) ;; + *) FUSB_TECH=generic ;; + esac + + AC_MSG_RESULT($FUSB_TECH) + AC_SUBST(FUSB_TECH) + + AM_CONDITIONAL(FUSB_TECH_darwin, test $FUSB_TECH = darwin) + AM_CONDITIONAL(FUSB_TECH_win32, test $FUSB_TECH = win32) + AM_CONDITIONAL(FUSB_TECH_generic, test $FUSB_TECH = generic) + AM_CONDITIONAL(FUSB_TECH_linux, test $FUSB_TECH = linux) + AM_CONDITIONAL(FUSB_TECH_ra_wb, test $FUSB_TECH = ra_wb) +]) + diff --git a/gsmsp/gsm/config/usrp_libusb.m4 b/gsmsp/gsm/config/usrp_libusb.m4 new file mode 100644 index 0000000..f6f1265 --- /dev/null +++ b/gsmsp/gsm/config/usrp_libusb.m4 @@ -0,0 +1,51 @@ +# Check for libusb support. -*- Autoconf -*- + +# Copyright 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, 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., 51 Franklin Street, Boston, MA +# 02110-1301, USA. + +AC_DEFUN([USRP_LIBUSB], +[ + AC_LANG_PUSH(C) + + libusbok=yes + AC_CHECK_HEADERS([usb.h], + [], + [libusbok=no, + AC_MSG_RESULT([USRP requires libusb. usb.h not found. See http://libusb.sf.net])] + ) + + save_LIBS="$LIBS" + case "$host_os" in + darwin*) LIBS="$LIBS -lIOKit" ;; + *) ;; + esac + AC_SEARCH_LIBS(usb_bulk_write, [usb], + [USB_LIBS="$LIBS"], + [libusbok=no, + AC_MSG_RESULT([USRP requires libusb. usb_bulk_write not found. See http://libusb.sf.net])] + ) + LIBS="$save_LIBS" + + AC_LANG_POP + + if test $libusbok = yes; then + AC_SUBST(USB_LIBS) + ifelse([$1], , :, [$1]) + else + ifelse([$2], , :, [$2]) + fi +]) diff --git a/gsmsp/gsm/config/usrp_sdcc.m4 b/gsmsp/gsm/config/usrp_sdcc.m4 new file mode 100644 index 0000000..5f3bbc9 --- /dev/null +++ b/gsmsp/gsm/config/usrp_sdcc.m4 @@ -0,0 +1,75 @@ +# Check for sdcc support. -*- Autoconf -*- + +# Copyright 2004 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, 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., 51 Franklin Street, Boston, MA +# 02110-1301, USA. + +AC_DEFUN([USRP_SDCC], +[ + sdccok=yes + AC_CHECK_PROG(XCC, sdcc, sdcc -mmcs51 --no-xinit-opt,no) + AC_CHECK_PROG(XAS, asx8051, asx8051 -plosgff,no) + + if test "$XCC" = "no" -o "$XAS" = "no" ; then + AC_MSG_RESULT([USRP requires sdcc. sdcc not found. See http://sdcc.sf.net]) + sdccok=no + else + sdcc_version_min=$1 + + sdcc_version=`sdcc --version 2>&1 | \ + sed 's/\(SDCC.* \)\([[0-9]]*\.[[0-9]]*\.[[0-9]]*\)\( .*$\)/\2/'` + + AC_MSG_CHECKING([sdcc_version "$sdcc_version"]) + + sdcc_major_version=`echo $sdcc_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + sdcc_minor_version=`echo $sdcc_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + sdcc_micro_version=`echo $sdcc_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + sdcc_major_min=`echo $sdcc_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + sdcc_minor_min=`echo $sdcc_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + sdcc_micro_min=`echo $sdcc_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + sdcc_version_proper=`expr \ + "$sdcc_major_version" \> "$sdcc_major_min" \| \ + "$sdcc_major_version" \= "$sdcc_major_min" \& \ + "$sdcc_minor_version" \> "$sdcc_minor_min" \| \ + "$sdcc_major_version" \= "$sdcc_major_min" \& \ + "$sdcc_minor_version" \= "$sdcc_minor_min" \& \ + "$sdcc_micro_version" \>= "$sdcc_micro_min" ` + + if test "$sdcc_version_proper" = "1" ; then + AC_MSG_RESULT([$sdcc_major_version.$sdcc_minor_version.$sdcc_micro_version]) + else + sdccok=no + AC_MSG_RESULT([USRP requires sdcc >= $sdcc_version_min. sdcc not found. See http://sdcc.sf.net"]) + fi + + AC_SUBST(XCC) + AC_SUBST(XAS) + fi + + if test $sdccok = yes; then + ifelse([$2], , :, [$2]) + else + ifelse([$3], , :, [$3]) + fi +]) diff --git a/gsmsp/gsm/configure b/gsmsp/gsm/configure new file mode 100755 index 0000000..79c6744 --- /dev/null +++ b/gsmsp/gsm/configure @@ -0,0 +1,25652 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.61. +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# 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" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +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 +IFS=$as_save_IFS + + ;; +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_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$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'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + 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=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # 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 after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, 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 + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\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 sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +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$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval 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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + + +# 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 <<EOF +$* +EOF + exit 0 +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/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. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + 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="$lt_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 + + + + +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 + +exec 7<&0 </dev/null 6>&1 + +# 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` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="src/lib/gsm.i" +# Factoring default headers for most tests. +ac_includes_default="\ +#include <stdio.h> +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#ifdef STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#else +# ifdef HAVE_STDLIB_H +# include <stdlib.h> +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include <memory.h> +# endif +# include <string.h> +#endif +#ifdef HAVE_STRINGS_H +# include <strings.h> +#endif +#ifdef HAVE_INTTYPES_H +# include <inttypes.h> +#endif +#ifdef HAVE_STDINT_H +# include <stdint.h> +#endif +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif" + +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +target +target_cpu +target_vendor +target_os +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +am__isrc +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +install_sh +STRIP +INSTALL_STRIP_PROGRAM +mkdir_p +AWK +SET_MAKE +am__leading_dot +AMTAR +am__tar +am__untar +PYTHON +PYTHON_VERSION +PYTHON_PREFIX +PYTHON_EXEC_PREFIX +PYTHON_PLATFORM +pythondir +pkgpythondir +pyexecdir +pkgpyexecdir +CXX +CXXFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CXX +EXEEXT +OBJEXT +DEPDIR +am__include +am__quote +AMDEP_TRUE +AMDEP_FALSE +AMDEPBACKSLASH +CXXDEPMODE +am__fastdepCXX_TRUE +am__fastdepCXX_FALSE +CXXCPP +CC +CFLAGS +ac_ct_CC +CCDEPMODE +am__fastdepCC_TRUE +am__fastdepCC_FALSE +CCAS +CCASFLAGS +CCASDEPMODE +am__fastdepCCAS_TRUE +am__fastdepCCAS_FALSE +LN_S +RM_PROG +SED +GREP +EGREP +ECHO +AR +RANLIB +DLLTOOL +AS +OBJDUMP +CPP +F77 +FFLAGS +ac_ct_F77 +LIBTOOL +NO_UNDEFINED +SWIG +PYTHON_CPPFLAGS +PYTHON_LDFLAGS +SWIG_PYTHON_LIB +SWIG_PYTHON_OPT +SWIG_PYTHON_CPPFLAGS +PTHREAD_CC +PTHREAD_LIBS +PTHREAD_CFLAGS +OMNITHREAD_POSIX_TRUE +OMNITHREAD_POSIX_FALSE +OMNITHREAD_NT_TRUE +OMNITHREAD_NT_FALSE +CXX_FOR_BUILD +LIBOBJS +PKG_CONFIG +GNURADIO_CORE_CFLAGS +GNURADIO_CORE_LIBS +GNURADIO_CORE_INCLUDEDIR +BOOST_CFLAGS +STD_DEFINES_AND_INCLUDES +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CXX +CXXFLAGS +LDFLAGS +LIBS +CPPFLAGS +CCC +CXXCPP +CC +CFLAGS +CCAS +CCASFLAGS +CPP +F77 +FFLAGS' + + +# 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. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +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 + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -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) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$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 ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -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'` + 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 ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$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 ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + 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 ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$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'` + 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; }; } + 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 directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +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 + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# 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 the parent directory. + ac_confdir=`$as_dirname -- "$0" || +$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 + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# 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 this package 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 \`..'] + +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] + --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] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +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 + + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --disable-assert don't use cpp.h assert + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=no] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-warnings Turn on warnings + --with-gprof Turn on gprof profiling + --with-prof Turn on prof profiling + --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-tags[=TAGS] include additional configurations [automatic] + --with-boost-include-dir=<path> + path to boost c++ include files + +Some influential environment variables: + CXX C++ compiler command + CXXFLAGS C++ compiler flags + LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a + nonstandard directory <lib dir> + LIBS libraries to pass to the linker, e.g. -l<library> + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if + you have headers in a nonstandard directory <include dir> + CXXCPP C++ preprocessor + CC C compiler command + CFLAGS C compiler flags + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) + CPP C preprocessor + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested 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 + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +configure +generated by GNU Autoconf 2.61 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 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 +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.61. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +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` +/usr/bin/hostinfo = `(/usr/bin/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 +IFS=$as_save_IFS + +} >&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. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# 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: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +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, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat 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.conftest.* && + rm -f -r 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 -f -r conftest* 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 -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" +fi +shift +for ac_site_file +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 $ac_precious_vars; 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 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 + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/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_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { 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=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_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; } +case $ac_cv_build in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ 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 + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ 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 + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 +echo "$as_me: error: invalid value of canonical target" >&2;} + { (exit 1); exit 1; }; };; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac + + +# 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}- +am__api_version='1.10' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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 +IFS=$as_save_IFS + + +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. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + 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' + +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm -f conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +echo "${ECHO_T}$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +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_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE=gsm + VERSION=1.0.0 + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +IFS=$as_save_IFS + +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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +IFS=$as_save_IFS + +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 + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + + + + + # Find any Python interpreter. + if test -z "$PYTHON"; then + for ac_prog in python python2 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PYTHON+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { echo "$as_me:$LINENO: result: $PYTHON" >&5 +echo "${ECHO_T}$PYTHON" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$PYTHON" && break +done +test -n "$PYTHON" || PYTHON=":" + + fi + am_display_PYTHON=python + + + if test "$PYTHON" = :; then + { { echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5 +echo "$as_me: error: no suitable Python interpreter found" >&2;} + { (exit 1); exit 1; }; } + else + + + { echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5 +echo $ECHO_N "checking for $am_display_PYTHON version... $ECHO_C" >&6; } +if test "${am_cv_python_version+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"` +fi +{ echo "$as_me:$LINENO: result: $am_cv_python_version" >&5 +echo "${ECHO_T}$am_cv_python_version" >&6; } + PYTHON_VERSION=$am_cv_python_version + + + + PYTHON_PREFIX='${prefix}' + + PYTHON_EXEC_PREFIX='${exec_prefix}' + + + + { echo "$as_me:$LINENO: checking for $am_display_PYTHON platform" >&5 +echo $ECHO_N "checking for $am_display_PYTHON platform... $ECHO_C" >&6; } +if test "${am_cv_python_platform+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"` +fi +{ echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5 +echo "${ECHO_T}$am_cv_python_platform" >&6; } + PYTHON_PLATFORM=$am_cv_python_platform + + + + + { echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5 +echo $ECHO_N "checking for $am_display_PYTHON script directory... $ECHO_C" >&6; } +if test "${am_cv_python_pythondir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || + echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` +fi +{ echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5 +echo "${ECHO_T}$am_cv_python_pythondir" >&6; } + pythondir=$am_cv_python_pythondir + + + + pkgpythondir=\${pythondir}/$PACKAGE + + + { echo "$as_me:$LINENO: checking for $am_display_PYTHON extension module directory" >&5 +echo $ECHO_N "checking for $am_display_PYTHON extension module directory... $ECHO_C" >&6; } +if test "${am_cv_python_pyexecdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || + echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"` +fi +{ echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5 +echo "${ECHO_T}$am_cv_python_pyexecdir" >&6; } + pyexecdir=$am_cv_python_pyexecdir + + + + pkgpyexecdir=\${pyexecdir}/$PACKAGE + + + + fi + + + + + + if test "$host_cpu" = "x86_64"; then + { echo "$as_me:$LINENO: checking libdir for lib64 suffix" >&5 +echo $ECHO_N "checking libdir for lib64 suffix... $ECHO_C" >&6; } + t=${libdir##*/lib} + if test "$t" != 64 && test -d /lib64 && ! test -L /lib64; then + libdir=${libdir}64 + { echo "$as_me:$LINENO: result: no. Setting libdir to $libdir" >&5 +echo "${ECHO_T}no. Setting libdir to $libdir" >&6; } + else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + fi + fi + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +{ echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +ac_ext=cpp +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 -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +IFS=$as_save_IFS + +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 g++ c++ gpp aCC CC cxx cc++ cl.exe 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +IFS=$as_save_IFS + +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 + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +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` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5 +echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that 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' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C++ compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that 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 { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err 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 +{ 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 + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +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 +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 + +depcc="$CXX" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=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=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + { echo "$as_me:$LINENO: checking whether C++ has bool" >&5 +echo $ECHO_N "checking whether C++ has bool... $ECHO_C" >&6; } + if test "$cross_compiling" = yes; then + { echo "$as_me:$LINENO: WARNING: Don't cross-compile" >&5 +echo "$as_me: WARNING: Don't cross-compile" >&2;} + +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +main() { bool b1=true; bool b2=false; } +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define CXX_HAS_NO_BOOL +_ACEOF + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + + { echo "$as_me:$LINENO: checking whether C++ has buggy scoping in for-loops" >&5 +echo $ECHO_N "checking whether C++ has buggy scoping in for-loops... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <iostream.h> +int +main () +{ + + for (int i=0;i<10;i++) { } + for (int i=0;i<10;i++) { } + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define CXX_HAS_BUGGY_FOR_LOOPS +_ACEOF + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { echo "$as_me:$LINENO: checking whether user wants assertions" >&5 +echo $ECHO_N "checking whether user wants assertions... $ECHO_C" >&6; } + # Check whether --enable-assert was given. +if test "${enable_assert+set}" = set; then + enableval=$enable_assert; +cat >>confdefs.h <<\_ACEOF +#define NDEBUG +_ACEOF + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +fi + + + { echo "$as_me:$LINENO: checking whether C++ has std::isnan" >&5 +echo $ECHO_N "checking whether C++ has std::isnan... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + + std::isnan(0); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define CXX_HAS_STD_ISNAN +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + { echo "$as_me:$LINENO: checking whether user wants warnings" >&5 +echo $ECHO_N "checking whether user wants warnings... $ECHO_C" >&6; } + +# Check whether --with-warnings was given. +if test "${with_warnings+set}" = set; then + withval=$with_warnings; lf_warnings=yes +else + lf_warnings=no +fi + + lf_warnings=yes # hard code for now -eb + { echo "$as_me:$LINENO: result: $lf_warnings" >&5 +echo "${ECHO_T}$lf_warnings" >&6; } + + cc_warning_flags="-Wall" + cxx_warning_flags="-Wall -Woverloaded-virtual" + if test $lf_warnings = yes + then + if test -n "${CC}" + then + + echo 'void f(){}' > conftest.c + for i in $cc_warning_flags + do + { echo "$as_me:$LINENO: checking whether $CC accepts $i" >&5 +echo $ECHO_N "checking whether $CC accepts $i... $ECHO_C" >&6; } + if test -z "`${CC} $i -c conftest.c 2>&1`" + then + CFLAGS="${CFLAGS} $i" + { 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 + done + rm -f conftest.c conftest.o + + fi + if test -n "${CXX}" + then + + echo 'void f(){}' > conftest.cc + for i in $cxx_warning_flags + do + { echo "$as_me:$LINENO: checking whether $CXX accepts $i" >&5 +echo $ECHO_N "checking whether $CXX accepts $i... $ECHO_C" >&6; } + if test -z "`${CXX} $i -c conftest.cc 2>&1`" + then + CXXFLAGS="${CXXFLAGS} $i" + { 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 + done + rm -f conftest.cc conftest.o + + fi + fi + + + { echo "$as_me:$LINENO: checking whether user wants gprof" >&5 +echo $ECHO_N "checking whether user wants gprof... $ECHO_C" >&6; } + +# Check whether --with-gprof was given. +if test "${with_gprof+set}" = set; then + withval=$with_gprof; +else + with_gprof=no +fi + + { echo "$as_me:$LINENO: result: $with_gprof" >&5 +echo "${ECHO_T}$with_gprof" >&6; } + + cc_profiling_flags="-pg" + cxx_profiling_flags="-pg" + ld_profiling_flags="-pg" + if test $with_gprof = yes + then + if test -n "${CC}" + then + + echo 'void f(){}' > conftest.c + for i in $cc_profiling_flags + do + { echo "$as_me:$LINENO: checking whether $CC accepts $i" >&5 +echo $ECHO_N "checking whether $CC accepts $i... $ECHO_C" >&6; } + if test -z "`${CC} $i -c conftest.c 2>&1`" + then + CFLAGS="${CFLAGS} $i" + { 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 + done + rm -f conftest.c conftest.o + + fi + if test -n "${CXX}" + then + + echo 'void f(){}' > conftest.cc + for i in $cxx_profiling_flags + do + { echo "$as_me:$LINENO: checking whether $CXX accepts $i" >&5 +echo $ECHO_N "checking whether $CXX accepts $i... $ECHO_C" >&6; } + if test -z "`${CXX} $i -c conftest.cc 2>&1`" + then + CXXFLAGS="${CXXFLAGS} $i" + { 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 + done + rm -f conftest.cc conftest.o + + fi + fi + + + { echo "$as_me:$LINENO: checking whether user wants prof" >&5 +echo $ECHO_N "checking whether user wants prof... $ECHO_C" >&6; } + +# Check whether --with-prof was given. +if test "${with_prof+set}" = set; then + withval=$with_prof; +else + with_prof=no +fi + + { echo "$as_me:$LINENO: result: $with_prof" >&5 +echo "${ECHO_T}$with_prof" >&6; } + + cc_profiling_flags="-p" + cxx_profiling_flags="-p" + ld_profiling_flags="-p" + if test $with_prof = yes + then + if test -n "${CC}" + then + + echo 'void f(){}' > conftest.c + for i in $cc_profiling_flags + do + { echo "$as_me:$LINENO: checking whether $CC accepts $i" >&5 +echo $ECHO_N "checking whether $CC accepts $i... $ECHO_C" >&6; } + if test -z "`${CC} $i -c conftest.c 2>&1`" + then + CFLAGS="${CFLAGS} $i" + { 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 + done + rm -f conftest.c conftest.o + + fi + if test -n "${CXX}" + then + + echo 'void f(){}' > conftest.cc + for i in $cxx_profiling_flags + do + { echo "$as_me:$LINENO: checking whether $CXX accepts $i" >&5 +echo $ECHO_N "checking whether $CXX accepts $i... $ECHO_C" >&6; } + if test -z "`${CXX} $i -c conftest.cc 2>&1`" + then + CXXFLAGS="${CXXFLAGS} $i" + { 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 + done + rm -f conftest.cc conftest.o + + fi + fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +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 + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +IFS=$as_save_IFS + +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 + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ 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 + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdarg.h> +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +# By default we simply use the C compiler to build assembly code. + +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS + + + +depcc="$CCAS" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CCAS_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CCAS_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CCAS_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CCAS_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CCAS_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CCAS_dependencies_compiler_type" >&6; } +CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then + am__fastdepCCAS_TRUE= + am__fastdepCCAS_FALSE='#' +else + am__fastdepCCAS_TRUE='#' + am__fastdepCCAS_FALSE= +fi + + +{ 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 whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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 +IFS=$as_save_IFS + + +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. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + 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' + +# 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_PROG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $RM_PROG in + [\\/]* | ?:[\\/]*) + ac_cv_path_RM_PROG="$RM_PROG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_RM_PROG="$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 +IFS=$as_save_IFS + + ;; +esac +fi +RM_PROG=$ac_cv_path_RM_PROG +if test -n "$RM_PROG"; then + { echo "$as_me:$LINENO: result: $RM_PROG" >&5 +echo "${ECHO_T}$RM_PROG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + + + +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=no +fi + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + +{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } +if test "${lt_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done + +fi + +SED=$lt_cv_path_SED + +{ echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6; } + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break + ;; + *) + test "$with_gnu_ld" != yes && break + ;; + esac + fi + done + IFS="$lt_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 lds only accept -v. +case `$LD -v 2>&1 </dev/null` in +*GNU* | *'with BFD'*) + lt_cv_prog_gnu_ld=yes + ;; +*) + lt_cv_prog_gnu_ld=no + ;; +esac +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + +{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi +{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6; } +NM="$lt_cv_path_NM" + +{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix4* | aix5*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + 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|DragonFly)/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_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix3*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +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 + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +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 +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check whether --enable-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 +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 5907 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + lt_cv_cc_needs_belf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_cc_needs_belf=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + 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 + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-cygwin* | *-*-mingw* | *-*-pw32*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; 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_DLLTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { echo "$as_me:$LINENO: result: $DLLTOOL" >&5 +echo "${ECHO_T}$DLLTOOL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; 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_DLLTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 +echo "${ECHO_T}$ac_ct_DLLTOOL" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; 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_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AS="${ac_tool_prefix}as" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { echo "$as_me:$LINENO: result: $AS" >&5 +echo "${ECHO_T}$AS" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; 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_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AS="as" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 +echo "${ECHO_T}$ac_ct_AS" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; 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_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { echo "$as_me:$LINENO: result: $OBJDUMP" >&5 +echo "${ECHO_T}$OBJDUMP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; 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_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 +echo "${ECHO_T}$ac_ct_OBJDUMP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + + ;; + +esac + +need_locks="$enable_libtool_lock" + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ 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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <string.h> + +_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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> + +_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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ctype.h> +#include <stdlib.h> +#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)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out 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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&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 + + + +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +fi + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + { echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_F77" && break +done + + if test "x$ac_ct_F77" = x; then + F77="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + F77=$ac_ct_F77 + fi +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_f77_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_prog_f77_g=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi +fi + +G77=`test $ac_compiler_gnu = yes && echo yes` +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# find the maximum length of command line arguments +{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } +else + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } +fi + + + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux* | k*bsd*-gnu) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # 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 <<EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +EOF + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat <<EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <<EOF >> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6; } +else + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } +fi + +{ echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } +if test "${lt_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +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 + +# 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='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' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_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 MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +IFS=$as_save_IFS + +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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +IFS=$as_save_IFS + +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 + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +IFS=$as_save_IFS + +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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +IFS=$as_save_IFS + +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 + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + + +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 "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# 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="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<EOF 1>&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@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<EOF 1>&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@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +enable_dlopen=no +enable_win32_dll=yes + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then + withval=$with_pic; pic_mode="$withval" +else + pic_mode=default +fi + +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8457: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:8461: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | 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). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8747: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:8751: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } + +if test x"$lt_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works=yes + fi + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } + +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8851: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:8855: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag= + enable_shared_with_static_runtimes=no + archive_cmds= + archive_expsym_cmds= + old_archive_From_new_cmds= + old_archive_from_expsyms_cmds= + export_dynamic_flag_spec= + whole_archive_flag_spec= + thread_safe_flag_spec= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + link_all_deplibs=unknown + hardcode_automatic=no + module_cmds= + module_expsym_cmds= + always_export_symbols=no + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + 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 + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + 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}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + + # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + interix3*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive /dev/null' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + 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 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + 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 "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + 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' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld='-rpath $libdir' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + openbsd*) + hardcode_direct=yes + hardcode_shlibpath_var=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_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=: + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib<name>.so + # instead of lib<name>.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +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 + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$hardcode_action" >&6; } + +if test "$hardcode_action" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +striplib= +old_striplib= +{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + ;; + *) + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + ;; + esac +fi + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + { echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef shl_load + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_shl_load || defined __stub___shl_load +choke me +#endif + +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + { echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef dlopen + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_dlopen || defined __stub___dlopen +choke me +#endif + +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + 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" + wl=$lt_prog_compiler_wl 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 <<EOF +#line 11161 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include <dlfcn.h> +#endif + +#include <stdio.h> + +#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); */ + } + else + puts (dlerror ()); + + 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; ) >&5 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_dlunknown|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 + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { 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 <<EOF +#line 11261 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include <dlfcn.h> +#endif + +#include <stdio.h> + +#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); */ + } + else + puts (dlerror ()); + + 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; ) >&5 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_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# Report which library types will actually be built +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler \ + CC \ + LD \ + lt_prog_compiler_wl \ + lt_prog_compiler_pic \ + lt_prog_compiler_static \ + lt_prog_compiler_no_builtin_flag \ + export_dynamic_flag_spec \ + thread_safe_flag_spec \ + whole_archive_flag_spec \ + enable_shared_with_static_runtimes \ + old_archive_cmds \ + old_archive_from_new_cmds \ + predep_objects \ + postdep_objects \ + predeps \ + postdeps \ + compiler_lib_search_path \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + old_archive_from_expsyms_cmds \ + allow_undefined_flag \ + no_undefined_flag \ + export_symbols_cmds \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ + hardcode_automatic \ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ + exclude_expsyms \ + include_expsyms; do + + case $var in + old_archive_cmds | \ + old_archive_from_new_cmds | \ + archive_cmds | \ + archive_expsym_cmds | \ + module_cmds | \ + module_expsym_cmds | \ + old_archive_from_expsyms_cmds | \ + export_symbols_cmds | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + { echo "$as_me:$LINENO: creating $ofile" >&5 +echo "$as_me: creating $ofile" >&6;} + + cat <<__EOF__ >> "$cfgfile" +#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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. + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### 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=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# 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_lt_prog_compiler_wl + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# 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_lt_prog_compiler_static + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_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 used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# 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_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# ### END LIBTOOL CONFIG + +__EOF__ + + + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + +# Check whether --with-tags was given. +if test "${with_tags+set}" = set; then + withval=$with_tags; tagnames="$withval" +fi + + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + else + { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 +echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; + *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 +echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 +echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[]) { return(0); }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +compiler_CXX=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' +else + lt_prog_compiler_no_builtin_flag_CXX= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break + ;; + *) + test "$with_gnu_ld" != yes && break + ;; + esac + fi + done + IFS="$lt_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 lds only accept -v. +case `$LD -v 2>&1 </dev/null` in +*GNU* | *'with BFD'*) + lt_cv_prog_gnu_ld=yes + ;; +*) + lt_cv_prog_gnu_ld=no + ;; +esac +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } +ld_shlibs_CXX=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + ld_shlibs_CXX=no + ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + gnu*) + ;; + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + interix3*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + openbsd*) + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; +esac +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +GCC_CXX="$GXX" +LD_CXX="$LD" + + +cat > conftest.$ac_ext <<EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +EOF + +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` + + for p in `eval $output_verbose_link_cmd`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" \ + || test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$rm -f confest.$objext + +# PORTME: override above test on systems where it is broken +case $host_os in +interix3*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + # + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + +lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13676: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:13680: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } + +if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_CXX=yes + fi + else + lt_prog_compiler_static_works_CXX=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:13780: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:13784: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I /d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_CXX=no + else + archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib<name>.so + # instead of lib<name>.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +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 + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var_CXX" || \ + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6; } + +if test "$hardcode_action_CXX" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do + + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# 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_lt_prog_compiler_wl_CXX + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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_lt_prog_compiler_static_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX + +# 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_CXX +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_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_CXX + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# 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_CXX + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# 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_CXX + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_CXX + +# 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_CXX + +# 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_CXX" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# 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_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld + + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_flag_spec_ld_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="\ + subroutine t + return + end +" + +# Code to be used in simple link tests +lt_simple_link_test_code="\ + program t + end +" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +compiler_F77=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } + +{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +{ echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6; } + +GCC_F77="$G77" +LD_F77="$LD" + +lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= + +{ 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 "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | 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). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_F77=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + lt_prog_compiler_wl_F77='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static_F77='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:15359: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:15363: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_F77=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } + +if test x"$lt_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_F77=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_F77=yes + fi + else + lt_prog_compiler_static_works_F77=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } + +if test x"$lt_prog_compiler_static_works_F77" = xyes; then + : +else + lt_prog_compiler_static_F77= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_F77=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:15463: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:15467: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_F77=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_F77= + enable_shared_with_static_runtimes_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + old_archive_From_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + thread_safe_flag_spec_F77= + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_direct_F77=no + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + link_all_deplibs_F77=unknown + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + always_export_symbols_F77=no + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + 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 + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_F77=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_F77=no + cat <<EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + + # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_F77=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_F77=no + fi + ;; + + interix3*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive /dev/null' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs_F77=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_F77=no + cat <<EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + + if test "$ld_shlibs_F77" = no; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_F77=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_F77=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_F77='' + hardcode_direct_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct_F77=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_F77=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_F77='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_F77=' ${wl}-bernotok' + allow_undefined_flag_F77=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + archive_cmds_need_lc_F77=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_F77=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_F77=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_F77=no + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + whole_archive_flag_spec_F77='' + link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_F77=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + freebsd1*) + ld_shlibs_F77=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_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + *) + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + link_all_deplibs_F77=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no + ;; + + openbsd*) + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_F77='-rpath $libdir' + fi + hardcode_libdir_separator_F77=: + ;; + + solaris*) + no_undefined_flag_F77=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs_F77=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_F77='${wl}-z,text' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_F77='${wl}-z,text' + allow_undefined_flag_F77='${wl}-z,nodefs' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + *) + ld_shlibs_F77=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6; } +test "$ld_shlibs_F77" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_F77 in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no + else + archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib<name>.so + # instead of lib<name>.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +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 + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_F77" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6; } + +if test "$hardcode_action_F77" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_F77 \ + CC_F77 \ + LD_F77 \ + lt_prog_compiler_wl_F77 \ + lt_prog_compiler_pic_F77 \ + lt_prog_compiler_static_F77 \ + lt_prog_compiler_no_builtin_flag_F77 \ + export_dynamic_flag_spec_F77 \ + thread_safe_flag_spec_F77 \ + whole_archive_flag_spec_F77 \ + enable_shared_with_static_runtimes_F77 \ + old_archive_cmds_F77 \ + old_archive_from_new_cmds_F77 \ + predep_objects_F77 \ + postdep_objects_F77 \ + predeps_F77 \ + postdeps_F77 \ + compiler_lib_search_path_F77 \ + archive_cmds_F77 \ + archive_expsym_cmds_F77 \ + postinstall_cmds_F77 \ + postuninstall_cmds_F77 \ + old_archive_from_expsyms_cmds_F77 \ + allow_undefined_flag_F77 \ + no_undefined_flag_F77 \ + export_symbols_cmds_F77 \ + hardcode_libdir_flag_spec_F77 \ + hardcode_libdir_flag_spec_ld_F77 \ + hardcode_libdir_separator_F77 \ + hardcode_automatic_F77 \ + module_cmds_F77 \ + module_expsym_cmds_F77 \ + lt_cv_prog_compiler_c_o_F77 \ + exclude_expsyms_F77 \ + include_expsyms_F77; do + + case $var in + old_archive_cmds_F77 | \ + old_archive_from_new_cmds_F77 | \ + archive_cmds_F77 | \ + archive_expsym_cmds_F77 | \ + module_cmds_F77 | \ + module_expsym_cmds_F77 | \ + old_archive_from_expsyms_cmds_F77 | \ + export_symbols_cmds_F77 | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_F77 + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_F77 + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_F77 + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# 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_lt_prog_compiler_wl_F77 + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 + +# 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_lt_prog_compiler_static_F77 + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_F77 +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_F77 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77 +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_F77 +module_expsym_cmds=$lt_module_expsym_cmds_F77 + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_F77 + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_F77 + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 + +# 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_F77 + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_F77 + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_F77 + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_F77 + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_F77 + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_F77 + +# 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_F77 + +# 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_F77" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_F77 + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_F77 + +# 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_F77 + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_F77 + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +objext_GCJ=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +compiler_GCJ=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +archive_cmds_need_lc_GCJ=no + +old_archive_cmds_GCJ=$old_archive_cmds + + +lt_prog_compiler_no_builtin_flag_GCJ= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + +{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:17663: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:17667: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl_GCJ= +lt_prog_compiler_pic_GCJ= +lt_prog_compiler_static_GCJ= + +{ 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 "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_static_GCJ='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | 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). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_GCJ='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_GCJ=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_GCJ=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_GCJ='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + else + lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_GCJ='-qnocommon' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + lt_prog_compiler_wl_GCJ='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) + lt_prog_compiler_wl_GCJ='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_GCJ='-Qoption ld ' + lt_prog_compiler_pic_GCJ='-PIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_GCJ='-Kconform_pic' + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_can_build_shared_GCJ=no + ;; + + uts4*) + lt_prog_compiler_pic_GCJ='-pic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_GCJ=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_GCJ"; then + +{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:17953: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:17957: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_GCJ=yes + fi + fi + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } + +if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in + "" | " "*) ;; + *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; + esac +else + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_can_build_shared_GCJ=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_GCJ= + ;; + *) + lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } +if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_GCJ=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_GCJ=yes + fi + else + lt_prog_compiler_static_works_GCJ=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } + +if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then + : +else + lt_prog_compiler_static_GCJ= +fi + + +{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } +if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_GCJ=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:18057: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:18061: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_GCJ=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_GCJ= + enable_shared_with_static_runtimes_GCJ=no + archive_cmds_GCJ= + archive_expsym_cmds_GCJ= + old_archive_From_new_cmds_GCJ= + old_archive_from_expsyms_cmds_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + thread_safe_flag_spec_GCJ= + hardcode_libdir_flag_spec_GCJ= + hardcode_libdir_flag_spec_ld_GCJ= + hardcode_libdir_separator_GCJ= + hardcode_direct_GCJ=no + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=unsupported + link_all_deplibs_GCJ=unknown + hardcode_automatic_GCJ=no + module_cmds_GCJ= + module_expsym_cmds_GCJ= + always_export_symbols_GCJ=no + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_GCJ= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + 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 + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_GCJ=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_GCJ=no + cat <<EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + + # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_GCJ=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_GCJ=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_GCJ='-L$libdir' + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=no + enable_shared_with_static_runtimes_GCJ=yes + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + interix3*) + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive /dev/null' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs_GCJ=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_GCJ=no + cat <<EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_GCJ=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_GCJ=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_GCJ=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_GCJ='' + hardcode_direct_GCJ=yes + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct_GCJ=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_GCJ=yes + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_libdir_separator_GCJ= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_GCJ=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_GCJ='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_GCJ="-z nodefs" + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_GCJ=' ${wl}-bernotok' + allow_undefined_flag_GCJ=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_GCJ='$convenience' + archive_cmds_need_lc_GCJ=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_GCJ=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_GCJ=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_GCJ=' ' + allow_undefined_flag_GCJ=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_GCJ=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_GCJ=no + hardcode_direct_GCJ=no + hardcode_automatic_GCJ=yes + hardcode_shlibpath_var_GCJ=unsupported + whole_archive_flag_spec_GCJ='' + link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + freebsd1*) + ld_shlibs_GCJ=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_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + ;; + *) + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + link_all_deplibs_GCJ=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + newsos6) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_shlibpath_var_GCJ=no + ;; + + openbsd*) + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + allow_undefined_flag_GCJ=unsupported + archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_GCJ='-rpath $libdir' + fi + hardcode_libdir_separator_GCJ=: + ;; + + solaris*) + no_undefined_flag_GCJ=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_shlibpath_var_GCJ=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs_GCJ=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_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_GCJ='$CC -r -o $output$reload_objs' + hardcode_direct_GCJ=no + ;; + motorola) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4.3*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_GCJ=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_GCJ='${wl}-z,text' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_GCJ='${wl}-z,text' + allow_undefined_flag_GCJ='${wl}-z,nodefs' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + *) + ld_shlibs_GCJ=no + ;; + esac + fi + +{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } +test "$ld_shlibs_GCJ" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_GCJ" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_GCJ=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_GCJ in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_GCJ + pic_flag=$lt_prog_compiler_pic_GCJ + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ + allow_undefined_flag_GCJ= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no + else + archive_cmds_need_lc_GCJ=yes + fi + allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } + ;; + esac + fi + ;; +esac + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib<name>.so + # instead of lib<name>.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +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 + +{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_GCJ" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && + test "$hardcode_minus_L_GCJ" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_GCJ=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_GCJ=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_GCJ=unsupported +fi +{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6; } + +if test "$hardcode_action_GCJ" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_GCJ \ + CC_GCJ \ + LD_GCJ \ + lt_prog_compiler_wl_GCJ \ + lt_prog_compiler_pic_GCJ \ + lt_prog_compiler_static_GCJ \ + lt_prog_compiler_no_builtin_flag_GCJ \ + export_dynamic_flag_spec_GCJ \ + thread_safe_flag_spec_GCJ \ + whole_archive_flag_spec_GCJ \ + enable_shared_with_static_runtimes_GCJ \ + old_archive_cmds_GCJ \ + old_archive_from_new_cmds_GCJ \ + predep_objects_GCJ \ + postdep_objects_GCJ \ + predeps_GCJ \ + postdeps_GCJ \ + compiler_lib_search_path_GCJ \ + archive_cmds_GCJ \ + archive_expsym_cmds_GCJ \ + postinstall_cmds_GCJ \ + postuninstall_cmds_GCJ \ + old_archive_from_expsyms_cmds_GCJ \ + allow_undefined_flag_GCJ \ + no_undefined_flag_GCJ \ + export_symbols_cmds_GCJ \ + hardcode_libdir_flag_spec_GCJ \ + hardcode_libdir_flag_spec_ld_GCJ \ + hardcode_libdir_separator_GCJ \ + hardcode_automatic_GCJ \ + module_cmds_GCJ \ + module_expsym_cmds_GCJ \ + lt_cv_prog_compiler_c_o_GCJ \ + exclude_expsyms_GCJ \ + include_expsyms_GCJ; do + + case $var in + old_archive_cmds_GCJ | \ + old_archive_from_new_cmds_GCJ | \ + archive_cmds_GCJ | \ + archive_expsym_cmds_GCJ | \ + module_cmds_GCJ | \ + module_expsym_cmds_GCJ | \ + old_archive_from_expsyms_cmds_GCJ | \ + export_symbols_cmds_GCJ | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_GCJ + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_GCJ + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_GCJ + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_GCJ + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# 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_lt_prog_compiler_wl_GCJ + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_GCJ +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ + +# 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_lt_prog_compiler_static_GCJ + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ + +# 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_GCJ +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_GCJ +archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_GCJ +module_expsym_cmds=$lt_module_expsym_cmds_GCJ + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_GCJ + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_GCJ + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ + +# 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_GCJ + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_GCJ + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_GCJ + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_GCJ + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_GCJ + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_GCJ + +# 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_GCJ + +# 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_GCJ" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_GCJ + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_GCJ + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_GCJ + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_GCJ + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + RC) + + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +objext_RC=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +compiler_RC=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + +lt_cv_prog_compiler_c_o_RC=yes + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_RC \ + CC_RC \ + LD_RC \ + lt_prog_compiler_wl_RC \ + lt_prog_compiler_pic_RC \ + lt_prog_compiler_static_RC \ + lt_prog_compiler_no_builtin_flag_RC \ + export_dynamic_flag_spec_RC \ + thread_safe_flag_spec_RC \ + whole_archive_flag_spec_RC \ + enable_shared_with_static_runtimes_RC \ + old_archive_cmds_RC \ + old_archive_from_new_cmds_RC \ + predep_objects_RC \ + postdep_objects_RC \ + predeps_RC \ + postdeps_RC \ + compiler_lib_search_path_RC \ + archive_cmds_RC \ + archive_expsym_cmds_RC \ + postinstall_cmds_RC \ + postuninstall_cmds_RC \ + old_archive_from_expsyms_cmds_RC \ + allow_undefined_flag_RC \ + no_undefined_flag_RC \ + export_symbols_cmds_RC \ + hardcode_libdir_flag_spec_RC \ + hardcode_libdir_flag_spec_ld_RC \ + hardcode_libdir_separator_RC \ + hardcode_automatic_RC \ + module_cmds_RC \ + module_expsym_cmds_RC \ + lt_cv_prog_compiler_c_o_RC \ + exclude_expsyms_RC \ + include_expsyms_RC; do + + case $var in + old_archive_cmds_RC | \ + old_archive_from_new_cmds_RC | \ + archive_cmds_RC | \ + archive_expsym_cmds_RC | \ + module_cmds_RC | \ + module_expsym_cmds_RC | \ + old_archive_from_expsyms_cmds_RC | \ + export_symbols_cmds_RC | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_RC + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_RC + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_RC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_RC + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# 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_lt_prog_compiler_wl_RC + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_RC +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC + +# 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_lt_prog_compiler_static_RC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC + +# 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_RC +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_RC +archive_expsym_cmds=$lt_archive_expsym_cmds_RC +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_RC +module_expsym_cmds=$lt_module_expsym_cmds_RC + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_RC + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_RC + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_RC + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_RC + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_RC + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_RC + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_RC + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_RC + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_RC + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_RC + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_RC" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_RC + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_RC + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_RC + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_RC + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + ;; + + *) + { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 +echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi +fi + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Prevent multiple expansion + + + + + + + + + + + + + + + + + + + + + + + + no_undefined="" + case "${host_os}" in + *mingw* | *cygwin*) + + # on MinGW/Cygwin extra LDFLAGS are required + no_undefined="-no-undefined" + ;; + esac + NO_UNDEFINED=$no_undefined + + + + + + + # Check for Python include path + { echo "$as_me:$LINENO: checking for Python include path" >&5 +echo $ECHO_N "checking for Python include path... $ECHO_C" >&6; } + if test -z "$PYTHON" ; then + { { echo "$as_me:$LINENO: error: cannot find Python path" >&5 +echo "$as_me: error: cannot find Python path" >&2;} + { (exit 1); exit 1; }; } + fi + + # ask distutils which include path we should use + python_cmd=' +import distutils.sysconfig +import os +path = distutils.sysconfig.get_python_inc(plat_specific=False) +if os.sep == "\\": + path = path.replace("\\", "/") +print path +' + python_path=`$PYTHON -c "$python_cmd"` + { echo "$as_me:$LINENO: result: $python_path" >&5 +echo "${ECHO_T}$python_path" >&6; } + if test -z "$python_path" ; then + { { echo "$as_me:$LINENO: error: cannot find Python include path" >&5 +echo "$as_me: error: cannot find Python include path" >&2;} + { (exit 1); exit 1; }; } + fi + + PYTHON_CPPFLAGS=-I$python_path + + + # Check for Python headers usability + python_save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" + +for ac_header in Python.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&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 + +else + { { echo "$as_me:$LINENO: error: cannot find usable Python headers" >&5 +echo "$as_me: error: cannot find usable Python headers" >&2;} + { (exit 1); exit 1; }; } +fi + +done + + CPPFLAGS="$python_save_CPPFLAGS" + + # Only set this on mingw and cygwin hosts, (only implemented + # for mingw host, for crosscompiling you need to trick this) + + PYTHON_LDFLAGS="" + case $host_os in + *mingw* | *cygwin* ) + { echo "$as_me:$LINENO: checking for Python LDFLAGS" >&5 +echo $ECHO_N "checking for Python LDFLAGS... $ECHO_C" >&6; } + + python_cmd=' +import distutils.sysconfig +import os +path = distutils.sysconfig.get_config_var("LIBPL") +if path == None: + path = distutils.sysconfig.PREFIX + "/libs" +if os.sep == "\\": + path = path.replace("\\", "/") +print path +' + python_stdlib_path=`$PYTHON -c "$python_cmd"` + + python_version_nodot=`echo $PYTHON_VERSION | sed "s,\.,,"` + libpython_name="python$PYTHON_VERSION" + + # Standard install of python for win32 has libpython24.a + # instead of libpython2.4.a so we check for the library + # without the dot in the version number. + + python_stdlib_filename=`find $python_stdlib_path -type f -name libpython$python_version_nodot.* -print | sed "1q"` + if test -n "$python_stdlib_filename" ; then + libpython_name="python$python_version_nodot" + fi + + PYTHON_LDFLAGS="-L$python_stdlib_path -l$libpython_name" + { echo "$as_me:$LINENO: result: $PYTHON_LDFLAGS" >&5 +echo "${ECHO_T}$PYTHON_LDFLAGS" >&6; } + # Replace all backslashes in PYTHON Paths with forward slashes + { echo "$as_me:$LINENO: checking for pythondir" >&5 +echo $ECHO_N "checking for pythondir... $ECHO_C" >&6; } + pythondir=`echo $pythondir |sed 's,\\\\,/,g'` + { echo "$as_me:$LINENO: result: $pythondir" >&5 +echo "${ECHO_T}$pythondir" >&6; } + + { echo "$as_me:$LINENO: checking for pkgpythondir" >&5 +echo $ECHO_N "checking for pkgpythondir... $ECHO_C" >&6; } + pkgpythondir=`echo $pkgpythondir |sed 's,\\\\,/,g'` + { echo "$as_me:$LINENO: result: $pkgpythondir" >&5 +echo "${ECHO_T}$pkgpythondir" >&6; } + + { echo "$as_me:$LINENO: checking for pyexecdir" >&5 +echo $ECHO_N "checking for pyexecdir... $ECHO_C" >&6; } + pyexecdir=`echo $pyexecdir |sed 's,\\\\,/,g'` + { echo "$as_me:$LINENO: result: $pyexecdir" >&5 +echo "${ECHO_T}$pyexecdir" >&6; } + + { echo "$as_me:$LINENO: checking for pkgpyexecdir" >&5 +echo $ECHO_N "checking for pkgpyexecdir... $ECHO_C" >&6; } + pkgpyexecdir=`echo $pkgpyexecdir |sed 's,\\\\,/,g'` + { echo "$as_me:$LINENO: result: $pkgpyexecdir" >&5 +echo "${ECHO_T}$pkgpyexecdir" >&6; } + + ;; + esac + + + + + + + + + + + # Extract the first word of "swig", so it can be a program name with args. +set dummy swig; 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_SWIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$SWIG"; then + ac_cv_prog_SWIG="$SWIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_SWIG="`which swig`" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +SWIG=$ac_cv_prog_SWIG +if test -n "$SWIG"; then + { echo "$as_me:$LINENO: result: $SWIG" >&5 +echo "${ECHO_T}$SWIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + if test -z "$SWIG" ; then + { { echo "$as_me:$LINENO: error: Cannot find 'swig' program. SWIG version >= 1.3.23 required" >&5 +echo "$as_me: error: Cannot find 'swig' program. SWIG version >= 1.3.23 required" >&2;} + { (exit 1); exit 1; }; } + SWIG=false + elif test -n "1.3.23" ; then + { echo "$as_me:$LINENO: checking for SWIG version" >&5 +echo $ECHO_N "checking for SWIG version... $ECHO_C" >&6; } + swig_version=`$SWIG -version 2>&1 | \ + awk '/^SWIG Version [0-9]+\.[0-9]+\.[0-9]+.*$/ { split($3,a,"[^.0-9]"); print a[1] }'` + { echo "$as_me:$LINENO: result: $swig_version" >&5 +echo "${ECHO_T}$swig_version" >&6; } + if test -n "$swig_version" ; then + swig_version=`echo $swig_version | \ + awk '{ split($1,a,"\."); print a[1]*1000000+a[2]*1000+a[3] }' 2>/dev/null` + swig_required_version=`echo 1.3.23 | \ + awk '{ split($1,a,"\."); print a[1]*1000000+a[2]*1000+a[3] }' 2>/dev/null` + if test $swig_required_version -gt $swig_version ; then + { { echo "$as_me:$LINENO: error: SWIG version >= 1.3.23 required" >&5 +echo "$as_me: error: SWIG version >= 1.3.23 required" >&2;} + { (exit 1); exit 1; }; } + fi + else + { { echo "$as_me:$LINENO: error: cannot determine SWIG version" >&5 +echo "$as_me: error: cannot determine SWIG version" >&2;} + { (exit 1); exit 1; }; } + fi + fi + + + + + if test "$SWIG" != "false" ; then + SWIG="$SWIG -c++" + fi + + + + + if test "$SWIG" != "false" ; then + SWIG_PYTHON_LIB=-lswigpy + + SWIG_PYTHON_OPT=-python + + fi + SWIG_PYTHON_CPPFLAGS=$PYTHON_CPPFLAGS + + + + + + + # Check first for POSIX + + + +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 + +acx_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + { echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 +echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_join (); +int +main () +{ +return pthread_join (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + acx_pthread_ok=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 +echo "${ECHO_T}$acx_pthread_ok" >&6; } + if test x"$acx_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all. + +acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# pthread: Linux, etcetera +# --thread-safe: KAI C++ + +case "${host_cpu}-${host_os}" in + *solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthread or + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" + ;; +esac + +if test x"$acx_pthread_ok" = xno; then +for flag in $acx_pthread_flags; do + + case $flag in + none) + { echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5 +echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6; } + ;; + + -*) + { echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5 +echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6; } + PTHREAD_CFLAGS="$flag" + ;; + + *) + { echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5 +echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6; } + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <pthread.h> +int +main () +{ +pthread_t th; pthread_join(th, 0); + pthread_attr_init(0); pthread_cleanup_push(0, 0); + pthread_create(0,0,0,0); pthread_cleanup_pop(0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + acx_pthread_ok=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 +echo "${ECHO_T}$acx_pthread_ok" >&6; } + if test "x$acx_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$acx_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: threads are created detached by default + # and the JOINABLE attribute has a nonstandard name (UNDETACHED). + { echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5 +echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <pthread.h> +int +main () +{ +int attr=PTHREAD_CREATE_JOINABLE; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ok=PTHREAD_CREATE_JOINABLE +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ok=unknown +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test x"$ok" = xunknown; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <pthread.h> +int +main () +{ +int attr=PTHREAD_CREATE_UNDETACHED; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ok=PTHREAD_CREATE_UNDETACHED +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ok=unknown +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi + if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then + +cat >>confdefs.h <<\_ACEOF +#define PTHREAD_CREATE_JOINABLE $ok +_ACEOF + + fi + { echo "$as_me:$LINENO: result: ${ok}" >&5 +echo "${ECHO_T}${ok}" >&6; } + if test x"$ok" = xunknown; then + { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5 +echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;} + fi + + { echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5 +echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6; } + flag=no + case "${host_cpu}-${host_os}" in + *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; + *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; + esac + { echo "$as_me:$LINENO: result: ${flag}" >&5 +echo "${ECHO_T}${flag}" >&6; } + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + # More AIX lossage: must compile with cc_r + # Extract the first word of "cc_r", so it can be a program name with args. +set dummy cc_r; 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_PTHREAD_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$PTHREAD_CC"; then + ac_cv_prog_PTHREAD_CC="$PTHREAD_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_PTHREAD_CC="cc_r" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}" +fi +fi +PTHREAD_CC=$ac_cv_prog_PTHREAD_CC +if test -n "$PTHREAD_CC"; then + { echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5 +echo "${ECHO_T}$PTHREAD_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +else + PTHREAD_CC="$CC" +fi + + + + + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$acx_pthread_ok" = xyes; then + ot_posix="yes" + +cat >>confdefs.h <<\_ACEOF +#define OMNITHREAD_POSIX 1 +_ACEOF + + + : +else + acx_pthread_ok=no + + # If no POSIX support found, then check for NT threads + { echo "$as_me:$LINENO: checking for NT threads" >&5 +echo $ECHO_N "checking for NT threads... $ECHO_C" >&6; } + + cat >conftest.$ac_ext <<_ACEOF + + #include <windows.h> + #include <winbase.h> + int main() { InitializeCriticalSection(NULL); return 0; } + +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + + ot_nt="yes" + +cat >>confdefs.h <<\_ACEOF +#define OMNITHREAD_NT 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { { echo "$as_me:$LINENO: error: GNU Radio requires POSIX threads. pthreads not found. +See \`config.log' for more details." >&5 +echo "$as_me: error: GNU Radio requires POSIX threads. pthreads not found. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +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 "x$ot_posix" = xyes; then + OMNITHREAD_POSIX_TRUE= + OMNITHREAD_POSIX_FALSE='#' +else + OMNITHREAD_POSIX_TRUE='#' + OMNITHREAD_POSIX_FALSE= +fi + + if test "x$ot_nt" = xyes; then + OMNITHREAD_NT_TRUE= + OMNITHREAD_NT_FALSE='#' +else + OMNITHREAD_NT_TRUE='#' + OMNITHREAD_NT_FALSE= +fi + + + save_LIBS="$LIBS" + { echo "$as_me:$LINENO: checking for library containing clock_gettime" >&5 +echo $ECHO_N "checking for library containing clock_gettime... $ECHO_C" >&6; } +if test "${ac_cv_search_clock_gettime+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char clock_gettime (); +int +main () +{ +return clock_gettime (); + ; + return 0; +} +_ACEOF +for ac_lib in '' rt; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_clock_gettime=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_clock_gettime+set}" = set; then + break +fi +done +if test "${ac_cv_search_clock_gettime+set}" = set; then + : +else + ac_cv_search_clock_gettime=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettime" >&5 +echo "${ECHO_T}$ac_cv_search_clock_gettime" >&6; } +ac_res=$ac_cv_search_clock_gettime +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + PTHREAD_LIBS="$PTHREAD_LIBS $LIBS" +fi + + + + +for ac_func in clock_gettime gettimeofday nanosleep +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&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 + + LIBS="$save_LIBS" + + +CFLAGS="${CFLAGS} $PTHREAD_CFLAGS" +CXXFLAGS="${CXXFLAGS} $PTHREAD_CFLAGS" + +if test "x$CXX_FOR_BUILD" = x +then + CXX_FOR_BUILD=${CXX} +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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <string.h> + +_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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> + +_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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ctype.h> +#include <stdlib.h> +#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)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out 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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/types.h> +#include <sys/wait.h> +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif + +int +main () +{ + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_sys_wait_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_sys_wait_h=no +fi + +rm -f core conftest.err 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 fcntl.h limits.h strings.h sys/ioctl.h sys/time.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&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 sys/mman.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&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 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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* 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"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 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; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_const=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no +fi + +rm -f core conftest.err 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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +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) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + +{ 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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef size_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_size_t=no +fi + +rm -f core conftest.err 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 int +_ACEOF + +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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/types.h> +#include <sys/time.h> +#include <time.h> + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_time=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_time=no +fi + +rm -f core conftest.err 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 + + +for ac_func in +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&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 + + + + + + + +for ac_header in sys/types.h fcntl.h io.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&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 windows.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&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 winioctl.h winbase.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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #if HAVE_WINDOWS_H + #include <windows.h> + #endif + + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&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_func in getopt usleep gettimeofday nanosleep rand srand random srandom sleep sigaction +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&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 struct timezone" >&5 +echo $ECHO_N "checking for struct timezone... $ECHO_C" >&6; } +if test "${ac_cv_type_struct_timezone+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #if HAVE_SYS_TYPES_H + # include <sys/types.h> + #endif + #if TIME_WITH_SYS_TIME + # include <sys/time.h> + # include <time.h> + #else + # if HAVE_SYS_TIME_H + # include <sys/time.h> + # else + # include <time.h> + # endif + #endif + + +typedef struct timezone ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_struct_timezone=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_struct_timezone=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_struct_timezone" >&5 +echo "${ECHO_T}$ac_cv_type_struct_timezone" >&6; } +if test $ac_cv_type_struct_timezone = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_TIMEZONE 1 +_ACEOF + + +fi +{ echo "$as_me:$LINENO: checking for struct timespec" >&5 +echo $ECHO_N "checking for struct timespec... $ECHO_C" >&6; } +if test "${ac_cv_type_struct_timespec+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #if HAVE_SYS_TYPES_H + # include <sys/types.h> + #endif + #if TIME_WITH_SYS_TIME + # include <sys/time.h> + # include <time.h> + #else + # if HAVE_SYS_TIME_H + # include <sys/time.h> + # else + # include <time.h> + # endif + #endif + + +typedef struct timespec ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_struct_timespec=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_struct_timespec=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_struct_timespec" >&5 +echo "${ECHO_T}$ac_cv_type_struct_timespec" >&6; } +if test $ac_cv_type_struct_timespec = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_TIMESPEC 1 +_ACEOF + + +fi +{ echo "$as_me:$LINENO: checking for ssize_t" >&5 +echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } +if test "${ac_cv_type_ssize_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #if HAVE_SYS_TYPES_H + # include <sys/types.h> + #endif + #if TIME_WITH_SYS_TIME + # include <sys/time.h> + # include <time.h> + #else + # if HAVE_SYS_TIME_H + # include <sys/time.h> + # else + # include <time.h> + # endif + #endif + + +typedef ssize_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_ssize_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_ssize_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 +echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; } +if test $ac_cv_type_ssize_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_SSIZE_T 1 +_ACEOF + + +fi + + + + + +for ac_func in getopt usleep gettimeofday +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 { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + case " $LIBOBJS " in + *" $ac_func.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; +esac + +fi +done + + + + +{ echo "$as_me:$LINENO: checking for Sleep" >&5 +echo $ECHO_N "checking for Sleep... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #include <windows.h> + #include <winbase.h> + +int +main () +{ + Sleep(0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SSLEEP 1 +_ACEOF + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + +{ echo "$as_me:$LINENO: checking whether mkdir accepts only one arg" >&5 +echo $ECHO_N "checking whether mkdir accepts only one arg... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/types.h> + #include <sys/stat.h> + #include <fcntl.h> +int +main () +{ + + mkdir("") + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define MKDIR_TAKES_ONE_ARG +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + + + + + + + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; 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_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$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 +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + if test -z "$PKG_CONFIG_PATH"; then + export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" + fi + + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { echo "$as_me:$LINENO: checking for gnuradio-core >= 2" >&5 +echo $ECHO_N "checking for gnuradio-core >= 2... $ECHO_C" >&6; } + + if $PKG_CONFIG --exists "gnuradio-core >= 2" ; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + succeeded=yes + + { echo "$as_me:$LINENO: checking GNURADIO_CORE_CFLAGS" >&5 +echo $ECHO_N "checking GNURADIO_CORE_CFLAGS... $ECHO_C" >&6; } + GNURADIO_CORE_CFLAGS=`$PKG_CONFIG --cflags "gnuradio-core >= 2"` + { echo "$as_me:$LINENO: result: $GNURADIO_CORE_CFLAGS" >&5 +echo "${ECHO_T}$GNURADIO_CORE_CFLAGS" >&6; } + + { echo "$as_me:$LINENO: checking GNURADIO_CORE_LIBS" >&5 +echo $ECHO_N "checking GNURADIO_CORE_LIBS... $ECHO_C" >&6; } + GNURADIO_CORE_LIBS=`$PKG_CONFIG --libs "gnuradio-core >= 2"` + { echo "$as_me:$LINENO: result: $GNURADIO_CORE_LIBS" >&5 +echo "${ECHO_T}$GNURADIO_CORE_LIBS" >&6; } + + { echo "$as_me:$LINENO: checking GNURADIO_CORE_INCLUDEDIR" >&5 +echo $ECHO_N "checking GNURADIO_CORE_INCLUDEDIR... $ECHO_C" >&6; } + GNURADIO_CORE_INCLUDEDIR=`$PKG_CONFIG --variable=includedir "gnuradio-core >= 2"` + { echo "$as_me:$LINENO: result: $GNURADIO_CORE_INCLUDEDIR" >&5 +echo "${ECHO_T}$GNURADIO_CORE_INCLUDEDIR" >&6; } + else + GNURADIO_CORE_CFLAGS="" + GNURADIO_CORE_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + GNURADIO_CORE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnuradio-core >= 2"` + echo $GNURADIO_CORE_PKG_ERRORS + fi + + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + : + else + { { echo "$as_me:$LINENO: error: Library requirements (gnuradio-core >= 2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (gnuradio-core >= 2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { (exit 1); exit 1; }; } + fi + +LIBS="$LIBS $GNURADIO_CORE_LIBS" + + + + ac_ext=cpp +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 + + gr_boost_include_dir= + +# Check whether --with-boost-include-dir was given. +if test "${with_boost_include_dir+set}" = set; then + withval=$with_boost_include_dir; + # "yes" and "no" are bogus answers + if test x"$with_boost_include_dir" = xyes || + test x"$with_boost_include_dir" = xno; then + gr_boost_include_dir= + else + gr_boost_include_dir=$with_boost_include_dir + fi + +fi + + echo "gr_boost_include_dir = $gr_boost_include_dir" + if test x$gr_boost_include_dir != x; then + # + # If the user specified a directory, then we use it + # + OLD_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$gr_boost_include_dir" + if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then + { echo "$as_me:$LINENO: checking for boost/shared_ptr.hpp" >&5 +echo $ECHO_N "checking for boost/shared_ptr.hpp... $ECHO_C" >&6; } +if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_boost_shared_ptr_hpp" >&5 +echo "${ECHO_T}$ac_cv_header_boost_shared_ptr_hpp" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking boost/shared_ptr.hpp usability" >&5 +echo $ECHO_N "checking boost/shared_ptr.hpp usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <boost/shared_ptr.hpp> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking boost/shared_ptr.hpp presence" >&5 +echo $ECHO_N "checking boost/shared_ptr.hpp presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <boost/shared_ptr.hpp> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: present but cannot be compiled" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for boost/shared_ptr.hpp" >&5 +echo $ECHO_N "checking for boost/shared_ptr.hpp... $ECHO_C" >&6; } +if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_boost_shared_ptr_hpp=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_boost_shared_ptr_hpp" >&5 +echo "${ECHO_T}$ac_cv_header_boost_shared_ptr_hpp" >&6; } + +fi +if test $ac_cv_header_boost_shared_ptr_hpp = yes; then + BOOST_CFLAGS="-I$gr_boost_include_dir" +else + { { echo "$as_me:$LINENO: error: Failed to locate boost/shared_ptr.hpp. +Try using --with-boost-include-dir=<path>, +E.g., --with-boost-include-dir=/usr/local/include/boost-1_33_1" >&5 +echo "$as_me: error: Failed to locate boost/shared_ptr.hpp. +Try using --with-boost-include-dir=<path>, +E.g., --with-boost-include-dir=/usr/local/include/boost-1_33_1" >&2;} + { (exit 1); exit 1; }; } +fi + + + CPPFLAGS=$OLD_CPPFLAGS + else + # + # Otherwise we check in the default places + # + if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then + { echo "$as_me:$LINENO: checking for boost/shared_ptr.hpp" >&5 +echo $ECHO_N "checking for boost/shared_ptr.hpp... $ECHO_C" >&6; } +if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_boost_shared_ptr_hpp" >&5 +echo "${ECHO_T}$ac_cv_header_boost_shared_ptr_hpp" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking boost/shared_ptr.hpp usability" >&5 +echo $ECHO_N "checking boost/shared_ptr.hpp usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <boost/shared_ptr.hpp> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking boost/shared_ptr.hpp presence" >&5 +echo $ECHO_N "checking boost/shared_ptr.hpp presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <boost/shared_ptr.hpp> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: present but cannot be compiled" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for boost/shared_ptr.hpp" >&5 +echo $ECHO_N "checking for boost/shared_ptr.hpp... $ECHO_C" >&6; } +if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_boost_shared_ptr_hpp=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_boost_shared_ptr_hpp" >&5 +echo "${ECHO_T}$ac_cv_header_boost_shared_ptr_hpp" >&6; } + +fi +if test $ac_cv_header_boost_shared_ptr_hpp = yes; then + BOOST_CFLAGS="" +else + # Nope, look for latest version if any in $prefix/include/boost-* + + # Wipe out cached value. KLUDGE: AC should have API for this + unset ac_cv_header_boost_shared_ptr_hpp + + boost_last_match(){ + #echo "boost_last_match: [$]*" + pattern="$1" + shift + if test "$pattern" = "$1" + then + LM='' + else + shift `expr $# - 1` + LM=$1 + fi + #echo "LM(1)='[$]LM'" + } + + pattern="/usr/local/include/boost-*" + boost_last_match "$pattern" $pattern + #echo "LM(2)='$LM'" + + OLD_CPPFLAGS=$CPP_FLAGS + CPPFLAGS="$CPPFLAGS -I$LM" + if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then + { echo "$as_me:$LINENO: checking for boost/shared_ptr.hpp" >&5 +echo $ECHO_N "checking for boost/shared_ptr.hpp... $ECHO_C" >&6; } +if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_boost_shared_ptr_hpp" >&5 +echo "${ECHO_T}$ac_cv_header_boost_shared_ptr_hpp" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking boost/shared_ptr.hpp usability" >&5 +echo $ECHO_N "checking boost/shared_ptr.hpp usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <boost/shared_ptr.hpp> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking boost/shared_ptr.hpp presence" >&5 +echo $ECHO_N "checking boost/shared_ptr.hpp presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <boost/shared_ptr.hpp> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: present but cannot be compiled" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: boost/shared_ptr.hpp: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for boost/shared_ptr.hpp" >&5 +echo $ECHO_N "checking for boost/shared_ptr.hpp... $ECHO_C" >&6; } +if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_boost_shared_ptr_hpp=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_boost_shared_ptr_hpp" >&5 +echo "${ECHO_T}$ac_cv_header_boost_shared_ptr_hpp" >&6; } + +fi +if test $ac_cv_header_boost_shared_ptr_hpp = yes; then + BOOST_CFLAGS="-I$LM" +else + { { echo "$as_me:$LINENO: error: Failed to locate boost/shared_ptr.hpp. +Try using --with-boost-include-dir=<path>, +E.g., --with-boost-include-dir=/usr/local/include/boost-1_33_1" >&5 +echo "$as_me: error: Failed to locate boost/shared_ptr.hpp. +Try using --with-boost-include-dir=<path>, +E.g., --with-boost-include-dir=/usr/local/include/boost-1_33_1" >&2;} + { (exit 1); exit 1; }; } +fi + + + CPPFLAGS=$OLD_CPPFLAGS + +fi + + + + fi + unset boost_last_match LM + 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 + + + + +STD_DEFINES_AND_INCLUDES="$GNURADIO_CORE_CFLAGS $BOOST_CFLAGS" + + +ac_config_files="$ac_config_files Makefile config/Makefile src/Makefile src/lib/Makefile" + + + +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 overridden 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, we kill variables containing newlines. +# 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. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} + 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}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${OMNITHREAD_POSIX_TRUE}" && test -z "${OMNITHREAD_POSIX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"OMNITHREAD_POSIX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"OMNITHREAD_POSIX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${OMNITHREAD_NT_TRUE}" && test -z "${OMNITHREAD_NT_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"OMNITHREAD_NT\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"OMNITHREAD_NT\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +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 +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# 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" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +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 +IFS=$as_save_IFS + + ;; +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_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$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'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # 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 after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, 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 + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\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 sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +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$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval 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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by $as_me, which was +generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +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 and configuration settings, then exit + -q, --quiet do not print progress messages + -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 + +Configuration commands: +$config_commands + +Report bugs to <bug-autoconf@gnu.org>." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2006 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +_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[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { 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 ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { 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" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "config/Makefile") CONFIG_FILES="$CONFIG_FILES config/Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "src/lib/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib/Makefile" ;; + + *) { { 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 + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for 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 + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +target!$target$ac_delim +target_cpu!$target_cpu$ac_delim +target_vendor!$target_vendor$ac_delim +target_os!$target_os$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +am__isrc!$am__isrc$ac_delim +CYGPATH_W!$CYGPATH_W$ac_delim +PACKAGE!$PACKAGE$ac_delim +VERSION!$VERSION$ac_delim +ACLOCAL!$ACLOCAL$ac_delim +AUTOCONF!$AUTOCONF$ac_delim +AUTOMAKE!$AUTOMAKE$ac_delim +AUTOHEADER!$AUTOHEADER$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +install_sh!$install_sh$ac_delim +STRIP!$STRIP$ac_delim +INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim +mkdir_p!$mkdir_p$ac_delim +AWK!$AWK$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +am__leading_dot!$am__leading_dot$ac_delim +AMTAR!$AMTAR$ac_delim +am__tar!$am__tar$ac_delim +am__untar!$am__untar$ac_delim +PYTHON!$PYTHON$ac_delim +PYTHON_VERSION!$PYTHON_VERSION$ac_delim +PYTHON_PREFIX!$PYTHON_PREFIX$ac_delim +PYTHON_EXEC_PREFIX!$PYTHON_EXEC_PREFIX$ac_delim +PYTHON_PLATFORM!$PYTHON_PLATFORM$ac_delim +pythondir!$pythondir$ac_delim +pkgpythondir!$pkgpythondir$ac_delim +pyexecdir!$pyexecdir$ac_delim +pkgpyexecdir!$pkgpyexecdir$ac_delim +CXX!$CXX$ac_delim +CXXFLAGS!$CXXFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CXX!$ac_ct_CXX$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +DEPDIR!$DEPDIR$ac_delim +am__include!$am__include$ac_delim +am__quote!$am__quote$ac_delim +AMDEP_TRUE!$AMDEP_TRUE$ac_delim +AMDEP_FALSE!$AMDEP_FALSE$ac_delim +AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim +CXXDEPMODE!$CXXDEPMODE$ac_delim +am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim +am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim +CXXCPP!$CXXCPP$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS <conf$$subs.sed +rm -f conf$$subs.sed +cat >>$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +CCDEPMODE!$CCDEPMODE$ac_delim +am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim +am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim +CCAS!$CCAS$ac_delim +CCASFLAGS!$CCASFLAGS$ac_delim +CCASDEPMODE!$CCASDEPMODE$ac_delim +am__fastdepCCAS_TRUE!$am__fastdepCCAS_TRUE$ac_delim +am__fastdepCCAS_FALSE!$am__fastdepCCAS_FALSE$ac_delim +LN_S!$LN_S$ac_delim +RM_PROG!$RM_PROG$ac_delim +SED!$SED$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +ECHO!$ECHO$ac_delim +AR!$AR$ac_delim +RANLIB!$RANLIB$ac_delim +DLLTOOL!$DLLTOOL$ac_delim +AS!$AS$ac_delim +OBJDUMP!$OBJDUMP$ac_delim +CPP!$CPP$ac_delim +F77!$F77$ac_delim +FFLAGS!$FFLAGS$ac_delim +ac_ct_F77!$ac_ct_F77$ac_delim +LIBTOOL!$LIBTOOL$ac_delim +NO_UNDEFINED!$NO_UNDEFINED$ac_delim +SWIG!$SWIG$ac_delim +PYTHON_CPPFLAGS!$PYTHON_CPPFLAGS$ac_delim +PYTHON_LDFLAGS!$PYTHON_LDFLAGS$ac_delim +SWIG_PYTHON_LIB!$SWIG_PYTHON_LIB$ac_delim +SWIG_PYTHON_OPT!$SWIG_PYTHON_OPT$ac_delim +SWIG_PYTHON_CPPFLAGS!$SWIG_PYTHON_CPPFLAGS$ac_delim +PTHREAD_CC!$PTHREAD_CC$ac_delim +PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim +PTHREAD_CFLAGS!$PTHREAD_CFLAGS$ac_delim +OMNITHREAD_POSIX_TRUE!$OMNITHREAD_POSIX_TRUE$ac_delim +OMNITHREAD_POSIX_FALSE!$OMNITHREAD_POSIX_FALSE$ac_delim +OMNITHREAD_NT_TRUE!$OMNITHREAD_NT_TRUE$ac_delim +OMNITHREAD_NT_FALSE!$OMNITHREAD_NT_FALSE$ac_delim +CXX_FOR_BUILD!$CXX_FOR_BUILD$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +PKG_CONFIG!$PKG_CONFIG$ac_delim +GNURADIO_CORE_CFLAGS!$GNURADIO_CORE_CFLAGS$ac_delim +GNURADIO_CORE_LIBS!$GNURADIO_CORE_LIBS$ac_delim +GNURADIO_CORE_INCLUDEDIR!$GNURADIO_CORE_INCLUDEDIR$ac_delim +BOOST_CFLAGS!$BOOST_CFLAGS$ac_delim +STD_DEFINES_AND_INCLUDES!$STD_DEFINES_AND_INCLUDES$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 50; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS <conf$$subs.sed +rm -f conf$$subs.sed +cat >>$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# 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 + +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # 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. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$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'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF + +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' + +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines + +# Remove the space that was appended to ease matching. +# Then replace #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. +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines + +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' + +while : +do + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines conftest.tail + +echo "ac_result=$ac_in" >>$CONFIG_STATUS +cat >>$CONFIG_STATUS <<\_ACEOF + if test x"$ac_file" != x-; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f $ac_file + mv "$tmp/config.h" $ac_file + fi + else + echo "/* $configure_input */" + cat "$ac_result" + fi + rm -f "$tmp/out12" +# Compute $ac_file's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $ac_file | $ac_file:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || +$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'`/stamp-h$_am_stamp_count + ;; + + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + + esac +done # for ac_tag + + +{ (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=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || 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 + diff --git a/gsmsp/gsm/configure.ac b/gsmsp/gsm/configure.ac new file mode 100644 index 0000000..6b85e01 --- /dev/null +++ b/gsmsp/gsm/configure.ac @@ -0,0 +1,102 @@ +dnl +dnl Copyright 2004,2005 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 51 Franklin Street, +dnl Boston, MA 02110-1301, USA. +dnl + +AC_INIT +AC_PREREQ(2.57) +AC_CONFIG_SRCDIR([src/lib/gsm.i]) +AM_CONFIG_HEADER(config.h) +AC_CANONICAL_TARGET([]) +AM_INIT_AUTOMAKE(gsm,1.0.0) +AM_PATH_PYTHON() + +GR_X86_64 +dnl LF_CONFIGURE_CC +LF_CONFIGURE_CXX +LF_SET_WARNINGS +GR_SET_GPROF +GR_SET_PROF +AM_PROG_AS +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_PROG_INSTALL +AC_PATH_PROG([RM_PROG], [rm]) + +AC_LIBTOOL_WIN32_DLL +AC_ENABLE_SHARED dnl do build shared libraries +AC_DISABLE_STATIC dnl don't build static libraries +AC_PROG_LIBTOOL + +dnl Locate python, SWIG, etc +GR_NO_UNDEFINED +GR_SCRIPTING + +dnl Checks for libraries. + +dnl check for threads (mandatory) +GR_OMNITHREAD + +CFLAGS="${CFLAGS} $PTHREAD_CFLAGS" +CXXFLAGS="${CXXFLAGS} $PTHREAD_CFLAGS" + +if test "x$CXX_FOR_BUILD" = x +then + CXX_FOR_BUILD=${CXX} +fi +AC_SUBST(CXX_FOR_BUILD) + +dnl Checks for header files. +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/ioctl.h sys/time.h unistd.h) +AC_CHECK_HEADERS(sys/mman.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_C_INLINE +AC_TYPE_SIZE_T +AC_HEADER_TIME + +dnl Checks for library functions. +AC_CHECK_FUNCS([]) + +dnl Check for Mingw support +GR_PWIN32 + +PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core >= 2) +LIBS="$LIBS $GNURADIO_CORE_LIBS" + +dnl Define where to find boost includes +dnl defines BOOST_CFLAGS +GR_REQUIRE_BOOST_INCLUDES + +STD_DEFINES_AND_INCLUDES="$GNURADIO_CORE_CFLAGS $BOOST_CFLAGS" +AC_SUBST(STD_DEFINES_AND_INCLUDES) + +AC_CONFIG_FILES([\ + Makefile \ + config/Makefile \ + src/Makefile \ + src/lib/Makefile \ + ]) + +dnl run_tests is created from run_tests.in. Make it executable. + +AC_OUTPUT diff --git a/gsmsp/gsm/depcomp b/gsmsp/gsm/depcomp new file mode 100755 index 0000000..04701da --- /dev/null +++ b/gsmsp/gsm/depcomp @@ -0,0 +1,530 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2005-07-09.11 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, 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., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, 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. + +# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to <bug-automake@gnu.org>. +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. + "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + stat=$? + + if test -f "$tmpdepfile"; then : + else + stripped=`echo "$stripped" | sed 's,^.*/,,'` + tmpdepfile="$stripped.u" + fi + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + outname="$stripped.o" + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mecanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/gsmsp/gsm/install-sh b/gsmsp/gsm/install-sh new file mode 100755 index 0000000..4d4a951 --- /dev/null +++ b/gsmsp/gsm/install-sh @@ -0,0 +1,323 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2005-05-14.22 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +chmodcmd="$chmodprog 0755" +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= +dstarg= +no_target_directory= + +usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: +-c (ignored) +-d create directories instead of installing files. +-g GROUP $chgrpprog installed files to GROUP. +-m MODE $chmodprog installed files to MODE. +-o USER $chownprog installed files to USER. +-s $stripprog installed files. +-t DIRECTORY install into DIRECTORY. +-T report an error if DSTFILE is a directory. +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test -n "$1"; do + case $1 in + -c) shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit $?;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t) dstarg=$2 + shift + shift + continue;; + + -T) no_target_directory=true + shift + continue;; + + --version) echo "$0 $scriptversion"; exit $?;; + + *) # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + test -n "$dir_arg$dstarg" && break + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done + break;; + esac +done + +if test -z "$1"; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src ;; + esac + + if test -n "$dir_arg"; then + dst=$src + src= + + if test -d "$dst"; then + mkdircmd=: + chmodcmd= + else + mkdircmd=$mkdirprog + fi + else + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dstarg: Is a directory" >&2 + exit 1 + fi + dst=$dst/`basename "$src"` + fi + fi + + # This sed command emulates the dirname command. + dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` + + # Make sure that the destination directory exists. + + # Skip lots of stat calls in the usual case. + if test ! -d "$dstdir"; then + defaultIFS=' + ' + IFS="${IFS-$defaultIFS}" + + oIFS=$IFS + # Some sh's can't handle IFS=/ for some reason. + IFS='%' + set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` + shift + IFS=$oIFS + + pathcomp= + + while test $# -ne 0 ; do + pathcomp=$pathcomp$1 + shift + if test ! -d "$pathcomp"; then + $mkdirprog "$pathcomp" + # mkdir can fail with a `File exist' error in case several + # install-sh are creating the directory concurrently. This + # is OK. + test -d "$pathcomp" || exit + fi + pathcomp=$pathcomp/ + done + fi + + if test -n "$dir_arg"; then + $doit $mkdircmd "$dst" \ + && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } + + else + dstfile=`basename "$dst"` + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + trap '(exit $?); exit' 1 2 13 15 + + # Copy the file name to the temp name. + $doit $cpprog "$src" "$dsttmp" && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + + # Now rename the file to the real destination. + { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ + || { + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + if test -f "$dstdir/$dstfile"; then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ + || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + || { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit 1 + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + } + } + fi || { (exit 1); exit 1; } +done + +# The final little trick to "correctly" pass the exit status to the exit trap. +{ + (exit 0); exit 0 +} + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/gsmsp/gsm/ltmain.sh b/gsmsp/gsm/ltmain.sh new file mode 100755 index 0000000..450e6fd --- /dev/null +++ b/gsmsp/gsm/ltmain.sh @@ -0,0 +1,6927 @@ +# 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, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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. + +basename="s,^.*/,,g" + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +progname=`echo "$progpath" | $SED $basename` +modename="$progname" + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION=1.5.23a +TIMESTAMP=" (1.1220.2.412 2006/10/13 14:13:30)" + +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# 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 "$progpath" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<EOF +$* +EOF + exit $EXIT_SUCCESS +fi + +default_mode= +help="Try \`$progname --help' for more information." +magic="%%%MAGIC variable%%%" +mkdir="mkdir" +mv="mv -f" +rm="rm -f" + +# 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='s/\([\\`\\"$\\\\]\)/\\\1/g' +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + SP2NL='tr \040 \012' + NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + SP2NL='tr \100 \n' + NL2SP='tr \r\n \100\100' + ;; +esac + +# NLS nuisances. +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +# We save the old values to restore during execute mode. +for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + fi" +done + +# Make sure IFS has a sensible default +lt_nl=' +' +IFS=" $lt_nl" + +if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + $echo "$modename: not configured to build any kind of library" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= +duplicate_deps=no +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 + +##################################### +# Shell function definitions: +# This seems to be the best place for them + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $mkdir "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ + $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | \ + $SED -n -e '1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $echo $win32_libid_type +} + + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case "$@ " in + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit $EXIT_FAILURE +# else +# $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + + $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" + $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 + exit $EXIT_FAILURE + fi +} + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + my_status="" + + $show "${rm}r $my_gentop" + $run ${rm}r "$my_gentop" + $show "$mkdir $my_gentop" + $run $mkdir "$my_gentop" + my_status=$? + if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then + exit $my_status + fi + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + extracted_serial=`expr $extracted_serial + 1` + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + $show "${rm}r $my_xdir" + $run ${rm}r "$my_xdir" + $show "$mkdir $my_xdir" + $run $mkdir "$my_xdir" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then + exit $exit_status + fi + case $host in + *-darwin*) + $show "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + if test -z "$run"; then + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` + darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` + if test -n "$darwin_arches"; then + darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + $show "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we have a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + lipo -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + ${rm}r unfat-$$ + cd "$darwin_orig_dir" + else + cd "$darwin_orig_dir" + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + fi # $run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + func_extract_archives_result="$my_oldobjs" +} +# End of Shell function definitions +##################################### + +# Darwin sucks +eval std_shrext=\"$shrext_cmds\" + +disable_libs=no + +# 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" + ;; + tag) + tagname="$arg" + preserve_args="${preserve_args}=$arg" + + # Check whether tagname contains only valid characters + case $tagname in + *[!-_A-Za-z0-9,/]*) + $echo "$progname: invalid tag name: $tagname" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $tagname in + CC) + # Don't test for the "default" C tag, as we know, it's there, but + # not specially marked. + ;; + *) + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then + taglist="$taglist $tagname" + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" + else + $echo "$progname: ignoring unknown tag $tagname" 1>&2 + fi + ;; + esac + ;; + *) + 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 + +Copyright (C) 2006 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." + exit $? + ;; + + --config) + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath + # Now print the configurations for the tags. + for tagname in $taglist; do + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" + done + exit $? + ;; + + --debug) + $echo "$progname: enabling shell trace mode" + set -x + preserve_args="$preserve_args $arg" + ;; + + --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 $? + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --preserve-dup-deps) duplicate_deps="yes" ;; + + --quiet | --silent) + show=: + preserve_args="$preserve_args $arg" + ;; + + --tag) + prevopt="--tag" + prev=tag + preserve_args="$preserve_args --tag" + ;; + --tag=*) + set tag "$optarg" ${1+"$@"} + shift + prev=tag + preserve_args="$preserve_args --tag" + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE +fi + +case $disable_libs in +no) + ;; +shared) + build_libtool_libs=no + build_old_libs=yes + ;; +static) + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` + ;; +esac + +# 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 + $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 + $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 + case $nonopt in + *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) + 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 $EXIT_FAILURE + 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= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + if test -n "$libobj" ; then + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 + exit $EXIT_FAILURE + fi + arg_mode=target + continue + ;; + + -static | -prefer-pic | -prefer-non-pic) + later="$later $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -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. + base_compile="$base_compile $lastarg" + continue + ;; + + * ) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + case $lastarg in + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, and some SunOS ksh mistreat backslash-escaping + # in scan sets (worked around with variable expansion), + # and furthermore cannot handle '|' '&' '(' ')' in scan sets + # at all, so we specify them separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + lastarg="\"$lastarg\"" + ;; + esac + + base_compile="$base_compile $lastarg" + done # for arg + + case $arg_mode in + arg) + $echo "$modename: you must specify an argument for -Xcompile" + exit $EXIT_FAILURE + ;; + target) + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit $EXIT_FAILURE + ;; + *) + # Get the name of the library object. + [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + xform='[cCFSifmso]' + case $libobj in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.ii) xform=ii ;; + *.class) xform=class ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.f90) xform=f90 ;; + *.for) xform=for ;; + *.java) xform=java ;; + *.obj) xform=obj ;; + 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 $EXIT_FAILURE + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -static) + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` + case $qlibobj in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qlibobj="\"$qlibobj\"" ;; + esac + test "X$libobj" != "X$qlibobj" \ + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." + objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir= + else + xdir=$xdir/ + fi + lobj=${xdir}$objdir/$objname + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + $run $rm $removelist + trap "$run $rm $removelist; exit $EXIT_FAILURE" 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 $EXIT_FAILURE" 1 2 15 + else + output_obj= + 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 "$progpath" "$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 $EXIT_FAILURE + fi + $echo "$srcfile" > "$lockfile" + fi + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` + case $qsrcfile in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qsrcfile="\"$qsrcfile\"" ;; + esac + + $run $rm "$libobj" "${libobj}T" + + # Create a libtool object file (analogous to a ".la" file), + # but don't create it if we're doing a dry run. + test -z "$run" && cat > ${libobj}T <<EOF +# $libobj - a libtool object file +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +EOF + + # 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 + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + if test ! -d "${xdir}$objdir"; then + $show "$mkdir ${xdir}$objdir" + $run $mkdir ${xdir}$objdir + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then + exit $exit_status + fi + fi + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + command="$command -o $lobj" + fi + + $run $rm "$lobj" "$output_obj" + + $show "$command" + if $run eval "$command"; then : + else + test -n "$output_obj" && $run $rm $removelist + exit $EXIT_FAILURE + 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 $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + $show "$mv $output_obj $lobj" + if $run $mv $output_obj $lobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the PIC object to the libtool object file. + test -z "$run" && cat >> ${libobj}T <<EOF +pic_object='$objdir/$objname' + +EOF + + # Allow error messages only from the first compilation. + if test "$suppress_opt" = yes; then + suppress_output=' >/dev/null 2>&1' + fi + else + # No PIC object so indicate it doesn't exist in the libtool + # object file. + test -z "$run" && cat >> ${libobj}T <<EOF +pic_object=none + +EOF + 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 $qsrcfile" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test "$compiler_c_o" = yes; then + command="$command -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + command="$command$suppress_output" + $run $rm "$obj" "$output_obj" + $show "$command" + if $run eval "$command"; then : + else + $run $rm $removelist + exit $EXIT_FAILURE + 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 $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && 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 + + # Append the name of the non-PIC object the libtool object file. + # Only append if the libtool object file exists. + test -z "$run" && cat >> ${libobj}T <<EOF +# Name of the non-PIC object. +non_pic_object='$objname' + +EOF + else + # Append the name of the non-PIC object the libtool object file. + # Only append if the libtool object file exists. + test -z "$run" && cat >> ${libobj}T <<EOF +# Name of the non-PIC object. +non_pic_object=none + +EOF + fi + + $run $mv "${libobj}T" "${libobj}" + + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + $run $rm "$lockfile" + fi + + exit $EXIT_SUCCESS + ;; + + # 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 invocation. + # 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" + base_compile="$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` + inst_prefix_dir= + + avoid_version=no + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + non_pic_objects= + notinst_path= # paths that contain not-installed libtool libraries + precious_files_regex= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + 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 + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_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 $EXIT_FAILURE + fi + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat $save_arg` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + done + else + $echo "$modename: link input file \`$save_arg' does not exist" + exit $EXIT_FAILURE + fi + arg=$save_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 $EXIT_FAILURE + ;; + 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 + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + darwin_framework|darwin_framework_skip) + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + prev= + 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 $EXIT_FAILURE + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework|-arch|-isysroot) + case " $CC " in + *" ${arg} ${1} "* | *" ${arg} ${1} "*) + prev=darwin_framework_skip ;; + *) compiler_flags="$compiler_flags $arg" + prev=darwin_framework ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + 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* | /*-*-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 + absdir="$dir" + notinst_path="$notinst_path $dir" + 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*) + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs="$deplibs -framework System" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + -model) + compile_command="$compile_command $arg" + compiler_flags="$compiler_flags $arg" + finalize_command="$finalize_command $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m* pass through architecture-specific compiler args for GCC + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -pg, --coverage pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-pg|--coverage|@*) + + # 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 + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + + -shrext) + prev=shrext + 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 + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -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 $EXIT_FAILURE + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -static | -static-libtool-libs) + # 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 + ;; + -version-number) + prev=vinfo + vinfo_number=yes + 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 + ;; + + -XCClinker) + prev=xcclinker + 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 + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + 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 $EXIT_FAILURE + 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 + + oldlibs= + # 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 + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then + exit $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 $EXIT_FAILURE + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + case $host in + *cygwin* | *mingw* | *pw32*) + # don't eliminate duplications in $postdeps and $predeps + duplicate_compiler_generated_deps=yes + ;; + *) + duplicate_compiler_generated_deps=$duplicate_deps + ;; + 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 + if test "X$duplicate_deps" = "Xyes" ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + esac + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # 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 $EXIT_FAILURE + ;; + 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,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags="$compiler_flags $deplib" + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 + 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 + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + 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 + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if (${SED} -e '2q' $lib | + grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + library_names= + old_library= + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + lib=$ladir/$old_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 + fi + ;; + *) ;; + esac + fi + 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" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + *) + $echo "$modename: warning: \`-L' is ignored for archives/objects" 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) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + if eval $echo \"$deplib\" 2>/dev/null \ + | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + $echo + $echo "*** Warning: Trying to link with static lib archive $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" + $echo "*** because the file extensions .$libext of this argument makes me believe" + $echo "*** that it is just a static archive that I should not used here." + 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" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + 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 + 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' or unhandled argument \`$deplib'" 1>&2 + exit $EXIT_FAILURE + fi + + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + 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 variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + 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 $EXIT_FAILURE + 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" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles="$dlprefiles $lib $dependency_libs" + 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 + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + 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 $EXIT_FAILURE + 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" # used for prog,scan pass + 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 + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath " in + *" $dir "*) ;; + *" $absdir "*) ;; + *) temp_rpath="$temp_rpath $absdir" ;; + esac + fi + + # 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 + 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 + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes ; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + # This is a shared library + + # Warn about portability, can't link against -module's on + # some systems (darwin) + if test "$shouldnotlink" = yes && test "$pass" = link ; then + $echo + if test "$linkmode" = prog; then + $echo "*** Warning: Linking the executable $output against the loadable module" + else + $echo "*** Warning: Linking the shared library $output against the loadable module" + fi + $echo "*** $linklib is not portable!" + fi + if 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 + 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* | mingw*) + 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='~' + cmds=$extract_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $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='~' + cmds=$old_archive_from_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $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" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a module then we can not link against + # it, someone is ignoring the new warnings I added + if /usr/bin/file -L $add 2> /dev/null | + $EGREP ": [^:]* bundle" >/dev/null ; then + $echo "** Warning, lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $echo + $echo "** And there doesn't seem to be a static archive available" + $echo "** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + fi + esac + 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" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + 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 $EXIT_FAILURE + 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" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + 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 + # 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 system can not link to static lib archive $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 "*** But as you try to build a module library, libtool will still create " + $echo "*** a static module, that should work as long as the dlopening application" + $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + 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 + 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" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + 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="$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 $EXIT_FAILURE + fi + if test "$absdir" != "$libdir"; then + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 + fi + path="$absdir" + fi + depdepl= + case $host in + *-*-darwin*) + # we do not want to link against static libs, + # but need to link against shared + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$path/$depdepl" ; then + depdepl="$path/$depdepl" + fi + # do not add paths which are already there + case " $newlib_search_path " in + *" $path "*) ;; + *) newlib_search_path="$newlib_search_path $path";; + esac + fi + path="" + ;; + *) + path="-L$path" + ;; + esac + ;; + -l*) + case $host in + *-*-darwin*) + # Again, we only want to link against shared libraries + eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` + for tmp in $newlib_search_path ; do + if test -f "$tmp/lib$tmp_libs.dylib" ; then + eval depdepl="$tmp/lib$tmp_libs.dylib" + break + fi + done + path="" + ;; + *) continue ;; + esac + ;; + *) continue ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + case " $deplibs " in + *" $depdepl "*) ;; + *) deplibs="$depdepl $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + dependency_libs="$newdependency_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 + 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 + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + 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 + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 + fi + + 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/-version-number' 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 shared_ext=\"$shrext_cmds\" + 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 $EXIT_FAILURE + 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 shared_ext=\"$shrext_cmds\" + 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 $EXIT_FAILURE + 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. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + 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/-version-number' 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 $EXIT_FAILURE + fi + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$2" + number_minor="$3" + number_revision="$4" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows|none) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + current=`expr $number_major + $number_minor - 1` + age="$number_minor" + revision="$number_minor" + ;; + esac + ;; + no) + current="$2" + revision="$3" + age="$4" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + 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 $EXIT_FAILURE + 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="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current"; + ;; + + irix | nonstopux) + major=`expr $current - $age + 1` + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$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="$verstring_prefix$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 $EXIT_FAILURE + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + 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, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$echo "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist="$removelist $p" + ;; + *) ;; + esac + done + if test -n "$removelist"; then + $show "${rm}r $removelist" + $run ${rm}r $removelist + fi + 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* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # 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 behavior. + 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 <<EOF + int main() { return 0; } +EOF + $rm conftest + if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then + ldd_output=`ldd conftest` + for i in $deplibs; do + name=`expr $i : '-l\(.*\)'` + # If $name is empty we are operating on a -L argument. + if test "$name" != "" && test "$name" != "0"; then + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $i "*) + newdeplibs="$newdeplibs $i" + i="" + ;; + esac + fi + if test -n "$i" ; then + libname=`eval \\$echo \"$libname_spec\"` + deplib_matches=`eval \\$echo \"$library_names_spec\"` + set dummy $deplib_matches + deplib_match=$2 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then + newdeplibs="$newdeplibs $i" + else + droppeddeps=yes + $echo + $echo "*** Warning: dynamic linker does not accept needed library $i." + $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 I believe you do not have" + $echo "*** because a test_compile did reveal that the linker did not use it for" + $echo "*** its dynamic dependency list that programs get resolved with at runtime." + fi + fi + else + newdeplibs="$newdeplibs $i" + fi + done + else + # Error occurred in the first compile. Let's try to salvage + # the situation: Compile a separate program for each library. + for i in $deplibs; do + name=`expr $i : '-l\(.*\)'` + # If $name is empty we are operating on a -L argument. + if test "$name" != "" && test "$name" != "0"; then + $rm conftest + if $LTCC $LTCFLAGS -o conftest conftest.c $i; then + ldd_output=`ldd conftest` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $i "*) + newdeplibs="$newdeplibs $i" + i="" + ;; + esac + fi + if test -n "$i" ; then + libname=`eval \\$echo \"$libname_spec\"` + deplib_matches=`eval \\$echo \"$library_names_spec\"` + set dummy $deplib_matches + deplib_match=$2 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then + newdeplibs="$newdeplibs $i" + else + droppeddeps=yes + $echo + $echo "*** Warning: dynamic linker does not accept needed library $i." + $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" + $echo "*** because a test_compile did reveal that the linker did not use this one" + $echo "*** as a dynamic dependency that programs can get resolved with at runtime." + fi + fi + else + droppeddeps=yes + $echo + $echo "*** Warning! Library $i is needed by this library but I was not able to" + $echo "*** make it link in! You will probably need to install it or some" + $echo "*** library that it depends on before this library will be fully" + $echo "*** functional. Installing it before continuing would be even better." + fi + else + newdeplibs="$newdeplibs $i" + fi + done + fi + ;; + file_magic*) + set dummy $deplibs_check_method + file_magic_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 "$name" != "" && test "$name" != "0"; then + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; 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 + # 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 + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $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" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for file magic test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a file magic. Last file checked: $potlib" + fi + 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 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; 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 + potlib="$potent_lib" # see symlink-check above in file_magic test + 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 + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $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" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a regex pattern. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ + -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` + done + fi + if $echo "X $tmp_deplibs" | $Xsed -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 + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + + # 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" + if test -n "$hardcode_libdir_flag_spec_ld"; then + case $archive_cmds in + *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; + *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; + esac + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + 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 shared_ext=\"$shrext_cmds\" + 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 + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + linknames="$linknames $link" + 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 + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + if len=`expr "X$cmd" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + $show "$cmd" + $run eval "$cmd" || exit $? + skipped_export=false + else + # The command line is too long to execute in one step. + $show "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + 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 + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + 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 "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise. + $echo "creating reloadable object files..." + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + output_la=`$echo "X$output" | $Xsed -e "$basename"` + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + delfiles= + last_robj= + k=1 + output=$output_objdir/$output_la-${k}.$objext + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + eval test_cmds=\"$reload_cmds $objlist $last_robj\" + if test "X$objlist" = X || + { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; }; then + objlist="$objlist $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + k=`expr $k + 1` + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + len=1 + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + + if ${skipped_export-false}; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + libobjs=$output + # Append the command to create the export file. + eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" + fi + + # Set up a command to remove the reloadable object files + # after they are used. + i=0 + while test "$i" -lt "$k" + do + i=`expr $i + 1` + delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" + done + + $echo "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + + # Append the command to remove the reloadable object files + # to the just-reset $cmds. + eval cmds=\"\$cmds~\$rm $delfiles\" + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_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 $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + fi + fi + + exit $EXIT_SUCCESS + 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 $EXIT_FAILURE + 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 and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + 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" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $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 $EXIT_SUCCESS + 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 $EXIT_SUCCESS + 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" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + ;; + + 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 + + case $host in + *darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + if test "$tagname" = CXX ; then + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + fi + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + 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*) + testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + 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/$outputname.exp" + $run $rm $export_symbols + $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + else + $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + 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" | + if sort -k 3 </dev/null >/dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + 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. */ +" + + case $host in + *cygwin* | *mingw* ) + $echo >> "$output_objdir/$dlsyms" "\ +/* DATA imports from DLLs on WIN32 can't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs */ +struct { +" + ;; + * ) + $echo >> "$output_objdir/$dlsyms" "\ +const struct { +" + ;; + esac + + + $echo >> "$output_objdir/$dlsyms" "\ + 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 -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag";; + esac + esac + + # Now compile the dynamic symbol file. + $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -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. + case $host in + *cygwin* | *mingw* ) + if test -f "$output_objdir/${outputname}.def" ; then + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + else + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + fi + ;; + * ) + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + ;; + esac + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit $EXIT_FAILURE + ;; + 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" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + fi + + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + $show "$link_command" + $run eval "$link_command" + exit_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 $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 $EXIT_SUCCESS + 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" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` + 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" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + fi + + # Quote $echo for shipping. + if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --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 + outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + output_name=`basename $output` + output_path=`dirname $output` + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $rm $cwrappersource $cwrapper + trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + cat > $cwrappersource <<EOF + +/* $cwrappersource - temporary wrapper executable 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 executable should never be moved out of the build directory. + If it is, it will not operate correctly. + + Currently, it simply execs the wrapper *script* "/bin/sh $output", + but could eventually absorb all of the scripts functionality and + exec $objdir/$outputname directly. +*/ +EOF + cat >> $cwrappersource<<"EOF" +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <malloc.h> +#include <stdarg.h> +#include <assert.h> +#include <string.h> +#include <ctype.h> +#include <sys/stat.h> + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +/* -DDEBUG is fairly common in CFLAGS. */ +#undef DEBUG +#if defined DEBUGWRAPPER +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) +#else +# define DEBUG(format, ...) +#endif + +const char *program_name = NULL; + +void * xmalloc (size_t num); +char * xstrdup (const char *string); +const char * base_name (const char *name); +char * find_executable(const char *wrapper); +int check_executable(const char *path); +char * strendzap(char *str, const char *pat); +void lt_fatal (const char *message, ...); + +int +main (int argc, char *argv[]) +{ + char **newargz; + int i; + + program_name = (char *) xstrdup (base_name (argv[0])); + DEBUG("(main) argv[0] : %s\n",argv[0]); + DEBUG("(main) program_name : %s\n",program_name); + newargz = XMALLOC(char *, argc+2); +EOF + + cat >> $cwrappersource <<EOF + newargz[0] = (char *) xstrdup("$SHELL"); +EOF + + cat >> $cwrappersource <<"EOF" + newargz[1] = find_executable(argv[0]); + if (newargz[1] == NULL) + lt_fatal("Couldn't find %s", argv[0]); + DEBUG("(main) found exe at : %s\n",newargz[1]); + /* we know the script has the same name, without the .exe */ + /* so make sure newargz[1] doesn't end in .exe */ + strendzap(newargz[1],".exe"); + for (i = 1; i < argc; i++) + newargz[i+1] = xstrdup(argv[i]); + newargz[argc+1] = NULL; + + for (i=0; i<argc+1; i++) + { + DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]); + ; + } + +EOF + + case $host_os in + mingw*) + cat >> $cwrappersource <<EOF + execv("$SHELL",(char const **)newargz); +EOF + ;; + *) + cat >> $cwrappersource <<EOF + execv("$SHELL",newargz); +EOF + ;; + esac + + cat >> $cwrappersource <<"EOF" + return 127; +} + +void * +xmalloc (size_t num) +{ + void * p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + + return p; +} + +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL +; +} + +const char * +base_name (const char *name) +{ + const char *base; + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char)name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} + +int +check_executable(const char * path) +{ + struct stat st; + + DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) && + ( + /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ +#if defined (S_IXOTH) + ((st.st_mode & S_IXOTH) == S_IXOTH) || +#endif +#if defined (S_IXGRP) + ((st.st_mode & S_IXGRP) == S_IXGRP) || +#endif + ((st.st_mode & S_IXUSR) == S_IXUSR)) + ) + return 1; + else + return 0; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise */ +char * +find_executable (const char* wrapper) +{ + int has_slash = 0; + const char* p; + const char* p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char* concat_name; + + DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char* path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char* q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR(*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + return NULL; +} + +char * +strendzap(char *str, const char *pat) +{ + size_t len, patlen; + + assert(str != NULL); + assert(pat != NULL); + + len = strlen(str); + patlen = strlen(pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp(str, pat) == 0) + *str = '\0'; + } + return str; +} + +static void +lt_error_core (int exit_status, const char * mode, + const char * message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} +EOF + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit $EXIT_FAILURE" 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' + +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +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 $EXIT_FAILURE + 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 + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2*) + $echo >> $output "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $echo >> $output "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $echo >> $output "\ + \$echo \"\$0: cannot exec \$program \$*\" + exit $EXIT_FAILURE + 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 $EXIT_FAILURE + fi +fi\ +" + chmod +x $output + fi + exit $EXIT_SUCCESS + ;; + 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="$old_deplibs $non_pic_objects" + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + $echo "X$obj" | $Xsed -e 's%^.*/%%' + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "copying selected object files to avoid basename conflicts..." + + if test -z "$gentop"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$gentop"; then + exit $exit_status + fi + fi + + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + counter=`expr $counter + 1` + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + $run ln "$obj" "$gentop/$newobj" || + $run cp "$obj" "$gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + + eval cmds=\"$old_archive_cmds\" + + if len=`expr "X$cmds" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + $echo "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + for obj in $save_oldobjs + do + oldobjs="$objlist $obj" + objlist="$objlist $obj" + eval test_cmds=\"$old_archive_cmds\" + if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + eval cmd=\"$cmd\" + 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 $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + + # 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + fi + newdlprefiles="$newdlprefiles $libdir/$name" + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + 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 | *mingw*,*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 + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# 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 $EXIT_SUCCESS + ;; + + # 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" | 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) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) prev=$arg ;; + -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 $EXIT_FAILURE + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + ;; + 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 | grep "^# 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 $EXIT_FAILURE + 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 + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + if test "$inst_prefix_dir" = "$destdir"; then + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` + else + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` + fi + + $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 + exit $EXIT_FAILURE + 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. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + if test "$linkname" != "$realname"; then + $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + cmds=$postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_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 $EXIT_FAILURE + ;; + 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 $EXIT_SUCCESS + ;; + + *) + # 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 + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + file=`$echo $file|${SED} 's,.exe$,,'` + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin*|*mingw*) + wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` + ;; + *) + wrapper=$file + ;; + esac + if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then + notinst_deplibs= + relink_command= + + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + # Check the variables that should have been set. + if test -z "$notinst_deplibs"; then + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 + exit $EXIT_FAILURE + 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= + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir=`func_mktempdir` + file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` + + $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$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + 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 "$old_striplib"; then + $show "$old_striplib $oldlib" + $run eval "$old_striplib $oldlib" || exit $? + fi + + # Do each command in the postinstall commands. + cmds=$old_postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $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 $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + 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. + cmds=$finish_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $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 $EXIT_SUCCESS + + $echo "X----------------------------------------------------------------------" | $Xsed + $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 "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS + ;; + + # 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 $EXIT_FAILURE + 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 $EXIT_FAILURE + fi + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# 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 $EXIT_FAILURE + 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 + if test ! -f "$dir/$dlname"; then + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE + fi + 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 | grep "^# 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 environment variables + for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # 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 $EXIT_SUCCESS + 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 $EXIT_FAILURE + fi + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$file"; then + dir=. + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + 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 | grep "^# 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" + + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + cmds=$postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $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. + cmds=$old_postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $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. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + + # Read the .lo file + . $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" \ + && test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" \ + && test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + file=`$echo $file|${SED} 's,.exe$,,'` + noexename=`$echo $name|${SED} 's,.exe$,,'` + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$noexename + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + $show "$rm $rmfiles" + $run $rm $rmfiles || exit_status=1 + done + objdir="$origobjdir" + + # 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 $EXIT_FAILURE + ;; + esac + + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + fi +fi # test -z "$show_help" + +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit $EXIT_FAILURE +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 + --tag=TAG use configuration variables from tag TAG + --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. + +Report bugs to <bug-libtool@gnu.org>." + exit $EXIT_SUCCESS + ;; + +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 + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -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 uninstalled libtool libraries + -static-libtool-libs + 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 $EXIT_FAILURE + ;; +esac + +$echo +$echo "Try \`$modename --help' for more information about other modes." + +exit $? + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +disable_libs=shared +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +disable_libs=static +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/gsmsp/gsm/missing b/gsmsp/gsm/missing new file mode 100755 index 0000000..894e786 --- /dev/null +++ b/gsmsp/gsm/missing @@ -0,0 +1,360 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2005-06-08.21 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case "$1" in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to <bug-automake@gnu.org>." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). +case "$1" in + lex|yacc) + # Not GNU programs, they don't have --version. + ;; + + tar) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case "$1" in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case "$f" in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if [ ! -f y.tab.h ]; then + echo >y.tab.h + fi + if [ ! -f y.tab.c ]; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if [ ! -f lex.yy.c ]; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` + fi + if [ -f "$file" ]; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case "$firstarg" in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case "$firstarg" in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/gsmsp/gsm/py-compile b/gsmsp/gsm/py-compile new file mode 100755 index 0000000..d6e900b --- /dev/null +++ b/gsmsp/gsm/py-compile @@ -0,0 +1,146 @@ +#!/bin/sh +# py-compile - Compile a Python program + +scriptversion=2005-05-14.22 + +# Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, 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., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, 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. + +# This file is maintained in Automake, please report +# bugs to <bug-automake@gnu.org> or send patches to +# <automake-patches@gnu.org>. + +if [ -z "$PYTHON" ]; then + PYTHON=python +fi + +basedir= +destdir= +files= +while test $# -ne 0; do + case "$1" in + --basedir) + basedir=$2 + if test -z "$basedir"; then + echo "$0: Missing argument to --basedir." 1>&2 + exit 1 + fi + shift + ;; + --destdir) + destdir=$2 + if test -z "$destdir"; then + echo "$0: Missing argument to --destdir." 1>&2 + exit 1 + fi + shift + ;; + -h|--h*) + cat <<\EOF +Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..." + +Byte compile some python scripts FILES. Use --destdir to specify any +leading directory path to the FILES that you don't want to include in the +byte compiled file. Specify --basedir for any additional path information you +do want to be shown in the byte compiled file. + +Example: + py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py + +Report bugs to <bug-automake@gnu.org>. +EOF + exit $? + ;; + -v|--v*) + echo "py-compile $scriptversion" + exit $? + ;; + *) + files="$files $1" + ;; + esac + shift +done + +if test -z "$files"; then + echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 + exit 1 +fi + +# if basedir was given, then it should be prepended to filenames before +# byte compilation. +if [ -z "$basedir" ]; then + pathtrans="path = file" +else + pathtrans="path = os.path.join('$basedir', file)" +fi + +# if destdir was given, then it needs to be prepended to the filename to +# byte compile but not go into the compiled file. +if [ -z "$destdir" ]; then + filetrans="filepath = path" +else + filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)" +fi + +$PYTHON -c " +import sys, os, string, py_compile + +files = '''$files''' + +print 'Byte-compiling python modules...' +for file in string.split(files): + $pathtrans + $filetrans + if not os.path.exists(filepath) or not (len(filepath) >= 3 + and filepath[-3:] == '.py'): + continue + print file, + sys.stdout.flush() + py_compile.compile(filepath, filepath + 'c', path) +print" || exit $? + +# this will fail for python < 1.5, but that doesn't matter ... +$PYTHON -O -c " +import sys, os, string, py_compile + +files = '''$files''' +print 'Byte-compiling python modules (optimized versions) ...' +for file in string.split(files): + $pathtrans + $filetrans + if not os.path.exists(filepath) or not (len(filepath) >= 3 + and filepath[-3:] == '.py'): + continue + print file, + sys.stdout.flush() + py_compile.compile(filepath, filepath + 'o', path) +print" 2>/dev/null || : + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/gsmsp/gsm/src/Makefile.am b/gsmsp/gsm/src/Makefile.am new file mode 100644 index 0000000..0262e4d --- /dev/null +++ b/gsmsp/gsm/src/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = lib diff --git a/gsmsp/gsm/src/Makefile.in b/gsmsp/gsm/src/Makefile.in new file mode 100644 index 0000000..7936445 --- /dev/null +++ b/gsmsp/gsm/src/Makefile.in @@ -0,0 +1,530 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = src +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/acx_pthread.m4 \ + $(top_srcdir)/config/gr_boost.m4 \ + $(top_srcdir)/config/gr_gprof.m4 \ + $(top_srcdir)/config/gr_no_undefined.m4 \ + $(top_srcdir)/config/gr_omnithread.m4 \ + $(top_srcdir)/config/gr_pwin32.m4 \ + $(top_srcdir)/config/gr_python.m4 \ + $(top_srcdir)/config/gr_scripting.m4 \ + $(top_srcdir)/config/gr_swig.m4 \ + $(top_srcdir)/config/gr_x86_64.m4 \ + $(top_srcdir)/config/lf_cxx.m4 \ + $(top_srcdir)/config/lf_warnings.m4 \ + $(top_srcdir)/config/pkg.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXX_FOR_BUILD = @CXX_FOR_BUILD@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GNURADIO_CORE_CFLAGS = @GNURADIO_CORE_CFLAGS@ +GNURADIO_CORE_INCLUDEDIR = @GNURADIO_CORE_INCLUDEDIR@ +GNURADIO_CORE_LIBS = @GNURADIO_CORE_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NO_UNDEFINED = @NO_UNDEFINED@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +PYTHON = @PYTHON@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RM_PROG = @RM_PROG@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STD_DEFINES_AND_INCLUDES = @STD_DEFINES_AND_INCLUDES@ +STRIP = @STRIP@ +SWIG = @SWIG@ +SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ +SWIG_PYTHON_LIB = @SWIG_PYTHON_LIB@ +SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = lib +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/gsmsp/gsm/src/lib/Makefile.am b/gsmsp/gsm/src/lib/Makefile.am new file mode 100644 index 0000000..84cf81d --- /dev/null +++ b/gsmsp/gsm/src/lib/Makefile.am @@ -0,0 +1,77 @@ +include $(top_srcdir)/Makefile.common + +# Install this stuff so that it ends up as the gnuradio.gsm module +# This usually ends up at: +# ${prefix}/lib/python${python_version}/site-packages/gnuradio + +ourpythondir = $(grpythondir) +ourlibdir = $(grpyexecdir) + +INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) + +SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(SWIGGRFLAGS) + +ALL_IFILES = \ + $(LOCAL_IFILES) \ + $(NON_LOCAL_IFILES) + +NON_LOCAL_IFILES = \ + $(GNURADIO_CORE_INCLUDEDIR)/swig/gnuradio.i + + +LOCAL_IFILES = \ + $(top_srcdir)/src/lib/gsm.i + +# These files are built by SWIG. The first is the C++ glue. +# The second is the python wrapper that loads the _gsm shared library +# and knows how to call our extensions. + +BUILT_SOURCES = \ + gsm.cc \ + gsm.py + +# This gets gsm.py installed in the right place +ourpython_PYTHON = \ + gsm.py + +ourlib_LTLIBRARIES = _gsm.la + +# These are the source files that go into the shared library +_gsm_la_SOURCES = \ + gsm.cc \ + common.cc \ + sch.cc \ + cch.cc \ + data_out.c \ + id_list.c \ + fire_crc.cc \ + interleave.cc \ + gsm_run_bb.cc + +# magic flags +_gsm_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version + +# link the library against some comon swig runtime code and the +# c++ standard library +_gsm_la_LIBADD = \ + $(PYTHON_LDFLAGS) \ + -lstdc++ + +gsm.cc gsm.py: $(LOCAL_IFILES) $(ALL_IFILES) + $(SWIG) $(SWIGPYTHONARGS) -module gsm -o gsm.cc $(LOCAL_IFILES) + +# These headers get installed in ${prefix}/include/gnuradio +grinclude_HEADERS = \ + gsm_run_bb.h common.h sch.h fire_crc.h cch.h common.h burst_types.h gsm_constants.h interleave.h id_list.h gsm_desc.h data_out.h + +# These swig headers get installed in ${prefix}/include/gnuradio/swig +swiginclude_HEADERS = \ + $(LOCAL_IFILES) + + +MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc + +# Don't distribute output of swig +dist-hook: + @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done + @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done diff --git a/gsmsp/gsm/src/lib/Makefile.in b/gsmsp/gsm/src/lib/Makefile.in new file mode 100644 index 0000000..7bb69e9 --- /dev/null +++ b/gsmsp/gsm/src/lib/Makefile.in @@ -0,0 +1,754 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# -*- Makefile -*- +# +# Copyright 2004,2006 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +DIST_COMMON = $(grinclude_HEADERS) $(ourpython_PYTHON) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(swiginclude_HEADERS) $(top_srcdir)/Makefile.common +subdir = src/lib +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/acx_pthread.m4 \ + $(top_srcdir)/config/gr_boost.m4 \ + $(top_srcdir)/config/gr_gprof.m4 \ + $(top_srcdir)/config/gr_no_undefined.m4 \ + $(top_srcdir)/config/gr_omnithread.m4 \ + $(top_srcdir)/config/gr_pwin32.m4 \ + $(top_srcdir)/config/gr_python.m4 \ + $(top_srcdir)/config/gr_scripting.m4 \ + $(top_srcdir)/config/gr_swig.m4 \ + $(top_srcdir)/config/gr_x86_64.m4 \ + $(top_srcdir)/config/lf_cxx.m4 \ + $(top_srcdir)/config/lf_warnings.m4 \ + $(top_srcdir)/config/pkg.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(ourlibdir)" "$(DESTDIR)$(ourpythondir)" \ + "$(DESTDIR)$(grincludedir)" "$(DESTDIR)$(swigincludedir)" +ourlibLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(ourlib_LTLIBRARIES) +am__DEPENDENCIES_1 = +_gsm_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__gsm_la_OBJECTS = gsm.lo common.lo sch.lo cch.lo data_out.lo \ + id_list.lo fire_crc.lo interleave.lo gsm_run_bb.lo +_gsm_la_OBJECTS = $(am__gsm_la_OBJECTS) +_gsm_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(_gsm_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(_gsm_la_SOURCES) +DIST_SOURCES = $(_gsm_la_SOURCES) +ourpythonPYTHON_INSTALL = $(INSTALL_DATA) +py_compile = $(top_srcdir)/py-compile +grincludeHEADERS_INSTALL = $(INSTALL_HEADER) +swigincludeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(grinclude_HEADERS) $(swiginclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BOOST_CFLAGS = @BOOST_CFLAGS@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXX_FOR_BUILD = @CXX_FOR_BUILD@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GNURADIO_CORE_CFLAGS = @GNURADIO_CORE_CFLAGS@ +GNURADIO_CORE_INCLUDEDIR = @GNURADIO_CORE_INCLUDEDIR@ +GNURADIO_CORE_LIBS = @GNURADIO_CORE_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NO_UNDEFINED = @NO_UNDEFINED@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +PYTHON = @PYTHON@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RM_PROG = @RM_PROG@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STD_DEFINES_AND_INCLUDES = @STD_DEFINES_AND_INCLUDES@ +STRIP = @STRIP@ +SWIG = @SWIG@ +SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ +SWIG_PYTHON_LIB = @SWIG_PYTHON_LIB@ +SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# includes +grincludedir = $(includedir)/gnuradio + +# swig includes +swigincludedir = $(grincludedir)/swig + +# Install this stuff in the appropriate subdirectory +# This usually ends up at: +# ${prefix}/lib/python${python_version}/site-packages/gnuradio +grpythondir = $(pythondir)/gnuradio +grpyexecdir = $(pyexecdir)/gnuradio + +# swig flags +SWIGPYTHONFLAGS = -fvirtual -python -modern +SWIGGRFLAGS = -I$(GNURADIO_CORE_INCLUDEDIR)/swig -I$(GNURADIO_CORE_INCLUDEDIR) + +# Don't assume that make predefines $(RM), because BSD make does +# not. We define it now in configure.ac using AM_PATH_PROG, but now +# here have to add a -f to be like GNU make. +RM = $(RM_PROG) -f + +# Install this stuff so that it ends up as the gnuradio.gsm module +# This usually ends up at: +# ${prefix}/lib/python${python_version}/site-packages/gnuradio +ourpythondir = $(grpythondir) +ourlibdir = $(grpyexecdir) +INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) +SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(SWIGGRFLAGS) +ALL_IFILES = \ + $(LOCAL_IFILES) \ + $(NON_LOCAL_IFILES) + +NON_LOCAL_IFILES = \ + $(GNURADIO_CORE_INCLUDEDIR)/swig/gnuradio.i + +LOCAL_IFILES = \ + $(top_srcdir)/src/lib/gsm.i + + +# These files are built by SWIG. The first is the C++ glue. +# The second is the python wrapper that loads the _gsm shared library +# and knows how to call our extensions. +BUILT_SOURCES = \ + gsm.cc \ + gsm.py + + +# This gets gsm.py installed in the right place +ourpython_PYTHON = \ + gsm.py + +ourlib_LTLIBRARIES = _gsm.la + +# These are the source files that go into the shared library +_gsm_la_SOURCES = \ + gsm.cc \ + common.cc \ + sch.cc \ + cch.cc \ + data_out.c \ + id_list.c \ + fire_crc.cc \ + interleave.cc \ + gsm_run_bb.cc + + +# magic flags +_gsm_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version + +# link the library against some comon swig runtime code and the +# c++ standard library +_gsm_la_LIBADD = \ + $(PYTHON_LDFLAGS) \ + -lstdc++ + + +# These headers get installed in ${prefix}/include/gnuradio +grinclude_HEADERS = \ + gsm_run_bb.h common.h sch.h fire_crc.h cch.h common.h burst_types.h gsm_constants.h interleave.h id_list.h gsm_desc.h data_out.h + + +# These swig headers get installed in ${prefix}/include/gnuradio/swig +swiginclude_HEADERS = \ + $(LOCAL_IFILES) + +MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .cc .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.common $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/lib/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-ourlibLTLIBRARIES: $(ourlib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(ourlibdir)" || $(MKDIR_P) "$(DESTDIR)$(ourlibdir)" + @list='$(ourlib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(ourlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(ourlibdir)/$$f'"; \ + $(LIBTOOL) --mode=install $(ourlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(ourlibdir)/$$f"; \ + else :; fi; \ + done + +uninstall-ourlibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(ourlib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(ourlibdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(ourlibdir)/$$p"; \ + done + +clean-ourlibLTLIBRARIES: + -test -z "$(ourlib_LTLIBRARIES)" || rm -f $(ourlib_LTLIBRARIES) + @list='$(ourlib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +_gsm.la: $(_gsm_la_OBJECTS) $(_gsm_la_DEPENDENCIES) + $(_gsm_la_LINK) -rpath $(ourlibdir) $(_gsm_la_OBJECTS) $(_gsm_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data_out.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fire_crc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsm_run_bb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/id_list.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interleave.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sch.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-ourpythonPYTHON: $(ourpython_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(ourpythondir)" || $(MKDIR_P) "$(DESTDIR)$(ourpythondir)" + @list='$(ourpython_PYTHON)'; dlist=''; for p in $$list; do\ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + f=$(am__strip_dir) \ + dlist="$$dlist $$f"; \ + echo " $(ourpythonPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(ourpythondir)/$$f'"; \ + $(ourpythonPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(ourpythondir)/$$f"; \ + else :; fi; \ + done; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(ourpythondir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(ourpythondir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-ourpythonPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(ourpython_PYTHON)'; dlist=''; for p in $$list; do\ + f=$(am__strip_dir) \ + rm -f "$(DESTDIR)$(ourpythondir)/$$f"; \ + rm -f "$(DESTDIR)$(ourpythondir)/$${f}c"; \ + rm -f "$(DESTDIR)$(ourpythondir)/$${f}o"; \ + done +install-grincludeHEADERS: $(grinclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(grincludedir)" || $(MKDIR_P) "$(DESTDIR)$(grincludedir)" + @list='$(grinclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(grincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(grincludedir)/$$f'"; \ + $(grincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(grincludedir)/$$f"; \ + done + +uninstall-grincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(grinclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(grincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(grincludedir)/$$f"; \ + done +install-swigincludeHEADERS: $(swiginclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(swigincludedir)" || $(MKDIR_P) "$(DESTDIR)$(swigincludedir)" + @list='$(swiginclude_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(swigincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(swigincludedir)/$$f'"; \ + $(swigincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(swigincludedir)/$$f"; \ + done + +uninstall-swigincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(swiginclude_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(swigincludedir)/$$f'"; \ + rm -f "$(DESTDIR)$(swigincludedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(ourlibdir)" "$(DESTDIR)$(ourpythondir)" "$(DESTDIR)$(grincludedir)" "$(DESTDIR)$(swigincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-ourlibLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-grincludeHEADERS install-ourlibLTLIBRARIES \ + install-ourpythonPYTHON install-swigincludeHEADERS + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-grincludeHEADERS uninstall-ourlibLTLIBRARIES \ + uninstall-ourpythonPYTHON uninstall-swigincludeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-ourlibLTLIBRARIES ctags dist-hook \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-grincludeHEADERS install-html \ + install-html-am install-info install-info-am install-man \ + install-ourlibLTLIBRARIES install-ourpythonPYTHON install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + install-swigincludeHEADERS installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-grincludeHEADERS \ + uninstall-ourlibLTLIBRARIES uninstall-ourpythonPYTHON \ + uninstall-swigincludeHEADERS + + +gsm.cc gsm.py: $(LOCAL_IFILES) $(ALL_IFILES) + $(SWIG) $(SWIGPYTHONARGS) -module gsm -o gsm.cc $(LOCAL_IFILES) + +# Don't distribute output of swig +dist-hook: + @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done + @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/gsmsp/gsm/src/lib/burst_types.h b/gsmsp/gsm/src/lib/burst_types.h new file mode 100644 index 0000000..377ef6d --- /dev/null +++ b/gsmsp/gsm/src/lib/burst_types.h @@ -0,0 +1,203 @@ +// $Id: burst_types.h,v 1.5 2007/03/14 05:44:53 jl Exp $ + +#pragma once + +#include "gsm_constants.h" + +static const int TB_LEN = 3; +static const int TB_OS1 = 0; +static const int TB_OS2 = 145; +static const unsigned char tail_bits[TB_LEN] = {0, 0, 0}; + +/* + * The normal burst is used to carry information on traffic and control + * channels. + */ +static const int N_TSC_NUM = 8; // number of training sequence codes +static const int N_TSC_CODE_LEN = 26; // length of tsc +static const int N_TSC_OS = 61; // tsc offset +static const int N_EDATA_LEN_1 = 58; // length of first data section +static const int N_EDATA_OS_1 = 3; // offset of first data section +static const int N_EDATA_LEN_2 = 58; // length of second data section +static const int N_EDATA_OS_2 = 87; // offset of second data section +static const unsigned char n_tsc[N_TSC_NUM][N_TSC_CODE_LEN] = { +/* 0 */ { + 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, + 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1 + }, +/* 1 */ { + 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, + 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1 + }, +/* 2 */ { + 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, + 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0 + }, +/* 3 */ { + 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, + 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0 + }, +/* 4 */ { + 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, + 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1 + }, +/* 5 */ { + 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, + 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0 + }, +/* 6 */ { + 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, + 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1 + }, +/* 7 */ { + 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, + 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0 + } +}; + + +/* + * The frequency correction burst is used for frequency synchronization + * of the mobile. This is broadcast in TS0 together with the SCH and + * BCCH. + * + * Modulating the bits below causes a spike at 62.5kHz above (below for + * COMPACT) the center frequency. One can use this spike with a narrow + * band filter to accurately determine the center of the channel. + */ +static const int FC_CODE_LEN = 142; +static const int FC_OS = 3; +static const unsigned char fc_fb[FC_CODE_LEN] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +static const unsigned char fc_compact_fb[FC_CODE_LEN] = { + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 +}; + + +/* + * The synchronization burst is used for time synchronization of the + * mobile. The bits given below were chosen for their correlation + * properties. The synchronization channel (SCH) contains a long + * training sequence (given below) and carries the TDMA frame number and + * base station identity code. It is broadcast in TS0 in the frame + * following the frequency correction burst. + */ +static const int SB_CODE_LEN = 64; +static const int SB_ETS_OS = 42; +static const int SB_EDATA_LEN_1 = 39; +static const int SB_EDATA_OS_1 = 3; +static const int SB_EDATA_LEN_2 = 39; +static const int SB_EDATA_OS_2 = 106; +static const unsigned char sb_etsc[SB_CODE_LEN] = { + 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, + 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, + 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1 +}; + +static const unsigned char sb_cts_etsc[SB_CODE_LEN] = { + 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, + 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, + 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1 +}; + +static const unsigned char sb_compact_etsc[SB_CODE_LEN] = { + 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, + 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, + 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0 +}; + + +/* + * A base tranceiver station must transmit a burst in every timeslot of + * every TDMA frame in channel C0. The dummy burst will be transmitted + * on all timeslots of all TDMA frames for which no other channel + * requires a burst to be transmitted. + */ +static const int D_CODE_LEN = 142; +static const int D_MB_OS = 3; +static const unsigned char d_mb[D_CODE_LEN] = { + 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, + 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, + 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, + 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, + 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, + 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, + 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, + 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0 +}; + + +/* + * The access burst is used for random access from a mobile. + */ +static const int AB_ETB_CODE_LEN = 8; +static const int AB_ETB_OS = 0; +static const unsigned char ab_etb[AB_ETB_CODE_LEN] = { + 0, 0, 1, 1, 1, 0, 1, 0 +}; + +static const int AB_SSB_CODE_LEN = 41; +static const int AB_SSB_OS = 8; +static const unsigned char ab_ssb[AB_SSB_CODE_LEN] = { + 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, + 0, 0, 1, 1, 1, 1, 0, 0, 0 +}; + +static const unsigned char ab_ts1_ssb[AB_SSB_CODE_LEN] = { + 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, + 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, + 0, 0, 1, 0, 0, 1, 1, 0, 1 +}; + +static const unsigned char ab_ts2_ssb[AB_SSB_CODE_LEN] = { + 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, + 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, + 1, 0, 1, 1, 1, 0, 1, 1, 1 +}; + + +typedef enum { + burst_n_0, + burst_n_1, + burst_n_2, + burst_n_3, + burst_n_4, + burst_n_5, + burst_n_6, + burst_n_7, + burst_fc, + burst_fc_c, + burst_s, + burst_s_cts, + burst_s_c, + burst_d, + burst_a, + burst_a_ts1, + burst_a_ts2, + burst_not_a_burst +} burst_t; + +static const int N_BURST_TYPES = ((int)(burst_not_a_burst) + 1); diff --git a/gsmsp/gsm/src/lib/cch.cc b/gsmsp/gsm/src/lib/cch.cc new file mode 100644 index 0000000..c43fe8c --- /dev/null +++ b/gsmsp/gsm/src/lib/cch.cc @@ -0,0 +1,485 @@ + +#include "common.h" +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <ctype.h> + +#include <exception> +#include <stdexcept> +#include <math.h> + +#include "burst_types.h" +#include "cch.h" +#include "fire_crc.h" + +extern struct _opt opt; + +/* + * GSM SACCH -- Slow Associated Control Channel + * + * These messages are encoded exactly the same as on the BCCH. + * (Broadcast Control Channel.) + * + * Input: 184 bits + * + * 1. Add parity and flushing bits. (Output 184 + 40 + 4 = 228 bit) + * 2. Convolutional encode. (Output 228 * 2 = 456 bit) + * 3. Interleave. (Output 456 bit) + * 4. Map on bursts. (4 x 156 bit bursts with each 2x57 bit content data) + */ + + +/* + * Parity (FIRE) for the GSM SACCH channel. + * + * g(x) = (x^23 + 1)(x^17 + x^3 + 1) + * = x^40 + x^26 + x^23 + x^17 + x^3 + 1 + */ + +static const unsigned char parity_polynomial[PARITY_SIZE + 1] = { + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, + 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, + 1 +}; + +// remainder after dividing data polynomial by g(x) +static const unsigned char parity_remainder[PARITY_SIZE] = { + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1 +}; + + +/* +static void parity_encode(unsigned char *d, unsigned char *p) { + + int i; + unsigned char buf[DATA_BLOCK_SIZE + PARITY_SIZE], *q; + + memcpy(buf, d, DATA_BLOCK_SIZE); + memset(buf + DATA_BLOCK_SIZE, 0, PARITY_SIZE); + + for(q = buf; q < buf + DATA_BLOCK_SIZE; q++) + if(*q) + for(i = 0; i < PARITY_SIZE + 1; i++) + q[i] ^= parity_polynomial[i]; + for(i = 0; i < PARITY_SIZE; i++) + p[i] = !buf[DATA_BLOCK_SIZE + i]; +} + */ + + +static int parity_check(unsigned char *d) { + + unsigned int i; + unsigned char buf[DATA_BLOCK_SIZE + PARITY_SIZE], *q; + + memcpy(buf, d, DATA_BLOCK_SIZE + PARITY_SIZE); + + for(q = buf; q < buf + DATA_BLOCK_SIZE; q++) + if(*q) + for(i = 0; i < PARITY_SIZE + 1; i++) + q[i] ^= parity_polynomial[i]; + return memcmp(buf + DATA_BLOCK_SIZE, parity_remainder, PARITY_SIZE); +} + + +/* + * Convolutional encoding and Viterbi decoding for the GSM SACCH channel. + */ + +/* + * Convolutional encoding: + * + * G_0 = 1 + x^3 + x^4 + * G_1 = 1 + x + x^3 + x^4 + * + * i.e., + * + * c_{2k} = u_k + u_{k - 3} + u_{k - 4} + * c_{2k + 1} = u_k + u_{k - 1} + u_{k - 3} + u_{k - 4} + */ +#define K 5 +#define MAX_ERROR (2 * CONV_INPUT_SIZE + 1) + + +/* + * Given the current state and input bit, what are the output bits? + * + * encode[current_state][input_bit] + */ +static const unsigned int encode[1 << (K - 1)][2] = { + {0, 3}, {3, 0}, {3, 0}, {0, 3}, + {0, 3}, {3, 0}, {3, 0}, {0, 3}, + {1, 2}, {2, 1}, {2, 1}, {1, 2}, + {1, 2}, {2, 1}, {2, 1}, {1, 2} +}; + + +/* + * Given the current state and input bit, what is the next state? + * + * next_state[current_state][input_bit] + */ +static const unsigned int next_state[1 << (K - 1)][2] = { + {0, 8}, {0, 8}, {1, 9}, {1, 9}, + {2, 10}, {2, 10}, {3, 11}, {3, 11}, + {4, 12}, {4, 12}, {5, 13}, {5, 13}, + {6, 14}, {6, 14}, {7, 15}, {7, 15} +}; + + +/* + * Given the previous state and the current state, what input bit caused + * the transition? If it is impossible to transition between the two + * states, the value is 2. + * + * prev_next_state[previous_state][current_state] + */ +static const unsigned int prev_next_state[1 << (K - 1)][1 << (K - 1)] = { + { 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2}, + { 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2}, + { 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2}, + { 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2}, + { 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2}, + { 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2}, + { 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2}, + { 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2}, + { 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2}, + { 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2}, + { 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2}, + { 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2}, + { 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2}, + { 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2}, + { 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1}, + { 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1} +}; + + +static inline unsigned int hamming_distance2(unsigned int w) { + + return (w & 1) + !!(w & 2); +} + + +/* +static void conv_encode(unsigned char *data, unsigned char *output) { + + unsigned int i, state = 0, o; + + // encode data + for(i = 0; i < CONV_INPUT_SIZE; i++) { + o = encode[state][data[i]]; + state = next_state[state][data[i]]; + *output++ = !!(o & 2); + *output++ = o & 1; + } +} + */ + + +static int conv_decode(unsigned char *output, unsigned char *data) { + + int i, t; + unsigned int rdata, state, nstate, b, o, distance, accumulated_error, + min_state, min_error, cur_state; + + unsigned int ae[1 << (K - 1)]; + unsigned int nae[1 << (K - 1)]; // next accumulated error + unsigned int state_history[1 << (K - 1)][CONV_INPUT_SIZE + 1]; + + // initialize accumulated error, assume starting state is 0 + for(i = 0; i < (1 << (K - 1)); i++) + ae[i] = nae[i] = MAX_ERROR; + ae[0] = 0; + + // build trellis + for(t = 0; t < CONV_INPUT_SIZE; t++) { + + // get received data symbol + rdata = (data[2 * t] << 1) | data[2 * t + 1]; + + // for each state + for(state = 0; state < (1 << (K - 1)); state++) { + + // make sure this state is possible + if(ae[state] >= MAX_ERROR) + continue; + + // find all states we lead to + for(b = 0; b < 2; b++) { + + // get next state given input bit b + nstate = next_state[state][b]; + + // find output for this transition + o = encode[state][b]; + + // calculate distance from received data + distance = hamming_distance2(rdata ^ o); + + // choose surviving path + accumulated_error = ae[state] + distance; + if(accumulated_error < nae[nstate]) { + + // save error for surviving state + nae[nstate] = accumulated_error; + + // update state history + state_history[nstate][t + 1] = state; + } + } + } + + // get accumulated error ready for next time slice + for(i = 0; i < (1 << (K - 1)); i++) { + ae[i] = nae[i]; + nae[i] = MAX_ERROR; + } + } + + // the final state is the state with the fewest errors + min_state = (unsigned int)-1; + min_error = MAX_ERROR; + for(i = 0; i < (1 << (K - 1)); i++) { + if(ae[i] < min_error) { + min_state = i; + min_error = ae[i]; + } + } + + // trace the path + cur_state = min_state; + for(t = CONV_INPUT_SIZE; t >= 1; t--) { + min_state = cur_state; + cur_state = state_history[cur_state][t]; // get previous + output[t - 1] = prev_next_state[cur_state][min_state]; + } + + // return the number of errors detected (hard-decision) + return min_error; +} + + +/* + * GSM SACCH interleaving and burst mapping + * + * Interleaving: + * + * Given 456 coded input bits, form 4 blocks of 114 bits: + * + * i(B, j) = c(n, k) k = 0, ..., 455 + * n = 0, ..., N, N + 1, ... + * B = B_0 + 4n + (k mod 4) + * j = 2(49k mod 57) + ((k mod 8) div 4) + * + * Mapping on Burst: + * + * e(B, j) = i(B, j) + * e(B, 59 + j) = i(B, 57 + j) j = 0, ..., 56 + * e(B, 57) = h_l(B) + * e(B, 58) = h_n(B) + * + * Where h_l(B) and h_n(B) are bits in burst B indicating flags. + */ + +/* +static void interleave(unsigned char *data, unsigned char *iBLOCK) { + + int j, k, B; + + // for each bit in input data + for(k = 0; k < CONV_SIZE; k++) { + B = k % 4; + j = 2 * ((49 * k) % 57) + ((k % 8) / 4); + iBLOCK[B * iBLOCK_SIZE + j] = data[k]; + } +} + */ + + +#if 0 +static void decode_interleave(unsigned char *data, unsigned char *iBLOCK) { + + int j, k, B; + + for(k = 0; k < CONV_SIZE; k++) { + B = k % 4; + j = 2 * ((49 * k) % 57) + ((k % 8) / 4); + data[k] = iBLOCK[B * iBLOCK_SIZE + j]; + } +} + +#endif + +/* +static void burstmap(unsigned char *iBLOCK, unsigned char *eBLOCK, + unsigned char hl, unsigned char hn) { + + int j; + + for(j = 0; j < 57; j++) { + eBLOCK[j] = iBLOCK[j]; + eBLOCK[j + 59] = iBLOCK[j + 57]; + } + eBLOCK[57] = hl; + eBLOCK[58] = hn; +} + */ + + +static void decode_burstmap(unsigned char *iBLOCK, unsigned char *eBLOCK, + unsigned char *hl, unsigned char *hn) { + + int j; + + for(j = 0; j < 57; j++) { + iBLOCK[j] = eBLOCK[j]; + iBLOCK[j + 57] = eBLOCK[j + 59]; + } + *hl = eBLOCK[57]; + *hn = eBLOCK[58]; +} + + +/* + * Transmitted bits are sent least-significant first. + */ +static int compress_bits(unsigned char *dbuf, unsigned int dbuf_len, + unsigned char *sbuf, unsigned int sbuf_len) { + + unsigned int i, j, c, pos = 0; + + if(dbuf_len < ((sbuf_len + 7) >> 3)) + return -1; + + for(i = 0; i < sbuf_len; i += 8) { + for(j = 0, c = 0; (j < 8) && (i + j < sbuf_len); j++) + c |= (!!sbuf[i + j]) << j; + dbuf[pos++] = c & 0xff; + } + return pos; +} + + +#if 0 +int get_ns_l3_len(unsigned char *data, unsigned int datalen) { + + if((data[0] & 3) != 1) { + fprintf(stderr, "error: get_ns_l3_len: pseudo-length reserved " + "bits bad (%2.2x)\n", data[0] & 3); + return -1; + } + return (data[0] >> 2); +} + +#endif + +static unsigned char *decode_sacch(unsigned char *e0, unsigned char *e1, + unsigned char *e2, unsigned char *e3, unsigned int *datalen) { + + int errors, len, data_size = (DATA_BLOCK_SIZE + 7) >> 3; + unsigned char conv_data[CONV_SIZE], iBLOCK[BLOCKS][iBLOCK_SIZE], + hl, hn, decoded_data[PARITY_OUTPUT_SIZE], *data; + + if(!(data = (unsigned char *)malloc(data_size))) { + throw std::runtime_error("error: decode_cch: malloc"); + } + + if(datalen) + *datalen = 0; + + // unmap the bursts + decode_burstmap(iBLOCK[0], e0, &hl, &hn); // XXX ignore stealing bits + decode_burstmap(iBLOCK[1], e1, &hl, &hn); + decode_burstmap(iBLOCK[2], e2, &hl, &hn); + decode_burstmap(iBLOCK[3], e3, &hl, &hn); + + // remove interleave + interleave_decode(&opt.ictx, conv_data, (unsigned char *)iBLOCK); + //decode_interleave(conv_data, (unsigned char *)iBLOCK); + + // Viterbi decode + errors = conv_decode(decoded_data, conv_data); + DEBUGF("conv_decode: %d\n", errors); + if (errors) + return NULL; + + // check parity + // If parity check error detected try to fix it. + if (parity_check(decoded_data)) + { + fire_crc crc(40, 184); + // fprintf(stderr, "error: sacch: parity error (%d)\n", errors); + unsigned char crc_result[224]; + if (crc.check_crc(decoded_data, crc_result) == 0) + { + errors = -1; + DEBUGF("error: sacch: parity error (%d)\n", errors); + return NULL; + } else { + memcpy(decoded_data, crc_result, sizeof crc_result); + errors = 0; + } + } + + if((len = compress_bits(data, data_size, decoded_data, + DATA_BLOCK_SIZE)) < 0) { + fprintf(stderr, "error: compress_bits\n"); + return 0; + } + if(len < data_size) { + fprintf(stderr, "error: buf too small (%d < %d)\n", + sizeof(data), len); + return 0; + } + + if(datalen) + *datalen = (unsigned int)len; + return data; +} + + +/* + * decode_cch + * + * Decode a "common" control channel. Most control channels use + * the same burst, interleave, Viterbi and parity configuration. + * The documentation for the control channels defines SACCH first + * and then just keeps referring to that. + * + * The current (investigated) list is as follows: + * + * BCCH Norm + * BCCH Ext + * PCH + * AGCH + * CBCH (SDCCH/4) + * CBCH (SDCCH/8) + * SDCCH/4 + * SACCH/C4 + * SDCCH/8 + * SACCH/C8 + * + * We provide two functions, one for where all four bursts are + * contiguous, and one where they aren't. + */ +unsigned char *decode_cch(unsigned char *e0, unsigned char *e1, + unsigned char *e2, unsigned char *e3, unsigned int *datalen) { + + return decode_sacch(e0, e1, e2, e3, datalen); +} + + +unsigned char *decode_cch(unsigned char *e, unsigned int *datalen) { + + return decode_sacch(e, e + eBLOCK_SIZE, e + 2 * eBLOCK_SIZE, + e + 3 * eBLOCK_SIZE, datalen); +} diff --git a/gsmsp/gsm/src/lib/cch.h b/gsmsp/gsm/src/lib/cch.h new file mode 100644 index 0000000..e4429a0 --- /dev/null +++ b/gsmsp/gsm/src/lib/cch.h @@ -0,0 +1,41 @@ + +/* + * decode_cch + * + * Decode a "common" control channel. Most control channels use + * the same burst, interleave, Viterbi and parity configuration. + * The documentation for the control channels defines SACCH first + * and then just keeps referring to that. + * + * The current (investigated) list is as follows: + * + * BCCH Norm + * BCCH Ext + * PCH + * AGCH + * CBCH (SDCCH/4) + * CBCH (SDCCH/8) + * SDCCH/4 + * SACCH/C4 + * SDCCH/8 + * SACCH/C8 + * + * We provide two functions, one for where all four bursts are + * contiguous, and one where they aren't. + */ + +#define DATA_BLOCK_SIZE 184 +#define PARITY_SIZE 40 +#define FLUSH_BITS_SIZE 4 +#define PARITY_OUTPUT_SIZE (DATA_BLOCK_SIZE + PARITY_SIZE + FLUSH_BITS_SIZE) + +#define CONV_INPUT_SIZE PARITY_OUTPUT_SIZE +#define CONV_SIZE (2 * CONV_INPUT_SIZE) + +#define BLOCKS 4 +#define iBLOCK_SIZE (CONV_SIZE / BLOCKS) +#define eBLOCK_SIZE (iBLOCK_SIZE + 2) + +unsigned char *decode_cch(unsigned char *, unsigned char *, unsigned char *, + unsigned char *, unsigned int *); +unsigned char *decode_cch(unsigned char *, unsigned int *); diff --git a/gsmsp/gsm/src/lib/common.cc b/gsmsp/gsm/src/lib/common.cc new file mode 100644 index 0000000..1666c24 --- /dev/null +++ b/gsmsp/gsm/src/lib/common.cc @@ -0,0 +1,87 @@ +/* + * $Id: system.c,v 1.1 2003/05/15 12:13:49 skyper Exp $ + */ + +#include "common.h" +#include <stdio.h> +#include <string.h> + +void +hexdump(const unsigned char *data, size_t len) +{ + size_t n = 0; + int line = 0; + + if (!len) + return; + + printf("%03x: ", line++); + while (1) + { + printf("%2.2x ", data[n++]); + if (n >= len) + break; + if ((n % 8 == 0) && (n % 16 != 0)) + printf(" - "); + if (n % 16 == 0) + printf("\n%03x: ", line++); + } + printf("\n"); +} + +#ifndef HAVE_STRLCPY +/* + * bsd'sh strlcpy(). + * The strlcpy() function copies up to size-1 characters from the + * NUL-terminated string src to dst, NUL-terminating the result. + * Return: total length of the string tried to create. + */ +size_t +strlcpy(char *dst, const char *src, size_t size) +{ + size_t len = strlen(src); + size_t ret = len; + + if (size <= 0) + return 0; + if (len >= size) + len = size - 1; + memcpy(dst, src, len); + dst[len] = 0; + + return ret; +} +#endif + +/* + * Debuggging... + * Convert an interger to a bit string and output it. + * Most significatn bit first. + */ +char * +int2bit(unsigned int val) +{ + static char buf[33 + 3]; + char *ptr = buf; + unsigned int i = 0x1 << 31; + int round = 0; + + while (i > 0) + { + + if (val & i) + *ptr++ = '1'; + else + *ptr++ = '0'; + + i = i >> 1; + + if ((++round % 8 == 0) && (i > 0)) + *ptr++ = '.'; + } + + *ptr = '\0'; + + return buf; +} + diff --git a/gsmsp/gsm/src/lib/common.h b/gsmsp/gsm/src/lib/common.h new file mode 100644 index 0000000..5ea56ce --- /dev/null +++ b/gsmsp/gsm/src/lib/common.h @@ -0,0 +1,51 @@ +#ifndef __GSMSP_COMMON_H__ +#define __GSMSP_COMMON_H__ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <unistd.h> + +#define MIN(a,b) ((a)<(b)?(a):(b)) +#define MAX(a,b) ((a)>(b)?(a):(b)) + +/* DISABLE me for release build. Otherwise with debug output. */ +//#define GSMSP_DEBUG 1 + +#ifdef GSMSP_DEBUG +# define DEBUGF(a...) do { \ + fprintf(stderr, "DEBUG %s:%d ", __func__, __LINE__); \ + fprintf(stderr, a); \ +} while (0) +#else +# define DEBUGF(a...) +#endif + +# define HEXDUMPF(data, len, a...) do { \ + printf("HEX %s:%d ", __func__, __LINE__); \ + printf(a); \ + hexdump(data, len); \ +} while (0) + +void hexdump(const unsigned char *data, size_t len); + +#ifndef GSMDECODE +#include "interleave.h" +struct _opt +{ + INTERLEAVE_CTX ictx; +}; +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* !__GSMSP_COMMON_H__ */ + + diff --git a/gsmsp/gsm/src/lib/data_out.c b/gsmsp/gsm/src/lib/data_out.c new file mode 100644 index 0000000..b74b886 --- /dev/null +++ b/gsmsp/gsm/src/lib/data_out.c @@ -0,0 +1,2289 @@ +#include "common.h" +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include "id_list.h" +#include "gsm_desc.h" + +#define OUTF(a...) do { \ + printf(" %3d: %02x ", (int)(data - start), data[0]); \ + printf(a); \ +} while (0) + +#define OUT(a...) do { \ + printf(a); \ +} while (0) + +#define RETTRUNK() do { \ + printf("%s:%d TRUNKATED (0x%p - 0x%p)\n", __func__, __LINE__, data, end); \ + return; \ +} while (0) + +static void l2_rrm(); +static void l2_sms(); +static void l2_cc(); +static void l2_RRsystemInfo1(); +static void l2_MccMncLac(); +static void l2_RRsystemInfo2(); +//static void l2_RRsystemInfo2ter(); +static void l2_RRsystemInfo3C(); +static void l2_RRsystemInfo4C(); +static void l2_RRsystemInfo6(); +static void l2_RRsystemInfo13C(); +static void l2_RRimmediateAssTBFC(); +static void l2_RRassignCommand(); +static void l2_RRassignComplete(); +static void l2_RRpagingrequest1(); +static void l2_RRpagingrequest2(); +static void l2_RRpagingrequest3(); +static void l2_RRimmediateAssignment(); +static void l2_RRimmAssTBFDirEncHoChaC(); +static void l2_MobId(); +static void l2_mmm(); +static void l2_HoppingChannel(); +static void l2_SingleChannel(); +static void l2_HoppingChannelAssCom(); +static void l2_SingleChannelAssCom(); +static void l2_MobileAllocation(); +static void l2_BcchAllocation(); +static void l2_TmsiReallocCommand(); +static void l2_RachControlParameters(); +static void l2_bcc(); +static void l2_Bbis(); +static void l2_ChannelRelease(); +static void l2_MMcmServiceRequest(); +static void l2_RRciphModCmd(); +static void l2_RRciphModCompl(); +static void l2_RRpagingresponse(); +static void l2_RRclassmarkChange(); + +static void l2_ChannelNeeded(char *str, unsigned char ch); +static void l2_MNCC(const char *str, unsigned char a, unsigned char b, unsigned char c); + +static char *BitRow(unsigned char c, int pos); +static char *PageMode(unsigned char mode); +static char *BitRowFill(unsigned char c, unsigned char mask); + +static void dcch_address(); +static void dcch_control(); +static void ControlChannelDescription(); +static void CellOptionsBcch(); +static void CellSelectionParameters(); +static void RequestReference(); +static void TimingAdvance(); +static void StartingTime(); +static void l2_NeighbourCellDescription(); +static void CellIdentity(); +static void MSClassMarkTwo(); +static void cpData(); +static void Address(const char *str); +static void ChannelDescriptionTwo(); +static void CCalerting(); +static void CCsetup(); +static void ProgressIndicator(); +static void Cause(); +static void SmsProtocolDataValidity(); +static void BearerCap(); +static void AuthenticationRequest(); +static void AuthenticationResponse(); + +static const unsigned char *start; +static const unsigned char *data; +static const unsigned char *end; + +/* + * B-format (and also A-Format) + */ +void +l2_data_out_B(int fn, const unsigned char *input_data, int len) +{ + data = input_data; + start = data; + end = data + len; + HEXDUMPF(data, 23 /*len*/, "Format B DATA\n"); + /* Need at least 3 octets */ + if (data + 2 >= end) + RETTRUNK(); + + dcch_address(); + data++; + dcch_control(); + data++; + /* FIXME: Why is extended length always set to 1? */ + OUTF("%s EL, Extended Length: %s\n", BitRow(data[0], 0), (data[0] & 1)?"y":"n"); + OUTF("%s M, segmentation: %c\n", BitRow(data[0], 1), ((data[0] >> 1) & 1)?'Y':'N'); + OUTF("%s Length: %u\n", BitRowFill(data[0], 0xfc), data[0] >> 2); + if (data + (data[0] >> 2) < end) + end = data + (data[0] >> 2) + 1; + data++; + if (data >= end) + return; + l2_Bbis(); +} + +static void +dcch_control() +{ + if ((data[0] & 0x03) != 3) + { + if ((data[0] & 1) == 0) + { + OUTF("-------0 Information Frame\n"); + OUTF("%s N(S), Sequence counter: %u\n", BitRowFill(data[0], 0x0e), (data[0] >> 1) & 0x07); + OUTF("%s P\n", BitRow(data[0], 4)); + } else if ((data[0] & 0x03) == 1) { + OUTF("------01 Supvervisory Frame\n"); + if (((data[0] >> 2) & 0x03) == 0) + OUTF("----00-- RR Frame (Receive ready)\n"); + else if (((data[0] >> 2) & 0x03) == 1) + OUTF("----01-- RNR Frame (Receive not ready)\n"); + else if (((data[0] >> 2) & 0x03) == 2) + OUTF("----10-- REJ Frame (REJect)\n"); + else + OUTF("----11-- UNKNOWN\n"); + OUTF("%s Poll/Final bit (P/F)\n", BitRow(data[0], 4)); + } + OUTF("%s N(R), Retransmission counter: %u\n", BitRowFill(data[0], 0xe0), (data[0] >> 5) & 0x07); + return; + } + OUTF("------11 Unnumbered Frame\n"); + switch (data[0] & 0xec) /* 11101100 */ + { + case 0x6c: /* 011-11-- */ + OUTF("%s P\n", BitRow(data[0], 4)); + OUTF("011-11-- SABM frame (Set asynchonous balance mode)\n"); + break; + case 0x0c: /* 000-11-- */ + OUTF("%s F\n", BitRow(data[0], 4)); + OUTF("000-11-- DM frame (Disconnected mode)\n"); + break; + case 0x00: + OUTF("%s P\n", BitRow(data[0], 4)); + OUTF("000-00-- UI frame (Unnumbered information)\n"); + break; + case 0x40: + OUTF("%s P\n", BitRow(data[0], 4)); + OUTF("010-00-- DISC frame (DISConnect)\n"); + break; + case 0x60: + OUTF("%s P\n", BitRow(data[0], 4)); + OUTF("011-00-- UA frame (Unnumbered achknowledgement)\n"); + break; + default: + OUTF("%s P/F\n", BitRow(data[0], 4)); + OUTF("%s UNKNOWN\n", BitRowFill(data[0], 0xec)); + break; + } +} + +static void +dcch_address() +{ + if (data[0] & 1) + OUTF("-------1 Extended Address: 1 octet long\n"); + else + OUTF("-------0 Extended Address: more octets follow\n"); + + if ((data[0] >> 1) & 1) + OUTF("------1- C/R: Command\n"); + else + OUTF("------0- C/R: Response\n"); + + if (data[0] & 1) + { + /* SAPI */ + switch ((data[0] >> 2) & 0x07) + { + case 0x03: + OUTF("---011-- SAPI: SMS and SS\n"); + break; + case 0x00: + OUTF("---000-- SAPI: RR, MM and CC\n"); + break; + default: + OUTF("%s SAPI: UNKNWON\n", BitRowFill(data[0], 0x1c)); + break; + } + + switch ((data[0] >> 4 ) & 0x03) + { + case 0x00: + OUTF("%s Link Protocol Disciminator: GSM (not Cell Broadcasting)\n", BitRowFill(data[0], 0x60)); + break; + case 0x01: + OUTF("%s Link Protocol Disciminator: Cell Broadcasting (CBS)\n", BitRowFill(data[0], 0x60)); + break; + default: + OUTF("%s Link Protocol Disciminator: UNKNOWN %u\n", BitRowFill(data[0], 0x60), (data[0] >> 5) & 0x03); + } + } else { + switch ((data[0] >> 2)) + { + case 0x03: + OUTF("000011-- SAPI: SMS and SS\n"); + break; + case 0x00: + OUTF("000000-- SAPI: RR, MM and CC\n"); + break; + default: + OUTF("%s SAPI: UNKNOWN\n", BitRowFill(data[0], 0xfc)); + break; + } + data++; + if (data >= end) + RETTRUNK(); + if (data[0] & 1) + OUTF("-------1 Extended Address: 1 octet long\n"); + else + OUTF("-------0 Extended Address: more octets follow [ERROR]\n"); + OUTF("%s Terminal Endpoint Identifier (TEI): %u\n", BitRowFill(data[0], 0xfe), data[0] >> 1); + } +} + +void +l2_data_out_Bbis(int fn, const unsigned char *input_data, int len) +{ + int i; + + + if (len <= 0) + return; + + data = input_data; + start = data; + + i = data[0] >> 2; + if (len - 1 < i) + OUTF("WARN: packet to short\n"); + len = MIN(len - 1, i); + /* len = number of octets following the length field */ + end = data + len + 1; + + HEXDUMPF(data, 23 /*len*/, "Format Bbis DATA\n"); + if (len <= 0) + return; + + OUTF("%s Pseudo Length: %d\n", BitRowFill(data[0], 0xfc), data[0] >> 2); + data++; + l2_Bbis(); +} + +static void +l2_Bbis() +{ + if (data >= end) + RETTRUNK(); + + switch (data[0] >> 7) + { + case 1: + OUTF("1------- Direction: To originating site\n"); + break; + default: + OUTF("0------- Direction: From originating site\n"); + } + + OUTF("%s %d TransactionID\n", BitRowFill(data[0], 0x70), (data[0] >> 4) & 7); + + switch (data[0] & 0x0f) + { + case 0: + OUTF("----0000 Group Call Control [FIXME]\n"); + break; + case 1: + OUTF("----0001 Broadcast call control [FIXME]\n"); + data++; + l2_bcc(); + /* TS GSM 04.69 */ + break; + case 2: + OUTF("----0010 PDSS1 [FIXME]\n"); + break; + case 3: + OUTF("----0011 Call control. call related SS messages\n"); + data++; + l2_cc(); + /* TS 24.008 */ + break; + case 4: + OUTF("----01-- PDSS2 [FIXME]\n"); + break; + case 5: + OUTF("----0101 Mobile Management Message (non GPRS)\n"); + data++; + /* TS 24.008 */ + l2_mmm(); + break; + case 6: + OUTF("----0110 Radio Resouce Management\n"); + data++; + l2_rrm(); + break; + case 7: + OUTF("----0111 RFU [FIXME]\n"); + break; + case 8: + OUTF("----1000 GPRS Mobile Management\n"); + /* in GMMattachAccept */ + /* in GMMidentityRequest */ + OUTF("FIXME: possible IMEI in here\n"); + break; + case 9: + OUTF("----1001 SMS messages\n"); + data++; + l2_sms(); + /* TS 04.11 */ + break; + case 0x0a: + OUTF("----1011 GRPS session management messages [FIXME]\n"); + break; + case 0x0b: + OUTF("----1011 Non-call related SS messages [FIXME]\n"); + /* GSM 04.80 */ + break; + case 0x0c: + OUTF("----1100 Location services [FIXME]\n"); + break; + case 0x0d: + OUTF("----1101 RFU [FIXME]\n"); + break; + case 0x0e: + OUTF("----1110 Extension of the PD to one octet length [FIXME]\n"); + break; + case 0x0f: + OUTF("----1111 Tests procedures describe in TS GSM 11.10 [FIXME]\n"); + break; + default: + OUTF("%s 0x%02x UNKNOWN\n", BitRowFill(data[0], 0x0f), data[0] & 0x0f); + } + +} + +/* + * Broadcast Call Control (04.69) + */ +static void +l2_bcc() +{ + if (data >= end) + RETTRUNK(); + + /* Message type 04.69:9.3*/ + switch (data[0] & 0x3f) + { + case 0x06: /* 0-000110 */ + OUTF("--000110 ???\n"); + break; + default: + OUTF("--?????? UNKNOWN [FIXME]\n"); + return; + } + + /* Call reference 04.69:9.4.1*/ + + /* Orig indication 04.69:9.5.5*/ + /* Spare half octet 04.69:9.4.5*/ + +} + +/* + * ProtDisc3 + */ +static void +l2_cc() +{ + if (data >= end) + RETTRUNK(); + OUTF("%s Send Sequence Number: %u\n", BitRowFill(data[0], 0xc0), data[0] >> 6); + + if ((data[0] & 0x3f) == 0x01) + { + OUTF("--000001 Call Alerting\n"); + data++; + CCalerting(); + } else if ((data[0] & 0x3f) == 0x02) { + OUTF("--000010 Call Proceesing\n"); + if (++data >= end) + return; + OUTF("FIXME %s\n", __func__); + } else if ((data[0] & 0x3f) == 0x07) { + OUTF("--000111 Call Connect\n"); + if (++data >= end) + return; + OUTF("FIXME %s\n", __func__); + } else if ((data[0] & 0x3f) == 0x08) { + OUTF("--001000 Call Confirmed\n"); + if (++data >= end) + return; + if (data[0] != 0x04) + return; + OUTF("--000010 Bearer Capability\n"); + data++; + BearerCap(); + } else if ((data[0] & 0x3f) == 0x05) { + OUTF("--000101 Call Setup\n"); + data++; + CCsetup(); + } else if ((data[0] & 0x3f) == 0x03) { + OUTF("--000011 Call Progress\n"); + data++; + ProgressIndicator(); + } else if ((data[0] & 0x3f) == 0x0f) { + OUTF("--001111 Connect Acknowledge\n"); + } else if ((data[0] & 0x3f) == 0x25) { + OUTF("--100101 Disconnect\n"); + data++; + Cause(); + } else if ((data[0] & 0x3f) == 0x2d) { + OUTF("--101101 CC Release\n"); + if (++data >= end) + RETTRUNK(); + if (data[0] == 0x08) + { + data++; + Cause(); + } + } else if ((data[0] & 0x3f) == 0x2a) { + OUTF("--101010 CC Release Complete\n"); + if (++data >= end) + RETTRUNK(); + if (data[0] == 0x08) + { + data++; + Cause(); + } + if (data >= end) + RETTRUNK(); + if (data[0] == 0x1c) + { + /* facility */ + OUTF("FIXME\n"); + } + } else { + OUTF("%s FIXME %s\n", BitRowFill(data[0], 0xff), __func__); + } +} + +/* + * ----0101 + * ProtDisc5 - Mobile Management message (non GPRS) + */ +static void +l2_mmm() +{ + if (data >= end) + return; + OUTF("%s SendSequenceNumber: %d\n", BitRowFill(data[0], 0xc0), data[0] >> 6); + switch (data[0] & 0x3f) + { + case 1: + //l2_MMimsiDetIndication(data + 1, end); + OUTF("--000001 Imsi Det Indication\n"); /* FIXME */ + OUTF("FIXME: Possible IMSI in here\n"); + OUTF("FIXME: Possible cipher mode here\n"); + break; + case 2: + OUTF("--000010 Location Update Accept\n"); /* FIXME */ + break; + case 4: + OUTF("--000100 Message Type: Locatoin Updating Reject\n"); + break; + case 8: + OUTF("--001000 MM Location Update Request\n"); /* FIXME */ + OUTF("FIXME: Possible IMSI in here\n"); + OUTF("FIXME: Possible cipher mode here\n"); + break; + case 0x12: + OUTF("--010010 Authentication Request\n"); + data++; + AuthenticationRequest(); + break; + case 0x14: + OUTF("--010100 Authentication Response\n"); + data++; + AuthenticationResponse(); + break; + case 0x19: + OUTF("--011001 MMidentityResponse\n"); + OUTF("FIXME: Possible IMSI in here\n"); + break; + case 0x1a: + OUTF("--011010 TMSI Realloc Command\n"); + data++; + l2_TmsiReallocCommand(); + break; + case 0x24: /* --100100 */ + OUTF("--100100 MMcmServiceRequest\n"); + data++; + l2_MMcmServiceRequest(); + /* in multisupport2 and others! */ + break; + default: + OUTF("UNKNWON\n"); + } +} + +/* + * ProtDisc6 - Radio Resource Management Messages + */ +static void +l2_rrm() +{ + if (data >= end) + return; + + switch (data[0] & 0x3f) + { + case 0x00: + OUTF("00000000 System Information Type 13\n"); + data++; + l2_RRsystemInfo13C(); + break; + case 0x06: + OUTF("00000110 System Information Type 5ter\n"); + data++; + l2_BcchAllocation(); + break; + case 0x0d: + OUTF("00001101 Channel Release\n"); + data++; + l2_ChannelRelease(); + break; + case 0x15: + OUTF("00010101 RR Measurement Report C [FIXME]\n"); + break; + case 0x16: + OUTF("00010110 RRclassmarkChange\n"); + data++; + l2_RRclassmarkChange(); + break; + case 0x19: + OUTF("00011001 RRsystemInfo1\n"); + data++; + l2_RRsystemInfo1(); + break; + case 0x1a: + OUTF("00011010 RRsystemInfo2\n"); + data++; + l2_RRsystemInfo2(); + break; + case 0x1B: /* 0001 1011 */ + OUTF("00011011 RRsystemInfo3C\n"); + data++; + l2_RRsystemInfo3C(); + break; + case 0x1c: + OUTF("00011100 RRsystemInfo4-C\n"); + data++; + l2_RRsystemInfo4C(); + break; + case 0x1d: + /* From SDCCH */ + OUTF("00011101 Neighbour Cells Description\n"); + data++; + l2_NeighbourCellDescription(); + break; + case 0x1e: + /* From SDCCH */ + OUTF("00011110 System Information Type 6\n"); + data++; + l2_RRsystemInfo6(); + break; + case 0x21: + OUTF("00100001 Paging Request Type 1\n"); + data++; + l2_RRpagingrequest1(); + break; + case 0x22: + OUTF("00100010 Paging Request Type 2\n"); + data++; + l2_RRpagingrequest2(); + break; + case 0x24: + OUTF("00100100 Paging Request Type 3\n"); + data++; + l2_RRpagingrequest3(); + break; + case 0x27: + OUTF("0-100111 RRpagingResponse\n"); + OUTF("-x------ Send sequence number: %d\n", (data[0] >> 7) & 0x01); + data++; + l2_RRpagingresponse(); + break; + case 0x29: + OUTF("0-101001 RR Assign Complete\n"); + data++; + l2_RRassignComplete(); + break; + case 0x2e: + OUTF("00101110 RR Assign Command\n"); + data++; + l2_RRassignCommand(); + break; + case 0x32: + OUTF("00110010 RR Cipher Mode Complete\n"); + data++; + l2_RRciphModCompl(); + break; + case 0x35: + OUTF("00110101 RR Cipher Mode Command\n"); + data++; + l2_RRciphModCmd(); + break; + case 0x3f: + OUTF("0-111111 RRimmediateAssignment\n"); + OUTF("-x------ Send sequence number: %d\n", (data[0] >> 7) & 0x01); + data++; + l2_RRimmediateAssignment(); + break; + default: + OUTF("???????? UNKNOWN. FIXME\n"); + } +} +static void +l2_RRsystemInfo13C() +{ + if (data >= end); + return; + if (data[0] >> 7) + OUTF("1------- SI 13 Restoctet present\n"); + else + OUTF("0------- SI 13 Restoctet NOT present\n"); + OUTF("%s BCCH_CHANGE_MARK : %d\n", BitRowFill(data[0], 0x70), (data[0] >> 4) & 0x07); + switch (data[0] & 0x0f) + { + case 0x00: + OUTF("----0000 SI_CHANGE_FIELD : Update of unspecified SI messages\n"); + break; + case 0x01: + OUTF("----00001 SI_CHANGE_FIELD : Update of unspecified SI1 messages\n"); + break; + case 0x02: + OUTF("----0010 SI_CHANGE_FIELD : Update of unspecified SI2 messages\n"); + break; + case 0x03: + OUTF("----0011 SI_CHANGE_FIELD : Update of unspecified SI3,4,7,8 messages\n"); + break; + case 0x04: + OUTF("----0100 SI_CHANGE_FIELD : Update of unspecified SI9 messages\n"); + break; + default: + OUTF("----???? Unknown %d\n", data[0] & 0x0f); + break; + } + OUTF("FIXME: implement me\n"); + +} + +static void +l2_RRimmediateAssignment() +{ + if (data >= end) + return; + + /* Octect 4, 0x79 */ + OUTF("%s\n", PageMode(data[0] & 0x03)); + + if ((data[0] >> 6) & 0x01) + OUTF("-1------ Two messages assign.: 1. message of..(continue)\n"); + else + OUTF("-0------ No meaning\n"); + if ((data[0] >> 5) & 0x01) + OUTF("--1----- Assigns a resource identified in the IA rest octets.\n"); + else + OUTF("--0----- Downlink assig to MS: No meaning\n"); + if ((data[0] >> 4) & 0x01) + { + OUTF("---1---- Temporary Block Flow (TBF)\n"); + data++; + l2_RRimmediateAssTBFC(); + return; + } + else + OUTF("---0---- This messages assigns a dedicated mode resource\n"); + data++; + if (data >= end) + return; + + /* Channel Description */ + ChannelDescriptionTwo(); + + if (data >= end) + return; + if (((data[0] >> 2) & 0x07) == 0) + l2_SingleChannel(); + else if (((data[0] >> 4) & 0x01) == 1) + { + l2_HoppingChannel(); + } else { + OUTF("xxx0??xxx UNKNOWN %d\n", (data[0] >> 3) & 0x3); + } +} + +static void +l2_SingleChannel() +{ + int freq; + OUTF("%s Training seq. code: %d\n", BitRowFill(data[0], 0xe0), data[0] >> 5); + OUTF("---000-- Single channel\n"); + freq = (data[0] & 0x03) << 8; + data++; + if (data >= end) + RETTRUNK(); + freq |= data[0]; + OUTF("........ Absolute RF channel number: %u\n", freq); + data++; + RequestReference(); + TimingAdvance(); + l2_MobileAllocation(); + if (data >= end) + return; +} + +static void +l2_HoppingChannel() +{ + unsigned char maio = 0; + OUTF("%s Training seq. code : %d\n", BitRowFill(data[0], 0xe0), data[0] >> 5); + OUTF("---1---- HoppingChannel\n"); + maio = (data[0] & 0x0f) << 2; + data++; + if (data >= end) + RETTRUNK(); + maio |= (data[0] >> 6); + OUTF("........ MAIO %d\n", maio); + OUTF("%s Hopping Seq. Number: %d\n", BitRowFill(data[0], 0x3f), data[0] & 0x3f); + + data++; + RequestReference(); + TimingAdvance(); + l2_MobileAllocation(); + if (data >= end) + return; /* finished. not truncated! */ + + OUTF("FIXME, more data left here???\n"); +} + +static void +l2_MobileAllocation() +{ + int c = 64, pos; + char *str = "Mobile allocation RF chann."; + const unsigned char *thisend; + + if (data >= end) + RETTRUNK(); + OUTF("%s Length of Mobile Allocation: %d\n", BitRowFill(data[0], 0xff), data[0]); + thisend = data + data[0] + 1; + if (thisend > end) + { + OUTF("xxxxxxxx ERROR: Packet to short or length to long\n"); + thisend = end; + } + + data++; + /* If mobile allocation has length 0 */ + if (data >= thisend) + return; + + while (data < thisend) + { + pos = 7; + while (pos >= 0) + { + if ((data[0] >> pos) & 1) + OUTF("%s %s%d\n", BitRow(data[0], pos), str, c - (7 - pos)); + pos--; + + } + + c -= 8; + data++; + if (c <= 0) + break; + } +} + +/* + * From RRsystemInfo2 + */ +static void +l2_BcchAllocation() +{ + int c, pos; + char *str = "BCCH alloc. RF chan.: "; + +#if 0 + /* goeller script for Info2 outputs channels 128 + 127 + * but opengpa outputs bitmap format for info2. + * We do what opengpa does. (correct?) + */ + if ((data[0] >> 7)) + OUTF("1------- %s%d\n", str, 128); + if ((data[0] >> 6) & 1) + OUTF("-1------ %s%d\n", str, 127); +#endif + if ((data[0] >> 6) == 0x00) + OUTF("00------ Bitmap format: 0\n"); + else { + OUTF("%s Bitmap format: UNKNOWN [FIXME]\n", BitRowFill(data[0], 0xc0)); + RETTRUNK(); + } + + if ((data[0] & 0x8e) == 0x8e) + { + /* From System Information Type 5ter */ + OUTF("1---111- Variable Bitmap SI5ter [FIXME]\n"); + return; + } + + if ((data[0] >> 5) & 1) + OUTF("--1----- Extension Indicator: The IE carries only a part of the BA\n"); + else + OUTF("--0----- Extension Indicator: The IE carries the complete BA\n"); + OUTF("---x---- BCCH alloc. seq. num: %d\n", (data[0] >> 4) & 1); + if ((data[0] >> 3) & 1) + OUTF("----1--- %s%d\n", str, 124); + if ((data[0] >> 2) & 1) + OUTF("-----1-- %s%d\n", str, 123); + if ((data[0] >> 1) & 1) + OUTF("------1- %s%d\n", str, 122); + if (data[0] & 1) + OUTF("-------1 %s%d\n", str, 121); + + data++; + c = 120; + while (data < end) + { + pos = 7; + while (pos >= 0) + { + if ((data[0] >> pos) & 1) + OUTF("%s %s%d\n", BitRow(data[0], pos), str, c - (7 - pos)); + pos--; + + } + + c -= 8; + data++; + if (c <= 0) + break; + } +} + +static void +l2_RRimmediateAssTBFC() +{ + if (data >= end) + return; + + /* GPRS Packet Channel Description */ + OUTF("%s Channel Type : %d\n", BitRowFill(data[0], 0xf8), data[0] >> 3); + OUTF("%s Time Slot Number : %d\n", BitRowFill(data[0], 0x07), data[0] & 0x07); + data++; + if (data >= end) + return; + + OUTF("%s Tranining Sequence Code: %d\n", BitRowFill(data[0], 0xe0), data[0] >> 5); + if ((data[0] >> 4) & 0x01) + { + OUTF("---1---- Direct Encoding of Hopping Channels\n"); + l2_RRimmAssTBFDirEncHoChaC(); + return; + } else { + OUTF("---0---- non-hopping RF channel config or indirect encoding of hopping RFCC\n"); + } + + if ((data[0] >> 3) & 0x01) + { + OUTF("----1--- indirect encoding of hopping RF channel config\n"); + } else { + OUTF("----0--- RRimmAssTBFaRFCN-C FIXME\n"); + return; + } + + data++; + if (data >= end) + RETTRUNK(); + OUTF("xxxxxxxx MAIO [FIXME]\n"); + + data++; + RequestReference(); + TimingAdvance(); + l2_MobileAllocation(); + if (data >= end) + RETTRUNK(); + OUTF("FIXME: implenet\n"); +} + +static void +l2_RRsystemInfo1() +{ + int ca; + + if (data + 1 >= end) + return; + switch (data[0] >> 6) + { + case 0x00: + OUTF("00------ Bitmap 0 format\n"); + break; + case 0x01: + OUTF("10------ Bitmap format: (FIXME)\n"); + break; + default: + OUTF("%s Bitmap %d format (FIXME)\n", BitRowFill(data[0], 0xc0), data[0] >> 6); + } + if ((data[0] >> 3) & 1) + OUTF("----1--- Cell Allocation : ARFCN 124\n"); + if ((data[0] >> 2) & 1) + OUTF("-----1-- Cell Allocation : ARFCN 123\n"); + if ((data[0] >> 1) & 1) + OUTF("------1- Cell Allocation : ARFCN 122\n"); + if (data[0] & 1) + OUTF("-------1 Cell Allocation : ARFCN 121\n"); + + ca = 120; + while (ca > 0) + { + data++; + if (data >= end) + return; + if ((data[0] >> 7) & 1) + OUTF("1------- Cell Allocation : ARFCN %d\n", ca); + if ((data[0] >> 6) & 1) + OUTF("-1------ Cell Allocation : ARFCN %d\n", ca - 1); + if ((data[0] >> 5) & 1) + OUTF("--1----- Cell Allocation : ARFCN %d\n", ca - 2); + if ((data[0] >> 4) & 1) + OUTF("---1---- Cell Allocation : ARFCN %d\n", ca - 3); + if ((data[0] >> 3) & 1) + OUTF("----1--- Cell Allocation : ARFCN %d\n", ca - 4); + if ((data[0] >> 2) & 1) + OUTF("-----1-- Cell Allocation : ARFCN %d\n", ca - 5); + if ((data[0] >> 1) & 1) + OUTF("------1- Cell Allocation : ARFCN %d\n", ca - 6); + if (data[0] & 1) + OUTF("-------1 Cell Allocation : ARFCN %d\n", ca - 7); + + ca -= 8; + } + + data++; + + l2_RachControlParameters(); + OUTF("FIXME: NCH Position\n"); + if (data >= end) + return; +} + +static void +l2_RachControlParameters() +{ + int ca = -1; + + if (data >= end) + return; + + if (((data[0] >> 6) & 0x03) == 0) + ca = 1; + else if (((data[0] >> 6) & 0x03) == 0x01) + ca = 2; + else if (((data[0] >> 6) & 0x03) == 0x02) + ca = 4; + else if (((data[0] >> 6) & 0x03) == 0x03) + ca = 7; + OUTF("%s Max. of retransmiss : %u\n", BitRowFill(data[0], 0xc0), ca); + if (((data[0] >> 2) & 0x0f) <= 9) + { + ca = ((data[0] >> 2) & 0x0f) + 3; + } else { + switch ((data[0] >> 2) & 0x0f) + { + case 10: /* --1010-- */ + ca = 14; + break; + case 11: + ca = 16; + break; + case 12: + ca = 20; + break; + case 13: + ca = 25; + break; + case 14: + ca = 32; + break; + case 15: + ca = 50; + break; + default: + ca = -1; + break; + } + } + OUTF("%s slots to spread TX : %u\n", BitRowFill(data[0], 0x3c), ca); + switch ((data[0] >> 1) & 0x01) + { + case 0: + OUTF("------0- The cell is barred : no\n"); + break; + case 1: + OUTF("------1- The cell is barred : yes\n"); + break; + } + + switch (data[0] & 0x01) + { + case 0: + OUTF("-------0 Call reestabl.i.cell: allowed\n"); + break; + case 1: + OUTF("-------1 Cell reestabl.i.cell: not allowed\n"); + } + + data++; + if (data >= end) + return; + switch ((data[0] >> 2) & 0x01) + { + case 0: + OUTF("-----0-- Emergency call EC 10: allowed\n"); + break; + case 1: + OUTF("-----1-- Emergency call EC 10: not allowed\n"); + break; + } + OUTF("%s Acc ctrl cl 11-15: 0 = permitted, 1 = forbidden\n", BitRowFill(data[0], 0xf8)); + OUTF("%s Acc ctrl cl 8- 9: 0 = permitted, 1 = forbidden\n", BitRowFill(data[0], 0x03)); + OUTF("%s Ordinary subscribers (8)\n", BitRowFill(data[0], 0x01)); + OUTF("%s Ordinary subscribers (9)\n", BitRowFill(data[0], 0x02)); + OUTF("%s Emergency call (10): %s\n", BitRowFill(data[0], 0x04), ((data[0] >> 4) & 1)?"Class 11-15 only":"Everyone"); + OUTF("%s Operator Specific (11)\n", BitRowFill(data[0], 0x08)); + OUTF("%s Security service (12)\n", BitRowFill(data[0], 0x10)); + OUTF("%s Public service (13)\n", BitRowFill(data[0], 0x20)); + OUTF("%s Emergency service (14)\n", BitRowFill(data[0], 0x40)); + OUTF("%s Network Operator (15)\n", BitRowFill(data[0], 0x80)); + data++; + if (data >= end) + RETTRUNK(); + OUTF("%s Acc ctrl cl 0- 7: 0 = permitted, 1 = forbidden\n", BitRowFill(data[0], 0xff)); + OUTF("%s Ordinary subscribers (0-7)\n", BitRowFill(data[0], 0xff)); + data++; +} + +static char * +BitRow(unsigned char c, int pos) +{ + unsigned char bit = 0; + static char buf[9]; + + if ((c >> pos) & 1) + bit = 1; + + if (pos == 0) + snprintf(buf, sizeof buf, "-------%d", bit); + else if (pos == 1) + snprintf(buf, sizeof buf, "------%d-", bit); + else if (pos == 2) + snprintf(buf, sizeof buf, "-----%d--", bit); + else if (pos == 3) + snprintf(buf, sizeof buf, "----%d---", bit); + else if (pos == 4) + snprintf(buf, sizeof buf, "---%d----", bit); + else if (pos == 5) + snprintf(buf, sizeof buf, "--%d-----", bit); + else if (pos == 6) + snprintf(buf, sizeof buf, "-%d------", bit); + else if (pos == 7) + snprintf(buf, sizeof buf, "%d-------", bit); + + return buf; +} + +static char * +BitRowFill(unsigned char c, unsigned char mask) +{ + static char buf[9]; + + memset(buf, '-', sizeof buf); + buf[sizeof buf - 1] = '\0'; + int i = 0; + while (i < 8) + { + if ((mask >> i) & 1) + { + if ((c >> i) & 1) + buf[7 - i] = '1'; + else + buf[7 - i] = '0'; + } + i++; + } + + return buf; +} + +static void +l2_RRsystemInfo2() +{ + if (data >= end) + RETTRUNK(); + + l2_BcchAllocation(); + if (data >= end) + RETTRUNK(); + + int c = 7; + while (c >= 0) + { + if ((data[0] >> c) & 1) + OUTF("%s BCCH carrier with NCC = %d is permitted for monitoring\n", BitRow(data[0], c), c); + c--; + } + data++; + if (data >= end) + RETTRUNK(); + + l2_RachControlParameters(); + + if (data > end) /* Note: not >= */ + RETTRUNK(); +} + +#if 0 +static void +l2_RRsystemInfo2ter() +{ + if (data >= end) + return; + if ((data[0] >> 7) == 0) + OUTF("%s Bitmap 0 format\n", BitRowFill(data[0], 0x8e)); + else { + /* 0x8e = 10001110 */ + if (((data[0] >> 1) & 0x07) == 0x04) + OUTF("1---100- 1024 range\nFIXME\n"); + else if (((data[0] >> 1) & 0x07) == 0x05) + OUTF("1---101- 512 range\nFIXME\n"); + else if (((data[0] >> 1) & 0x07) == 0x06) + OUTF("1---110- 128 range\nFIXME\n"); + else if (((data[0] >> 1) & 0x07) == 0x07) + OUTF("1---111- variable Bitmap\nFIXME\n"); + else + OUTF("1---xxx- UNKNOWN 0x%08x\n", data[0]); + } + OUTF("FIXME\n"); +} +#endif + + +/* + * RRsystemInfo4-C + */ +static void +l2_RRsystemInfo4C() +{ + if (data + 2 >= end) + RETTRUNK(); + l2_MccMncLac(); + CellSelectionParameters(); + l2_RachControlParameters(); + if (data >= end) + RETTRUNK(); + OUTF("FIXME\n"); +} + +/* + * Output MCC, MNC and LAC. consume 5 bytes. + */ +static void +l2_MccMncLac() +{ + if (data + 2 >= end) + return; + unsigned short lac; + + l2_MNCC("Mobile Country Code", data[0] & 0x0f, (data[0] >> 4) & 0x0f, data[1] & 0x0f); + data++; + l2_MNCC("Mobile Network Code", data[1] & 0x0f, (data[1] >> 4) & 0x0f, (data[0] >> 4) & 0x0f); + data += 2; + + if (data + 1 >= end) + return; + + lac = data[0]; + lac = (lac << 8) | data[1]; + OUTF("%-8u [0x%02x%02x] Local Area Code\n", lac, data[0], data[1]); + data += 2; +} +/* + * RRsystemINfo3-C + */ +static void +l2_RRsystemInfo3C() +{ + CellIdentity(); + l2_MccMncLac(); + + ControlChannelDescription(); + CellOptionsBcch(); + CellSelectionParameters(); + l2_RachControlParameters(); + + /* FIXME: complete here */ +} + +static void +l2_RRsystemInfo6() +{ + CellIdentity(); + l2_MccMncLac(); + CellOptionsBcch(); + if (data >= end) + RETTRUNK(); + OUTF("%s Network Colour Code: %u\n", BitRowFill(data[0], 0xff), data[0]); +} + +static void +CellIdentity() +{ + unsigned short id; + + if (data + 1 >= end) + return; + + id = data[0]; + id = (id << 8) | data[1]; + OUTF("%-8u [0x%02x%02x] Cell identity\n", id, data[0], data[1]); + data += 2; +} + +static void +ControlChannelDescription() +{ + if (data >= end) + RETTRUNK(); + OUTF("%s Spare bit (should be 0)\n", BitRow(data[0], 7)); + if ((data[0] >> 6) & 1) + OUTF("-1------ MSs in the cell shall apply IMSI attach/detach procedure\n"); + else + OUTF("-0------ MSs in cell are not allowed attach/detach procedure\n"); + OUTF("%s Number of blocks: %u\n", BitRowFill(data[0], 0x38), (data[0] >> 3) & 0x07); + + switch (data[0] & 0x07) + { + case 0x00: + OUTF("-----000 1 basic physical channel for CCCH, not combined with SDCCHs\n"); + break; + case 0x01: + OUTF("-----001 1 basic physical channel for CCCH, combined with SDCCHs\n"); + break; + case 0x02: + OUTF("-----010 2 basic physical channel for CCCH, not combined with SDCCHs\n"); + break; + case 0x04: + OUTF("-----100 3 basic physical channel for CCCH, not combined with SDCCHs\n"); + break; + case 0x06: + OUTF("-----110 4 basic physical channel for CCCH, not combined with SDCCHs\n"); + break; + default: + OUTF("%s Unknown CCCH config (ERROR)\n", BitRowFill(data[0], 0x07)); + break; + } + + data++; + if (data >= end) + RETTRUNK(); + + OUTF("%s spare bits (should be 0)\n", BitRowFill(data[0], 0xf8)); + OUTF("%s %u multi frames period for paging request\n", BitRowFill(data[0], 0x07), (data[0] & 0x07) + 2); + + data++; + if (data >= end) + RETTRUNK(); + OUTF("%s T3212 TimeOut value: %u\n", BitRowFill(data[0], 0xff), data[0]); + data++; +} + +static void +CellOptionsBcch() +{ + if (data >= end) + RETTRUNK(); + OUTF("%s spare bit (should be 0)\n", BitRowFill(data[0], 0x80)); + if ((data[0] >> 6) & 1) + OUTF("-1------ Power control indicator is set\n"); + else + OUTF("-0------ Power control indicator is not set\n"); + + if (((data[0] >> 4) & 0x03) == 0x00) + OUTF("--00---- MSs may use uplink DTX\n"); + else if (((data[0] >> 4) & 0x03) == 0x01) + OUTF("--01---- MSs shall use uplink DTX\n"); + else if (((data[0] >> 4) & 0x03) == 0x02) + OUTF("--10---- MSs shall not use uplink DTX\n"); + else + OUTF("%s DTX UNKNOWN [ERROR]\n", BitRowFill(data[0], 0x30)); + + OUTF("%s Radio Link Timeout: %u\n", BitRowFill(data[0], 0x0f), ((data[0] & 0x0f) + 1 ) * 4); + data++; +} + +static void +l2_MNCC(const char *str, unsigned char a, unsigned char b, unsigned char c) +{ + char buf[128]; + char f[12]; + + snprintf(f, sizeof f, "%x%x%x", a, b, c); + /* Nokia netmonitor shows NC's like '30F' and '10F' */ + snprintf(buf, sizeof buf, "%-8s %s\n", f, str); + +#if 0 + buf[0] = '\0'; + if (a != 0x0f) + { + snprintf(buf, sizeof buf, "%x", a); + if (b != 0x0f) + { + snprintf(buf + 1, sizeof buf - 1, "%x", b); + if (c != 0x0f) + snprintf(buf + 2, sizeof buf - 2, "%x", c); + } + } + snprintf(buf + strlen(buf), sizeof buf - strlen(buf), " - %s\n", str); +#endif + + OUTF(buf); +} + +static char * +PageMode(unsigned char mode) +{ + switch (mode) + { + case 0: + return "------00 Page Mode: Normal paging"; + case 1: + return "------01 Page Mode: Extended paging"; + case 2: + return "------10 Page Mode: Paging reorganisation"; + case 3: + return "------11 Page Mode: reserved / same as before"; + } + + return "------?? UNKNOWN\n"; +} + +static void +l2_RRpagingrequest1() +{ + if (data >= end) + return; + + OUTF("%s\n", PageMode(data[0] & 0x3)); + + /* FIXME complete here */ + + data++; + if (data >= end) + return; + + l2_MobId(); + if (data >= end) + return; /* sometimes it's end here */ + if (data[0] == 0x17) + { + data++; + l2_MobId(); + return; + } + OUTF("ERR: wrong data\n"); +} + +static void +l2_ChannelNeeded(char *str, unsigned char ch) +{ + switch (ch) + { + case 0x00: + OUTF("%s Channel Needed: Any channel\n", str); + break; + case 0x01: + OUTF("%s Channel Needed: SDCCH\n", str); + break; + case 0x02: + OUTF("%s Channel Needed: TCH/F (Full rate)\n", str); + break; + case 0x03: + OUTF("%s Channel Needed: TCH/H or TCH/F (Dual rate)\n", str); + break; + } + +} + +static void +l2_RRpagingrequest2() +{ + if (data >= end) + return; + OUTF("%s\n", PageMode(data[0] & 0x03)); + + l2_ChannelNeeded("--xx---- (first)", (data[0] >> 4) & 0x03); + l2_ChannelNeeded("xx------ (second)", data[0] >> 6); + + data++; + if (data + 3 >= end) + RETTRUNK(); + OUTF("........ Mob. Ident 1 (P)TMSI: %02X%02X%02X%02X\n", data[0], data[1], data[2], data[3]); + data += 4; + if (data + 3 >= end) + RETTRUNK(); + OUTF("........ Mob. Ident 2 (P)TMSI: %02X%02X%02X%02X\n", data[0], data[1], data[2], data[3]); + data += 4; + if (data >= end) + RETTRUNK(); + + if (data[0] == 0x17) + { + data++; + l2_MobId(); + return; + } + + OUTF("FIXME, unknown\n"); +} + +static void +l2_RRpagingrequest3() +{ + if (data >= end) + RETTRUNK(); + OUTF("%s\n", PageMode(data[0] & 0x03)); + l2_ChannelNeeded("--xx---- (first)", (data[0] >> 4) & 0x03); + l2_ChannelNeeded("xx------ (second)", data[0] >> 6); + data++; + + int c = 0; + while (c++ < 4) + { + if (data + 3 >= end) + RETTRUNK(); + OUTF("........ Mob. Ident %u (P)TMSI: %02X%02X%02X%02X\n", c, data[0], data[1], data[2], data[3]); + data += 4; + } +} + +static void +l2_MobId() +{ + const unsigned char *thisend = end; + unsigned char len = data[0]; + char odd = 0; + int bcd = 0; + + data++; + if (data >= end) + return; + + if ((data[0] >> 3) & 1) + odd = 1; + + switch (data[0] & 0x07) + { + case 0: + OUTF("-----000 Type of identity: No Identity\n"); + break; + case 1: + OUTF("-----001 Type of identity: IMSI\n"); + bcd = 1; + break; + case 2: + OUTF("-----010 Type of identity: IMEI\n"); + bcd = 1; + break; + case 3: + OUTF("-----011 Type of identity: IMEISV\n"); + bcd = 1; + break; + case 4: + OUTF("-----100 Type of identity: TMSI/P-TMSI\n"); + break; + default: + OUTF("-----000 Type of identity: UNKNOWN\n"); + return; + } + if (len <= 0) + return; + + /* Nokia Netmonitor never outputs the first value */ + //OUTF("%x", data[0] >> 4); + unsigned char c; + c = data[0] >> 4; + len--; + data++; + if (len <= 0) + return; + + OUTF("-------- ID(%d/%s): ", len, odd?"odd":"even"); + + if (data + len < thisend) + thisend = data + len; + if (bcd) + { + OUT("%X", c); + while (data < thisend) + { + if ((data + 1 == thisend) && (!odd)) + OUT("%X", data[0] & 0x0f); + else + OUT("%X%X", data[0] & 0x0f, (data[0] >> 4) & 0x0f); + data++; + } + } else { + while (data < thisend) + { + if ((data + 1 == thisend) && (odd)) + OUT("%X", (data[0] >> 4 ) & 0x0f); + else + OUT("%X%X", (data[0] >> 4) & 0x0f, data[0] & 0x0f); + data++; + } + } + OUT("\n"); +} + + +static void CellSelectionParameters() +{ + if (data >= end) + RETTRUNK(); + + switch (data[0] >> 5) + { + case 0: + OUTF("000----- Cell Reselect Hyst. : 0 db RXLEV\n"); + break; + case 1: + OUTF("001----- Cell Reselect Hyst. : 2 db RXLEV\n"); + break; + case 2: + OUTF("010----- Cell Reselect Hyst. : 4 db RXLEV\n"); + break; + case 3: + OUTF("011----- Cell Reselect Hyst. : 6 db RXLEV\n"); + break; + case 4: + OUTF("100----- Cell Reselect Hyst. : 8 db RXLEV\n"); + break; + case 5: + OUTF("101----- Cell Reselect Hyst. : 10 db RXLEV\n"); + break; + case 6: + OUTF("110----- Cell Reselect Hyst. : 12 db RXLEV\n"); + break; + case 7: + OUTF("111----- Cell Reselect Hyst. : 14 db RXLEV\n"); + break; + } + OUTF("---xxxxx Max Tx power level: %d\n", data[0] & 0x1f); + data++; + if (data >= end) + RETTRUNK(); + + if (data[0] >> 7) + OUTF("1------- Additional cells in SysInfo 16,17\n"); + else + OUTF("0------- No additional cells in SysInfo 7-8\n"); + if ((data[0] >> 6) & 1) + OUTF("-1------ New establishm cause: supported\n"); + else + OUTF("-0------ New establishm cause: not supported\n"); + OUTF("--xxxxxx RXLEV Access Min permitted = -110 + %ddB\n", data[0] & 0x3f); + data++; +} + +static void +l2_RRimmAssTBFDirEncHoChaC() +{ + unsigned char maio = (data[0] & 0x0f) << 4; + + data++; + if (data >= end) + RETTRUNK(); + maio |= (data[0] >> 6); + OUTF("xxxxxxxx MAIO: %u\n", maio); + OUTF("%s HSN: %u\n", BitRowFill(data[0], 0x3f), data[0] & 0x3f); + data++; + + RequestReference(); + + TimingAdvance(); + l2_MobileAllocation(); + + if (data >= end) + RETTRUNK(); + if (data[0] == 0x7c) + { + StartingTime(); + return; + } + OUTF("FIXME: implement me\n"); +} + +static void +RequestReference() +{ + if (data >= end) + RETTRUNK(); + + /* Request Reference */ + if ((data[0] >> 5) == 0) + OUTF("000----- Establishing Cause : All other cases\n"); + else if ((data[0] >> 5) == 0x01) + OUTF("001----- Establishing Cause : All other cases\n"); + else if ((data[0] >> 5) == 0x02) + OUTF("010----- Establishing Cause : All other cases\n"); + else if ((data[0] >> 5) == 0x03) + OUTF("011----- Establishing Cause : All other cases\n"); + else if ((data[0] >> 5) == 0x04) + OUTF("100----- Establishing Cause: Answer to paging\n"); + else if ((data[0] >> 5) == 0x05) + OUTF("101----- Establishing Cause: Emergency call\n"); + else if ((data[0] >> 5) == 0x07) + OUTF("111----- Establishing Cause: Other services req. by user\n"); +/* Random refernce must be 5 bit long ?! */ +// else if ((data[0] >> 4) == 0x05) +// OUTF("0101---- Establishing Cause: Originating data call from dual rate mobile station\n"); +// else if ((data[0] >> 4) == 0x02) +// OUTF("0010---- Establishing Cause: Answer to paging\n"); + else + OUTF("%s Establishing Cause: UNKNOWN [FIXME}\n", BitRowFill(data[0], 0xe0)); + + OUTF("---xxxxx Random Reference : %d\n", data[0] & 0x1f); + + data++; + if (data + 1>= end) + RETTRUNK(); + + OUTF("xxxxxxxx T1/T2/T3\n"); + data++; + OUTF("xxxxxxxx T1/T2/T3\n"); + data++; + /* END Request Reference */ +} + +static void +TimingAdvance() +{ + if (data >= end) + RETTRUNK(); + OUTF("--xxxxxx Timing advance value: %d\n", data[0] & 0x3f); + data++; +} + +static void +StartingTime() +{ + if (data >= end) + RETTRUNK(); + OUTF("01111100 Starting Time block\n"); + data++; + if (data >= end) + RETTRUNK(); + unsigned char t3; + OUTF("%s T1 Frame Number: %u\n", BitRowFill(data[0], 0xf8), data[0] >> 3); + t3 = (data[0] & 0x07) << 5; + data++; + if (data >= end) + RETTRUNK(); + t3 |= (data[0] >> 5); + OUTF("%s T2 Frame Number: %u\n", BitRowFill(data[0], 0x1f), data[0] & 0x1f); + OUTF("........ T3 Frame Number: %u\n", t3); +} + +/* + * RRsystemInfo5 + */ +static void +l2_NeighbourCellDescription() +{ + if (data >= end) + RETTRUNK(); + l2_BcchAllocation(); +} + + +static void +l2_ChannelRelease() +{ + if (data >= end) + RETTRUNK(); + OUTF("%s\n", id_list_get(list_ChannelRelease, data[0])); + data++; +} + +static void +l2_MMcmServiceRequest() +{ + if (data >= end) + RETTRUNK(); + + OUTF("%s Ciphering key sequence: %u\n", BitRowFill(data[0], 0x70), (data[0] >> 4) & 0x07); + OUTF("%s\n", id_list_get(list_RequestServiceType, data[0] & 0x0f)); + data++; + MSClassMarkTwo(); + if (data >= end) + RETTRUNK(); + + if (data[0] == 0x20) + { + OUTF("FIXME: classmark3\n"); + return; + } + + l2_MobId(); +} + +static void +MSClassMarkTwo() +{ + if (data >= end) + RETTRUNK(); + + OUTF("%s MS Classmark 2 length: %u\n", BitRowFill(data[0], 0xff), data[0]); + data++; + if (data >= end) + RETTRUNK(); + + if (((data[0] >> 5) & 0x03) == 0) + OUTF("-00----- Revision Level: Phase 1\n"); + else if (((data[0] >> 5) & 0x03) == 1) + OUTF("-01----- Revision Level: Phase 2\n"); + else + OUTF("-xx----- Revision Level: Unknown\n"); + if (((data[0] >> 4) & 1) == 0) + OUTF("---0---- Controlled early classmark sending: Not implemented\n"); + else + OUTF("---1---- Controlled early classmark sending: Implemented\n"); + if ((data[0] >> 3) & 1) + OUTF("----1--- A5/1 not available\n"); + else + OUTF("----0--- A5/1 available\n"); + + OUTF("%s RF power class capability: Class %u\n", BitRowFill(data[0], 0x07), (data[0] & 0x07) + 1); + + data++; + + if ((data[0] >> 6) & 1) + OUTF("-1------ Pseudo Sync Capability: present\n"); + else + OUTF("-1------ Pseudo Sync Capability: not present\n"); + + if (((data[0] >> 4) & 0x03) == 0) + OUTF("--00---- SS Screening: Phase 1 default value\n"); + else if (((data[0] >> 4) & 0x03) == 1) + OUTF("--01---- SS Screening: Phase 2 error handling\n"); + else + OUTF("--xx---- SS Screening: UNKNOWN\n"); + + if ((data[0] >> 3) & 1) + OUTF("----1--- Mobile Terminated Point to Point SMS: supported\n"); + else + OUTF("----0--- Mobile Terminated Point to Point SMS: not supported\n"); + + if ((data[0] >> 2) & 1) + OUTF("-----1-- VoiceBroadcastService: supported\n"); + else + OUTF("-----0-- VoiceBroadcastService: not supported\n"); + + if ((data[0] >> 1) & 1) + OUTF("------1- VoiceGroupCallService: supported\n"); + else + OUTF("------0- VoiceGroupCallService: not supported\n"); + + if (data[0] & 1) + OUTF("-------1 MS supports E-GSM or R-GSM: supported\n"); + else + OUTF("-------0 MS supports E-GSM or R-GSM: not supported\n"); + + data++; + if (data >= end) + RETTRUNK(); + + + if ((data[0] >> 7) & 1) + OUTF("1------- CM3 option: supported\n"); + else + OUTF("0------- CM3 option: not supported\n"); + + if ((data[0] >> 5) & 1) + OUTF("--1----- LocationServiceValueAdded Capability: supported\n"); + else + OUTF("--0----- LocationServiceValueAdded Capability: not supported\n"); + + if ((data[0] >> 3) & 1) + OUTF("----1--- SoLSA Capability: supported\n"); + else + OUTF("----0--- SoLSA Capability: not supported\n"); + + if ((data[0] >> 1) & 1) + OUTF("------1- A5/3 available\n"); + else + OUTF("------0- A5/3 not available\n"); + + if (data[0] & 1) + OUTF("-------1 A5/2: available\n"); + else + OUTF("-------0 A5/2: not available\n"); + data++; +} + +static void +l2_RRciphModCmd() +{ + if (data >= end) + RETTRUNK(); + if (((data[0] >> 1) & 0x07) == 0x07) + OUTF("----111- Cipher: reserved [UNKNOWN]\n"); + else + OUTF("%s Cipher: A5/%u\n", BitRowFill(data[0], 0x0e), ((data[0] >> 1) & 0x07) + 1); + + + if (data[0] & 1) + OUTF("-------1 Start ciphering\n"); + else + OUTF("-------0 No ciphering\n"); + + if ((data[0] >> 4) & 1) + OUTF("---1---- Cipher Response: IMEISV shall be included\n"); + else + OUTF("---0---- Cipher Response: IMEISV shall not be included\n"); + data++; +} + +static void +l2_RRciphModCompl() +{ + if (data >= end) + RETTRUNK(); + + if (data[0] != 0x17) + return; + if (++data >= end) + RETTRUNK(); + l2_MobId(); +} + +static void +l2_TmsiReallocCommand() +{ + if (data >= end) + RETTRUNK(); + + l2_MccMncLac(); + l2_MobId(); +} + +static void +l2_sms() +{ + if (data >= end) + RETTRUNK(); + + if ((data[0] == 0x04)) + OUTF("00000100 Type: CP-ACK\n"); + else if (data[0] == 0x10) + OUTF("00010000 Type: CP-ERROR\n"); + else if (data[0] == 1) { + OUTF("00000001 Type: CP-DATA\n"); + data++; + cpData(); + } else + OUTF("%s UNKNOWN\n", BitRowFill(data[0], 0xff)); +} + +static void +cpDataUp() +{ + if (data >= end) + RETTRUNK(); + OUTF("%s Parameter %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + OUTF("%s Parameter %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + OUTF("%s Parameter %u\n", BitRowFill(data[0], 0xff), data[0]); + data++; + Address("SMSC"); + if (data >= end) + RETTRUNK(); + + /* FIXME: Be more detailed here about message flags */ + OUTF("%s Message Flags: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data + 1 >= end) + RETTRUNK(); + int num = data[0] << 8; + OUTF("%s Reference Number [continue]\n", BitRowFill(data[0], 0xff)); + data++; + num |= data[0]; + OUTF("%s Reference Number: %u\n", BitRowFill(data[0], 0xff), num); + data++; + + /* Destination address */ + Address("Destination"); + SmsProtocolDataValidity(); + if (data >= end) + RETTRUNK(); +} + +static void +cpData() +{ + if (data >= end) + RETTRUNK(); + OUTF("%s Length: %u\n", BitRowFill(data[0], 0xff), data[0]); + data++; + if (data >= end) + RETTRUNK(); + if ((data[0] & 1) == 0) + { + //OUTF("xxxxxxx0 cpDataUp FIXME\n"); + //data++; + cpDataUp(); + return; + } + OUTF("%s Parameter\n", BitRowFill(data[0], 0xff)); + if (++data >= end) + RETTRUNK(); + OUTF("%s Parameter\n", BitRowFill(data[0], 0xff)); + if (++data >= end) + return; /* Can happen that msg terminated here... */ + + Address("SMSC"); + if (data >= end) + RETTRUNK(); + + OUTF("%s TP-MTI, TP-MMS, TP-SRI, TP-UDIH, TP-RP: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + OUTF("%s Reference number: %u\n", BitRowFill(data[0], 0xff), data[0]); + if ((data[0]) == 0x44) + { + OUTF("FIXME: ems_type\n"); + return; + } + if (++data >= end) + RETTRUNK(); + + OUTF("%s Parameter\n", BitRowFill(data[0], 0xff)); + data++; + + Address("Destination"); + SmsProtocolDataValidity(); + + int c = 0; + while (c++ < 7) + { + OUTF("%s Parameter%u\n", BitRowFill(data[0], 0xff), c); + if (++data >= end) + RETTRUNK(); + } + OUTF("FIXME %p < %p\n", data, end); +} + +static void +Address(const char *str) +{ + int len; + + if (data >= end) + RETTRUNK(); + len = data[0]; + OUTF("%s %s Address Length: %u\n", BitRowFill(data[0], 0xff), str, data[0]); + data++; + if (len <= 0) + return; + if (data >= end) + RETTRUNK(); + if (data[0] >> 7) + OUTF("1------- Extension\n"); + + OUTF("%s\n", id_list_get(list_SMSCAddressType, (data[0] >> 4) & 0x07)); + OUTF("%s\n", id_list_get(list_SMSCAddressNumberingPlan, data[0] & 0x0f)); + len--; + data++; + if (len <= 0) + return; + const unsigned char *thisend = data + len; + if (thisend > end) + thisend = end; + + OUTF("-------- Number(%d): ", len); + while (data < thisend) + { + if ((data[0] >> 4) == 0x0f) + OUT("%X", data[0] & 0x0f); + else + OUT("%X%X", data[0] & 0x0f, data[0] >> 4); + data++; + } + OUT("\n"); +} + + +static void +l2_RRpagingresponse() +{ + if (data >= end) + RETTRUNK(); + + if ((data[0] & 0x07) == 0x07) + OUTF("-----111 Cipher key sequence: Key not available!\n"); + else + OUTF("%s Ciphering key sequence: %u\n", BitRowFill(data[0], 0x07), data[0] & 0x07); + + OUTF("%s Ciphering key sequence: %u\n", BitRowFill(data[0], 0x70), (data[0] >> 4) & 0x07); + + data++; + MSClassMarkTwo(); + if (data >= end) + RETTRUNK(); + l2_MobId(); +} + +static void +l2_RRassignCommand() +{ + ChannelDescriptionTwo(); + if (data >= end) + RETTRUNK(); + + OUTF("%s Training seq. code: %d\n", BitRowFill(data[0], 0xe0), data[0] >> 5); + if (((data[0] >> 2) & 0x07) == 0x00) + l2_SingleChannelAssCom(); + else if (((data[0] >> 4) & 1) == 0x01) + l2_HoppingChannelAssCom(); + else + OUTF("xxx0??xxx UNKNOWN %d\n", (data[0] >> 3) & 0x3); +} + +static void +l2_RRassignComplete() +{ + if (data >= end) + RETTRUNK(); + + OUTF("%s\n", id_list_get(list_ChannelRelease, data[0])); + data++; +} + +static void +ChannelDescriptionTwo() +{ + if (data >= end) + RETTRUNK(); + OUTF("%s Timeslot number: %d\n", BitRowFill(data[0], 0x07), data[0] & 0x07); + OUTF("%s Channel Description: %s\n", BitRowFill(data[0], 0xf8), id_list_get(list_ChannelDescriptionTwo, data[0] >> 3)); + + data++; +} + +static void +l2_SingleChannelAssCom() +{ + int freq = (data[0] & 0x03) << 8; + + data++; + if (data >= end) + RETTRUNK(); + freq |= data[0]; + OUTF("........ Absolute RF channel number: %u\n", freq); + if (++data >= end) + RETTRUNK(); + OUTF("%s Power Level: %u\n", BitRowFill(data[0], 0x1f), data[0] & 0x1f); + if (++data >= end) + RETTRUNK(); + if (data[0] != 0x63) + return; + if (++data >= end) + RETTRUNK(); + OUTF("%s\n", id_list_get(list_ChannelMode, data[0])); +} + +static void +l2_HoppingChannelAssCom() +{ + OUTF("FIXME %s\n", __func__); +} + +static void +CCalerting() +{ + if (data >= end) + RETTRUNK(); + if (data[0] != 0x1e) + return; + + data++; + ProgressIndicator(); +} + +static void +ProgressIndicator() +{ + if (data >= end) + RETTRUNK(); + + OUTF("%s Length of IE Progress Indicator: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + OUTF("%s Coding: %s\n", BitRowFill(data[0], 0x60), id_list_get(list_CodingStandard, (data[0] >> 5) & 0x03)); + OUTF("%s Location: %s\n", BitRowFill(data[0], 0x0f), id_list_get(list_Location, data[0] & 0x0f)); + if (++data >= end) + RETTRUNK(); + OUTF("%s\n", id_list_get(list_Progress, data[0] & 0x7f)); + data++; +} + +static void +CCsetup() +{ + if (data >= end) + RETTRUNK(); + + if (data[0] == 0x04) + { + OUTF("00000100 Bearer Capability\n"); + data++; + BearerCap(); + } else if (data[0] == 0x1e) { + OUTF("00011110 Progress Indicator\n"); + ProgressIndicator(); + return; + } else { + OUTF("%s FIXME\n", BitRowFill(data[0], 0xff)); + } + + data++; +} + +static void +Cause() +{ + if (data >= end) + RETTRUNK(); + + OUTF("%s Length of Cause: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + + OUTF("%s Coding: %s\n", BitRowFill(data[0], 0x60), id_list_get(list_CodingStandard, (data[0] >> 5) & 0x03)); + OUTF("%s Location: %s\n", BitRowFill(data[0], 0x0f), id_list_get(list_Location, data[0] & 0x0f)); + if (++data >= end) + RETTRUNK(); + + OUTF("%s Cause: %s\n", BitRowFill(data[0], 0x7f), id_list_get(list_Cause, data[0] & 0x7f)); + data++; +} + +static void +l2_RRclassmarkChange() +{ + if (data >= end) + RETTRUNK(); + MSClassMarkTwo(); + if (data >= end) + RETTRUNK(); + if (data[0] == 0x20) + { + OUTF("00100000 Class Mark 3 [FIXME]\n"); + data++; + } +} + +static void +SmsProtocolDataValidity() +{ + if (data >= end) + RETTRUNK(); + OUTF("%s Protocol Identifier: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (++data >= end) + RETTRUNK(); + OUTF("%s Data Coding Sheme: %u\n", BitRowFill(data[0], 0xff), data[0]); + data++; +} + +static void +BearerCap() +{ + int len; + + if (data >= end) + RETTRUNK(); + + len = data[0]; + OUTF("%s Length: %u\n", BitRowFill(data[0], 0xff), data[0]); + if (data + len > end) + len = end - data; + if (++data >= end) + RETTRUNK(); + + OUTF("%s Radio Channel: %s\n", BitRowFill(data[0], 0x60), id_list_get(list_RadioChannelReq, (data[0] >> 5) & 0x03)); + if ((data[0] >> 4) & 1) + OUTF("---1---- Coding Standard: reserved\n"); + else + OUTF("---0---- Coding Standard: GSM\n"); + if ((data[0] >> 3) & 1) + OUTF("----1--- Transfer Mode: Packet\n"); + else + OUTF("----0--- Transfer Mode: Circuit\n"); + + OUTF("%s Transfer Capability: %s\n", BitRowFill(data[0], 0x07), id_list_get(list_TransferCap, data[0] & 0x07)); + //len--; + OUTF("FIXME: Stuff missing here\n"); +#if 0 + if (++data >= end) + RETTRUNK(); + if ((data[0] >> 6) & 1) + OUTF("-1------ Coding: octet 3 extended [FIXME]\n"); + else + OUTF("-0------ Coding: octet 3 extended for inf. trans. cap\n"); + + /* FIXME: Stuff missing here */ +#endif +} + +static void +AuthenticationRequest() +{ + char rand[16 * 2 + 1]; + + if (data >= end) + RETTRUNK(); + + OUTF("%s Cipher Key Sequence Number: %u\n", BitRowFill(data[0], 0x07), data[0] & 0x07); + data++; + if (data + 16 > end) + RETTRUNK(); + + snprintf(rand, sizeof rand, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7], data[8], data[9], data[10], data[11], data[12], data[13], data[14], data[15]); + OUTF("-------- RAND: %s\n", rand); + data += 16; +} + +static void +AuthenticationResponse() +{ + char sres[4 * 2 + 1]; + + if (data + 4 > end) + RETTRUNK(); + snprintf(sres, sizeof sres, "%02x%02x%02x%02x", data[0], data[1], data[2], data[3]); + OUTF("-------- SRES: %s\n", sres); + data += 4; +} + diff --git a/gsmsp/gsm/src/lib/data_out.h b/gsmsp/gsm/src/lib/data_out.h new file mode 100644 index 0000000..d920136 --- /dev/null +++ b/gsmsp/gsm/src/lib/data_out.h @@ -0,0 +1,11 @@ + +#ifdef __cplusplus +extern "C" { +#endif + +void l2_data_out_Bbis(int fn, const unsigned char *data, int len); +void l2_data_out_B(int fn, const unsigned char *data, int len); + +#ifdef __cplusplus +} +#endif diff --git a/gsmsp/gsm/src/lib/fire_crc.cc b/gsmsp/gsm/src/lib/fire_crc.cc new file mode 100644 index 0000000..9037ee5 --- /dev/null +++ b/gsmsp/gsm/src/lib/fire_crc.cc @@ -0,0 +1,168 @@ +/* -*- c++ -*- */ +/* + * Copyright 2005 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "fire_crc.h" +#include <math.h> +#include <iostream> + +fire_crc::fire_crc (unsigned int crc_size, unsigned int data_size) + : d_crc_size(crc_size), + d_data_size(data_size), + d_syn_start(0), + d_syndrome_reg() +{ + // Initialise syndrome +} + +fire_crc::~fire_crc() +{ +} + +int +fire_crc::rem(const int x, const int y) +{ + return (x % y); +} + +int +fire_crc::check_crc(const unsigned char *input_bits, + unsigned char *control_data) +{ + int j,error_count = 0, error_index = 0, success_flag = 0, syn_index = 0; + d_syn_start = 0; + // reset the syndrome register + d_syndrome_reg.clear(); + d_syndrome_reg.insert(d_syndrome_reg.begin(),40,0); + + // shift in the data bits + for (unsigned int i=0; i < d_data_size; i++) { + error_count = syndrome_shift(input_bits[i]); + control_data[i] = input_bits[i]; + } + + // shift in the crc bits + for (unsigned int i=0; i < d_crc_size; i++) { + error_count = syndrome_shift(1-input_bits[i+d_data_size]); + } + + // Find position of error burst + if (error_count == 0) { + error_index = 0; + } + else { + error_index = 1; + error_count = syndrome_shift(0); + error_index += 1; + while (error_index < (d_data_size + d_crc_size) ) { + error_count = syndrome_shift(0); + error_index += 1; + if ( error_count == 0 ) break; + } + } + + // Test for correctable errors + //printf("error_index %d\n",error_index); + if (error_index == 224) success_flag = 0; + else { + + // correct index depending on the position of the error + if (error_index == 0) syn_index = error_index; + else syn_index = error_index - 1; + + // error burst lies within data bits + if (error_index < 184) { + //printf("error < bit 184,%d\n",error_index); + j = error_index; + while ( j < (error_index+12) ) { + if (j < 184) { + control_data[j] = control_data[j] ^ + d_syndrome_reg[rem(d_syn_start+39-j+syn_index,40)]; + } + else break; + j = j + 1; + } + } + else if ( error_index > 212 ) { + //printf("error > bit 212,%d\n",error_index); + j = 0; + while ( j < (error_index - 212) ) { + control_data[j] = control_data[j] ^ + d_syndrome_reg[rem(d_syn_start+39-j-224+syn_index,40)]; + j = j + 1; + } + } + // for 183 < error_index < 213 error in parity alone so ignore + success_flag = 1; + } + return success_flag; +} + +int +fire_crc::syndrome_shift(unsigned int bit) +{ + int error_count = 0; + if (d_syn_start == 0) d_syn_start = 39; + else d_syn_start -= 1; + + std::vector<int> temp_syndrome_reg = d_syndrome_reg; + + temp_syndrome_reg[rem(d_syn_start+3,40)] = + d_syndrome_reg[rem(d_syn_start+3,40)] ^ + d_syndrome_reg[d_syn_start]; + temp_syndrome_reg[rem(d_syn_start+17,40)] = + d_syndrome_reg[rem(d_syn_start+17,40)] ^ + d_syndrome_reg[d_syn_start]; + temp_syndrome_reg[rem(d_syn_start+23,40)] = + d_syndrome_reg[rem(d_syn_start+23,40)] ^ + d_syndrome_reg[d_syn_start]; + temp_syndrome_reg[rem(d_syn_start+26,40)] = + d_syndrome_reg[rem(d_syn_start+26,40)] ^ + d_syndrome_reg[d_syn_start]; + + temp_syndrome_reg[rem(d_syn_start+4,40)] = + d_syndrome_reg[rem(d_syn_start+4,40)] ^ bit; + temp_syndrome_reg[rem(d_syn_start+6,40)] = + d_syndrome_reg[rem(d_syn_start+6,40)] ^ bit; + temp_syndrome_reg[rem(d_syn_start+10,40)] = + d_syndrome_reg[rem(d_syn_start+10,40)] ^ bit; + temp_syndrome_reg[rem(d_syn_start+16,40)] = + d_syndrome_reg[rem(d_syn_start+16,40)] ^ bit; + temp_syndrome_reg[rem(d_syn_start+27,40)] = + d_syndrome_reg[rem(d_syn_start+27,40)] ^ bit; + temp_syndrome_reg[rem(d_syn_start+29,40)] = + d_syndrome_reg[rem(d_syn_start+29,40)] ^ bit; + temp_syndrome_reg[rem(d_syn_start+33,40)] = + d_syndrome_reg[rem(d_syn_start+33,40)] ^ bit; + temp_syndrome_reg[rem(d_syn_start+39,40)] = + d_syndrome_reg[rem(d_syn_start+39,40)] ^ bit; + + temp_syndrome_reg[d_syn_start] = d_syndrome_reg[d_syn_start] ^ bit; + + d_syndrome_reg = temp_syndrome_reg; + + for (unsigned int i = 0; i < 28; i++) { + error_count = error_count + d_syndrome_reg[rem(d_syn_start+i,40)]; + } + return error_count; +} + + diff --git a/gsmsp/gsm/src/lib/fire_crc.h b/gsmsp/gsm/src/lib/fire_crc.h new file mode 100644 index 0000000..bd231c4 --- /dev/null +++ b/gsmsp/gsm/src/lib/fire_crc.h @@ -0,0 +1,54 @@ +/* -*- c++ -*- */ +/* + * Copyright 2005 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include <vector> +#include <math.h> + +#ifndef INCLUDED_FIRE_CRC_H +#define INCLUDED_FIRE_CRC_H + +/*! + * \brief + * \ingroup + */ + +class fire_crc +{ +protected: + + unsigned int d_crc_size; + unsigned int d_data_size; + unsigned int d_syn_start; + std::vector<int> d_syndrome_reg; + +public: + + fire_crc (unsigned int crc_size, unsigned int data_size); + ~fire_crc (); + int check_crc (const unsigned char *input_bits, + unsigned char *control_bits); + int syndrome_shift (unsigned int bit); + int rem (const int x, const int y); + +}; + +#endif diff --git a/gsmsp/gsm/src/lib/gsm.i b/gsmsp/gsm/src/lib/gsm.i new file mode 100644 index 0000000..dc3b5d4 --- /dev/null +++ b/gsmsp/gsm/src/lib/gsm.i @@ -0,0 +1,32 @@ +/* -*- c++ -*- */ + +%feature("autodoc", "1"); // generate python docstrings + +%include "exception.i" +%import "gnuradio.i" // the common stuff + +%{ +#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix +#include "gsm_run_bb.h" +#include <stdexcept> +%} + +// ---------------------------------------------------------------- + +/* + * First arg is the package prefix. + * Second arg is the name of the class minus the prefix. + * + * This does some behind-the-scenes magic so we can + * access gsm_ruN_bb from python as gsm.run_bb + */ +GR_SWIG_BLOCK_MAGIC(gsm,run_bb); + +gsm_run_bb_sptr gsm_make_run_bb (); + +class gsm_run_bb : public gr_block +{ +private: + gsm_run_bb (); +}; + diff --git a/gsmsp/gsm/src/lib/gsm_constants.h b/gsmsp/gsm/src/lib/gsm_constants.h new file mode 100644 index 0000000..779cd0f --- /dev/null +++ b/gsmsp/gsm/src/lib/gsm_constants.h @@ -0,0 +1,12 @@ +// $Id: gsm_constants.h,v 1.3 2007/03/14 05:44:53 jl Exp $ + +#pragma once + +static const double QN_TIME = 12.0l / 13.0l / 1000000.0l; +static const double BN_TIME = 4.0l * QN_TIME; +static const double TN_TIME = 156.25l * BN_TIME; +static const double FN_TIME = 8.0l * TN_TIME; + +static const double GSM_RATE = 812500.0l / 3.0l; +static const int MAX_FN = 26 * 51 * 2048; +static const int BURST_LENGTH = 156; diff --git a/gsmsp/gsm/src/lib/gsm_desc.h b/gsmsp/gsm/src/lib/gsm_desc.h new file mode 100644 index 0000000..e9f59ba --- /dev/null +++ b/gsmsp/gsm/src/lib/gsm_desc.h @@ -0,0 +1,158 @@ + + +struct _id_list list_ChannelRelease[] = { +{0, "00000000 RR-Cause (reason of event) = Normal event"}, +{1, "00000001 RR-Cause (reason of event) = Abnormal release, unspecified"}, +{2, "00000010 RR-Cause (reason of event) = Abnormal release, channel unacceptable"}, +{3, "00000011 RR-Cause (reason of event) = Abnormal release, timer expired"}, +{4, "00000100 RR-Cause (reason of event) = Abnormal release, no activity on the radio path"}, +{5, "00000101 RR-Cause (reason of event) = Preemptive release"}, +{8, "00001000 RR-Cause (reason of event) = Handover impossible, timing advance out of range"}, +{9, "00001001 RR-Cause (reason of event) = Channel mode unacceptable"}, +{10, "00001010 RR-Cause (reason of event) = Frequency not implemented"}, +{0x81, "01000001 RR-Cause (reason of event) = Call already cleared"}, +{0x5f, "01011111 RR-Cause (reason of event) = Semantically incorrect message"}, +{0x60, "01100000 RR-Cause (reason of event) = Invalid mandatory information"}, +{0x61, "01100001 RR-Cause (reason of event) = Message type non-existent or not implemented"}, +{0x62, "01100010 RR-Cause (reason of event) = Message type not compatible with protocol state"}, +{0x64, "01100100 RR-Cause (reason of event) = Conditional IE error"}, +{0x65, "01100101 RR-Cause (reason of event) = Nocell allocation available"}, +{0x6f, "01101111 RR-Cause (reason of event) = Protocol error unspecified"}, +{-1, NULL} +}; + +struct _id_list list_RequestServiceType[] = { +{1, "----0001 Request Service Type: MS originated call"}, +{2, "----0010 Request Service Type: Emergency call"}, +{4, "----0100 Request Service Type: SMS"}, +{8, "----1000 Request Service Type: Supplementary Service Activation"}, +{9, "----1001 Request Service Type: Voice Group call"}, +{10, "----1010 Request Service Type: Voice Broadcast call"}, +{11, "----1011 Request Service Type: Location Services"}, +{-1, NULL} +}; + +struct _id_list list_SMSCAddressType[] = { +{0, "-000---- Unknown Number Type"}, +{1, "-001---- International Number"}, +{2, "-010---- National Number"}, +{3, "-011---- Network specific number"}, +{4, "-100---- Subscriber number"}, +{5, "-101---- Alphanumeric number"}, +{6, "-110---- Abbreviated number"}, +{-1, NULL} +}; + +struct _id_list list_SMSCAddressNumberingPlan[] = { +{0, "----0000 Numbering plan: Unknown"}, +{1, "----0001 Numbering plan: ISDN/telephone (E164/E.163)"}, +{3, "----0011 Numbering plan: Data(X.121)"}, +{4, "----0100 Numbering plan: Telex"}, +{8, "----1000 Numbering plan: National"}, +{9, "----1001 Numbering plan: Private"}, +{10, "----1010 Numbering plan: ERMES (ESTI DE/PS3 01-3)"}, +{-1, NULL} +}; + +struct _id_list list_ChannelDescriptionTwo[] = { +{0x01, "TCH/F + ACCHs"}, +{0x02, "TCH/H + ACCHs, subchannel 0"}, +{0x03, "TCH/H + ACCHs, subchannel 1"}, +{0x04, "SDCCH/4 + SACCH/C4 or CBCH (SDCCH/4), SC0"}, +{0x05, "SDCCH/4 + SACCH/C4 or CBCH (SDCCH/4), SC1"}, +{0x06, "SDCCH/4 + SACCH/C4 or CBCH (SDCCH/4), SC2"}, +{0x07, "SDCCH/4 + SACCH/C4 or CBCH (SDCCH/4), SC3"}, +{0x08, "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), SC0"}, +{0x09, "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), SC1"}, +{0x0a, "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), SC2"}, +{0x0b, "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), SC3"}, +{0x0c, "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), SC4"}, +{0x0d, "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), SC5"}, +{0x0e, "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), SC6"}, +{0x0f, "SDCCH/8 + SACCH/C8 or CBCH (SDCCH/8), SC7"}, +{-1, NULL} +}; + +struct _id_list list_ChannelMode[] = { +{0x00, "00000000 Channel Mode: signaling only"}, +{0x01, "00000001 Channel Mode: TCH/F or TCH/H rev 1"}, +{0x21, "00100001 Channel Mode: TCH/F or TCH/H rev 2"}, +{0x41, "01000001 Channel Mode: TCH/F or TCH/H rev 3"}, +{0x0f, "00001111 Channel Mode: Data, 14.5 kbit/s"}, +{0x03, "00000011 Channel Mode: Data, 12.0 kbit/s"}, +{0x0b, "00001011 Channel Mode: Data, 6.0 kbit/s"}, +{0x13, "00010011 Channel Mode: Data, 3.6 kbit/s"}, +{-1, NULL} +}; + +struct _id_list list_CodingStandard[] = { +{0x00, "CCITT"}, +{0x01, "Reserved for international standards"}, +{0x02, "National standard"}, +{0x03, "GSM-PLMNS"}, +{-1, NULL} +}; + + +struct _id_list list_Location[] = { +{0x00, "User"}, +{0x01, "Private network serving local user"}, +{0x02, "Public network serving local user"}, +{0x04, "Public network serving remote user"}, +{0x05, "Private network serving remote user"}, +{0x0a, "Network beyong interworking point"}, +{-1, NULL} +}; + +struct _id_list list_Progress[] = { +{0x01, "-0000001 Progress: Call is not end-to-end PLMN/ISDN"}, +{0x02, "-0000010 Progress: Destination address in non-PLMN/ISDN"}, +{0x03, "-0000011 Progress: Origination address in non-PLMN/ISDN"}, +{0x04, "-0000100 Progress: Call has returned to the PLMN/ISDN"}, +{0x08, "-0001000 Progress: In-band information or appr. pattern available"}, +{0x20, "-0100000 Progress: Call is end-to-end PLMN/ISDN"}, +{0x40, "-1000000 Progress: Queueing"}, +{-1, NULL} +}; + +struct _id_list list_Cause[] = { +{0x01, "Unassigned number"}, +{0x03, "No route to destination"}, +{0x06, "Channel unacceptable"}, +{0x08, "Operator determined barring"}, +{0x10, "Normal call clearing"}, +{0x11, "User busy"}, +{0x12, "No user responding"}, +{0x13, "User alerting, no answer"}, +{0x15, "Call rejected"}, +{0x16, "Number changed, New destination"}, +{0x19, "Pre-emption"}, +{0x1a, "Non selected user clearing"}, +{0x1b, "Destination out of order"}, +{0x1c, "Invalid number format (incomplete number)"}, +{0x1d, "Fascility rejected"}, +{0x1e, "Response to Status Enquiry"}, +{0x1f, "Normal"}, +{0x22, "No channel available"}, +{0x26, "Network out of order"}, +/* FIXME: fill in others.. */ +{-1, NULL} +}; + +struct _id_list list_RadioChannelReq[] = { +{0x00, "reserved"}, +{0x01, "full rate MS"}, +{0x02, "dual rate MS/half rate preferred"}, +{0x03, "dual rate MS/full rate preferred"}, +{-1, NULL} +}; + +struct _id_list list_TransferCap[] = { +{0x00, "speech"}, +{0x01, "unrestricted digital information"}, +{0x02, "3.1 kHz audio, exx PLMN"}, +{0x03, "facsimile group 3"}, +{0x05, "Other ITC"}, +{-1, NULL} +}; + diff --git a/gsmsp/gsm/src/lib/gsm_run_bb.cc b/gsmsp/gsm/src/lib/gsm_run_bb.cc new file mode 100644 index 0000000..0db1bbf --- /dev/null +++ b/gsmsp/gsm/src/lib/gsm_run_bb.cc @@ -0,0 +1,420 @@ +/* -*- c++ -*- */ +/* + * config.h is generated by configure. It contains the results + * of probing for features, options etc. It should be the first + * file included in your .cc file. + */ +#include "common.h" +#include <gsm_run_bb.h> +#include <gr_io_signature.h> +#include "sch.h" +#include "cch.h" +#include "data_out.h" + +struct _opt opt; + +/* Estiamted earliest SCH start after FCH 142 bit's 0 */ +#define GSMSP_EST_SCH_START_AFTER_FCH (3 + 8 + 156 * 7) + +/* SCH training sequence */ +#if 1 +const unsigned char syncbits[] = { +0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, +0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, +0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, +0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, +0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, +0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01 }; +#endif + +static unsigned char syncbitsdiffencoded[sizeof syncbits]; + +static ssize_t g_req_size; + +static void diff_encode(unsigned char *out, const unsigned char *in, size_t len); +static void diff_decode(unsigned char *out, const unsigned char *in, size_t len); +static int memdiff(const unsigned char *s1, const unsigned char *s2, size_t n); +/* + * Create a new instance of howto_square2_ff and return + * a boost shared_ptr. This is effectively the public constructor. + */ +gsm_run_bb_sptr +gsm_make_run_bb () +{ + return gsm_run_bb_sptr (new gsm_run_bb ()); +} + +/* + * The private constructor + */ +gsm_run_bb::gsm_run_bb () + : gr_sync_block ("run_bb", + gr_make_io_signature (1, 1, sizeof (unsigned char)), + gr_make_io_signature (0, 0, 0)) +{ + set_output_multiple(156); + bits_processed = 0; + iPhase = 1; + ChangeSearchMode(EModeFindFCCH); + diff_encode(syncbitsdiffencoded, syncbits, sizeof syncbits); + //HEXDUMPF(syncbitsdiffencoded, sizeof syncbitsdiffencoded, "syncbitsdiffencoded:\n"); + interleave_init(&opt.ictx, 456, 114); +} + +/* + * Our virtual destructor. + */ +gsm_run_bb::~gsm_run_bb () +{ + // nothing else required in this example + interleave_deinit(&opt.ictx); +} + +void +gsm_run_bb::forecast(int noutput_items, gr_vector_int &ninput_items_required) +{ + unsigned ninputs = ninput_items_required.size(); + for (unsigned int i = 0; i < ninputs; i++) + ninput_items_required[i] = noutput_items; +} + +/* + * Find SCH in inbuf[]. Return the offset of the SCH *start*. + */ +int +gsm_run_bb::find_sch() +{ + int ret; + const unsigned char *end; + + end = iPtr + 3 + 39 + sizeof syncbitsdiffencoded + 39 + 8; + + DEBUGF("earliest SCH can start: %d\n", bits_processed + iPtr - iStart); + + while (iPtr + 39 + 3 + sizeof syncbitsdiffencoded < end) + { + ret = memdiff(iPtr + 39 + 3, syncbitsdiffencoded, sizeof (syncbitsdiffencoded)); + //DEBUGF("memdiff start: %d, ret = %d\n", bits_processed + iPtr - iStart + 39 + 3, ret); + if (ret <= 5) + { + DEBUGF("Possible SCH start: %d (bit error %d)\n", bits_processed + iPtr - iStart, ret); + //iPtr = iPtr - 39 - 3; + return 0; + } + iPtr++; + } + + return -1; /* SCH not found */ +} + +int +gsm_run_bb::process_sch() +{ + int fn = 0, bsic = 0; + int ret; + unsigned char burst[156]; + + //DEBUGF("process_sch at %d\n", bits_processed + iPtr - iStart); + diff_decode(burst, iPtr, 156); + ret = decode_sch(burst, &fn, &bsic); + DEBUGF("SCH ret %d, fn %d, bsic %d\n", ret, fn, bsic); + if (ret == 0) + iFN = fn; + + return ret; +} + +/* + * Search for an exact match! + * FIXME: later on accepts FCH burst with a few bit errors. + */ +int +gsm_run_bb::find_fch() +{ + while (iPtr < iEnd) + { + // DEBUGF("zero count %d\n", fcch_zero_count); + if (*iPtr == iFchLastBit) + { + + fcch_zero_count++; + if (fcch_zero_count >= 142) + { + iPtr++; + return 0; + } + } else { + fcch_zero_count = 0; + iFchLastBit = *iPtr; + } + iPtr++; + } + + return -1; /* Need more data */ +} + +void +gsm_run_bb::ChangeSearchMode(TMode new_mode) +{ + switch (new_mode) + { + case EModeFindFCCH: + ts_n = 0; + g_req_size = 1; + iFchLastBit = 0; + fcch_zero_count = 0; + break; + case EModeProcessL2: + memset(timeslots, 0, sizeof timeslots); + // memset(timeslots[0].data, 0x41, sizeof timeslots[0].data); + timeslots[0].n_max_frames = 51; + timeslots[0].config = TS_CONFIG_CCH; + for (int i = 1; i < 2; i++) + { + timeslots[i].n_max_frames = 51; + timeslots[i].config = TS_CONFIG_SDCCH8; + } + case EModeProcessSCH: + case EModeFindSCH: + ts_n = 0; + default: + g_req_size = 156; + } + + mode = new_mode; +} + +/* + * encode: + * - last = 1 + * - *out = !(in[0] ^ last) + * decode: + * - last = 1 + * => ret 0 seen 16 times. all FCCH with Phase: 1 + * decode: + * - last = 0 + * => ret 0 seen 2 times. all FCCH with Phase: 1 + */ +static void +diff_decode(unsigned char *out, const unsigned char *in, size_t len) +{ + const unsigned char *end = in + len; + unsigned char last; /* = 1; */ + + /* + * The first 3 decoded bits must be 0 because they are the tail bits. + * If one of these bits is wrong then the error is propagated. + * To prevent this we just always set the first 3 bits to 0. + */ +#if 0 + int ret; + ret = memdiff(in, (const unsigned char *)"\x00\x01\x01", 3); + if (ret != 0) + { + HEXDUMPF(in, 3, "BIT ERROR in TAIL BITS (%d)\n", ret); + } +#endif +#if 1 + in += 3; + last = 0; + memset(out, 0, 3); + out += 3; +#endif + + while (in < end) + { + *out = !*in ^ last; + last = *out; + in++; + out++; + } +} + +/* + * Init value is always 1. (after GSM 05.04?) + */ +static void +diff_encode(unsigned char *out, const unsigned char *in, size_t len) +{ + const unsigned char *end = in + len; + unsigned char last = 1; + + while (in < end) + { + *out = !(in[0] ^ last); + last = in[0]; + in++; + out++; + } +} + +int +gsm_run_bb::work (int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &/*output_items*/) +{ + int ret; + + iStart = (const unsigned char *)input_items[0]; + iPtr = iStart; + iEnd = iStart + noutput_items; + + while (iEnd - iPtr >= g_req_size) + { + ts_n = (ts_n + 1) % 8; + if (ts_n == 0) + iFN++; + switch (mode) + { + case EModeFindFCCH: + ret = find_fch(); + if (ret != 0) + break; + DEBUGF("ts %d: Found FCH start at %d (Phase: %d)\n", ts_n, bits_processed + (iPtr - iStart) - 142, iFchLastBit); + iPtr += 3 + 8; /* Tail + guard */ + iPhase = iFchLastBit; + ChangeSearchMode(EModeFindSCH); + break; + case EModeFindSCH: + if (ts_n != 0) + { + iPtr += g_req_size; + break; + } + ret = find_sch(); + if (ret != 0) + ChangeSearchMode(EModeFindFCCH); + else + ChangeSearchMode(EModeProcessSCH); + break; + case EModeProcessSCH: + if (process_sch() != 0) + { + ChangeSearchMode(EModeFindFCCH); + } else { + iPtr += g_req_size; + ChangeSearchMode(EModeProcessL2); + } + //ChangeSearchMode(EModeFindFCCH); + break; + default: + /* Check if handling this timeslot...*/ + /* At the moment only handle cch channel */ + if (timeslots[ts_n].config == TS_CONFIG_UNKNOWN) + { + iPtr += g_req_size; + break; + } +#if 1 + /* 1, 11, 21, 31, 41 but not 0, 10, 20, 30, 40, 50, . */ + if ((timeslots[ts_n].config == TS_CONFIG_CCH) && ((iFN % 51 != 0) && ((iFN % 51 + 9) % 10 == 0))) + { + ret = memdiff(iPtr + 39 + 3, syncbitsdiffencoded, sizeof (syncbitsdiffencoded)); + if (ret >= 5) + { + HEXDUMPF(iPtr + 39 + 3, sizeof syncbitsdiffencoded, "ERR: Out of sync!\n"); + ChangeSearchMode(EModeFindFCCH); + break; + } + ChangeSearchMode(EModeProcessSCH); + break; + } +#endif + + burst_ptr = timeslots[ts_n].data[iFN % timeslots[ts_n].n_max_frames]; + diff_decode(burst_ptr, iPtr, 156); + if (handle_l2() != 0) + { + ChangeSearchMode(EModeFindFCCH); + break; + } + iPtr += g_req_size; + break; + } + + /* NOTHING HERE */ + } + + bits_processed += iPtr - iStart; + return iPtr - iStart; +} + +int +gsm_run_bb::handle_l2() +{ + unsigned char *data; + unsigned int len; + unsigned char b[4][58 * 2]; + unsigned char ready = 0; + //DEBUGF("(ts %d, iFN %% %d = %d\n", ts_n, timeslots[ts_n].n_max_frames, iFN % 51); + + /* FIXME: if ts_n == 0 then check if burst 1, 11, 21, 31, ... etc + * are still same bsic and if frame number matches... + */ + if (timeslots[ts_n].config == TS_CONFIG_CCH) + { + /* 2..5, 12..15, 22..25, 23..35, 42..45 */ + /* 6..9, 16..19, 26..29, 36..39, 46..49 */ + /* But not 0, 1, 50, ... */ + if ((iFN % 51 != 0) && ( (((iFN % 51) + 5) % 10 == 0) || (((iFN % 51) + 1) % 10 == 0) ) ) + ready = 1; + //ready = 0; /* TESTING */ + } else if (timeslots[ts_n].config == TS_CONFIG_SDCCH8) { + /* 0..3, 4..7, 8..11, 12..15, .. but not 48..50 */ + if (((iFN % 51) <= 47) && (((iFN % 51) + 1) % 4 == 0)) + ready = 1; + } + + if (ready == 0) + return 0; + + int tdma_n = (iFN % 51) - 3; + for (int i = 0; i < 4; i++) + { + memcpy(b[i], timeslots[ts_n].data[tdma_n + i] + 3, 58); + memcpy(b[i] + 58, timeslots[ts_n].data[tdma_n + i] + 3 + 58 + 26, 58); + } + data = decode_cch(b[0], b[1], b[2], b[3], &len); + if (data == NULL) + { + //DEBUGF("ERR TS %d decoding at %d\n", ts_n, bits_processed + iPtr - iStart); + return 0; + } + DEBUGF("OK TS %d decoding at %d, len %d\n", ts_n, bits_processed + iPtr - iStart, len); + //HEXDUMPF(data, len, "DATA (%d)\n", len); +#if 0 + if (1) + { + unsigned char data[]={0x17, 0x06, 0x00, 0xe0, 0xa7, 0x80, 0xe0 ,0x0e ,0x12 ,0x04 ,0xd2 ,0x49 ,0xd2 ,0xda ,0x2b ,0x2b ,0x2b ,0x2b ,0x2b ,0x2b ,0x2b ,0x2b ,0x2b}; + l2_data_out(1, 0, data, 23); + exit(0); + } +#endif + if (timeslots[ts_n].config == TS_CONFIG_SDCCH8) + { + l2_data_out_B(iFN, data, len); + } else { + l2_data_out_Bbis(iFN, data, len); + } + + return 0; +} + +/* + * Return number of bytes s1 differes from s2. + * Return 0 if s1 and s2 are equal. + */ +static int +memdiff(const unsigned char *s1, const unsigned char *s2, size_t n) +{ + int diff = 0; + + for (size_t i = 0; i < n; i++) + if (s1[i] != s2[i]) + diff++; + + return diff; +} + diff --git a/gsmsp/gsm/src/lib/gsm_run_bb.h b/gsmsp/gsm/src/lib/gsm_run_bb.h new file mode 100644 index 0000000..23cef35 --- /dev/null +++ b/gsmsp/gsm/src/lib/gsm_run_bb.h @@ -0,0 +1,87 @@ +/* -*- c++ -*- */ +#ifndef INCLUDED_GR_EXAMPLE_B_SQUARE_BB_H +#define INCLUDED_GR_EXAMPLE_B_SQUARE_BB_H + +#include <gr_sync_block.h> + +class gsm_run_bb; + +/* + * We use boost::shared_ptr's instead of raw pointers for all access + * to gr_blocks (and many other data structures). The shared_ptr gets + * us transparent reference counting, which greatly simplifies storage + * management issues. This is especially helpful in our hybrid + * C++ / Python system. + * + * See http://www.boost.org/libs/smart_ptr/smart_ptr.htm + * + * As a convention, the _sptr suffix indicates a boost::shared_ptr + */ +typedef boost::shared_ptr<gsm_run_bb> gsm_run_bb_sptr; + +/*! + * \brief Return a shared_ptr to a new instance of howto_square2_ff. + * + * To avoid accidental use of raw pointers, howto_square2_ff's + * constructor is private. howto_make_square2_ff is the public + * interface for creating new instances. + */ +gsm_run_bb_sptr gsm_make_run_bb (); + +enum TimeslotConfig { TS_CONFIG_UNKNOWN, TS_CONFIG_CCH, TS_CONFIG_SDCCH8 }; +struct timeslot_st +{ + unsigned char data[102][156]; + unsigned char n_max_frames; + TimeslotConfig config; +}; + +/*! + * \brief square2 a stream of floats. + * \ingroup block + * + * This uses the preferred technique: subclassing gr_sync_block. + */ +class gsm_run_bb : public gr_sync_block +{ + private: + enum TMode { EModeFindFCCH, EModeFindSCH, EModeProcessSCH, EModeProcessL2 }; + // The friend declaration allows howto_make_square2_ff to + // access the private constructor. + + friend gsm_run_bb_sptr gsm_make_run_bb (); + + gsm_run_bb (); // private constructor + int find_sch(); + int process_sch(); + int find_fch(); + int handle_l2(); + //int find_fch(const unsigned char *start, const unsigned char *end); + //int FillWorkingBuffer(const unsigned char *start, const unsigned char *end); + void ChangeSearchMode(TMode new_mode); + public: + ~gsm_run_bb (); // public destructor + + void forecast(int noutput_items, gr_vector_int &ninput_items_required); + // Where all the action really happens + + int work (int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); + private: + int ts_n; + unsigned char syncbits_match[64]; + int bits_processed; + int fcch_zero_count; + unsigned char *burst_ptr; +// unsigned char burst[156]; + struct timeslot_st timeslots[8]; + TMode mode; + //unsigned char mode; + const unsigned char *iStart, *iPtr, *iEnd; + unsigned char iFchLastBit; + unsigned char iPhase; + int iFN; +}; + +#endif /* INCLUDED_HOWTO_SQUARE2_FF_H */ diff --git a/gsmsp/gsm/src/lib/id_list.c b/gsmsp/gsm/src/lib/id_list.c new file mode 100644 index 0000000..571c3a0 --- /dev/null +++ b/gsmsp/gsm/src/lib/id_list.c @@ -0,0 +1,18 @@ +#include "common.h" +#include "id_list.h" + +const char * +id_list_get(struct _id_list *id_list, int id) +{ + struct _id_list *idptr = id_list; + + while (idptr->string != NULL) + { + if (idptr->id == id) + return idptr->string; + idptr++; + } + + return "UNKNOWN"; +} + diff --git a/gsmsp/gsm/src/lib/id_list.h b/gsmsp/gsm/src/lib/id_list.h new file mode 100644 index 0000000..6ee12cc --- /dev/null +++ b/gsmsp/gsm/src/lib/id_list.h @@ -0,0 +1,23 @@ + +#ifndef __GSMSP_ID_LIST_H__ +#define __GSMSP_ID_LIST_H__ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +struct _id_list +{ + int id; + const char *string; +}; + +const char *id_list_get(struct _id_list *id_list, int id); + +#ifdef __cplusplus +} +#endif + +#endif /* !__GSMSP_COMMON_H__ */ + + diff --git a/gsmsp/gsm/src/lib/interleave.cc b/gsmsp/gsm/src/lib/interleave.cc new file mode 100644 index 0000000..879d64d --- /dev/null +++ b/gsmsp/gsm/src/lib/interleave.cc @@ -0,0 +1,48 @@ + +#include "common.h" +#include <stdlib.h> +#include <stdio.h> +#include "interleave.h" + +int +interleave_init(INTERLEAVE_CTX *ictx, int size, int block_size) +{ + ictx->trans_size = size; + ictx->trans = (unsigned short *)malloc(size * sizeof *ictx->trans); + +// DEBUGF("size: %d\n", size); +// DEBUGF("Block size: %d\n", block_size); + int j, k, B; + for (k = 0; k < size; k++) + { + B = k % 4; + j = 2 * ((49 * k) % 57) + ((k % 8) / 4); + ictx->trans[k] = B * block_size + j; + /* Mapping: pos1 goes to pos2: pos1 -> pos2 */ +// DEBUGF("%d -> %d\n", ictx->trans[k], k); + } +// exit(0); + return 0; +} + +int +interleave_deinit(INTERLEAVE_CTX *ictx) +{ + if (ictx->trans != NULL) + { + free(ictx->trans); + ictx->trans = NULL; + } + + return 0; +} + +void +interleave_decode(INTERLEAVE_CTX *ictx, unsigned char *dst, unsigned char *src) +{ + + int k; + for (k = 0; k < ictx->trans_size; k++) + dst[k] = src[ictx->trans[k]]; +} + diff --git a/gsmsp/gsm/src/lib/interleave.h b/gsmsp/gsm/src/lib/interleave.h new file mode 100644 index 0000000..b1abf81 --- /dev/null +++ b/gsmsp/gsm/src/lib/interleave.h @@ -0,0 +1,18 @@ +/* + * $Id:$ + */ + +#ifndef __GSMSP_INTERLEAVE_H__ +#define __GSMSP_INTERLEAVE_H__ 1 + +typedef struct _interleave_ctx +{ + unsigned short *trans; + int trans_size; +} INTERLEAVE_CTX; + +int interleave_init(INTERLEAVE_CTX *ictx, int size, int block_size); +int interleave_deinit(INTERLEAVE_CTX *ictx); +void interleave_decode(INTERLEAVE_CTX *ictx, unsigned char *dst, unsigned char *src); + +#endif diff --git a/gsmsp/gsm/src/lib/sch.cc b/gsmsp/gsm/src/lib/sch.cc new file mode 100644 index 0000000..7bfebc6 --- /dev/null +++ b/gsmsp/gsm/src/lib/sch.cc @@ -0,0 +1,325 @@ +// $Id: sch.cc,v 1.11 2007/03/14 05:44:53 jl Exp $ + +#include "common.h" +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include "burst_types.h" + +/* + * Synchronization channel. + * + * Timeslot Repeat length Frame Number (mod repeat length) + * 0 51 1, 11, 21, 31, 41 + */ + +/* + * Parity (FIRE) for the GSM SCH. + * + * g(x) = x^10 + x^8 + x^6 + x^5 + x^4 + x^2 + 1 + */ +#define DATA_BLOCK_SIZE 25 +#define PARITY_SIZE 10 +#define TAIL_BITS_SIZE 4 +#define PARITY_OUTPUT_SIZE (DATA_BLOCK_SIZE + PARITY_SIZE + TAIL_BITS_SIZE) + +static const unsigned char parity_polynomial[PARITY_SIZE + 1] = { + 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1 +}; + +static const unsigned char parity_remainder[PARITY_SIZE] = { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +}; + + +static void parity_encode(unsigned char *d, unsigned char *p) { + + unsigned int i; + unsigned char buf[DATA_BLOCK_SIZE + PARITY_SIZE], *q; + + memcpy(buf, d, DATA_BLOCK_SIZE); + memset(buf + DATA_BLOCK_SIZE, 0, PARITY_SIZE); + + for(q = buf; q < buf + DATA_BLOCK_SIZE; q++) + if(*q) + for(i = 0; i < PARITY_SIZE + 1; i++) + q[i] ^= parity_polynomial[i]; + for(i = 0; i < PARITY_SIZE; i++) + p[i] = !buf[DATA_BLOCK_SIZE + i]; +} + + +static int parity_check(unsigned char *d) { + + unsigned int i; + unsigned char buf[DATA_BLOCK_SIZE + PARITY_SIZE], *q; + + memcpy(buf, d, DATA_BLOCK_SIZE + PARITY_SIZE); + + for(q = buf; q < buf + DATA_BLOCK_SIZE; q++) + if(*q) + for(i = 0; i < PARITY_SIZE + 1; i++) + q[i] ^= parity_polynomial[i]; + return memcmp(buf + DATA_BLOCK_SIZE, parity_remainder, PARITY_SIZE); +} + + +/* + * Convolutional encoding and Viterbi decoding for the GSM SCH. + * (Equivalent to the GSM SACCH.) + * + * G_0 = 1 + x^3 + x^4 + * G_1 = 1 + x + x^3 + x^4 + * + * i.e., + * + * c_{2k} = u_k + u_{k - 3} + u_{k - 4} + * c_{2k + 1} = u_k + u_{k - 1} + u_{k - 3} + u_{k - 4} + */ +#define CONV_INPUT_SIZE PARITY_OUTPUT_SIZE +#define CONV_SIZE (2 * CONV_INPUT_SIZE) +#define K 5 +#define MAX_ERROR (2 * CONV_INPUT_SIZE + 1) + + +/* + * Given the current state and input bit, what are the output bits? + * + * encode[current_state][input_bit] + */ +static const unsigned int encode[1 << (K - 1)][2] = { + {0, 3}, {3, 0}, {3, 0}, {0, 3}, + {0, 3}, {3, 0}, {3, 0}, {0, 3}, + {1, 2}, {2, 1}, {2, 1}, {1, 2}, + {1, 2}, {2, 1}, {2, 1}, {1, 2} +}; + + +/* + * Given the current state and input bit, what is the next state? + * + * next_state[current_state][input_bit] + */ +static const unsigned int next_state[1 << (K - 1)][2] = { + {0, 8}, {0, 8}, {1, 9}, {1, 9}, + {2, 10}, {2, 10}, {3, 11}, {3, 11}, + {4, 12}, {4, 12}, {5, 13}, {5, 13}, + {6, 14}, {6, 14}, {7, 15}, {7, 15} +}; + + +/* + * Given the previous state and the current state, what input bit caused + * the transition? If it is impossible to transition between the two + * states, the value is 2. + * + * prev_next_state[previous_state][current_state] + */ +static const unsigned int prev_next_state[1 << (K - 1)][1 << (K - 1)] = { + { 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2}, + { 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2}, + { 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2}, + { 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2}, + { 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2}, + { 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2}, + { 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2}, + { 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2}, + { 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2}, + { 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2}, + { 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2}, + { 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2}, + { 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2}, + { 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2}, + { 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1}, + { 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1} +}; + + +static inline unsigned int hamming_distance2(unsigned int w) { + + return (w & 1) + !!(w & 2); +} + + +static void conv_encode(unsigned char *data, unsigned char *output) { + + unsigned int i, state = 0, o; + + // encode data + for(i = 0; i < CONV_INPUT_SIZE; i++) { + o = encode[state][data[i]]; + state = next_state[state][data[i]]; + *output++ = !!(o & 2); + *output++ = o & 1; + } +} + + +static int conv_decode(unsigned char *data, unsigned char *output) { + + int i, t; + unsigned int rdata, state, nstate, b, o, distance, accumulated_error, + min_state, min_error, cur_state; + + unsigned int ae[1 << (K - 1)]; + unsigned int nae[1 << (K - 1)]; // next accumulated error + unsigned int state_history[1 << (K - 1)][CONV_INPUT_SIZE + 1]; + + // initialize accumulated error, assume starting state is 0 + for(i = 0; i < (1 << (K - 1)); i++) + ae[i] = nae[i] = MAX_ERROR; + ae[0] = 0; + + // build trellis + for(t = 0; t < CONV_INPUT_SIZE; t++) { + + // get received data symbol + rdata = (data[2 * t] << 1) | data[2 * t + 1]; + + // for each state + for(state = 0; state < (1 << (K - 1)); state++) { + + // make sure this state is possible + if(ae[state] >= MAX_ERROR) + continue; + + // find all states we lead to + for(b = 0; b < 2; b++) { + + // get next state given input bit b + nstate = next_state[state][b]; + + // find output for this transition + o = encode[state][b]; + + // calculate distance from received data + distance = hamming_distance2(rdata ^ o); + + // choose surviving path + accumulated_error = ae[state] + distance; + if(accumulated_error < nae[nstate]) { + + // save error for surviving state + nae[nstate] = accumulated_error; + + // update state history + state_history[nstate][t + 1] = state; + } + } + } + + // get accumulated error ready for next time slice + for(i = 0; i < (1 << (K - 1)); i++) { + ae[i] = nae[i]; + nae[i] = MAX_ERROR; + } + } + + // the final state is the state with the fewest errors + min_state = (unsigned int)-1; + min_error = MAX_ERROR; + for(i = 0; i < (1 << (K - 1)); i++) { + if(ae[i] < min_error) { + min_state = i; + min_error = ae[i]; + } + } + + // trace the path + cur_state = min_state; + for(t = CONV_INPUT_SIZE; t >= 1; t--) { + min_state = cur_state; + cur_state = state_history[cur_state][t]; // get previous + output[t - 1] = prev_next_state[cur_state][min_state]; + } + + // return the number of errors detected (hard-decision) + return min_error; +} + + +int decode_sch(const unsigned char *buf, int *fn_o, int *bsic_o) { + + int errors, bsic, t1, t2, t3p, t3, fn, tt; + unsigned char data[CONV_SIZE], decoded_data[PARITY_OUTPUT_SIZE]; + + // extract encoded data from synchronization burst + /* buf + 3, 39 bit */ + /* buf + 3 + 39 + 64 = 106, 39 */ + memcpy(data, buf + SB_EDATA_OS_1, SB_EDATA_LEN_1); + memcpy(data + SB_EDATA_LEN_1, buf + SB_EDATA_OS_2, SB_EDATA_LEN_2); + + // Viterbi decode + if(errors = conv_decode(data, decoded_data)) { + // fprintf(stderr, "error: sch: conv_decode (%d)\n", errors); + DEBUGF("ERR: conv_decode %d\n", errors); + return errors; + } + + // check parity + if(parity_check(decoded_data)) { + // fprintf(stderr, "error: sch: parity failed\n"); + DEBUGF("ERR: parity_check failed\n"); + return 1; + } + + // Synchronization channel information, 44.018 page 171. (V7.2.0) + bsic = + (decoded_data[ 7] << 5) | + (decoded_data[ 6] << 4) | + (decoded_data[ 5] << 3) | + (decoded_data[ 4] << 2) | + (decoded_data[ 3] << 1) | + (decoded_data[ 2] << 0); + t1 = + (decoded_data[ 1] << 10) | + (decoded_data[ 0] << 9) | + (decoded_data[15] << 8) | + (decoded_data[14] << 7) | + (decoded_data[13] << 6) | + (decoded_data[12] << 5) | + (decoded_data[11] << 4) | + (decoded_data[10] << 3) | + (decoded_data[ 9] << 2) | + (decoded_data[ 8] << 1) | + (decoded_data[23] << 0); + t2 = + (decoded_data[22] << 4) | + (decoded_data[21] << 3) | + (decoded_data[20] << 2) | + (decoded_data[19] << 1) | + (decoded_data[18] << 0); + t3p = + (decoded_data[17] << 2) | + (decoded_data[16] << 1) | + (decoded_data[24] << 0); + + t3 = 10 * t3p + 1; + + // modulo arithmetic + if(t3 < t2) + tt = (t3 + 26) - t2; + else + tt = (t3 - t2) % 26; + fn = (51 * 26 * t1) + (51 * tt) + t3; + + /* + * BSIC: Base Station Identification Code + * BCC: Base station Color Code + * NCC: Network Color Code + * + * FN: Frame Number + */ + /* + printf("bsic: %x (bcc: %u; ncc: %u)\tFN: %u\n", bsic, bsic & 7, + (bsic >> 3) & 7, fn); + */ + + if(fn_o) + *fn_o = fn; + if(bsic_o) + *bsic_o = bsic; + + return 0; +} diff --git a/gsmsp/gsm/src/lib/sch.h b/gsmsp/gsm/src/lib/sch.h new file mode 100644 index 0000000..2858954 --- /dev/null +++ b/gsmsp/gsm/src/lib/sch.h @@ -0,0 +1,3 @@ +// $Id: sch.h,v 1.3 2007/03/14 05:44:53 jl Exp $ + +int decode_sch(const unsigned char *, int *, int *); diff --git a/gsmsp/python/Makefile.am b/gsmsp/python/Makefile.am new file mode 100644 index 0000000..c4f9343 --- /dev/null +++ b/gsmsp/python/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = gsm_run.py diff --git a/gsmsp/python/Makefile.in b/gsmsp/python/Makefile.in new file mode 100644 index 0000000..5629f5d --- /dev/null +++ b/gsmsp/python/Makefile.in @@ -0,0 +1,276 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = python +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +subdirs = @subdirs@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = gsm_run.py +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign python/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign python/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/gsmsp/python/gsm_run.py b/gsmsp/python/gsm_run.py new file mode 100755 index 0000000..2d085fc --- /dev/null +++ b/gsmsp/python/gsm_run.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python + +# import the GNU Radio code +import os +from gnuradio import gr, blks +import gsm +from gnuradio.blksimpl import gmsk + +gsm_rate = 1625000.0 / 6.0 # GSM samples / symbol + +# most useful file Robert has +#file_name = os.environ.get("GSMSPROOT") + "/resources/data/GSMSP_20070218_robert_dbsrx_941MHz_112.cfile" +#file_name = os.environ.get("GSMSPROOT") + "/resources/data/GSMSP_20070204_robert_dbsrx_953.6MHz_64.cfile" +file_name = "signal.data" +#decimation = 64 # the decimation Robert used +#decimation = 112 # the decimation Robert used +decimation = 118 # the decimation Robert used + +sps = 64e6 / decimation # samples / second with this decimation + +filter_cutoff = 150e3 # bandpass filter between +/- 150kHz +filter_t_width = 50e3 # width of filter transition +offset = 0 # Robert didn't need an offset + + +# create a GNURadio Flow Graph +fg = gr.flow_graph() + + # create a file source from Robert's file +source = gr.file_source(gr.sizeof_gr_complex, file_name) + +# create a filter with the above constants +filter_taps = gr.firdes.low_pass(1.0, sps, filter_cutoff, +filter_t_width, gr.firdes.WIN_HAMMING) +filter = gr.freq_xlating_fir_filter_ccf(1, filter_taps, offset, sps) + +# create the GMSK demod object +gd = gmsk.gmsk_demod(fg, sps / gsm_rate, gain_mu = 0.01, +omega_relative_limit = 0.005) + +#diff = gr.diff_decoder_bb (2) + +gsm = gsm.run_bb () +#sqr = gr_example_b.square_bb () + +# create the vector sink +#sink = gr.vector_sink_b() + +# connect all the blocks together +fg.connect(source, filter, gd, gsm) + +# process the file +fg.run() + +# dump the data +#print sink.data() + diff --git a/gsmsp/resources/Makefile.am b/gsmsp/resources/Makefile.am new file mode 100644 index 0000000..2c0c150 --- /dev/null +++ b/gsmsp/resources/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = data tools diff --git a/gsmsp/resources/Makefile.in b/gsmsp/resources/Makefile.in new file mode 100644 index 0000000..d07e699 --- /dev/null +++ b/gsmsp/resources/Makefile.in @@ -0,0 +1,435 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = resources +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +subdirs = @subdirs@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = data tools +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign resources/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign resources/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic ctags \ + ctags-recursive distclean distclean-generic distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ + tags-recursive uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/gsmsp/resources/data/GSMSP_940.8Mhz_118.cfile b/gsmsp/resources/data/GSMSP_940.8Mhz_118.cfile Binary files differnew file mode 100644 index 0000000..cd5a006 --- /dev/null +++ b/gsmsp/resources/data/GSMSP_940.8Mhz_118.cfile diff --git a/gsmsp/resources/data/Makefile.am b/gsmsp/resources/data/Makefile.am new file mode 100644 index 0000000..fc2722c --- /dev/null +++ b/gsmsp/resources/data/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = GSMSP_940.8Mhz_118.cfile diff --git a/gsmsp/resources/data/Makefile.in b/gsmsp/resources/data/Makefile.in new file mode 100644 index 0000000..c00f158 --- /dev/null +++ b/gsmsp/resources/data/Makefile.in @@ -0,0 +1,276 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = resources/data +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +subdirs = @subdirs@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = GSMSP_940.8Mhz_118.cfile +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign resources/data/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign resources/data/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/gsmsp/resources/tools/Makefile.am b/gsmsp/resources/tools/Makefile.am new file mode 100644 index 0000000..7e4662f --- /dev/null +++ b/gsmsp/resources/tools/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = chk_bootstrap_prg.sh diff --git a/gsmsp/resources/tools/Makefile.in b/gsmsp/resources/tools/Makefile.in new file mode 100644 index 0000000..15e0da1 --- /dev/null +++ b/gsmsp/resources/tools/Makefile.in @@ -0,0 +1,276 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = resources/tools +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +subdirs = @subdirs@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = chk_bootstrap_prg.sh +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign resources/tools/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign resources/tools/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/gsmsp/resources/tools/chk_bootstrap_prg.sh b/gsmsp/resources/tools/chk_bootstrap_prg.sh new file mode 100755 index 0000000..ba6a6bf --- /dev/null +++ b/gsmsp/resources/tools/chk_bootstrap_prg.sh @@ -0,0 +1,26 @@ +#! /bin/sh + +DIE=0 +(autoconf --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have autoconf installed." + DIE=1 +} + +# libtool --version check not done... +(libtoolize --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have libtool installed." + DIE=1 +} + +(automake --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have automake installed." + DIE=1 +} + +if test "$DIE" -eq 1; then + exit 1 +fi + diff --git a/gsmsp/run.sh b/gsmsp/run.sh new file mode 100755 index 0000000..70cb4bf --- /dev/null +++ b/gsmsp/run.sh @@ -0,0 +1,44 @@ +#! /bin/sh + +# set GSMSPROOT +if [ x"${GSMSPROOT}" = x ]; then + export GSMSPROOT=`pwd` + echo "WARN: Setting GSMSPROOT to ${GSMSPROOT}" + cd "$cwd" +fi + +if [ ! -d "${GSMSPROOT}" ]; then + echo "ERR: GSMSPROOT directory \"$GSMSPROOT\" does not exist." + exit -1 +fi + +PYVERSION=`python -V 2>&1 | cut -f2 -d" " | cut -f1-2 -d.` + +if [ x"${PYTHONPATH}" = x -o x`echo "$PYTHONPATH" | grep site-packages` = x ]; then + export PYTHONPATH=$PYTHONPATH:/usr/lib/python${PYVERSION}/site-packages + export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python${PYVERSION}/site-packages +fi + +for block in gsm; do + dir="${GSMSPROOT}/${block}/src/lib" + if [ ! -d "${dir}" ]; then + echo "Ignoring block $block, $dir does not exist..." + fi + echo "Adding block $block..." + export PYTHONPATH=${GSMSPROOT}/${block}/src/lib:$PYTHONPATH + export PYTHONPATH=${GSMSPROOT}/${block}/src/lib/.libs:$PYTHONPATH +done + +echo " GSMSPROOT=${GSMSPROOT}" +echo " PYTHONPATH=${PYTHONPATH}" +if [ ! -f ${GSMSPROOT}/signal.data ]; then + ln -sf ${GSMSPROOT}/resources/data/GSMSP_940.8Mhz_118.cfile ${GSMSPROOT}/signal.data +fi + +if [ x"$1" = x ]; then + echo " EXEC=${GSMSPROOT}/python/gsm_run.py" + ${GSMSPROOT}/python/gsm_run.py +else + $1 +fi + diff --git a/gsmstack/README b/gsmstack/README new file mode 100644 index 0000000..54c26ed --- /dev/null +++ b/gsmstack/README @@ -0,0 +1,25 @@ +gsmstack - A GSM Um Layer 1 implementation +(C) 2008 by Harald Welte <laforge@gnumonks.org>, portions from gsm-tvoid +======================================================================== + +This is a GSM Layer 1 implementation mainly aimed at the requirements of +a GSM protocol analyzer. It starts off where the demodulation ends: With +the raw bits of the differential-decoded GSM Um burst. + +Based on that input, the stack takes care of demultiplexing the bursts into the +various physical and logical channels, decoding the various burst types, +convolutional decode and parity checking (where applicable). + +For the CCCH, it includes FCH and SCH processing. Frequency correction +informaiton can be signalled to the decoder/demodulator by callback functions. + +The recovereed TDMA Frame Number will be passed along with all MAC blocks +to the Layer2 protocol instance on top. + +The output of this Layer1 stack are the 23byte MAC blocks for control +channels, and the 260bits (32.5byte) speech frames for TCH/F channels + +The codebase is currently unfinished and highly experimental. + +Patches/contributions are welcome, please send them to laforge@gnumonks.org + diff --git a/gsmstack/cch.c b/gsmstack/cch.c new file mode 100644 index 0000000..d3a2619 --- /dev/null +++ b/gsmstack/cch.c @@ -0,0 +1,224 @@ +/* This file was taken from gsm-tvoid */ + +#include "system.h" + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <ctype.h> +#include <math.h> + +#include "burst_types.h" +#include "cch.h" +#include "conv.h" +#include "fire_crc.h" + +/* + * GSM SACCH -- Slow Associated Control Channel + * + * These messages are encoded exactly the same as on the BCCH. + * (Broadcast Control Channel.) + * + * Input: 184 bits + * + * 1. Add parity and flushing bits. (Output 184 + 40 + 4 = 228 bit) + * 2. Convolutional encode. (Output 228 * 2 = 456 bit) + * 3. Interleave. (Output 456 bit) + * 4. Map on bursts. (4 x 156 bit bursts with each 2x57 bit content data) + */ + + +/* + * Parity (FIRE) for the GSM SACCH channel. + * + * g(x) = (x^23 + 1)(x^17 + x^3 + 1) + * = x^40 + x^26 + x^23 + x^17 + x^3 + 1 + */ + +static const unsigned char parity_polynomial[PARITY_SIZE + 1] = { + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, + 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, + 1 +}; + +// remainder after dividing data polynomial by g(x) +static const unsigned char parity_remainder[PARITY_SIZE] = { + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1 +}; + + +/* +static void parity_encode(unsigned char *d, unsigned char *p) { + + int i; + unsigned char buf[DATA_BLOCK_SIZE + PARITY_SIZE], *q; + + memcpy(buf, d, DATA_BLOCK_SIZE); + memset(buf + DATA_BLOCK_SIZE, 0, PARITY_SIZE); + + for(q = buf; q < buf + DATA_BLOCK_SIZE; q++) + if(*q) + for(i = 0; i < PARITY_SIZE + 1; i++) + q[i] ^= parity_polynomial[i]; + for(i = 0; i < PARITY_SIZE; i++) + p[i] = !buf[DATA_BLOCK_SIZE + i]; +} + */ + + +static int parity_check(unsigned char *d) { + + unsigned int i; + unsigned char buf[DATA_BLOCK_SIZE + PARITY_SIZE], *q; + + memcpy(buf, d, DATA_BLOCK_SIZE + PARITY_SIZE); + + for(q = buf; q < buf + DATA_BLOCK_SIZE; q++) + if(*q) + for(i = 0; i < PARITY_SIZE + 1; i++) + q[i] ^= parity_polynomial[i]; + return memcmp(buf + DATA_BLOCK_SIZE, parity_remainder, PARITY_SIZE); +} + +static void decode_burstmap(unsigned char *iBLOCK, unsigned char *eBLOCK, + unsigned char *hl, unsigned char *hn) { + + int j; + + for(j = 0; j < 57; j++) { + iBLOCK[j] = eBLOCK[j]; + iBLOCK[j + 57] = eBLOCK[j + 59]; + } + *hl = eBLOCK[57]; + *hn = eBLOCK[58]; +} + + +/* + * Transmitted bits are sent least-significant first. + */ +static int compress_bits(unsigned char *dbuf, unsigned int dbuf_len, + unsigned char *sbuf, unsigned int sbuf_len) { + + unsigned int i, j, c, pos = 0; + + if(dbuf_len < ((sbuf_len + 7) >> 3)) + return -1; + + for(i = 0; i < sbuf_len; i += 8) { + for(j = 0, c = 0; (j < 8) && (i + j < sbuf_len); j++) + c |= (!!sbuf[i + j]) << j; + dbuf[pos++] = c & 0xff; + } + return pos; +} + + +#if 0 +int get_ns_l3_len(unsigned char *data, unsigned int datalen) { + + if((data[0] & 3) != 1) { + fprintf(stderr, "error: get_ns_l3_len: pseudo-length reserved " + "bits bad (%2.2x)\n", data[0] & 3); + return -1; + } + return (data[0] >> 2); +} + +#endif + +/* + * decode_cch + * + * Decode a "common" control channel. Most control channels use + * the same burst, interleave, Viterbi and parity configuration. + * The documentation for the control channels defines SACCH first + * and then just keeps referring to that. + * + * The current (investigated) list is as follows: + * + * BCCH Norm + * BCCH Ext + * PCH + * AGCH + * CBCH (SDCCH/4) + * CBCH (SDCCH/8) + * SDCCH/4 + * SACCH/C4 + * SDCCH/8 + * SACCH/C8 + * + * We provide two functions, one for where all four bursts are + * contiguous, and one where they aren't. + */ + +static unsigned char *decode_cch(GS_CTX *ctx, unsigned char *burst, + unsigned int *datalen) +{ + + int errors, len, data_size; + unsigned char conv_data[CONV_SIZE], iBLOCK[BLOCKS][iBLOCK_SIZE], + hl, hn, decoded_data[PARITY_OUTPUT_SIZE]; + FC_CTX fc_ctx; + + data_size = sizeof ctx->msg; + if (datalen) + *datalen = 0; + + // unmap the bursts + decode_burstmap(iBLOCK[0], burst, &hl, &hn); // XXX ignore stealing bits + decode_burstmap(iBLOCK[1], burst + 116, &hl, &hn); + decode_burstmap(iBLOCK[2], burst + 116 * 2, &hl, &hn); + decode_burstmap(iBLOCK[3], burst + 116 * 3, &hl, &hn); + + // remove interleave + interleave_decode(&ctx->interleave_ctx, conv_data, (unsigned char *)iBLOCK); + + // Viterbi decode + errors = conv_decode(decoded_data, conv_data, CONV_INPUT_SIZE_CCH); + if (errors) { + DEBUGF("conv_decode: %d\n", errors); + return NULL; + } + + // check parity + // If parity check error detected try to fix it. + if (parity_check(decoded_data)) + { + FC_init(&fc_ctx, 40, 184); + unsigned char crc_result[224]; + if (FC_check_crc(&fc_ctx, decoded_data, crc_result) == 0) + { + errors = -1; + DEBUGF("error: sacch: parity error (%d)\n", errors); + return NULL; + } else { + DEBUGF("Successfully corrected parity bits!\n"); + memcpy(decoded_data, crc_result, sizeof crc_result); + errors = 0; + } + } + + if((len = compress_bits(ctx->msg, data_size, decoded_data, + DATA_BLOCK_SIZE)) < 0) { + fprintf(stderr, "error: compress_bits\n"); + return NULL; + } + if(len < data_size) { + fprintf(stderr, "error: buf too small (%d < %d)\n", + sizeof(ctx->msg), len); + return NULL; + } + + if(datalen) + *datalen = (unsigned int)len; + return ctx->msg; +} diff --git a/gsmstack/cch.h b/gsmstack/cch.h new file mode 100644 index 0000000..71308c4 --- /dev/null +++ b/gsmstack/cch.h @@ -0,0 +1,41 @@ + +#ifndef __GSMSTACK_CCH_H__ +#define __GSMSTACK_CCH_H__ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#include "gsmstack.h" + +/* + * decode_cch + * + * Decode a "common" control channel. Most control channels use + * the same burst, interleave, Viterbi and parity configuration. + * The documentation for the control channels defines SACCH first + * and then just keeps referring to that. + * + * The current (investigated) list is as follows: + * + * BCCH Norm + * BCCH Ext + * PCH + * AGCH + * CBCH (SDCCH/4) + * CBCH (SDCCH/8) + * SDCCH/4 + * SACCH/C4 + * SDCCH/8 + * SACCH/C8 + * + * We provide two functions, one for where all four bursts are + * contiguous, and one where they aren't. + */ +unsigned char *decode_cch(GS_CTX *ctx, unsigned char *burst, unsigned int *len); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/gsmstack/channel.c b/gsmstack/channel.c new file mode 100644 index 0000000..6bd61e5 --- /dev/null +++ b/gsmstack/channel.c @@ -0,0 +1,155 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <errno.h> +#include "gsmstack.h" +#include "cch.h" +#include "tch.h" + +/* convert an 18byte 8-bit-per-byte burst to a 142byte 1bit-per-byte */ +static void bit_per_byte(unsigned char *dest, const unsigned char *src) +{ + int bit, byte; + + for (byte = 0; byte < BURST_BYTES; src++) { + for (bit = 0; bit < 8; bit++) { + if (src[byte] >> bit &= 0x01) + *dest++ = 0x01; + else + *dest++ = 0x00; + } + } +} + +static int add_burst_to_lchan(struct gsm_logi_chan *lchan, + struct gsm_burst *burst) +{ + struct gsm_phys_chan *pchan = burst->pchan; + int rc = 0; + + /* copy burst to burst buffer */ + memcpy(lchan->burst_buf[lchan->next_burst], burst, sizeof(*burst)); + lchan->next_burst++; + + if (lchan->next_burst == 4) { + lchan->next_burst = 0; + /* decode the four bursts into a MAC block */ + switch (pchan->config) { + case GSM_PCHAN_TCH_H: + /* FIXME */ + break; + case GSM_PCHAN_TCH_F: + rc = tch_decode(); + break; + case GSM_PCHAN_CCCH: + case GSM_PCHAN_SDCCH8_SACCH8C: + rc = cch_decode(); + break; + default: + fprintf(stderr, "unknown pchan config %u\n", + pchan->config); + } + /* pass the resulting MAC block up the stack */ + if (rc) + rc = gsm_lchan_macblock() + } + + return rc; +} + +static int gsm_rx_sdcch8(struct gsm_burst *burst) +{ + struct gsm_phys_chan *pchan = burst->gsm_pchan; + int rc = -EINVAL; + + if (burst_type == GSM_BURST_DUMMY) + return; + + if (burst->type != GSM_BURST_NORMAL) { + fprintf(stderr, "Burst type %u not allowed in SDCCH8\n", + burst->type); + /* FIXME: statistics */ + return rc; + } + + lchan = get_lchan(pchan, burst->fnr); + return add_burst_to_lchan(lchan, burst); +} + +static int gsm_rx_tch_f(struct gsm_burst *burst) +{ + struct gsm_phys_chan *pchan = burst->gsm_pchan; + struct gsm_logi_chan *lchan; + int rc = -EINVAL; + + if (burst->type != GSM_BURST_NORMAL) + return rc; + + lchan = get_lchan(pchan, fnr); + return add_burst_to_lchan(lchan, burst); +} + +/* input a new GSM Um burst on a CCCH */ +static int gsm_rx_ccch(struct gsm_burst *burst) +{ + struct gsm_phys_chan *pchan = burst->gsm_pchan; + struct gsm_logi_chan *lchan; + int rc = -EINVAL; + + switch (burst->type) { + case GSM_BURST_FCCH: + /* FIXME */ + /* obtain the frequency offset and report to caller */ + break; + case GSM_BURST_SCH: + /* obtain the RFN from the SCH burst */ + /* FIXME */ + break; + case GSM_BURST_NORMAL: + /* determine logical channel and append burst */ + lchan = get_lchan(pchan, burst->fnr); + rc = add_burst_to_lchan(lchan, burst); + break; + default: + break; + }; + return rc; +} + +/* input a new GSM Um interface burst into the stack */ +int gsm_rx_burst(struct gsm_burst *burst, int bits) +{ + struct gsm_phys_chan *pchan; + int rc = -EINVAL; + + /* we assume the following fields have already been + * filled-in by the caller: + * phys_chan, rx_time, rx_frame_nr, decoded/decoded_bits */ + + pchan = burst->phys_chan; + + if (!bits) + bit_per_byte(burst->decoded_bits, burst->decoded); + + pchan->stats.rx_total++; + pchan->stats.rx_type[burst->type]++; + + switch (pchan->config) { + case GSM_PCHAN_CCCH: + rc = gsm_rx_ccch(burst); + break; + case GSM_PCHAN_SDCCH8_SACCH8C: + rc = gsm_rx_sdcch8(burst); + break; + case GSM_PCHAN_TCH_F: + rc = gsm_rx_tch_h(burst); + break; + case GSM_PCHAN_TCH_H: + case GSM_PCHAN_UNKNOWN: + default: + fprintf(stderr, "unknown pchan config (ts=%u\n)\n", + pchan->timeslot); + return; + break; + } +} diff --git a/gsmstack/conv.c b/gsmstack/conv.c new file mode 100644 index 0000000..5b7ab65 --- /dev/null +++ b/gsmstack/conv.c @@ -0,0 +1,206 @@ +/* This file was taken from gsm-tvoid */ + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <ctype.h> + +#include <math.h> + +//#include "burst_types.h" +#include "conv.h" +//#include "fire_crc.h" + + +/* + * Convolutional encoding and Viterbi decoding for the GSM CCH+TCH channel. + */ + +/* The class 1 bits are encoded with the 1/2 rate convolutional code defined by + * the polynomials: + * G0 = 1 + D3+ D4 + * G1 = 1 + D + D3+ D4 + * The coded bits {c(0), c(1),..., c(455)} are then defined by: + * class 1: c(2k) = u(k) + u(k-3) + u(k-4) + * c(2k+1) = u(k) + u(k-1) + u(k-3) + u(k-4) for k = 0,1,...,188 + * u(k) = 0 for k < 0 + * class 2:c(378+k) = d(182+k) for k = 0,1,....,77 + */ + + +/* + * Convolutional encoding: + * + * G_0 = 1 + x^3 + x^4 + * G_1 = 1 + x + x^3 + x^4 + * + * i.e., + * + * c_{2k} = u_k + u_{k - 3} + u_{k - 4} + * c_{2k + 1} = u_k + u_{k - 1} + u_{k - 3} + u_{k - 4} + */ +#define K 5 +#define MAX_ERROR(size) (2 * size + 1) + + +/* + * Given the current state and input bit, what are the output bits? + * + * encode[current_state][input_bit] + */ +static const unsigned int encode[1 << (K - 1)][2] = { + {0, 3}, {3, 0}, {3, 0}, {0, 3}, + {0, 3}, {3, 0}, {3, 0}, {0, 3}, + {1, 2}, {2, 1}, {2, 1}, {1, 2}, + {1, 2}, {2, 1}, {2, 1}, {1, 2} +}; + + +/* + * Given the current state and input bit, what is the next state? + * + * next_state[current_state][input_bit] + */ +static const unsigned int next_state[1 << (K - 1)][2] = { + {0, 8}, {0, 8}, {1, 9}, {1, 9}, + {2, 10}, {2, 10}, {3, 11}, {3, 11}, + {4, 12}, {4, 12}, {5, 13}, {5, 13}, + {6, 14}, {6, 14}, {7, 15}, {7, 15} +}; + + +/* + * Given the previous state and the current state, what input bit caused + * the transition? If it is impossible to transition between the two + * states, the value is 2. + * + * prev_next_state[previous_state][current_state] + */ +static const unsigned int prev_next_state[1 << (K - 1)][1 << (K - 1)] = { + { 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2}, + { 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2}, + { 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2}, + { 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2}, + { 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2}, + { 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2}, + { 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2}, + { 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2}, + { 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2}, + { 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2}, + { 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2}, + { 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2}, + { 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2}, + { 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2}, + { 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1}, + { 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1} +}; + + +static inline unsigned int hamming_distance2(unsigned int w) { + + return (w & 1) + !!(w & 2); +} + + +/* +static void conv_encode(unsigned char *data, unsigned char *output, + unsigned int input_size) { + + unsigned int i, state = 0, o; + + // encode data + for(i = 0; i < input_size; i++) { + o = encode[state][data[i]]; + state = next_state[state][data[i]]; + *output++ = !!(o & 2); + *output++ = o & 1; + } +} + */ + + +int +conv_decode(unsigned char *output, unsigned char *data, + unsigned int input_size) { + + int i, t; + unsigned int rdata, state, nstate, b, o, distance, accumulated_error, + min_state, min_error, cur_state; + + unsigned int max_error = MAX_ERROR(input_size); + unsigned int ae[1 << (K - 1)]; + unsigned int nae[1 << (K - 1)]; // next accumulated error + unsigned int state_history[1 << (K - 1)][CONV_MAX_INPUT_SIZE + 1]; + + // initialize accumulated error, assume starting state is 0 + for(i = 0; i < (1 << (K - 1)); i++) + ae[i] = nae[i] = max_error; + ae[0] = 0; + + // build trellis + for(t = 0; t < input_size; t++) { + + // get received data symbol + rdata = (data[2 * t] << 1) | data[2 * t + 1]; + + // for each state + for(state = 0; state < (1 << (K - 1)); state++) { + + // make sure this state is possible + if(ae[state] >= max_error) + continue; + + // find all states we lead to + for(b = 0; b < 2; b++) { + + // get next state given input bit b + nstate = next_state[state][b]; + + // find output for this transition + o = encode[state][b]; + + // calculate distance from received data + distance = hamming_distance2(rdata ^ o); + + // choose surviving path + accumulated_error = ae[state] + distance; + if(accumulated_error < nae[nstate]) { + + // save error for surviving state + nae[nstate] = accumulated_error; + + // update state history + state_history[nstate][t + 1] = state; + } + } + } + + // get accumulated error ready for next time slice + for(i = 0; i < (1 << (K - 1)); i++) { + ae[i] = nae[i]; + nae[i] = max_error; + } + } + + // the final state is the state with the fewest errors + min_state = (unsigned int)-1; + min_error = max_error; + for(i = 0; i < (1 << (K - 1)); i++) { + if(ae[i] < min_error) { + min_state = i; + min_error = ae[i]; + } + } + + // trace the path + cur_state = min_state; + for(t = input_size; t >= 1; t--) { + min_state = cur_state; + cur_state = state_history[cur_state][t]; // get previous + output[t - 1] = prev_next_state[cur_state][min_state]; + } + + // return the number of errors detected (hard-decision) + return min_error; +} diff --git a/gsmstack/conv.h b/gsmstack/conv.h new file mode 100644 index 0000000..4bd96a1 --- /dev/null +++ b/gsmstack/conv.h @@ -0,0 +1,24 @@ +/* This file was taken from gsm-tvoid */ +#ifndef _GSM_CONV_H +#define _GSM_CONV_H + +#define DATA_BLOCK_SIZE 184 +#define PARITY_SIZE 40 +#define FLUSH_BITS_SIZE 4 +#define PARITY_OUTPUT_SIZE (DATA_BLOCK_SIZE + PARITY_SIZE + FLUSH_BITS_SIZE) + +#define CONV_INPUT_SIZE_TCH_F 189 +#define CONV_INPUT_SIZE_CCH PARITY_OUTPUT_SIZE +#define CONV_MAX_INPUT_SIZE PARITY_OUTPUT_SIZE +#define CONV_SIZE (2 * CONV_MAX_INPUT_SIZE) + +#define BLOCKS 4 +#define iBLOCK_SIZE (CONV_SIZE / BLOCKS) +#define eBLOCK_SIZE (iBLOCK_SIZE + 2) + +int conv_decode(unsigned char *output, unsigned char *data, + unsigned int input_size); +int parity_check(unsigned char *data); +int compress_bits(unsigned char *dbuf, int dlen, unsigned char *src, int len); + +#endif /* _GSM_CONV_H */ diff --git a/gsmstack/get_lctype.c b/gsmstack/get_lctype.c new file mode 100644 index 0000000..fcffaa1 --- /dev/null +++ b/gsmstack/get_lctype.c @@ -0,0 +1,109 @@ + +/* helper routines to determine the logical channel type based on + * physical channel configuration and frame number */ + +#include "gsmstack.h" +#include "get_lctype.h" + +#define GSM_FN_51 (fn / 51) + +#define GSM_TC(fn) ((fn / 51) % 8) + + +/* parameters determined from CCCH_CONF (octet 2 of control channel description + * in System Information Type 3: + * BS_CC_CHANS defines if we have CCCH on ts 2/4/6 + * BS_CCCH_SDCCH_COMB defines if we have SDCCH/8 SACCH/C8 on TS0 + * BS_AG_BLKS_RES defines which CCCH blocks are reserved for AGCH + * if BCCH Ext. is used, BS_AS_BLKS_RES has to be non-zero + */ + +static int get_lctype_for_ccch(unsigned int fnr) +{ + unsigned int fnr51 = GSM_FN_51(fnr); + int lc_type; + + if (fnr51 % 10 == 0) + lc_type = GSM_LCHAN_FCCH; + else if (fnr51 % 10 == 1) + lc_type = GSM_LCHAN_SCH; + else if (fnr51 >= 2 && fnr_mod_51 <= 5) + lc_type = GSM_LCHAN_BCCH; + else if (fnr51 >= 6 && fnr51 <= 9) { + if (flags & CCCH_F_BCCH_EXT) + lc_type = GSM_LCHAN_BCCH; + else + lc_ctype = GSM_LCHAN_PCH; + } else + lc_ctype = GSM_LCHAN_PCH; + + /* FIXME: what about AGCH ? */ + /* FIXME: what about NCH ? */ + /* FIXME: what about CBCH ? */ + + return lc_ctype; +} + +static int get_lctype_for_sdcch8(unsigned int fnr) +{ + unsigned int fnr51 = GSM_FN_51(fnr); + unsigned int fnr102 = fnr % 102; + int lc_type; + + /* the lower 32 bursts are evenly divided between SDCCH8 0..7 */ + if (fnr51 % < 32) { + lc_type = GSM_LCHAN_SDCCH8; + subc = fnr51 / 4; + } else { + /* the upper 16 bursts are bundles of four bursts for + * alternating either SACCH0..3 or SACCH4..7 */ + lc_type = GSM_LCHAN_SACCH8C; + subc = (fnr51 - 32) / 4; + if (fnr102 > 50) + subc += 4; + } + + return lc_type; +} + +static int get_lctype_for_tch_f(unsigned int fnr) +{ + unsigned int fnr52 = fnr % 52; + int lc_type = GSM_LCHAN_TCH; + + /* only burst number 12 and 51 are be SACCH */ + if (fnr52 == 12 || fnr52 == 51) + lc_ctype = GSM_LCHAN_SACCH; + /* burst number 26 and 39 are empty (for measurements) */ + else if (fnr52 == 26 || fnr52 == 39) + lc_ctype = GSM_LCHAN_NONE; + + return lc_type; +} + +/* get the logical channel type based on frame number and + * physical channel configuration */ +int get_lctype(struct gsm_phys_chan *pchan, int fnr) +{ + switch (pchan->config) { + case GSM_PCHAN_CCCH: + return get_lctype_for_ccch(fnr); + break; + case GSM_PCHAN_TCH_F: + return get_lctype_for_tch_f(fnr); + break; + case GSM_PCHAN_SDCCH8_SACCH8C: + return get_lctype_for_sdcch8(fnr); + break; + } + + return -EINVAL; +} + +/* get a pointer to the logical channel structure based on frame number + * and physical channel configuration */ +struct gsm_logi_chan *get_lchan(struct gsm_phys_chan *pchan, int fnr) +{ + int lctype = get_lctype(pchan, fnr); + return &pchan->logi_chan[lctype]; +} diff --git a/gsmstack/get_lctype.h b/gsmstack/get_lctype.h new file mode 100644 index 0000000..32164a4 --- /dev/null +++ b/gsmstack/get_lctype.h @@ -0,0 +1,7 @@ +#ifndef _GSM_LCTYPE_H +#define _GSM_LCTYPE_H + +extern int get_lctype(struct gsm_phys_chan *pchan, int fnr); +extern struct gsm_logi_chan *get_lchan(struct gsm_phys_chan *pchan, int fnr); + +#endif /* _GSM_LCTYPE_H */ diff --git a/gsmstack/gsmstack.c b/gsmstack/gsmstack.c new file mode 100644 index 0000000..5e69e93 --- /dev/null +++ b/gsmstack/gsmstack.c @@ -0,0 +1,31 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <malloc.h> +#include <errno.h> + +#include "gsmstack.h" + + +struct gsm_rf_chan *gsm_init_rfchan(unsigned int arfcn) +{ + struct gsm_rf_chan *rf; + int i; + + rf = malloc(sizeof(*rf)); + if (!rf) + return NULL; + memset(rf, 0, sizeof(*rf)); + + rf->arfcn = arfcn; + + for (i = 0; i < NR_TIMESLOTS; i++) { + struct gsm_phys_chan *pchan; + + pchan = &rf->phys_chan[i]; + pchan->timeslot = i; + pchan->rf_chan = rf; + } + + return rf; +} diff --git a/gsmstack/gsmstack.h b/gsmstack/gsmstack.h new file mode 100644 index 0000000..d73a156 --- /dev/null +++ b/gsmstack/gsmstack.h @@ -0,0 +1,135 @@ +#ifndef _GSMSTACK_H +#define _GSMSTACK_H + +#define NR_TIMESLOTS 8 +#define NR_ARFCN 1024 + +#define USEFUL_BITS 142 +#define BURST_BITS (USEFUL_BITS/8 + 1) + +#include "gsmtap.h" +enum gsm_burst_type { + GSM_BURST_UNKNOWN = GSMTAP_BURST_UNKNOWN, + GSM_BURST_FCCH = GSMTAP_BURST_FCCH, + GSM_BURST_PARTIAL_SCH = GSMTAP_BURST_PARTIAL_SCH, + GSM_BURST_SCH = GSMTAP_BURST_SCH, + GSM_BURST_CTS_SCH = GSMTAP_BURST_CTS_SCH, + GSM_BURST_COMPACT_SCH = GSMTAP_BURST_COMPACT_SCH, + GSM_BURST_NORMAL = GSMTAP_BURST_NORMAL, + GSM_BURST_DUMMY = GSMTAP_BURST_DUMMY, + GSM_BURST_ACCESS = GSMTAP_BURST_ACCESS, + GSM_BURST_NONE = GSMTAP_BURST_NONE, + _GSM_BURST_CNT +}; + + +struct gsm_burst { + /* time at which we were received */ + struct timeval rx_time; + + /* the physical channel which we're part of. + * always guaranteed to be != NULL */ + struct gsm_phys_chan *phys_chan; + + /* the logical channel to which we belong. + * only filled-in if we actually know about it */ + struct gsm_logi_chan *logi_chan; + + /* the burst type (as per gsmtap.h) */ + unsigned char burst_type; + + /* the relative receive TDMA frame */ + unsigned int rx_frame_nr; + + /* the timeslot number is part of the phys_chan */ + + /* the burst after differential decode, 8 bit per byte */ + unsigned char decoded[BURST_BITS]; + + /* the burst after differential decode, 1 bit per byte */ + unsigned char decoded_bits[USEFUL_BITS]; +}; + +struct gsm_burst_stats { + unsigned int rx_total; + unsigned int rx_type[_GSM_BURST_CNT]; +}; + +enum gsm_logical_channel_type { + GSM_LCHAN_UNKNOWN, + GSM_LCHAN_NONE, + + /* CBCH */ + GSM_LCHAN_FCCH, /* Frequency Correction CH */ + GSM_LCHAN_SCH, /* Synchronization CH */ + GSM_LCHAN_BCCH, /* Broadcast Control CH */ + GSM_LCHAN_PCH, /* Paging CH */ + GSM_LCHAN_NCH, /* Notification CH */ + GSM_LCHAN_AGCH, /* Access Grant CH */ + GSM_LCHAN_CBCH, /* Cell Broadcast CH */ + + /* SDCCH */ + GSM_LCHAN_SDCCH8, /* Slow Dedicated Control CH */ + GSM_LCHAN_SACCH8C, /* Slow Associated Control CH */ + + /* TCH */ + GSM_LCHAN_TCH_F, /* Traffic CH */ + GSM_LCHAN_TCH_H, /* Traffic CH */ + GSM_LCHAN_SACCH, /* Slow Associated Control CH */ + + /* uplink */ + GSM_LCHAN_RACH, /* Random Access CH */ +}; + +struct gsm_logi_chan { + enum gsm_logical_channel_type type; + /* here we aggregate the bursts for this logical channel + * until we have found enough bursts for one MAC block */ + struct gsm_burst burst_buf[4]; + int next_burst; + + struct gsm_burst_stats stats; +}; + +enum gsm_phys_chan_config { + GSM_PCHAN_UNKNOWN, + GSM_PCHAN_CCCH, + GSM_PCHAN_CCCH_WITH_SDCCH8, + GSM_PCHAN_TCH_F, + GSM_PCHAN_TCH_H, + GSM_PCHAN_SDCCH8_SACCH8C, +}; + +/* maximum logical channels for one physical channel */ +#define NR_LOGI_CHANS 16 + +/* A GSM physical channel configuration */ +struct gsm_phys_chan { + /* in which timeslot is this channel? */ + unsigned int timeslot; + /* to which RF channel do we belong? */ + struct gsm_rf_chan *rf_chan; + /* how is our physical configuration */ + enum gsm_phys_chan_config config; + /* those are our logical channels */ + struct gsm_logi_chan logi_chan[NR_LOGI_CHANS]; + int nr_logi_chans; + + struct gsm_burst_stats stats; +}; + +struct gsm_rf_chan { + /* ARFCN (frequency) of the RF channel */ + unsigned int arfcn; + + /* current RFN as determined by SCH + frame count */ + unsigned int rfn; + + /* the physical channel for each timeslot */ + struct gsm_phys_chan phys_chan[NR_TIMESLOTS]; +}; + + +extern struct gsm_rf_chan *gsm_init_rfchan(unsigned int arfcn); + +#endif /* _GSMSTACK_H */ diff --git a/gsmstack/gsmstack_chan.h b/gsmstack/gsmstack_chan.h new file mode 100644 index 0000000..a54fae0 --- /dev/null +++ b/gsmstack/gsmstack_chan.h @@ -0,0 +1,12 @@ +#ifndef _GSMSTACK_CHAN_H +#define _GSMSTACK_CHAN_H + +/* 51 multiframe for CCCH TS0 of a FCCH+SCH+BCCH+PACH */ +const char ccch[] = + "FSBBBBPPPPFSPPPPPPPPFSPPPPPPPPFSPPPPPPPPFSPPPPPPPP_"; + +/* SDCCH/8 + SACCH/C8; A...D are alternating 0..3/4..7 */ +const char sdcch8[] = + "00001111222233334444555566667777AAAABBBBCCCCDDDD___"; + +#endif /* _GSMSTACK_CHAN_H */ diff --git a/gsmstack/gsmtap.h b/gsmstack/gsmtap.h new file mode 100644 index 0000000..316e73d --- /dev/null +++ b/gsmstack/gsmtap.h @@ -0,0 +1,60 @@ +#ifndef _GSMTAP_H +#define _GSMTAP_H + +/* gsmtap header, pseudo-header in front of the actua GSM payload*/ + +#include <sys/types.h> + +#define GSMTAP_VERSION 0x01 + +#define GSMTAP_TYPE_UM 0x01 +#define GSMTAP_TYPE_ABIS 0x02 +#define GSMTAP_TYPE_UM_BURST 0x03 /* raw burst bits */ + +#define GSMTAP_BURST_UNKNOWN 0x00 +#define GSMTAP_BURST_FCCH 0x01 +#define GSMTAP_BURST_PARTIAL_SCH 0x02 +#define GSMTAP_BURST_SCH 0x03 +#define GSMTAP_BURST_CTS_SCH 0x04 +#define GSMTAP_BURST_COMPACT_SCH 0x05 +#define GSMTAP_BURST_NORMAL 0x06 +#define GSMTAP_BURST_DUMMY 0x07 +#define GSMTAP_BURST_ACCESS 0x08 +#define GSMTAP_BURST_NONE 0x09 + +struct gsmtap_hdr { + u_int8_t version; /* version, set to 0x01 currently */ + u_int8_t hdr_len; /* length in number of 32bit words */ + u_int8_t type; /* see GSMTAP_TYPE_* */ + u_int8_t timeslot; /* timeslot (0..7 on Um) */ + + u_int16_t arfcn; /* ARFCN (frequency) */ + u_int8_t noise_db; /* noise figure in dB */ + u_int8_t signal_db; /* signal level in dB */ + + u_int32_t frame_number; /* GSM Frame Number (FN) */ + + u_int8_t burst_type; /* Type of burst, see above */ + u_int8_t antenna_nr; /* Antenna Number */ + u_int16_t res; /* reserved for future use (RFU) */ + +} __attribute__((packed)); + + +/* PCAP related definitions */ +#define TCPDUMP_MAGIC 0xa1b2c3d4 +#ifndef LINKTYPE_GSMTAP +#define LINKTYPE_GSMTAP 2342 +#endif +struct pcap_timeval { + int32_t tv_sec; + int32_t tv_usec; +}; + +struct pcap_sf_pkthdr { + struct pcap_timeval ts; /* time stamp */ + u_int32_t caplen; /* lenght of portion present */ + u_int32_t len; /* length of this packet */ +}; + +#endif /* _GSMTAP_H */ diff --git a/gsmstack/interleave.c b/gsmstack/interleave.c new file mode 100644 index 0000000..7899274 --- /dev/null +++ b/gsmstack/interleave.c @@ -0,0 +1,48 @@ +/* This file was taken from gsm-tvoid */ + +#include <stdlib.h> +#include <stdio.h> +#include "interleave.h" + +int +interleave_init(INTERLEAVE_CTX *ictx, int size, int block_size) +{ + ictx->trans_size = size; + ictx->trans = (unsigned short *)malloc(size * sizeof *ictx->trans); + +// DEBUGF("size: %d\n", size); +// DEBUGF("Block size: %d\n", block_size); + int j, k, B; + for (k = 0; k < size; k++) + { + B = k % 4; + j = 2 * ((49 * k) % 57) + ((k % 8) / 4); + ictx->trans[k] = B * block_size + j; + /* Mapping: pos1 goes to pos2: pos1 -> pos2 */ +// DEBUGF("%d -> %d\n", ictx->trans[k], k); + } +// exit(0); + return 0; +} + +int +interleave_deinit(INTERLEAVE_CTX *ictx) +{ + if (ictx->trans != NULL) + { + free(ictx->trans); + ictx->trans = NULL; + } + + return 0; +} + +void +interleave_decode(INTERLEAVE_CTX *ictx, unsigned char *dst, unsigned char *src) +{ + + int k; + for (k = 0; k < ictx->trans_size; k++) + dst[k] = src[ictx->trans[k]]; +} + diff --git a/gsmstack/interleave.h b/gsmstack/interleave.h new file mode 100644 index 0000000..cfd4888 --- /dev/null +++ b/gsmstack/interleave.h @@ -0,0 +1,19 @@ +/* This file was taken from gsm-tvoid */ +/* + * $Id:$ + */ + +#ifndef __GSMSP_INTERLEAVE_H__ +#define __GSMSP_INTERLEAVE_H__ 1 + +typedef struct _interleave_ctx +{ + unsigned short *trans; + int trans_size; +} INTERLEAVE_CTX; + +int interleave_init(INTERLEAVE_CTX *ictx, int size, int block_size); +int interleave_deinit(INTERLEAVE_CTX *ictx); +void interleave_decode(INTERLEAVE_CTX *ictx, unsigned char *dst, unsigned char *src); + +#endif diff --git a/gsmstack/source_pcap_burst.c b/gsmstack/source_pcap_burst.c new file mode 100644 index 0000000..0956c19 --- /dev/null +++ b/gsmstack/source_pcap_burst.c @@ -0,0 +1,151 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <errno.h> +#include <fcntl.h> + +#include <pcap.h> + +#include "gsmstack.h" +#include "gsmtap.h" + +/* source_pcap_burst.c: read a PCAP file with GSMTAP_UM_BURST packets + * and feed them into the stack. + * + * (C) 2008 by Harald Welte <laforge@gnumonks.org> + * + * TODO: + * fix PCAP endianness + */ + + +static struct gsm_rf_chan *rfchans[NR_ARFCN]; + +static int read_pcap_hdr(int fd) +{ + int rc; + struct pcap_file_header pfh; + + rc = read(fd, &pfh, sizeof(pfh)); + if (rc < sizeof(pfh)) + return -EIO; + + if (pfh.magic != TCPDUMP_MAGIC) + return -EINVAL; + + if (pfh.linktype != LINKTYPE_GSMTAP) + return -EINVAL; + + return 0; +} + +static int send_burst(struct gsmtap_hdr *gh, int burst_len, + struct timeval *tv) +{ + unsigned char *data = (unsigned char *)gh + sizeof(*gh); + struct gsm_burst burst; + struct gsm_rf_chan *rfchan; + struct gsm_phys_chan *pchan; + unsigned int arfcn; + + arfcn = ntohs(gh->arfcn); + + /* Create new RF channel structure if we've not seen this ARFCN + * before */ + if (!rfchans[arfcn]) { + rfchans[arfcn] = gsm_init_rfchan(arfcn); + if (!rfchans[arfcn]) { + fprintf(stderr, "cannot init rfchan ARFCN=%u\n", + arfcn); + return -EINVAL; + } + } + + rfchan = rfchans[arfcn]; + pchan = &rfchan->phys_chan[gh->timeslot]; + + memset(&burst, 0, sizeof(burst)); + burst.phys_chan = pchan; + burst.burst_type = gh->burst_type; + burst.rx_frame_nr = ntohl(gh->frame_number); + memcpy(&burst.rx_time, tv, sizeof(burst.rx_time)); + memcpy(burst.decoded, data, burst_len); + + return gsm_rx_burst(&burst, 0); +} + +/* fills 'buf' with gsmtap_hdr and payload, returns length of payload */ +static int read_one_pkt(int fd, unsigned char *buf, int bufsize, + struct timeval *tv) +{ + struct pcap_sf_pkthdr pkthdr; + struct gsmtap_hdr *gh = (struct gsmtap_hdr *) buf; + int len, burstlen; + + len = read(fd, &pkthdr, sizeof(pkthdr)); + if (len < sizeof(pkthdr)) + return -1; + + /* FIXME: ntohl on caplen and len? */ + + if (pkthdr.caplen < sizeof(*gh)) + return -2; + + if (pkthdr.len > pkthdr.caplen) + return -3; + + if (bufsize < pkthdr.len) + return -4; + + if (tv) { + tv->tv_sec = pkthdr.ts.tv_sec; + tv->tv_usec = pkthdr.ts.tv_usec; + } + + len = read(fd, buf, pkthdr.caplen); + if (len < pkthdr.caplen) + return -5; + + if (gh->version != GSMTAP_VERSION || + gh->type != GSMTAP_TYPE_UM_BURST) + return -6; + + return pkthdr.caplen - sizeof(*gh); +} + +int main(int argc, char **argv) +{ + char *fname; + int fd, rc; + + if (argc != 2) { + fprintf(stderr, "please specify pcap filename\n"); + exit(2); + } + + fname = argv[1]; + + fd = open(fname, O_RDONLY); + if (fd < 0) { + perror("open"); + exit(1); + } + + rc = read_pcap_hdr(fd); + if (rc < 0) { + perror("pcap_hdr"); + exit(1); + } + + while (1) { + unsigned char buf[1024]; + struct timeval tv; + int burst_len; + burst_len = read_one_pkt(fd, buf, sizeof(buf), &tv); + if (burst_len < 0) { + fprintf(stderr, "read_one_pkt() = %d\n", burst_len); + exit(3); + } + rc = send_burst((struct gsmtap_hdr *)buf, burst_len, &tv); + } +} diff --git a/gsmstack/tch.c b/gsmstack/tch.c new file mode 100644 index 0000000..068d1cd --- /dev/null +++ b/gsmstack/tch.c @@ -0,0 +1,145 @@ + +/* GSM TCH/F channel coding + * + * (C) 2008 by Harald Welte <laforge@gnumonks.org> + */ + +#include "system.h" + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <ctype.h> +#include <math.h> + +//#include "burst_types.h" +#include "tch.h" +//#include "fire_crc.h" + +/* + * GSM TCH/F -- Traffic Channel (Full Rate) + * + * Input: 260 bits (182 class-1, 78 class-2 bits) + * + * 1. Rearrange according to Table 2 (TS 05.03) + * 2. Add 3 parity bits for first 50 class-1 bits (d0...49) + * 3. Add four tailing bits to class-1. (Output 182 + 3 + 4 = 189 bit) + * 4. Convolutional encode of class-1 (Output = 189 * 2 = 378 bit) + * 5. Append class-2 bits (Output = 378 + 78 = 456bit) + * 3. Interleave. (Output 456 bit) + * 4. Map on bursts. (4 x 156 bit bursts with each 2x57 bit content data) + */ + + +#if 0 +/* + * Parity (FIRE) for the GSM SACCH channel. + * + * g(x) = (x^23 + 1)(x^17 + x^3 + 1) + * = x^40 + x^26 + x^23 + x^17 + x^3 + 1 + */ + +static const unsigned char parity_polynomial[PARITY_SIZE + 1] = { + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, + 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, + 1 +}; + +// remainder after dividing data polynomial by g(x) +static const unsigned char parity_remainder[PARITY_SIZE] = { + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1 +}; + + +/* +static void parity_encode(unsigned char *d, unsigned char *p) { + + int i; + unsigned char buf[DATA_BLOCK_SIZE + PARITY_SIZE], *q; + + memcpy(buf, d, DATA_BLOCK_SIZE); + memset(buf + DATA_BLOCK_SIZE, 0, PARITY_SIZE); + + for(q = buf; q < buf + DATA_BLOCK_SIZE; q++) + if(*q) + for(i = 0; i < PARITY_SIZE + 1; i++) + q[i] ^= parity_polynomial[i]; + for(i = 0; i < PARITY_SIZE; i++) + p[i] = !buf[DATA_BLOCK_SIZE + i]; +} + */ + + +static int parity_check(unsigned char *d) { + + unsigned int i; + unsigned char buf[DATA_BLOCK_SIZE + PARITY_SIZE], *q; + + memcpy(buf, d, DATA_BLOCK_SIZE + PARITY_SIZE); + + for(q = buf; q < buf + DATA_BLOCK_SIZE; q++) + if(*q) + for(i = 0; i < PARITY_SIZE + 1; i++) + q[i] ^= parity_polynomial[i]; + return memcmp(buf + DATA_BLOCK_SIZE, parity_remainder, PARITY_SIZE); +} +#endif + +static unsigned char *decode_tch_f(GS_CTX *ctx, unsigned char *burst, + unsigned int *datalen) +{ + int errors, len, data_size; + unsigned char conv_data[CONV_SIZE], iBLOCK[BLOCKS][iBLOCK_SIZE], + hl, hn, decoded_data[PARITY_OUTPUT_SIZE]; + //FC_CTX fc_ctx; + + data_size = sizeof ctx->msg; + if (datalen) + *datalen = 0; + + // unmap the bursts + decode_burstmap(iBLOCK[0], burst, &hl, &hn); // XXX ignore stealing bits + decode_burstmap(iBLOCK[1], burst + 116, &hl, &hn); + decode_burstmap(iBLOCK[2], burst + 116 * 2, &hl, &hn); + decode_burstmap(iBLOCK[3], burst + 116 * 3, &hl, &hn); + + // remove interleave + interleave_decode(&ctx->interleave_ctx, conv_data, (unsigned char *)iBLOCK); + //decode_interleave(conv_data, (unsigned char *)iBLOCK); + + // Viterbi decode of class-1 bits + errors = conv_decode(decoded_data, conv_data, CONV_INPUT_SIZE_TCH_F); + if (errors) { + DEBUGF("conv_decode: %d\n", errors); + return NULL; + } + // reordering + remove four tailing bits (185..188) + for (i = 0; i <= 90; i++) { + ctx->msg[2*i] = decoded_data[i]; + ctx->msg[2*i+1] = decoded_data[184-i]; + } + len = 182; + // check 3 bit parity (91,92,93) of class-1 bits + /* FIXME */ + // append class-2 bits + memcpy(ctx->msg+185, conv_data+(2*CONV_INPUT_SIZE_TCH_F), 78); + len += 78; /* should be 260 bits now */ + + if (len < data_size) { + fprintf(stderr, "error: buf too small (%d < %d)\n", + sizeof(ctx->msg), len); + return NULL; + } + + if (datalen) + *datalen = (unsigned int)len; + return ctx->msg; +} diff --git a/gsmstack/tch.h b/gsmstack/tch.h new file mode 100644 index 0000000..c27d633 --- /dev/null +++ b/gsmstack/tch.h @@ -0,0 +1,16 @@ +#ifndef __GSMSTACK_TCH_H__ +#define __GSMSTACK_TCH_H__ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#include "gsmstack.h" + +unsigned char *decode_tch(GS_CTX *ctx, unsigned char *burst, unsigned int *len); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/gssm/AUTHORS b/gssm/AUTHORS new file mode 100644 index 0000000..5d2553d --- /dev/null +++ b/gssm/AUTHORS @@ -0,0 +1,4 @@ +Josh Lackey <jl@thre.at> + +The functions mm_demod() and quad_demod() are dervied from the corresponding +functions in the GNU Radio project. diff --git a/gssm/ChangeLog b/gssm/ChangeLog new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/gssm/ChangeLog diff --git a/gssm/LICENSE b/gssm/LICENSE new file mode 100644 index 0000000..db9d807 --- /dev/null +++ b/gssm/LICENSE @@ -0,0 +1,34 @@ +Copyright (c) 2007, Joshua Lackey (jl@thre.at) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Threat Security nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-- + +The functions mm_demod() and quad_demod() in gssm_sink.cc are derived from the +corresponding functions in the GNU Radio project. + diff --git a/gssm/Makefile.am b/gssm/Makefile.am new file mode 100644 index 0000000..90b432f --- /dev/null +++ b/gssm/Makefile.am @@ -0,0 +1,3 @@ +include $(top_srcdir)/Makefile.common + +SUBDIRS = src diff --git a/gssm/Makefile.common b/gssm/Makefile.common new file mode 100644 index 0000000..ec4ab08 --- /dev/null +++ b/gssm/Makefile.common @@ -0,0 +1,2 @@ +grincludedir = $(includedir)/gnuradio +swigincludedir = $(grincludedir)/swig diff --git a/gssm/NEWS b/gssm/NEWS new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/gssm/NEWS diff --git a/gssm/README b/gssm/README new file mode 100644 index 0000000..370a0a1 --- /dev/null +++ b/gssm/README @@ -0,0 +1,247 @@ +gssm -- Groupe Special (Software) Mobile + + or + +gssm -- The Global Software System for Mobile communications + +--- + +SUMMARY + +This package monitors GSM base station control channels. It uses the USRP +and various daughterboards to capture live data, GNU Radio and custom +modules to demodulate and decode the GSM packets, and Wireshark to display +the data. + +Get it here: http://thre.at/gsm. + +Talk about it here: gsm-subscribe@lists.segfault.net. + +More here: http://wiki.thc.org/gsm. + +--- + +WHAT + +This package monitors GSM base station control channels. It uses the USRP +and various daughterboards to capture live data, GNU Radio and custom +modules to demodulate and decode the GSM packets, and Wireshark to display +the data. + +This version of gssm decodes most of the control channels. The control +channels contain the information necessary for a mobile to communicate with +a base station. The control channels which gssm currently decodes are: + + FCCH The frequency correction channel. + SCH The synchronization channel. + BCCH The broadcast control channel. + PCH The paging channel. Downlink only, used to page mobiles. + AGCH The access grant channel. Downlink only, used to allocate + an SDCCH or directly a TCH. + SACCH Slow associated control channel. + SDCCH Stand-alone dedicated control channel. + +gssm displays the decoded data using Wireshark. Not only does this give us a +very nice graphical front end to examine the dissected packets, but Wireshark +already has quite a bit of code to dissect GSM data. Unfortunately, the +current implementation of Wireshark does not dissect packets unique to the +wireless interface. Up to now, there was no reason to include code to dissect +these packets. I include a patch for wireshark-0.99.5 which adds (partial) Um +packet dissection capability and a new custom ethertype to interface with the +USRP. + +While gssm has basic functionality now, it really is alpha-quality software +and there are a number of enhancements which must be made before it becomes +truly useful. + + 1. The Mueller and Muller clock recovery method doesn't always + handle the quarter-bits present in a GSM burst. A more reliable + method must be implemented. Until then, this software will suffer + from a large number of receive errors even with a high + signal-to-noise ratio. + + 2. Wireshark dissects most GSM packets except those specific to + the Um interface, the wireless interface between the mobile and + the BTS, the Base Transciever Station. + + a. I've only implemented a small portion of the Um + interface. Much more work must be done to complete this. + + b. Only the Bbis frame type is implemented. When packets + arrive in Wireshark which are "malformed" or with strange + protocol descriptors, it is because they were sent using + some other frame type. + + c. The interface between gssm and Wireshark is extremely + hacky, to say the least. It would be nice to eventually + standardize a GNU Radio interface for Wireshark. I also want + to clean up my Um interface and submit that there as well. + + 3. You need to find your local GSM tower by hand. Once you've + found it, you need to edit the python script and enter the + information by hand. It would be very nice if this information was + automatically generated. + + 4. The code is designed to support all frequency bands but I + haven't implemented anything but U.S. support. + + 5. This code is receive-only and currently can only monitor tower + to mobile transmissions. + + 6. Lots more. + +--- + +WHERE + +This code is being adopted by the GSM Scanner Project and will be used as +the base for further improvements. Questions and suggestions can certainly +be sent to me, but they also should be directed to the mailing list -- +gsm-subscribe@lists.segfault.net. Also, check out the wiki at +http://wiki.thc.org/gsm. + +The current version of the code can be found here: http://thre.at/gsm. +Updates and bug-fixes will be found at the GSM Scanner Project, +http://wiki.thc.org/gsm. + +--- + +HOW + +First, you must install the gssm package. + +1. First install GNU Radio. Any relatively recent GNU Radio build + should work. I've been testing on revision 5220. + +2. Now build gssm. It should be as simple to install as: + + jl@hackphoo ~ $ cd ~/src/gssm + jl@hackphoo ~/src/gssm $ ./bootstrap && ./configure && make && sudo make install + [...] + jl@hackphoo ~/src/gssm $ + +3. Get the latest version of Wireshark and apply the patch in the + patch directory and then build Wireshark as usual. Note that the + current version of this patch is for wireshark-0.99.5 and may not + apply cleanly to newer versions. + + jl@hackphoo ~ $ cd ~/src/wireshark-0.99.5 + jl@hackphoo ~/src/wireshark-0.99.5 $ patch -p1 < ~/src/gssm/patch/wireshark-0.99.5-gssm.patch + patching file epan/dissectors/packet-gsm_a.c + jl@hackphoo ~/src/wireshark-0.99.5 $ ./configure && make && sudo make install + [...] + jl@hackphoo ~/src/wireshark-0.99.5 $ + +4. gssm uses a TUN interface to send packets to Wireshark. You must + have the tun.ko kernel module loaded. + + jl@hackphoo:~$ lsmod | grep tun + tun 12032 0 + jl@hackphoo:~$ + + If the tun.ko kernel module is not loaded, you can try and load it + by hand. + + jl@hackphoo:~$ lsmod | grep tun + jl@hackphoo:~$ sudo modprobe tun + jl@hackphoo:~$ lsmod | grep tun + tun 12032 0 + jl@hackphoo:~$ + + If that doesn't work and you get a "FATAL: Module tun not found", + you are most likely going to have to rebuild your kernel and make + sure that you enable support for the TUN device. + + It appears that Ubuntu 7.04 supports the TUN device by default. + +5. It is possible to configure the TUN device so that any user, or + users in a certain group, can create and delete interfaces. + Unfortunately, it appears that no matter who creates the + interfaces only root can mark these interfaces up. + + Rather than require gssm to run as root, we instead use another + simpler program to create the interface and mark it up. This + program, mktun, was installed with gssm. + + jl@hackphoo:~$ /usr/local/bin/mktun --help + note: you must be root (except perhaps to delete the interface) + usage: mktun [--help | -h] | [--delete | -d] <interface_name> + jl@hackphoo:~$ sudo /usr/local/bin/mktun gsm + jl@hackphoo:~$ ifconfig + [...] + + gsm Link encap:Ethernet HWaddr 22:07:3F:7F:6A:EC + inet6 addr: fe80::2007:3fff:fe7f:6aec/64 Scope:Link + UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 + RX packets:33324 errors:0 dropped:0 overruns:0 frame:0 + TX packets:0 errors:0 dropped:6 overruns:0 carrier:0 + collisions:0 txqueuelen:500 + RX bytes:1199664 (1.1 MiB) TX bytes:0 (0.0 b) + + [...] + jl@hackphoo:~$ + + You can always delete the interface when you want to get rid of it. + + jl@hackphoo:~$ sudo /usr/local/bin/mktun -d gsm + jl@hackphoo:~$ ifconfig | grep gsm + jl@hackphoo:~$ + +Now, demod some traffic. + +1. Since this program doesn't scan the GSM frequency ranges for you, you + must locate your closest tower by hand. There are instructions on how + to do this at http://wiki.thc.org/gsm. + + Essentially, use usrp_fft.py in the GSM frequency ranges + (http://en.wikipedia.org/wiki/GSM_frequency_ranges) and look for a peak + roughly 300kHz wide. The main channel on a base station, channel 0, + does not use frequency hopping so the peak of the signal you are + looking for should be constant. + + The M&M clock recovery occasionally fails to synchronize with bursts + and so you need a fairly strong signal to get good results with the + current code. Look for signals that are at least 20dB above the noise + floor. (!) + +2. The USRP daughterboards have a frequency offset error which differs + from board to board. Normally this error ranges from 4kHz to 32kHz. + The current code will demodulate data with offsets up to 32kHz but will + perform much better if you compensate for the offset. + + The GSM Scanner Project has a matlab script which will locate your + offset. This doesn't help if you don't own matlab. Currently, the + easiest alternative method is as follows. + + a. Use usrp_fft.py and set the decimation rate to 112. When + the frequency correction burst is transmitted it forms a peak + in the signal 62.5kHz above the center of the channel. + + b. Locate the 62.5kHz peak and eyeball the offset. You should + be able to estimate the offset within 10kHz or so. + +3. Enter in the frequency and the offset above into the script + gssm-v0.1/src/python/gssm_usrp.py. + +4. Start Wireshark and monitor the gsm interface. + +5. Start the gssm_usrp.py script. + + You should see a bunch of errors start flying by. This is expected + even when we aren't receiving bad data because of the fairly brain-dead + way the code determines if channels have data. Any data displayed in + Wireshark has been successfully Viterbi decoded and has survived a FIRE + parity check and is therefore, with extremely high-probability, valid. + So, don't worry about all the errors. There aren't really that many + and it doesn't affect the valid data anyway. + + If it is displayed incorrectly in Wireshark it is because I haven't + implemented frame types besides Bbis. + + You can expand most of the packets you see and you can use the + Wireshark filter functionality on quite a few of the GSM information + elements. + +6. Notice obvious errors. Write code to fix the errors. Send us patches. + + diff --git a/gssm/TODO b/gssm/TODO new file mode 100644 index 0000000..c3ca5b4 --- /dev/null +++ b/gssm/TODO @@ -0,0 +1 @@ +Lots. diff --git a/gssm/bootstrap b/gssm/bootstrap new file mode 100755 index 0000000..a725425 --- /dev/null +++ b/gssm/bootstrap @@ -0,0 +1,7 @@ +rm -rf config.cache autom4te*.cache + +aclocal -I config +autoconf +autoheader +libtoolize --automake +automake --add-missing diff --git a/gssm/config/Makefile.am b/gssm/config/Makefile.am new file mode 100644 index 0000000..ad85978 --- /dev/null +++ b/gssm/config/Makefile.am @@ -0,0 +1,61 @@ +# +# Copyright 2001 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# + +include $(top_srcdir)/Makefile.common + +# Install m4 macros in this directory +m4datadir = $(datadir)/aclocal + +# List your m4 macros here +m4macros = \ + acx_pthread.m4 \ + bnv_have_qt.m4 \ + cppunit.m4 \ + gr_as.m4 \ + gr_boost.m4 \ + gr_check_usrp.m4 \ + gr_check_mc4020.m4 \ + gr_check_shm_open.m4 \ + gr_doxygen.m4 \ + gr_gprof.m4 \ + gr_omnithread.m4 \ + gr_pwin32.m4 \ + gr_python.m4 \ + gr_scripting.m4 \ + gr_set_md_cpu.m4 \ + gr_swig.m4 \ + gr_sysv_shm.m4 \ + lf_cc.m4 \ + lf_cxx.m4 \ + lf_warnings.m4 \ + lf_x11.m4 \ + mkstemp.m4 \ + onceonly.m4 \ + pkg.m4 \ + usrp_fusb_tech.m4 \ + usrp_libusb.m4 \ + usrp_sdcc.m4 + + +# Don't install m4 macros anymore +# m4data_DATA = $(m4macros) + +EXTRA_DIST = $(m4macros) diff --git a/gssm/config/acx_pthread.m4 b/gssm/config/acx_pthread.m4 new file mode 100644 index 0000000..d318ab0 --- /dev/null +++ b/gssm/config/acx_pthread.m4 @@ -0,0 +1,190 @@ +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/htmldoc/acx_pthread.html +dnl +AC_DEFUN([ACX_PTHREAD], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_LANG_SAVE +AC_LANG_C +acx_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) + AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) + AC_MSG_RESULT($acx_pthread_ok) + if test x"$acx_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all. + +acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# pthread: Linux, etcetera +# --thread-safe: KAI C++ + +case "${host_cpu}-${host_os}" in + *solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthread or + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" + ;; +esac + +if test x"$acx_pthread_ok" = xno; then +for flag in $acx_pthread_flags; do + + case $flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $flag]) + PTHREAD_CFLAGS="$flag" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$flag]) + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + AC_TRY_LINK([#include <pthread.h>], + [pthread_t th; pthread_join(th, 0); + pthread_attr_init(0); pthread_cleanup_push(0, 0); + pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], + [acx_pthread_ok=yes]) + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + AC_MSG_RESULT($acx_pthread_ok) + if test "x$acx_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$acx_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: threads are created detached by default + # and the JOINABLE attribute has a nonstandard name (UNDETACHED). + AC_MSG_CHECKING([for joinable pthread attribute]) + AC_TRY_LINK([#include <pthread.h>], + [int attr=PTHREAD_CREATE_JOINABLE;], + ok=PTHREAD_CREATE_JOINABLE, ok=unknown) + if test x"$ok" = xunknown; then + AC_TRY_LINK([#include <pthread.h>], + [int attr=PTHREAD_CREATE_UNDETACHED;], + ok=PTHREAD_CREATE_UNDETACHED, ok=unknown) + fi + if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then + AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok, + [Define to the necessary symbol if this constant + uses a non-standard name on your system.]) + fi + AC_MSG_RESULT(${ok}) + if test x"$ok" = xunknown; then + AC_MSG_WARN([we do not know how to create joinable pthreads]) + fi + + AC_MSG_CHECKING([if more special flags are required for pthreads]) + flag=no + case "${host_cpu}-${host_os}" in + *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; + *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; + esac + AC_MSG_RESULT(${flag}) + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + # More AIX lossage: must compile with cc_r + AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC}) +else + PTHREAD_CC="$CC" +fi + +AC_SUBST(PTHREAD_LIBS) +AC_SUBST(PTHREAD_CFLAGS) +AC_SUBST(PTHREAD_CC) + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$acx_pthread_ok" = xyes; then + ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) + : +else + acx_pthread_ok=no + $2 +fi +AC_LANG_RESTORE +])dnl ACX_PTHREAD diff --git a/gssm/config/bnv_have_qt.m4 b/gssm/config/bnv_have_qt.m4 new file mode 100644 index 0000000..1469bfb --- /dev/null +++ b/gssm/config/bnv_have_qt.m4 @@ -0,0 +1,404 @@ +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/htmldoc/bnv_have_qt.html +dnl +AC_DEFUN([BNV_HAVE_QT], +[ + dnl THANKS! This code includes bug fixes by: + dnl Tim McClarren. + + AC_REQUIRE([AC_PROG_CXX]) + AC_REQUIRE([AC_PATH_X]) + AC_REQUIRE([AC_PATH_XTRA]) + + AC_MSG_CHECKING(for Qt) + + AC_ARG_WITH([Qt-dir], + [ --with-Qt-dir=DIR DIR is equal to \$QTDIR if you have followed the + installation instructions of Trolltech. Header + files are in DIR/include, binary utilities are + in DIR/bin and the library is in DIR/lib]) + AC_ARG_WITH([Qt-include-dir], + [ --with-Qt-include-dir=DIR + Qt header files are in DIR]) + AC_ARG_WITH([Qt-bin-dir], + [ --with-Qt-bin-dir=DIR Qt utilities such as moc and uic are in DIR]) + AC_ARG_WITH([Qt-lib-dir], + [ --with-Qt-lib-dir=DIR The Qt library is in DIR]) + AC_ARG_WITH([Qt-lib], + [ --with-Qt-lib=LIB Use -lLIB to link with the Qt library]) + if test x"$with_Qt_dir" = x"no" || + test x"$with_Qt_include-dir" = x"no" || + test x"$with_Qt_bin_dir" = x"no" || + test x"$with_Qt_lib_dir" = x"no" || + test x"$with_Qt_lib" = x"no"; then + # user disabled Qt. Leave cache alone. + have_qt="User disabled Qt." + else + # "yes" is a bogus option + if test x"$with_Qt_dir" = xyes; then + with_Qt_dir= + fi + if test x"$with_Qt_include_dir" = xyes; then + with_Qt_include_dir= + fi + if test x"$with_Qt_bin_dir" = xyes; then + with_Qt_bin_dir= + fi + if test x"$with_Qt_lib_dir" = xyes; then + with_Qt_lib_dir= + fi + if test x"$with_Qt_lib" = xyes; then + with_Qt_lib= + fi + # No Qt unless we discover otherwise + have_qt=no + # Check whether we are requested to link with a specific version + if test x"$with_Qt_lib" != x; then + bnv_qt_lib="$with_Qt_lib" + fi + # Check whether we were supplied with an answer already + if test x"$with_Qt_dir" != x; then + have_qt=yes + bnv_qt_dir="$with_Qt_dir" + bnv_qt_include_dir="$with_Qt_dir/include" + bnv_qt_bin_dir="$with_Qt_dir/bin" + bnv_qt_lib_dir="$with_Qt_dir/lib" + # Only search for the lib if the user did not define one already + if test x"$bnv_qt_lib" = x; then + bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p | + sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`" + fi + bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + else + # Use cached value or do search, starting with suggestions from + # the command line + AC_CACHE_VAL(bnv_cv_have_qt, + [ + # We are not given a solution and there is no cached value. + bnv_qt_dir=NO + bnv_qt_include_dir=NO + bnv_qt_lib_dir=NO + if test x"$bnv_qt_lib" = x; then + bnv_qt_lib=NO + fi + BNV_PATH_QT_DIRECT + if test "$bnv_qt_dir" = NO || + test "$bnv_qt_include_dir" = NO || + test "$bnv_qt_lib_dir" = NO || + test "$bnv_qt_lib" = NO; then + # Problem with finding complete Qt. Cache the known absence of Qt. + bnv_cv_have_qt="have_qt=no" + else + # Record where we found Qt for the cache. + bnv_cv_have_qt="have_qt=yes \ + bnv_qt_dir=$bnv_qt_dir \ + bnv_qt_include_dir=$bnv_qt_include_dir \ + bnv_qt_bin_dir=$bnv_qt_bin_dir \ + bnv_qt_LIBS=\"$bnv_qt_LIBS\"" + fi + ])dnl + eval "$bnv_cv_have_qt" + fi # all $bnv_qt_* are set + fi # $have_qt reflects the system status + if test x"$have_qt" = xyes; then + QT_CXXFLAGS="-I$bnv_qt_include_dir" + QT_DIR="$bnv_qt_dir" + QT_LIBS="$bnv_qt_LIBS" + # If bnv_qt_dir is defined, utilities are expected to be in the + # bin subdirectory + if test x"$bnv_qt_dir" != x; then + if test -x "$bnv_qt_dir/bin/uic"; then + QT_UIC="$bnv_qt_dir/bin/uic" + else + # Old versions of Qt don't have uic + QT_UIC= + fi + QT_MOC="$bnv_qt_dir/bin/moc" + else + # Or maybe we are told where to look for the utilities + if test x"$bnv_qt_bin_dir" != x; then + if test -x "$bnv_qt_bin_dir/uic"; then + QT_UIC="$bnv_qt_bin_dir/uic" + else + # Old versions of Qt don't have uic + QT_UIC= + fi + QT_MOC="$bnv_qt_bin_dir/moc" + else + # Last possibility is that they are in $PATH + QT_UIC="`which uic`" + QT_MOC="`which moc`" + fi + fi + # All variables are defined, report the result + AC_MSG_RESULT([$have_qt: + QT_CXXFLAGS=$QT_CXXFLAGS + QT_DIR=$QT_DIR + QT_LIBS=$QT_LIBS + QT_UIC=$QT_UIC + QT_MOC=$QT_MOC]) + else + # Qt was not found + QT_CXXFLAGS= + QT_DIR= + QT_LIBS= + QT_UIC= + QT_MOC= + AC_MSG_RESULT($have_qt) + fi + AC_SUBST(QT_CXXFLAGS) + AC_SUBST(QT_DIR) + AC_SUBST(QT_LIBS) + AC_SUBST(QT_UIC) + AC_SUBST(QT_MOC) + + #### Being paranoid: + if test x"$have_qt" = xyes; then + AC_MSG_CHECKING(correct functioning of Qt installation) + AC_CACHE_VAL(bnv_cv_qt_test_result, + [ + cat > bnv_qt_test.h << EOF +#include <qobject.h> +class Test : public QObject +{ +Q_OBJECT +public: + Test() {} + ~Test() {} +public slots: + void receive() {} +signals: + void send(); +}; +EOF + + cat > bnv_qt_main.$ac_ext << EOF +#include "bnv_qt_test.h" +#include <qapplication.h> +int main( int argc, char **argv ) +{ + QApplication app( argc, argv ); + Test t; + QObject::connect( &t, SIGNAL(send()), &t, SLOT(receive()) ); +} +EOF + + bnv_cv_qt_test_result="failure" + bnv_try_1="$QT_MOC bnv_qt_test.h -o moc_bnv_qt_test.$ac_ext >/dev/null 2>bnv_qt_test_1.out" + AC_TRY_EVAL(bnv_try_1) + bnv_err_1=`grep -v '^ *+' bnv_qt_test_1.out | grep -v "^bnv_qt_test.h\$"` + if test x"$bnv_err_1" != x; then + echo "$bnv_err_1" >&AC_FD_CC + echo "configure: could not run $QT_MOC on:" >&AC_FD_CC + cat bnv_qt_test.h >&AC_FD_CC + else + bnv_try_2="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o moc_bnv_qt_test.o moc_bnv_qt_test.$ac_ext >/dev/null 2>bnv_qt_test_2.out" + AC_TRY_EVAL(bnv_try_2) + bnv_err_2=`grep -v '^ *+' bnv_qt_test_2.out | grep -v "^bnv_qt_test.{$ac_ext}\$"` + if test x"$bnv_err_2" != x; then + echo "$bnv_err_2" >&AC_FD_CC + echo "configure: could not compile:" >&AC_FD_CC + cat bnv_qt_test.$ac_ext >&AC_FD_CC + else + bnv_try_3="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o bnv_qt_main.o bnv_qt_main.$ac_ext >/dev/null 2>bnv_qt_test_3.out" + AC_TRY_EVAL(bnv_try_3) + bnv_err_3=`grep -v '^ *+' bnv_qt_test_3.out | grep -v "^bnv_qt_main.{$ac_ext}\$"` + if test x"$bnv_err_3" != x; then + echo "$bnv_err_3" >&AC_FD_CC + echo "configure: could not compile:" >&AC_FD_CC + cat bnv_qt_main.$ac_ext >&AC_FD_CC + else + bnv_try_4="$CXX $QT_LIBS $LIBS -o bnv_qt_main bnv_qt_main.o moc_bnv_qt_test.o >/dev/null 2>bnv_qt_test_4.out" + AC_TRY_EVAL(bnv_try_4) + bnv_err_4=`grep -v '^ *+' bnv_qt_test_4.out` + if test x"$bnv_err_4" != x; then + echo "$bnv_err_4" >&AC_FD_CC + else + bnv_cv_qt_test_result="success" + fi + fi + fi + fi + ])dnl AC_CACHE_VAL bnv_cv_qt_test_result + AC_MSG_RESULT([$bnv_cv_qt_test_result]); + if test x"$bnv_cv_qt_test_result" = "xfailure"; then + # working Qt was not found + QT_CXXFLAGS= + QT_DIR= + QT_LIBS= + QT_UIC= + QT_MOC= + have_qt=no + AC_MSG_WARN([Failed to find matching components of a complete + Qt installation. Try using more options, + see ./configure --help.]) + fi + + rm -f bnv_qt_test.h moc_bnv_qt_test.$ac_ext moc_bnv_qt_test.o \ + bnv_qt_main.$ac_ext bnv_qt_main.o bnv_qt_main \ + bnv_qt_test_1.out bnv_qt_test_2.out bnv_qt_test_3.out bnv_qt_test_4.out + fi +]) + +dnl Internal subroutine of BNV_HAVE_QT +dnl Set bnv_qt_dir bnv_qt_include_dir bnv_qt_bin_dir bnv_qt_lib_dir bnv_qt_lib +dnl Copyright 2001 Bastiaan N. Veelo <Bastiaan.N.Veelo@immtek.ntnu.no> +AC_DEFUN([BNV_PATH_QT_DIRECT], +[ + ## Binary utilities ## + if test x"$with_Qt_bin_dir" != x; then + bnv_qt_bin_dir=$with_Qt_bin_dir + fi + ## Look for header files ## + if test x"$with_Qt_include_dir" != x; then + bnv_qt_include_dir="$with_Qt_include_dir" + else + # The following header file is expected to define QT_VERSION. + qt_direct_test_header=qglobal.h + # Look for the header file in a standard set of common directories. + bnv_include_path_list=" + /usr/include + `ls -dr /usr/include/qt* 2>/dev/null` + `ls -dr /usr/lib/qt*/include 2>/dev/null` + `ls -dr /usr/local/qt*/include 2>/dev/null` + `ls -dr /opt/qt*/include 2>/dev/null` + " + for bnv_dir in $bnv_include_path_list; do + if test -r "$bnv_dir/$qt_direct_test_header"; then + bnv_dirs="$bnv_dirs $bnv_dir" + fi + done + # Now look for the newest in this list + bnv_prev_ver=0 + for bnv_dir in $bnv_dirs; do + bnv_this_ver=`egrep -w '#define QT_VERSION' $bnv_dir/$qt_direct_test_header | sed s/'#define QT_VERSION'//` + if expr $bnv_this_ver '>' $bnv_prev_ver > /dev/null; then + bnv_qt_include_dir=$bnv_dir + bnv_prev_ver=$bnv_this_ver + fi + done + fi dnl Found header files. + + # Are these headers located in a traditional Trolltech installation? + # That would be $bnv_qt_include_dir stripped from its last element: + bnv_possible_qt_dir=`dirname $bnv_qt_include_dir` + if test -x $bnv_possible_qt_dir/bin/moc && + ls $bnv_possible_qt_dir/lib/libqt* > /dev/null; then + # Then the rest is a piece of cake + bnv_qt_dir=$bnv_possible_qt_dir + bnv_qt_bin_dir="$bnv_qt_dir/bin" + bnv_qt_lib_dir="$bnv_qt_dir/lib" + # Only look for lib if the user did not supply it already + if test x"$bnv_qt_lib" = xNO; then + bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p | + sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`" + fi + bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + else + # There is no valid definition for $QTDIR as Trolltech likes to see it + bnv_qt_dir= + ## Look for Qt library ## + if test x"$with_Qt_lib_dir" != x; then + bnv_qt_lib_dir="$with_Qt_lib_dir" + # Only look for lib if the user did not supply it already + if test x"$bnv_qt_lib" = xNO; then + bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p | + sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`" + fi + bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + else + # Normally, when there is no traditional Trolltech installation, + # the library is installed in a place where the linker finds it + # automatically. + # If the user did not define the library name, try with qt + if test x"$bnv_qt_lib" = xNO; then + bnv_qt_lib=qt + fi + qt_direct_test_header=qapplication.h + qt_direct_test_main=" + int argc; + char ** argv; + QApplication app(argc,argv); + " + # See if we find the library without any special options. + # Don't add top $LIBS permanently yet + bnv_save_LIBS="$LIBS" + LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + bnv_qt_LIBS="$LIBS" + bnv_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="-I$bnv_qt_include_dir" + AC_TRY_LINK([#include <$qt_direct_test_header>], + $qt_direct_test_main, + [ + # Success. + # We can link with no special library directory. + bnv_qt_lib_dir= + ], [ + # That did not work. Try the multi-threaded version + echo "Non-critical error, please neglect the above." >&AC_FD_CC + bnv_qt_lib=qt-mt + LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + AC_TRY_LINK([#include <$qt_direct_test_header>], + $qt_direct_test_main, + [ + # Success. + # We can link with no special library directory. + bnv_qt_lib_dir= + ], [ + # That did not work. Try the OpenGL version + echo "Non-critical error, please neglect the above." >&AC_FD_CC + bnv_qt_lib=qt-gl + LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + AC_TRY_LINK([#include <$qt_direct_test_header>], + $qt_direct_test_main, + [ + # Succes. + # We can link with no special library directory. + bnv_qt_lib_dir= + ], [ + # That did not work. Maybe a library version I don't know about? + echo "Non-critical error, please neglect the above." >&AC_FD_CC + # Look for some Qt lib in a standard set of common directories. + bnv_dir_list=" + `echo $bnv_qt_includes | sed ss/includess` + /lib + /usr/lib + /usr/local/lib + /opt/lib + `ls -dr /usr/lib/qt* 2>/dev/null` + `ls -dr /usr/local/qt* 2>/dev/null` + `ls -dr /opt/qt* 2>/dev/null` + " + for bnv_dir in $bnv_dir_list; do + if ls $bnv_dir/libqt*; then + # Gamble that it's the first one... + bnv_qt_lib="`ls $bnv_dir/libqt* | sed -n 1p | + sed s@$bnv_dir/lib@@ | sed s/[.].*//`" + bnv_qt_lib_dir="$bnv_dir" + break + fi + done + # Try with that one + LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" + AC_TRY_LINK([#include <$qt_direct_test_header>], + $qt_direct_test_main, + [ + # Succes. + # We can link with no special library directory. + bnv_qt_lib_dir= + ], [ + # Leave bnv_qt_lib_dir defined + ]) + ]) + ]) + ]) + if test x"$bnv_qt_lib_dir" != x; then + bnv_qt_LIBS="-l$bnv_qt_lib_dir $LIBS" + else + bnv_qt_LIBS="$LIBS" + fi + LIBS="$bnv_save_LIBS" + CXXFLAGS="$bnv_save_CXXFLAGS" + fi dnl $with_Qt_lib_dir was not given + fi dnl Done setting up for non-traditional Trolltech installation +]) diff --git a/gssm/config/cppunit.m4 b/gssm/config/cppunit.m4 new file mode 100644 index 0000000..0991d51 --- /dev/null +++ b/gssm/config/cppunit.m4 @@ -0,0 +1,80 @@ +dnl +dnl AM_PATH_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +dnl +AC_DEFUN([AM_PATH_CPPUNIT], +[ + +AC_ARG_WITH(cppunit-prefix,[ --with-cppunit-prefix=PFX Prefix where CppUnit is installed (optional)], + cppunit_config_prefix="$withval", cppunit_config_prefix="") +AC_ARG_WITH(cppunit-exec-prefix,[ --with-cppunit-exec-prefix=PFX Exec prefix where CppUnit is installed (optional)], + cppunit_config_exec_prefix="$withval", cppunit_config_exec_prefix="") + + if test x$cppunit_config_exec_prefix != x ; then + cppunit_config_args="$cppunit_config_args --exec-prefix=$cppunit_config_exec_prefix" + if test x${CPPUNIT_CONFIG+set} != xset ; then + CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config + fi + fi + if test x$cppunit_config_prefix != x ; then + cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix" + if test x${CPPUNIT_CONFIG+set} != xset ; then + CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config + fi + fi + + AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no) + cppunit_version_min=$1 + + AC_MSG_CHECKING(for Cppunit - version >= $cppunit_version_min) + no_cppunit="" + if test "$CPPUNIT_CONFIG" = "no" ; then + no_cppunit=yes + else + CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags` + CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs` + cppunit_version=`$CPPUNIT_CONFIG --version` + + cppunit_major_version=`echo $cppunit_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + cppunit_minor_version=`echo $cppunit_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + cppunit_micro_version=`echo $cppunit_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + cppunit_major_min=`echo $cppunit_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + cppunit_minor_min=`echo $cppunit_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + cppunit_micro_min=`echo $cppunit_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + cppunit_version_proper=`expr \ + $cppunit_major_version \> $cppunit_major_min \| \ + $cppunit_major_version \= $cppunit_major_min \& \ + $cppunit_minor_version \> $cppunit_minor_min \| \ + $cppunit_major_version \= $cppunit_major_min \& \ + $cppunit_minor_version \= $cppunit_minor_min \& \ + $cppunit_micro_version \>= $cppunit_micro_min ` + + if test "$cppunit_version_proper" = "1" ; then + AC_MSG_RESULT([$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version]) + else + AC_MSG_RESULT(no) + no_cppunit=yes + fi + fi + + if test "x$no_cppunit" = x ; then + ifelse([$2], , :, [$2]) + else + CPPUNIT_CFLAGS="" + CPPUNIT_LIBS="" + ifelse([$3], , :, [$3]) + fi + + AC_SUBST(CPPUNIT_CFLAGS) + AC_SUBST(CPPUNIT_LIBS) +]) + + + diff --git a/gssm/config/gr_as.m4 b/gssm/config/gr_as.m4 new file mode 100644 index 0000000..a069547 --- /dev/null +++ b/gssm/config/gr_as.m4 @@ -0,0 +1,34 @@ +# Figure out how to run the assembler. -*- Autoconf -*- + +# serial 2 + +# Copyright 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, 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. + +# I just copy and renamed this from automake-1.6.3 so we should work +# under both 1.4-p6 and later. -eb + +# GR_PROG_AS +# ---------- +AC_DEFUN([GR_PROG_AS], +[# By default we simply use the C compiler to build assembly code. +AC_REQUIRE([AC_PROG_CC]) +: ${CCAS='$(CC)'} +# Set ASFLAGS if not already set. +: ${CCASFLAGS='$(CFLAGS)'} +AC_SUBST(CCAS) +AC_SUBST(CCASFLAGS)]) diff --git a/gssm/config/gr_boost.m4 b/gssm/config/gr_boost.m4 new file mode 100644 index 0000000..dc44219 --- /dev/null +++ b/gssm/config/gr_boost.m4 @@ -0,0 +1,70 @@ +dnl +dnl Copyright 2004 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +dnl Boston, MA 02111-1307, USA. +dnl + +AC_DEFUN([GR_REQUIRE_BOOST_INCLUDES], +[ + AC_LANG_PUSH(C++) + gr_boost_include_dir= + AC_ARG_WITH([boost-include-dir], + AC_HELP_STRING([--with-boost-include-dir=<path>], + [path to boost c++ include files]), + [ + # "yes" and "no" are bogus answers + if test x"$with_boost_include_dir" == xyes || + test x"$with_boost_include_dir" == xno; then + gr_boost_include_dir= + else + gr_boost_include_dir=$with_boost_include_dir + fi + ]) + echo "gr_boost_include_dir = $gr_boost_include_dir" + if test x$gr_boost_include_dir != x; then + # if user specified a directory, then we use it + OLD_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$gr_boost_include_dir" + AC_CHECK_HEADER([boost/shared_ptr.hpp], + [BOOST_CFLAGS="-I$gr_boost_include_dir"], + [AC_MSG_ERROR( + [Failed to locate boost/shared_ptr.hpp. +Try using --with-boost-include-dir=<path>])]) + CPPFLAGS=$OLD_CPPFLAGS + else + # is the header in the default place? + AC_CHECK_HEADER([boost/shared_ptr.hpp], + [BOOST_CFLAGS=""], + [ # nope, look one more place + # wipe out cached value. KLUDGE: AC should have API for this + unset AS_TR_SH([ac_cv_header_boost/shared_ptr.hpp]) + p=/usr/local/include/boost-1_31 + OLD_CPPFLAGS=$CPP_FLAGS + CPPFLAGS="$CPPFLAGS -I$p" + AC_CHECK_HEADER([boost/shared_ptr.hpp], + [BOOST_CFLAGS="-I$p"], + [AC_MSG_ERROR( + [Failed to locate boost/shared_ptr.hpp. +Try using --with-boost-include-dir=<path>])]) + CPPFLAGS=$OLD_CPPFLAGS + ]) + + fi + AC_LANG_POP + AC_SUBST(BOOST_CFLAGS) +]) diff --git a/gssm/config/gr_check_mc4020.m4 b/gssm/config/gr_check_mc4020.m4 new file mode 100644 index 0000000..0c4318e --- /dev/null +++ b/gssm/config/gr_check_mc4020.m4 @@ -0,0 +1,37 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +dnl Boston, MA 02111-1307, USA. +dnl + +AC_DEFUN([GR_CHECK_MC4020],[ + AC_MSG_CHECKING([for mc4020 A/D driver include file]) + AC_COMPILE_IFELSE([ +#include <mc4020.h> +int main (int argc, char **argv) +{ + return 0; +} +],[HAVE_MC4020=yes + AC_DEFINE(HAVE_MC4020,[1],[Define if you have a Measurement Computing PCI-DAS4020/12 A/D])], + [HAVE_MC4020=no]) + + AC_MSG_RESULT($HAVE_MC4020) + AM_CONDITIONAL(HAVE_MC4020, test x$HAVE_MC4020 = xyes) +]) + diff --git a/gssm/config/gr_check_shm_open.m4 b/gssm/config/gr_check_shm_open.m4 new file mode 100644 index 0000000..27c9ee6 --- /dev/null +++ b/gssm/config/gr_check_shm_open.m4 @@ -0,0 +1,29 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +dnl Boston, MA 02111-1307, USA. + +AC_DEFUN([GR_CHECK_SHM_OPEN], +[ + SHM_OPEN_LIBS="" + save_LIBS="$LIBS" + AC_SEARCH_LIBS([shm_open], [rt], [SHM_OPEN_LIBS="$LIBS"]) + AC_CHECK_FUNCS([shm_open]) + LIBS="$save_LIBS" + AC_SUBST(SHM_OPEN_LIBS) +]) diff --git a/gssm/config/gr_check_usrp.m4 b/gssm/config/gr_check_usrp.m4 new file mode 100644 index 0000000..b818a69 --- /dev/null +++ b/gssm/config/gr_check_usrp.m4 @@ -0,0 +1,32 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +dnl Boston, MA 02111-1307, USA. +dnl + +dnl Check for Universal Software Radio Peripheral + +AC_DEFUN([GR_CHECK_USRP],[ + PKG_CHECK_MODULES(USRP, usrp >= 0.2, + [HAVE_USRP=yes + AC_DEFINE(HAVE_USRP,[1],[Define if you have a USRP])], + [HAVE_USRP=no]) + + AM_CONDITIONAL(HAVE_USRP, test x$HAVE_USRP = xyes) +]) + diff --git a/gssm/config/gr_doxygen.m4 b/gssm/config/gr_doxygen.m4 new file mode 100644 index 0000000..b40b1ea --- /dev/null +++ b/gssm/config/gr_doxygen.m4 @@ -0,0 +1,56 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +dnl Boston, MA 02111-1307, USA. +dnl + +AC_DEFUN([GR_CHECK_DOXYGEN],[ + AC_ARG_ENABLE(doxygen, [ --enable-doxygen enable documentation generation with doxygen (auto)]) + AC_ARG_ENABLE(dot, [ --enable-dot use 'dot' to generate graphs in doxygen (auto)]) + AC_ARG_ENABLE(html-docs, [ --enable-html-docs enable HTML generation with doxygen (yes)], [], [ enable_html_docs=yes]) + AC_ARG_ENABLE(latex-docs, [ --enable-latex-docs enable LaTeX doc generation with doxygen (no)], [], [ enable_latex_docs=no]) + + if test "x$enable_doxygen" = xno; then + enable_doc=no + else + AC_PATH_PROG(DOXYGEN, doxygen, , $PATH) + if test x$DOXYGEN = x; then + if test "x$enable_doxygen" = xyes; then + AC_MSG_ERROR([could not find doxygen]) + fi + enable_doc=no + else + enable_doc=yes + AC_PATH_PROG(DOT, dot, , $PATH) + fi + fi + + AM_CONDITIONAL(DOC, test x$enable_doc = xyes) + + if test x$DOT = x; then + if test "x$enable_dot" = xyes; then + AC_MSG_ERROR([could not find dot]) + fi + enable_dot=no + else + enable_dot=yes + fi + AC_SUBST(enable_dot) + AC_SUBST(enable_html_docs) + AC_SUBST(enable_latex_docs) +]) diff --git a/gssm/config/gr_gprof.m4 b/gssm/config/gr_gprof.m4 new file mode 100644 index 0000000..cc50508 --- /dev/null +++ b/gssm/config/gr_gprof.m4 @@ -0,0 +1,72 @@ +dnl +dnl Copyright 2002 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +dnl Boston, MA 02111-1307, USA. +dnl + +dnl FIXME probably need to add linker flag too... + +AC_DEFUN([GR_SET_GPROF],[ + dnl Check for --with-gprof + AC_MSG_CHECKING([whether user wants gprof]) + AC_ARG_WITH(gprof, + [ --with-gprof Turn on gprof profiling], + [], [ with_gprof=no ]) + AC_MSG_RESULT($with_gprof) + + dnl gprof profiling flags for the two main compilers + cc_profiling_flags="-pg" + cxx_profiling_flags="-pg" + ld_profiling_flags="-pg" + if test $with_gprof = yes + then + if test -n "${CC}" + then + LF_CHECK_CC_FLAG($cc_profiling_flags) + fi + if test -n "${CXX}" + then + LF_CHECK_CXX_FLAG($cxx_profiling_flags) + fi + fi +]) + +AC_DEFUN([GR_SET_PROF],[ + dnl Check for --with-prof + AC_MSG_CHECKING([whether user wants prof]) + AC_ARG_WITH(prof, + [ --with-prof Turn on prof profiling], + [], [ with_prof=no ]) + AC_MSG_RESULT($with_prof) + + dnl prof profiling flags for the two main compilers + cc_profiling_flags="-p" + cxx_profiling_flags="-p" + ld_profiling_flags="-p" + if test $with_prof = yes + then + if test -n "${CC}" + then + LF_CHECK_CC_FLAG($cc_profiling_flags) + fi + if test -n "${CXX}" + then + LF_CHECK_CXX_FLAG($cxx_profiling_flags) + fi + fi +]) diff --git a/gssm/config/gr_omnithread.m4 b/gssm/config/gr_omnithread.m4 new file mode 100644 index 0000000..7c3150b --- /dev/null +++ b/gssm/config/gr_omnithread.m4 @@ -0,0 +1,51 @@ +# Check for Omnithread (pthread/NT) thread support. -*- Autoconf -*- + +# Copyright 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, 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. + +AC_DEFUN([GR_OMNITHREAD], +[ + # Check first for POSIX + ACX_PTHREAD( + [ ot_posix="yes" + AC_DEFINE(OMNITHREAD_POSIX,[1],[Define to 1 to enable pthread]) + ],[ + # If no POSIX support found, then check for NT threads + AC_MSG_CHECKING([for NT threads]) + + AC_LINK_IFELSE([ + #include <windows.h> + #include <winbase.h> + int main() { InitializeCriticalSection(NULL); return 0; } + ], + [ + ot_nt="yes" + AC_DEFINE(OMNITHREAD_NT,[1],[Define to 1 to enable NT thread]) + ], + [AC_MSG_FAILURE([GNU Radio requires POSIX threads. pthreads not found.])] + ) + AC_MSG_RESULT(yes) + ]) + AM_CONDITIONAL(OMNITHREAD_POSIX, test "x$ot_posix" = xyes) + AM_CONDITIONAL(OMNITHREAD_NT, test "x$ot_nt" = xyes) + + save_LIBS="$LIBS" + AC_SEARCH_LIBS([clock_gettime], [rt], [PTHREAD_LIBS="$PTHREAD_LIBS $LIBS"]) + AC_CHECK_FUNCS([clock_gettime gettimeofday nanosleep]) + LIBS="$save_LIBS" +]) + diff --git a/gssm/config/gr_pwin32.m4 b/gssm/config/gr_pwin32.m4 new file mode 100644 index 0000000..5f748af --- /dev/null +++ b/gssm/config/gr_pwin32.m4 @@ -0,0 +1,146 @@ +# Check for (mingw)win32 POSIX replacements. -*- Autoconf -*- + +# Copyright 2003,2004,2005 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + + +AC_DEFUN([GR_PWIN32], +[ +AC_REQUIRE([AC_HEADER_TIME]) +AC_CHECK_HEADERS([sys/types.h fcntl.h io.h]) +AC_CHECK_HEADERS([windows.h]) +AC_CHECK_HEADERS([winioctl.h winbase.h], [], [], [ + #if HAVE_WINDOWS_H + #include <windows.h> + #endif +]) + +AC_CHECK_FUNCS([getopt usleep gettimeofday nanosleep rand srand random srandom sleep sigaction]) +AC_CHECK_TYPES([struct timezone, struct timespec, ssize_t],[],[],[ + #if HAVE_SYS_TYPES_H + # include <sys/types.h> + #endif + #if TIME_WITH_SYS_TIME + # include <sys/time.h> + # include <time.h> + #else + # if HAVE_SYS_TIME_H + # include <sys/time.h> + # else + # include <time.h> + # endif + #endif +]) + +dnl Checks for replacements +AC_REPLACE_FUNCS([getopt usleep gettimeofday]) + + +AC_MSG_CHECKING(for Sleep) +AC_TRY_LINK([ #include <windows.h> + #include <winbase.h> + ], [ Sleep(0); ], + [AC_DEFINE(HAVE_SSLEEP,1,[Define to 1 if you have win32 Sleep]) + AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no) + ) + +dnl Under Win32, mkdir prototype in io.h has only one arg +AC_MSG_CHECKING(whether mkdir accepts only one arg) +AC_TRY_COMPILE([#include <sys/types.h> + #include <sys/stat.h> + #include <fcntl.h>], [ + mkdir("") + ], [ AC_MSG_RESULT(yes) + AC_DEFINE(MKDIR_TAKES_ONE_ARG,[],[Define if mkdir accepts only one arg]) ], + [ AC_MSG_RESULT(no) + ]) + +AH_BOTTOM( +[ +/* Define missing prototypes, implemented in replacement lib */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef HAVE_GETOPT +int getopt (int argc, char * const argv[], const char * optstring); +extern char * optarg; +extern int optind, opterr, optopt; +#endif + +#ifndef HAVE_USLEEP +int usleep(unsigned long usec); /* SUSv2 */ +#endif + +#ifndef HAVE_NANOSLEEP +#ifndef HAVE_STRUCT_TIMESPEC +#if HAVE_SYS_TYPES_H +# include <sys/types.h> /* need time_t */ +#endif +struct timespec { + time_t tv_sec; + long tv_nsec; +}; +#endif +static inline int nanosleep(const struct timespec *req, struct timespec *rem) { return usleep(req->tv_sec*1000000+req->tv_nsec/1000); } +#endif + +#if defined(HAVE_SSLEEP) && !defined(HAVE_SLEEP) +#ifdef HAVE_WINBASE_H +#include <windows.h> +#include <winbase.h> +#endif +/* TODO: what about SleepEx? */ +static inline unsigned int sleep (unsigned int nb_sec) { Sleep(nb_sec*1000); return 0; } +#endif + +#ifndef HAVE_GETTIMEOFDAY +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif +#ifndef HAVE_STRUCT_TIMEZONE +struct timezone { + int tz_minuteswest; + int tz_dsttime; +}; +#endif +int gettimeofday(struct timeval *tv, struct timezone *tz); +#endif + +#if !defined(HAVE_RANDOM) && defined(HAVE_RAND) +#include <stdlib.h> +static inline long int random (void) { return rand(); } +#endif + +#if !defined(HAVE_SRANDOM) && defined(HAVE_SRAND) +static inline void srandom (unsigned int seed) { srand(seed); } +#endif + +#ifndef HAVE_SSIZE_T +typedef size_t ssize_t; +#endif + +#ifdef __cplusplus +} +#endif +]) + + +]) diff --git a/gssm/config/gr_python.m4 b/gssm/config/gr_python.m4 new file mode 100644 index 0000000..957d557 --- /dev/null +++ b/gssm/config/gr_python.m4 @@ -0,0 +1,104 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +dnl Boston, MA 02111-1307, USA. +dnl + +# PYTHON_DEVEL() +# +# Checks for Python and tries to get the include path to 'Python.h'. +# It provides the $(PYTHON_CPPFLAGS) output variable. +AC_DEFUN([PYTHON_DEVEL],[ + AC_REQUIRE([AM_PATH_PYTHON]) + + # Check for Python include path + AC_MSG_CHECKING([for Python include path]) + if test -z "$PYTHON" ; then + AC_MSG_ERROR([cannot find Python path]) + fi + + python_path=${PYTHON%/bin*} + for i in "$python_path/include/python$PYTHON_VERSION/" "$python_path/include/python/" "$python_path/" ; do + python_path=`find $i -type f -name Python.h -print` + if test -n "$python_path" ; then + break + fi + done + for i in $python_path ; do + python_path=${python_path%/Python.h} + break + done + AC_MSG_RESULT([$python_path]) + if test -z "$python_path" ; then + AC_MSG_ERROR([cannot find Python include path]) + fi + + AC_SUBST(PYTHON_CPPFLAGS,[-I$python_path]) + + # Check for Python headers usability + python_save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" + AC_CHECK_HEADERS([Python.h], [], + [AC_MSG_ERROR([cannot find usable Python headers])]) + CPPFLAGS="$python_save_CPPFLAGS" + + # Check for Python library path + AC_MSG_CHECKING([for Python library path]) + python_path=`echo $PYTHON | sed "s,/bin.*$,,"` + for i in "$python_path/lib/python$PYTHON_VERSION/config/" "$python_path/lib/python$PYTHON_VERSION/" "$python_path/lib/python/config/" "$python_path/lib/python/" "$python_path/" "$python_path/libs" ; do + python_path=`find $i -type f -name libpython$PYTHON_VERSION.* -print | sed "1q"` + if test -n "$python_path" ; then + break + fi + done + python_path=`echo $python_path | sed "s,/libpython.*$,,"` + if test -z "$python_path" ; then + AC_MSG_WARN(cannot find Python library path) + fi + AC_MSG_RESULT([$python_path]) + + AC_SUBST([PYTHON_LDFLAGS],["-L$python_path -lpython$PYTHON_VERSION"]) + # + python_site=`echo $python_path | sed "s/config/site-packages/"` + AC_SUBST([PYTHON_SITE_PKG],[$python_site]) + # + # libraries which must be linked in when embedding + # + AC_MSG_CHECKING(python extra libraries) + PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \ + conf = distutils.sysconfig.get_config_var; \ + print conf('LOCALMODLIBS')+' '+conf('LIBS')" + AC_MSG_RESULT($PYTHON_EXTRA_LIBS)` + AC_SUBST(PYTHON_EXTRA_LIBS) + + + # Check for Python library usability + python_save_LIBS=$LIBS + python_save_CPPFLAGS=$CPPFLAGS + LIBS="$LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LIBS" + CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" + + AC_MSG_CHECKING(Python headers and library usability) + AC_TRY_LINK([ #include <Python.h> ], [ PyArg_Parse(NULL, NULL); ], + [AC_MSG_RESULT(yes)], + [AC_MSG_WARN(no dev lib, crossing fingers) + AC_SUBST([PYTHON_LDFLAGS],[""])]) + + CPPFLAGS="$python_save_CPPFLAGS" + LIBS="$python_save_LIBS" +]) diff --git a/gssm/config/gr_scripting.m4 b/gssm/config/gr_scripting.m4 new file mode 100644 index 0000000..7f3abde --- /dev/null +++ b/gssm/config/gr_scripting.m4 @@ -0,0 +1,30 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +dnl Boston, MA 02111-1307, USA. +dnl + +AC_DEFUN([GR_SCRIPTING],[ + AC_REQUIRE([AC_PROG_LN_S]) + AC_REQUIRE([AC_PROG_CXX]) + AC_REQUIRE([AC_PROG_LIBTOOL]) + + SWIG_PROG(1.3.23) + SWIG_ENABLE_CXX + SWIG_PYTHON +]) diff --git a/gssm/config/gr_set_md_cpu.m4 b/gssm/config/gr_set_md_cpu.m4 new file mode 100644 index 0000000..e53eeaf --- /dev/null +++ b/gssm/config/gr_set_md_cpu.m4 @@ -0,0 +1,41 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +dnl Boston, MA 02111-1307, USA. +dnl + +AC_DEFUN([GR_SET_MD_CPU],[ + AC_REQUIRE([AC_CANONICAL_TARGET]) + AC_ARG_WITH(md-cpu, + [ --with-md-cpu=ARCH set machine dependent speedups (auto)], + [cf_with_md_cpu="$withval"], + [cf_with_md_cpu="$target_cpu"]) + + AC_MSG_CHECKING([for machine dependent speedups]) + case "$cf_with_md_cpu" in + x86 | i[[3-7]]86) MD_CPU=x86 ;; +# sparc) MD_CPU=sparc ;; + *) MD_CPU=generic ;; + esac + AC_MSG_RESULT($MD_CPU) + AC_SUBST(MD_CPU) + + AM_CONDITIONAL(MD_CPU_x86, test $MD_CPU = x86) + AM_CONDITIONAL(MD_CPU_generic, test $MD_CPU = generic) +]) + diff --git a/gssm/config/gr_swig.m4 b/gssm/config/gr_swig.m4 new file mode 100644 index 0000000..a587c6d --- /dev/null +++ b/gssm/config/gr_swig.m4 @@ -0,0 +1,85 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +dnl Boston, MA 02111-1307, USA. +dnl + +# SWIG_PROG([required-version]) +# +# Checks for the SWIG program. If found you can (and should) call SWIG via $(SWIG). +# You can use the optional first argument to check if the version of the available SWIG +# is greater or equal to the value of the argument. It should have the format: +# N[.N[.N]] (N is a number between 0 and 999. Only the first N is mandatory.) +AC_DEFUN([SWIG_PROG],[ + AC_REQUIRE([AC_PROG_MAKE_SET]) + AC_CHECK_PROG(SWIG,swig,[`which swig`]) + if test -z "$SWIG" ; then + AC_MSG_ERROR([Cannot find 'swig' program. SWIG version >= $1 required]) + SWIG=false + elif test -n "$1" ; then + AC_MSG_CHECKING([for SWIG version]) + swig_version=`$SWIG -version 2>&1 | \ + awk '/^SWIG Version [[0-9]+\.[0-9]+\.[0-9]]+.*$/ { split($[3],a,"[[^.0-9]]"); print a[[1]] }'` + AC_MSG_RESULT([$swig_version]) + if test -n "$swig_version" ; then + swig_version=`echo $swig_version | \ + awk '{ split($[1],a,"\."); print [a[1]*1000000+a[2]*1000+a[3]] }' 2>/dev/null` + swig_required_version=`echo $1 | \ + awk '{ split($[1],a,"\."); print [a[1]*1000000+a[2]*1000+a[3]] }' 2>/dev/null` + if test $swig_required_version -gt $swig_version ; then + AC_MSG_ERROR([SWIG version >= $1 required]) + fi + else + AC_MSG_ERROR([cannot determine SWIG version]) + fi + fi +]) + +# SWIG_ENABLE_CXX() +# +# Enable swig C++ support. This effects all invocations of $(SWIG). +AC_DEFUN([SWIG_ENABLE_CXX],[ + AC_REQUIRE([SWIG_PROG]) + AC_REQUIRE([AC_PROG_CXX]) + if test "$SWIG" != "false" ; then + SWIG="$SWIG -c++" + fi +]) + +# SWIG_PYTHON([use-shadow-classes]) +# +# Checks for Python and provides the $(SWIG_PYTHON_CPPFLAGS), +# $(SWIG_PYTHON_LIB) and $(SWIG_PYTHON_OPT) output variables. +# $(SWIG_PYTHON_OPT) contains all necessary swig options to generate +# code for Python. If you need multi module support use +# $(SWIG_PYTHON_LIB) (provided by the SWIG_MULTI_MODULE_SUPPORT() +# macro) to link against the appropriate library. It contains the +# SWIG Python runtime library that is needed by the type check system +# for example. + +AC_DEFUN([SWIG_PYTHON],[ + AC_REQUIRE([SWIG_PROG]) + AC_REQUIRE([PYTHON_DEVEL]) + if test "$SWIG" != "false" ; then + AC_SUBST(SWIG_PYTHON_LIB,[-lswigpy]) +dnl test ! "x$1" = "xno" && swig_shadow=" -shadow" || swig_shadow="" +dnl AC_SUBST(SWIG_PYTHON_OPT,[-python$swig_shadow]) + AC_SUBST(SWIG_PYTHON_OPT,[-python]) + fi + AC_SUBST(SWIG_PYTHON_CPPFLAGS,[$PYTHON_CPPFLAGS]) +]) diff --git a/gssm/config/gr_sysv_shm.m4 b/gssm/config/gr_sysv_shm.m4 new file mode 100644 index 0000000..5e11e49 --- /dev/null +++ b/gssm/config/gr_sysv_shm.m4 @@ -0,0 +1,36 @@ +# Check for IPC System V shm support. -*- Autoconf -*- + +# Copyright 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, 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. + +AC_DEFUN([GR_SYSV_SHM], +[ + AC_LANG_SAVE + AC_LANG_C + + AC_CHECK_HEADERS([sys/ipc.h sys/shm.h]) + + save_LIBS="$LIBS" + AC_SEARCH_LIBS(shmat, [cygipc ipc], + [ IPC_LIBS="$LIBS" ], + [ AC_MSG_WARN([SystemV IPC support not found. ]) ] + ) + LIBS="$save_LIBS" + + AC_LANG_RESTORE + AC_SUBST(IPC_LIBS) +]) diff --git a/gssm/config/lf_cc.m4 b/gssm/config/lf_cc.m4 new file mode 100644 index 0000000..f9bd715 --- /dev/null +++ b/gssm/config/lf_cc.m4 @@ -0,0 +1,42 @@ +dnl Autoconf support for C++ +dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a configuration +dnl script generated by Autoconf, you may include it under the same +dnl distribution terms that you use for the rest of that program. + +# ------------------------------------------------------------------------- +# Use this macro to configure your C compiler +# When called the macro does the following things: +# 1. It finds an appropriate C compiler. +# If you passed the flag --with-cc=foo then it uses that +# particular compiler +# 2. Check whether the compiler works. +# 3. Checks whether the compiler accepts the -g +# ------------------------------------------------------------------------- + +AC_DEFUN([LF_CONFIGURE_CC],[ + dnl Sing the song + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_PROG_CPP])dnl + AC_REQUIRE([AC_AIX])dnl + AC_REQUIRE([AC_ISC_POSIX])dnl + AC_REQUIRE([AC_MINIX])dnl + AC_REQUIRE([AC_HEADER_STDC])dnl +]) + diff --git a/gssm/config/lf_cxx.m4 b/gssm/config/lf_cxx.m4 new file mode 100644 index 0000000..8ade1fb --- /dev/null +++ b/gssm/config/lf_cxx.m4 @@ -0,0 +1,121 @@ +dnl Autoconf support for C++ +dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a configuration +dnl script generated by Autoconf, you may include it under the same +dnl distribution terms that you use for the rest of that program. + +# ----------------------------------------------------------------- +# This macro should be called to configure your C++ compiler. +# When called, the macro does the following things: +# 1. It finds an appropriate C++ compiler +# If you passed the flag --with-cxx=foo, then it uses that +# particular compiler +# 2. Checks whether the compiler accepts the -g +# ------------------------------------------------------------------ + +AC_DEFUN([LF_CONFIGURE_CXX],[ + AC_REQUIRE([AC_PROG_CXX])dnl + AC_REQUIRE([AC_PROG_CXXCPP])dnl + LF_CXX_PORTABILITY +]) + +# ----------------------------------------------------------------------- +# This macro tests the C++ compiler for various portability problem. +# 1. Defines CXX_HAS_NO_BOOL if the compiler does not support the bool +# data type +# 2. Defines CXX_HAS_BUGGY_FOR_LOOPS if the compiler has buggy +# scoping for the for-loop +# 3. Defines USE_ASSERT if the user wants to use assertions +# ----------------------------------------------------------------------- + + +AC_DEFUN([LF_CXX_PORTABILITY],[ + + dnl + dnl Check for common C++ portability problems + dnl + + dnl AC_LANG_PUSH + dnl AC_LANG_CPLUSPLUS + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + + dnl Check whether we have bool + AC_MSG_CHECKING(whether C++ has bool) + AC_TRY_RUN([main() { bool b1=true; bool b2=false; }], + [ AC_MSG_RESULT(yes) ], + [ AC_MSG_RESULT(no) + AC_DEFINE(CXX_HAS_NO_BOOL,[],[Define if C++ is missing bool type]) ], + [ AC_MSG_WARN(Don't cross-compile)] + ) + + dnl Test whether C++ has buggy for-loops + AC_MSG_CHECKING(whether C++ has buggy scoping in for-loops) + AC_TRY_COMPILE([#include <iostream.h>], [ + for (int i=0;i<10;i++) { } + for (int i=0;i<10;i++) { } +], [ AC_MSG_RESULT(no) ], + [ AC_MSG_RESULT(yes) + AC_DEFINE(CXX_HAS_BUGGY_FOR_LOOPS,[],[Define if for loop scoping is broken]) ]) + + dnl Test whether the user wants to enable assertions + AC_MSG_CHECKING(whether user wants assertions) + AC_ARG_ENABLE(assert, + [ --disable-assert don't use cpp.h assert], + [ AC_DEFINE(NDEBUG,[],[Define to disable asserts (don't doit!)]) + AC_MSG_RESULT(no) ], + [ AC_MSG_RESULT(yes) ], + ) + + dnl Test whether C++ has std::isnan + AC_MSG_CHECKING(whether C++ has std::isnan) + AC_TRY_COMPILE([#include <math.h>], [ + std::isnan(0); +], [ AC_MSG_RESULT(yes) + AC_DEFINE(CXX_HAS_STD_ISNAN,[],[Define if has std::isnan]) ], + [ AC_MSG_RESULT(no) ]) + + dnl Done with the portability checks + dnl AC_LANG_POP([C++]) + AC_LANG_RESTORE +]) + +AH_BOTTOM([// Workaround for compilers with buggy for-loop scoping +// That's quite a few compilers actually including recent versions of +// Dec Alpha cxx, HP-UX CC and SGI CC. +// The trivial "if" statement provides the correct scoping to the +// for loop + +#ifdef CXX_HAS_BUGGY_FOR_LOOPS +#undef for +#define for if(1) for +#endif +]) + +AH_BOTTOM([// If the C++ compiler we use doesn't have bool, then +// the following is a near-perfect work-around. +// You must make sure your code does not depend on "int" and "bool" +// being two different types, in overloading for instance. + +#ifdef CXX_HAS_NO_BOOL +#define bool int +#define true 1 +#define false 0 +#endif +]) diff --git a/gssm/config/lf_warnings.m4 b/gssm/config/lf_warnings.m4 new file mode 100644 index 0000000..0ebb97e --- /dev/null +++ b/gssm/config/lf_warnings.m4 @@ -0,0 +1,128 @@ +dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a configuration +dnl script generated by Autoconf, you may include it under the same +dnl distribution terms that you use for the rest of that program. + +# -------------------------------------------------------------------------- +# Check whether the C++ compiler accepts a certain flag +# If it does it adds the flag to CXXFLAGS +# If it does not then it returns an error to lf_ok +# Usage: +# LF_CHECK_CXX_FLAG(-flag1 -flag2 -flag3 ...) +# ------------------------------------------------------------------------- + +AC_DEFUN([LF_CHECK_CXX_FLAG],[ + echo 'void f(){}' > conftest.cc + for i in $1 + do + AC_MSG_CHECKING([whether $CXX accepts $i]) + if test -z "`${CXX} $i -c conftest.cc 2>&1`" + then + CXXFLAGS="${CXXFLAGS} $i" + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + done + rm -f conftest.cc conftest.o +]) + +# -------------------------------------------------------------------------- +# Check whether the C compiler accepts a certain flag +# If it does it adds the flag to CFLAGS +# If it does not then it returns an error to lf_ok +# Usage: +# LF_CHECK_CC_FLAG(-flag1 -flag2 -flag3 ...) +# ------------------------------------------------------------------------- + +AC_DEFUN([LF_CHECK_CC_FLAG],[ + echo 'void f(){}' > conftest.c + for i in $1 + do + AC_MSG_CHECKING([whether $CC accepts $i]) + if test -z "`${CC} $i -c conftest.c 2>&1`" + then + CFLAGS="${CFLAGS} $i" + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + done + rm -f conftest.c conftest.o +]) + +# -------------------------------------------------------------------------- +# Check whether the Fortran compiler accepts a certain flag +# If it does it adds the flag to FFLAGS +# If it does not then it returns an error to lf_ok +# Usage: +# LF_CHECK_F77_FLAG(-flag1 -flag2 -flag3 ...) +# ------------------------------------------------------------------------- + +AC_DEFUN([LF_CHECK_F77_FLAG],[ + cat << EOF > conftest.f +c....:++++++++++++++++++++++++ + PROGRAM MAIN + PRINT*,'Hello World!' + END +EOF + for i in $1 + do + AC_MSG_CHECKING([whether $F77 accepts $i]) + if test -z "`${F77} $i -c conftest.f 2>&1`" + then + FFLAGS="${FFLAGS} $i" + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + done + rm -f conftest.f conftest.o +]) + +# ---------------------------------------------------------------------- +# Provide the configure script with an --with-warnings option that +# turns on warnings. Call this command AFTER you have configured ALL your +# compilers. +# ---------------------------------------------------------------------- + +AC_DEFUN([LF_SET_WARNINGS],[ + dnl Check for --with-warnings + AC_MSG_CHECKING([whether user wants warnings]) + AC_ARG_WITH(warnings, + [ --with-warnings Turn on warnings], + [ lf_warnings=yes ], [ lf_warnings=no ]) + lf_warnings=yes # hard code for now -eb + AC_MSG_RESULT($lf_warnings) + + dnl Warnings for the two main compilers + cc_warning_flags="-Wall" + cxx_warning_flags="-Wall -Woverloaded-virtual" + if test $lf_warnings = yes + then + if test -n "${CC}" + then + LF_CHECK_CC_FLAG($cc_warning_flags) + fi + if test -n "${CXX}" + then + LF_CHECK_CXX_FLAG($cxx_warning_flags) + fi + fi +]) diff --git a/gssm/config/lf_x11.m4 b/gssm/config/lf_x11.m4 new file mode 100644 index 0000000..3bd19f2 --- /dev/null +++ b/gssm/config/lf_x11.m4 @@ -0,0 +1,39 @@ +dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a configuration +dnl script generated by Autoconf, you may include it under the same +dnl distribution terms that you use for the rest of that program. + + +#----------------------------------------------------------------------- +# This macro searches for Xlib and when it finds it it adds the +# appropriate flags to CXXFLAGS and export the link sequence to +# the variable XLIB. +# In your configure.in file add: +# LF_PATH_XLIB +# In your Makefile.am add +# program_LDADD = .... $(XLIB) +#------------------------------------------------------------------------ + +AC_DEFUN([LF_PATH_XLIB],[ + AC_PATH_XTRA + CXXFLAGS="$CXXFLAGS $X_CFLAGS" + XLIB="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" + AC_SUBST(XLIB) +]) + diff --git a/gssm/config/mkstemp.m4 b/gssm/config/mkstemp.m4 new file mode 100644 index 0000000..4af0f0a --- /dev/null +++ b/gssm/config/mkstemp.m4 @@ -0,0 +1,89 @@ +#serial 4 + +# On some hosts (e.g., HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a +# silly limit that it can create no more than 26 files from a given template. +# Other systems lack mkstemp altogether. +# On OSF1/Tru64 V4.0F, the system-provided mkstemp function can create +# only 32 files per process. +# On systems like the above, arrange to use the replacement function. +AC_DEFUN([UTILS_FUNC_MKSTEMP], +[dnl + AC_REPLACE_FUNCS(mkstemp) + if test $ac_cv_func_mkstemp = no; then + utils_cv_func_mkstemp_limitations=yes + else + AC_CACHE_CHECK([for mkstemp limitations], + utils_cv_func_mkstemp_limitations, + [ + AC_TRY_RUN([ +# include <stdlib.h> + int main () + { + int i; + for (i = 0; i < 70; i++) + { + char template[] = "conftestXXXXXX"; + int fd = mkstemp (template); + if (fd == -1) + exit (1); + close (fd); + } + exit (0); + } + ], + utils_cv_func_mkstemp_limitations=no, + utils_cv_func_mkstemp_limitations=yes, + utils_cv_func_mkstemp_limitations=yes + ) + ] + ) + fi + + if test $utils_cv_func_mkstemp_limitations = yes; then + AC_LIBOBJ(mkstemp) + AC_LIBOBJ(tempname) + AC_DEFINE(mkstemp, rpl_mkstemp, + [Define to rpl_mkstemp if the replacement function should be used.]) + gl_PREREQ_MKSTEMP + jm_PREREQ_TEMPNAME + fi +]) + +# Prerequisites of lib/mkstemp.c. +AC_DEFUN([gl_PREREQ_MKSTEMP], +[ + AH_BOTTOM( + [ + #ifndef HAVE_MKSTEMP + #ifdef __cplusplus + extern "C" { + #endif + int rpl_mkstemp (char *templ); + #ifdef __cplusplus + } + #endif + #endif + ]) +]) + +# Prerequisites of lib/tempname.c. +AC_DEFUN([jm_PREREQ_TEMPNAME], +[ + AC_REQUIRE([AC_HEADER_STAT]) + AC_CHECK_HEADERS_ONCE(fcntl.h sys/time.h unistd.h) + AC_CHECK_HEADERS(stdint.h) + AC_CHECK_FUNCS(__secure_getenv gettimeofday lstat) + AC_CHECK_DECLS_ONCE(getenv) + # AC_REQUIRE([jm_AC_TYPE_UINTMAX_T]) + + dnl Under Win32, mkdir prototype in io.h has only one arg + AC_MSG_CHECKING(whether mkdir accepts only one arg) + AC_TRY_COMPILE([#include <sys/types.h> + #include <sys/stat.h> + #include <fcntl.h>], [ + mkdir("") + ], [ AC_MSG_RESULT(yes) + AC_DEFINE(MKDIR_TAKES_ONE_ARG,[],[Define if mkdir accepts only one arg]) ], + [ AC_MSG_RESULT(no) + ]) +]) diff --git a/gssm/config/onceonly.m4 b/gssm/config/onceonly.m4 new file mode 100644 index 0000000..f6fec37 --- /dev/null +++ b/gssm/config/onceonly.m4 @@ -0,0 +1,63 @@ +# onceonly.m4 serial 3 +dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl This file defines some "once only" variants of standard autoconf macros. +dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS +dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS +dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS +dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC +dnl The advantage is that the check for each of the headers/functions/decls +dnl will be put only once into the 'configure' file. It keeps the size of +dnl the 'configure' file down, and avoids redundant output when 'configure' +dnl is run. +dnl The drawback is that the checks cannot be conditionalized. If you write +dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi +dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to +dnl empty, and the check will be inserted before the body of the AC_DEFUNed +dnl function. + +dnl Autoconf version 2.57 or newer is recommended. +AC_PREREQ(2.54) + +# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of +# AC_CHECK_HEADERS(HEADER1 HEADER2 ...). +AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ + : + AC_FOREACH([gl_HEADER_NAME], [$1], [ + AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(defn([gl_HEADER_NAME]), + [-./], [___])), [ + AC_CHECK_HEADERS(gl_HEADER_NAME) + ]) + AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME, + [-./], [___]))) + ]) +]) + +# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of +# AC_CHECK_FUNCS(FUNC1 FUNC2 ...). +AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ + : + AC_FOREACH([gl_FUNC_NAME], [$1], [ + AC_DEFUN([gl_CHECK_FUNC_]defn([gl_FUNC_NAME]), [ + AC_CHECK_FUNCS(defn([gl_FUNC_NAME])) + ]) + AC_REQUIRE([gl_CHECK_FUNC_]defn([gl_FUNC_NAME])) + ]) +]) + +# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of +# AC_CHECK_DECLS(DECL1, DECL2, ...). +AC_DEFUN([AC_CHECK_DECLS_ONCE], [ + : + AC_FOREACH([gl_DECL_NAME], [$1], [ + AC_DEFUN([gl_CHECK_DECL_]defn([gl_DECL_NAME]), [ + AC_CHECK_DECLS(defn([gl_DECL_NAME])) + ]) + AC_REQUIRE([gl_CHECK_DECL_]defn([gl_DECL_NAME])) + ]) +]) diff --git a/gssm/config/pkg.m4 b/gssm/config/pkg.m4 new file mode 100644 index 0000000..770f062 --- /dev/null +++ b/gssm/config/pkg.m4 @@ -0,0 +1,68 @@ +dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) +dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page +dnl also defines GSTUFF_PKG_ERRORS on error +AC_DEFUN([PKG_CHECK_MODULES], [ + succeeded=no + + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + dnl If PKG_CONFIG_PATH is not already set, add /usr/local/lib/pkgconfig. + dnl If it's set, assume the user knows what they're doing. + dnl This should help avoid failures while looking for fftw3f + if test -z "$PKG_CONFIG_PATH"; then + export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" + fi + + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + AC_MSG_CHECKING(for $2) + + if $PKG_CONFIG --exists "$2" ; then + AC_MSG_RESULT(yes) + succeeded=yes + + AC_MSG_CHECKING($1_CFLAGS) + $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` + AC_MSG_RESULT($$1_CFLAGS) + + AC_MSG_CHECKING($1_LIBS) + $1_LIBS=`$PKG_CONFIG --libs "$2"` + AC_MSG_RESULT($$1_LIBS) + + AC_MSG_CHECKING($1_INCLUDEDIR) + $1_INCLUDEDIR=`$PKG_CONFIG --variable=includedir "$2"` + AC_MSG_RESULT($$1_INCLUDEDIR) + else + $1_CFLAGS="" + $1_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + ifelse([$4], ,echo $$1_PKG_ERRORS,) + fi + + AC_SUBST($1_CFLAGS) + AC_SUBST($1_LIBS) + AC_SUBST($1_INCLUDEDIR) + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + ifelse([$3], , :, [$3]) + else + ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) + fi +]) + + diff --git a/gssm/config/usrp_fusb_tech.m4 b/gssm/config/usrp_fusb_tech.m4 new file mode 100644 index 0000000..573c175 --- /dev/null +++ b/gssm/config/usrp_fusb_tech.m4 @@ -0,0 +1,54 @@ +dnl +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +dnl Boston, MA 02111-1307, USA. +dnl + +AC_DEFUN([USRP_SET_FUSB_TECHNIQUE],[ + AC_REQUIRE([AC_CANONICAL_TARGET]) + AC_ARG_WITH(fusb-tech, + [ --with-fusb-tech=OS set fast usb technique (auto)], + [cf_with_fusb_tech="$withval"], + [cf_with_fusb_tech="$target_os"]) + + + AC_CHECK_HEADER([linux/usbdevice_fs.h], + [x_have_usbdevice_fs_h=yes], + [x_have_usbdevice_fs_h=no]) + + AC_MSG_CHECKING([for fast usb technique to use]) + case "$cf_with_fusb_tech" in + linux*) if test x${x_have_usbdevice_fs_h} = xyes; + then + FUSB_TECH=linux + else + FUSB_TECH=generic + fi ;; + + darwin*) FUSB_TECH=darwin ;; + *) FUSB_TECH=generic ;; + esac + + AC_MSG_RESULT($FUSB_TECH) + AC_SUBST(FUSB_TECH) + + AM_CONDITIONAL(FUSB_TECH_darwin, test $FUSB_TECH = darwin) + AM_CONDITIONAL(FUSB_TECH_generic, test $FUSB_TECH = generic) + AM_CONDITIONAL(FUSB_TECH_linux, test $FUSB_TECH = linux) +]) + diff --git a/gssm/config/usrp_libusb.m4 b/gssm/config/usrp_libusb.m4 new file mode 100644 index 0000000..27f8c2a --- /dev/null +++ b/gssm/config/usrp_libusb.m4 @@ -0,0 +1,38 @@ +# Check for libusb support. -*- Autoconf -*- + +# Copyright 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, 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. + +AC_DEFUN([USRP_LIBUSB], +[ + AC_LANG_PUSH(C) + + AC_CHECK_HEADERS([usb.h], + [], + [ AC_MSG_ERROR([USRP requires libusb. usb.h not found, stop. See http://libusb.sf.net]) ] + ) + + save_LIBS="$LIBS" + AC_SEARCH_LIBS(usb_bulk_write, [usb], + [ USB_LIBS="$LIBS" ], + [ AC_MSG_ERROR([USRP requires libusb. usb_bulk_write not found, stop. See http://libusb.sf.net]) ] + ) + LIBS="$save_LIBS" + + AC_LANG_POP + AC_SUBST(USB_LIBS) +]) diff --git a/gssm/config/usrp_sdcc.m4 b/gssm/config/usrp_sdcc.m4 new file mode 100644 index 0000000..81c255a --- /dev/null +++ b/gssm/config/usrp_sdcc.m4 @@ -0,0 +1,67 @@ +# Check for sdcc support. -*- Autoconf -*- + +# Copyright 2004 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, 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. + +AC_DEFUN([USRP_SDCC], +[ + AC_CHECK_PROG(XCC, sdcc, sdcc -mmcs51 --no-xinit-opt,no) + AC_CHECK_PROG(XAS, asx8051, asx8051 -plosgff,no) + + if test "$XCC" = "no" -o "$XAS" = "no" ; then + AC_MSG_ERROR([USRP requires sdcc. sdcc not found, stop. See http://sdcc.sf.net]) + fi + + sdcc_version_min=$1 + + sdcc_version=`sdcc --version 2>&1 | \ + sed 's/\(SDCC.* \)\([[0-9]]*\.[[0-9]]*\.[[0-9]]*\)\( .*$\)/\2/'` + + AC_MSG_CHECKING([sdcc_version "$sdcc_version"]) + + sdcc_major_version=`echo $sdcc_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + sdcc_minor_version=`echo $sdcc_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + sdcc_micro_version=`echo $sdcc_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + sdcc_major_min=`echo $sdcc_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + sdcc_minor_min=`echo $sdcc_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + sdcc_micro_min=`echo $sdcc_version_min | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + sdcc_version_proper=`expr \ + "$sdcc_major_version" \> "$sdcc_major_min" \| \ + "$sdcc_major_version" \= "$sdcc_major_min" \& \ + "$sdcc_minor_version" \> "$sdcc_minor_min" \| \ + "$sdcc_major_version" \= "$sdcc_major_min" \& \ + "$sdcc_minor_version" \= "$sdcc_minor_min" \& \ + "$sdcc_micro_version" \>= "$sdcc_micro_min" ` + + if test "$sdcc_version_proper" = "1" ; then + AC_MSG_RESULT([$sdcc_major_version.$sdcc_minor_version.$sdcc_micro_version]) + else + AC_MSG_ERROR([USRP requires sdcc >= $sdcc_version_min. sdcc not found, stop. See http://sdcc.sf.net]) + fi + + AC_SUBST(XCC) + AC_SUBST(XAS) + +]) diff --git a/gssm/configure.ac b/gssm/configure.ac new file mode 100644 index 0000000..7ce1181 --- /dev/null +++ b/gssm/configure.ac @@ -0,0 +1,101 @@ +dnl +dnl Copyright 2004 Free Software Foundation, Inc. +dnl +dnl This file is part of GNU Radio +dnl +dnl GNU Radio is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl GNU Radio is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GNU Radio; see the file COPYING. If not, write to +dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +dnl Boston, MA 02111-1307, USA. +dnl + +AC_INIT +AC_PREREQ(2.57) +AC_CONFIG_SRCDIR([src/lib/gssm.i]) +AM_CONFIG_HEADER(config.h) +AC_CANONICAL_TARGET([]) +AM_INIT_AUTOMAKE(gssm, 0.0) + +dnl disable maintainer rules: e.g., rebuilding configure, makefile.in's unless +dnl user explicitly specifies --enable-maintainer-mode +dnl AM_MAINTAINER_MODE + +dnl LF_CONFIGURE_CC +LF_CONFIGURE_CXX +LF_SET_WARNINGS +GR_SET_GPROF +GR_SET_PROF +GR_PROG_AS +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_PROG_INSTALL + +AC_LIBTOOL_WIN32_DLL +AC_ENABLE_SHARED dnl do build shared libraries +AC_DISABLE_STATIC dnl don't build static libraries +AC_PROG_LIBTOOL + +dnl locate python, swig, +GR_SCRIPTING + +dnl check for threads (mandatory) +GR_OMNITHREAD + +dnl CFLAGS="${CFLAGS} $PTHREAD_CFLAGS" +dnl CXXFLAGS="${CXXFLAGS} $PTHREAD_CFLAGS" +CFLAGS="-O3 $PTHREAD_CFLAGS" +CXXFLAGS="-O3 $PTHREAD_CFLAGS" + +if test "x$CXX_FOR_BUILD" = x +then + CXX_FOR_BUILD=${CXX} +fi +AC_SUBST(CXX_FOR_BUILD) + +dnl Checks for header files. +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/ioctl.h sys/time.h unistd.h) +AC_CHECK_HEADERS(sys/mman.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_C_INLINE +AC_TYPE_SIZE_T +AC_HEADER_TIME + +dnl Checks for library functions. +AC_CHECK_FUNCS([]) + +dnl check for mingw +GR_PWIN32 + +PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core >= 2) +LIBS="$LIBS $GNURADIO_CORE_LIBS" + +dnl Define where to find boost includes +dnl defines BOOST_CFLAGS +GR_REQUIRE_BOOST_INCLUDES + +STD_DEFINES_AND_INCLUDES="$GNURADIO_CORE_CFLAGS $BOOST_CFLAGS" +AC_SUBST(STD_DEFINES_AND_INCLUDES) + +AC_CONFIG_FILES([\ + Makefile \ + config/Makefile \ + src/Makefile \ + src/lib/Makefile \ + src/mktun/Makefile \ + ]) + +AC_OUTPUT diff --git a/gssm/patch/wireshark-0.99.5-gssm.patch b/gssm/patch/wireshark-0.99.5-gssm.patch new file mode 100644 index 0000000..655b909 --- /dev/null +++ b/gssm/patch/wireshark-0.99.5-gssm.patch @@ -0,0 +1,2669 @@ +*** wireshark-0.99.5/epan/dissectors/packet-gsm_a.c 2007-02-01 15:00:39.000000000 -0800 +--- wireshark-0.99.5-gssm/epan/dissectors/packet-gsm_a.c 2007-05-31 00:24:56.000000000 -0700 +*************** +*** 567,575 **** + /* [3] 10.5.2.8b Channel Request Description 2 */ + /* Pos 20 */ + { 0x00, "Cipher Mode Setting" }, /* [3] 10.5.2.9 */ +! /* [3] 10.5.2.10 Cipher Response +! * [3] 10.5.2.11 Control Channel Description +! * [3] 10.5.2.11a DTM Information Details */ + { 0x00, "Dynamic ARFCN Mapping" }, /* [3] 10.5.2.11b */ + { 0x00, "Frequency Channel Sequence" }, /* [3] 10.5.2.12 */ + { 0x00, "Frequency List" }, /* 10.5.2.13 */ +--- 567,576 ---- + /* [3] 10.5.2.8b Channel Request Description 2 */ + /* Pos 20 */ + { 0x00, "Cipher Mode Setting" }, /* [3] 10.5.2.9 */ +! /* [3] 10.5.2.10 Cipher Response */ +! {0x00, "Control Channel Description"}, /* [3] 10.5.2.11 Control Channel Description */ // jl +! /* [3] 10.5.2.11 Control Channel Description */ +! /* [3] 10.5.2.11a DTM Information Details */ + { 0x00, "Dynamic ARFCN Mapping" }, /* [3] 10.5.2.11b */ + { 0x00, "Frequency Channel Sequence" }, /* [3] 10.5.2.12 */ + { 0x00, "Frequency List" }, /* 10.5.2.13 */ +*************** +*** 594,633 **** + { 0x00, "MultiRate configuration" }, /* [3] 10.5.2.21aa */ + /* Pos 30 */ + { 0x00, "Multislot Allocation" }, /* [3] 10.5.2.21b */ +! /* + * [3] 10.5.2.21c NC mode +! * [3] 10.5.2.22 Neighbour Cell Description + * [3] 10.5.2.22a Neighbour Cell Description 2 + * [3] 10.5.2.22b (void) + * [3] 10.5.2.22c NT/N Rest Octets +! * [3] 10.5.2.23 P1 Rest Octets + * [3] 10.5.2.24 P2 Rest Octets + * [3] 10.5.2.25 P3 Rest Octets +! * [3] 10.5.2.25a Packet Channel Description +! * [3] 10.5.2.25b Dedicated mode or TBF + * [3] 10.5.2.25c RR Packet Uplink Assignment + * [3] 10.5.2.25d RR Packet Downlink Assignment +! * [3] 10.5.2.26 Page Mode + * [3] 10.5.2.26a (void) + * [3] 10.5.2.26b (void) + * [3] 10.5.2.26c (void) + * [3] 10.5.2.26d (void) +- * [3] 10.5.2.27 NCC Permitted + */ + { 0x00, "Power Command" }, /* 10.5.2.28 */ + { 0x00, "Power Command and access type" }, /* 10.5.2.28a */ +! /* +! * [3] 10.5.2.29 RACH Control Parameters +! * [3] 10.5.2.30 Request Reference +! */ +! { 0x00, "RR Cause" }, /* 10.5.2.31 */ + { 0x00, "Synchronization Indication" }, /* 10.5.2.39 */ +! /* [3] 10.5.2.32 SI 1 Rest Octets + * [3] 10.5.2.33 SI 2bis Rest Octets + * [3] 10.5.2.33a SI 2ter Rest Octets + * [3] 10.5.2.33b SI 2quater Rest Octets +! * [3] 10.5.2.34 SI 3 Rest Octets +! * [3] 10.5.2.35 SI 4 Rest Octets + * [3] 10.5.2.35a SI 6 Rest Octets + * [3] 10.5.2.36 SI 7 Rest Octets + * [3] 10.5.2.37 SI 8 Rest Octets +--- 595,643 ---- + { 0x00, "MultiRate configuration" }, /* [3] 10.5.2.21aa */ + /* Pos 30 */ + { 0x00, "Multislot Allocation" }, /* [3] 10.5.2.21b */ +! /* + * [3] 10.5.2.21c NC mode +! */ +! {0x00, "Neighbor Cell Description"}, /* [3] 10.5.2.22 Neighbour Cell Description */ // jl +! /* + * [3] 10.5.2.22a Neighbour Cell Description 2 + * [3] 10.5.2.22b (void) + * [3] 10.5.2.22c NT/N Rest Octets +! */ +! {0x00, "P1 Rest Octets"}, /* [3] 10.5.2.23 P1 Rest Octets */ // jl +! /* + * [3] 10.5.2.24 P2 Rest Octets + * [3] 10.5.2.25 P3 Rest Octets +! */ +! {0x00, "Packet Channel Description"}, /* [3] 10.5.2.25a Packet Channel Description */ // jl +! {0x00, "Dedicated Mode or TBF" }, /* [3] 10.5.2.25b Dedicated mode or TBF */ // jl +! /* + * [3] 10.5.2.25c RR Packet Uplink Assignment + * [3] 10.5.2.25d RR Packet Downlink Assignment +! */ +! {0x00, "Page Mode"}, /* [3] 10.5.2.26 Page Mode */ // jl +! /* + * [3] 10.5.2.26a (void) + * [3] 10.5.2.26b (void) + * [3] 10.5.2.26c (void) + * [3] 10.5.2.26d (void) + */ ++ {0x00, "NCC Permitted"}, /* [3] 10.5.2.27 NCC Permitted */ // jl + { 0x00, "Power Command" }, /* 10.5.2.28 */ + { 0x00, "Power Command and access type" }, /* 10.5.2.28a */ +! {0x00, "RACH Control Parameters"}, /* [3] 10.5.2.29 RACH Control Parameters */ // jl +! {0x00, "Request Reference"}, /* [3] 10.5.2.30 Request Reference */ // jl +! { 0x00, "RR Cause" }, /* 10.5.2.31 */ + { 0x00, "Synchronization Indication" }, /* 10.5.2.39 */ +! {0x00, "SI 1 Rest Octets"}, /* [3] 10.5.2.32 SI 1 Rest Octets */ // jl +! /* + * [3] 10.5.2.33 SI 2bis Rest Octets + * [3] 10.5.2.33a SI 2ter Rest Octets + * [3] 10.5.2.33b SI 2quater Rest Octets +! */ +! {0x00, "SI 3 Rest Octets"}, /* [3] 10.5.2.34 SI 3 Rest Octets */ // jl +! {0x00, "SI 4 Rest Octets"}, /* [3] 10.5.2.35 SI 4 Rest Octets */ // jl +! /* + * [3] 10.5.2.35a SI 6 Rest Octets + * [3] 10.5.2.36 SI 7 Rest Octets + * [3] 10.5.2.37 SI 8 Rest Octets +*************** +*** 1057,1062 **** +--- 1067,1093 ---- + #define DTAP_SS_IEI_MASK 0x3f + + /* Initialize the protocol and registered fields */ ++ static int hf_gsm_a_rr_rach_cp_max_retrans = -1; // jl ++ static int hf_gsm_a_rr_rach_cp_tx_integer = -1; // jl ++ static int hf_gsm_a_rr_rach_cp_cell_bar_access = -1; // jl ++ static int hf_gsm_a_rr_rach_cp_re = -1; // jl ++ static int hf_gsm_a_rr_rach_cp_ec = -1; // jl ++ static int hf_gsm_a_rr_si_1_rest_octets = -1; // jl ++ ++ static int hf_gsm_a_rr_neigh_cell_dsc_ext = -1; // jl ++ static int hf_gsm_a_rr_neigh_cell_dsc_ba = -1; // jl ++ ++ static int hf_gsm_a_rr_cc_dsc_mscr = -1; // jl ++ static int hf_gsm_a_rr_cc_dsc_att = -1; // jl ++ static int hf_gsm_a_rr_cc_dsc_cbq3 = -1; // jl ++ static int hf_gsm_a_rr_cc_dsc_ccch = -1; // jl ++ ++ static int hf_gsm_a_rr_co_bcch_dn_ind = -1; // jl ++ static int hf_gsm_a_rr_co_bcch_pwrc = -1; // jl ++ static int hf_gsm_a_rr_co_bcch_dtx = -1; // jl ++ ++ static int hf_gsm_a_rr_dm_or_tbf = -1; // jl ++ + static int proto_a_bssmap = -1; + static int proto_a_dtap = -1; + static int proto_a_rp = -1; +*************** +*** 3211,3220 **** + * [3] 10.5.2.1e Cell selection indicator after release of all TCH and SDCCH IE + */ + DE_RR_CELL_DSC, /* 10.5.2.2 RR Cell Description */ + /* +- * [3] 10.5.2.3 Cell Options (BCCH) + * [3] 10.5.2.3a Cell Options (SACCH) +! * [3] 10.5.2.4 Cell Selection Parameters + * [3] 10.5.2.4a (void) + */ + DE_RR_CH_DSC, /* [3] 10.5.2.5 Channel Description */ +--- 3242,3254 ---- + * [3] 10.5.2.1e Cell selection indicator after release of all TCH and SDCCH IE + */ + DE_RR_CELL_DSC, /* 10.5.2.2 RR Cell Description */ ++ DE_RR_CO_BCCH, /* [3] 10.5.2.3 Cell Options (BCCH) */ // jl ++ + /* + * [3] 10.5.2.3a Cell Options (SACCH) +! */ +! DE_RR_CELL_SEL_PARAM, /* [3] 10.5.2.4 Cell Selection Parameters */ // jl +! /* + * [3] 10.5.2.4a (void) + */ + DE_RR_CH_DSC, /* [3] 10.5.2.5 Channel Description */ +*************** +*** 3230,3237 **** + * [3] 10.5.2.8b Channel Request Description 2 */ + /* Pos 20 */ + DE_RR_CIP_MODE_SET, /* [3] 10.5.2.9 Cipher Mode Setting */ +! /* [3] 10.5.2.10 Cipher Response +! * [3] 10.5.2.11 Control Channel Description + * [3] 10.5.2.11a DTM Information Details */ + DE_RR_DYN_ARFCN_MAP, /* [3] 10.5.2.11b Dynamic ARFCN Mapping */ + DE_RR_FREQ_CH_SEQ, /* [3] 10.5.2.12 Frequency Channel Sequence */ +--- 3264,3275 ---- + * [3] 10.5.2.8b Channel Request Description 2 */ + /* Pos 20 */ + DE_RR_CIP_MODE_SET, /* [3] 10.5.2.9 Cipher Mode Setting */ +! /* +! * [3] 10.5.2.10 Cipher Response +! */ +! DE_RR_CC_DSC, /* [3] 10.5.2.11 Control Channel Description */ // jl +! +! /* + * [3] 10.5.2.11a DTM Information Details */ + DE_RR_DYN_ARFCN_MAP, /* [3] 10.5.2.11b Dynamic ARFCN Mapping */ + DE_RR_FREQ_CH_SEQ, /* [3] 10.5.2.12 Frequency Channel Sequence */ +*************** +*** 3245,3252 **** + */ + + DE_RR_HO_REF, /* 10.5.2.15 Handover Reference */ + /* +- * [3] 10.5.2.16 IA Rest Octets + * [3] 10.5.2.17 IAR Rest Octets + * [3] 10.5.2.18 IAX Rest Octets + * [3] 10.5.2.19 L2 Pseudo Length +--- 3283,3290 ---- + */ + + DE_RR_HO_REF, /* 10.5.2.15 Handover Reference */ ++ DE_RR_IA_REST_OCTETS, /* [3] 10.5.2.16 IA Rest Octets */ // jl + /* + * [3] 10.5.2.17 IAR Rest Octets + * [3] 10.5.2.18 IAX Rest Octets + * [3] 10.5.2.19 L2 Pseudo Length +*************** +*** 3261,3298 **** + + /* + * [3] 10.5.2.21c NC mode +! * [3] 10.5.2.22 Neighbour Cell Description + * [3] 10.5.2.22a Neighbour Cell Description 2 + * [3] 10.5.2.22b (void) + * [3] 10.5.2.22c NT/N Rest Octets + * [3] 10.5.2.23 P1 Rest Octets + * [3] 10.5.2.24 P2 Rest Octets + * [3] 10.5.2.25 P3 Rest Octets +! * [3] 10.5.2.25a Packet Channel Description +! * [3] 10.5.2.25b Dedicated mode or TBF + * [3] 10.5.2.25c RR Packet Uplink Assignment + * [3] 10.5.2.25d RR Packet Downlink Assignment +! * [3] 10.5.2.26 Page Mode + * [3] 10.5.2.26a (void) + * [3] 10.5.2.26b (void) + * [3] 10.5.2.26c (void) + * [3] 10.5.2.26d (void) +- * [3] 10.5.2.27 NCC Permitted + */ + DE_RR_POW_CMD, /* 10.5.2.28 Power Command */ + DE_RR_POW_CMD_AND_ACC_TYPE, /* 10.5.2.28a Power Command and access type */ +! /* +! * [3] 10.5.2.29 RACH Control Parameters +! * [3] 10.5.2.30 Request Reference +! */ +! DE_RR_CAUSE, /* 10.5.2.31 RR Cause */ + DE_RR_SYNC_IND, /* 10.5.2.39 Synchronization Indication */ +! /* [3] 10.5.2.32 SI 1 Rest Octets + * [3] 10.5.2.33 SI 2bis Rest Octets + * [3] 10.5.2.33a SI 2ter Rest Octets + * [3] 10.5.2.33b SI 2quater Rest Octets +! * [3] 10.5.2.34 SI 3 Rest Octets +! * [3] 10.5.2.35 SI 4 Rest Octets + * [3] 10.5.2.35a SI 6 Rest Octets + * [3] 10.5.2.36 SI 7 Rest Octets + * [3] 10.5.2.37 SI 8 Rest Octets +--- 3299,3346 ---- + + /* + * [3] 10.5.2.21c NC mode +! */ +! DE_RR_NEIGH_CELL_DSC, /* [3] 10.5.2.22 Neighbour Cell Description */ // jl +! /* + * [3] 10.5.2.22a Neighbour Cell Description 2 + * [3] 10.5.2.22b (void) + * [3] 10.5.2.22c NT/N Rest Octets ++ */ ++ DE_RR_P1_REST_OCTETS, /* [3] 10.5.2.23 P1 Rest Octets */ // jl ++ /* + * [3] 10.5.2.23 P1 Rest Octets + * [3] 10.5.2.24 P2 Rest Octets + * [3] 10.5.2.25 P3 Rest Octets +! */ +! DE_RR_PCD, /* [3] 10.5.2.25a Packet Channel Description */ // jl +! DE_RR_DM_OR_TBF, /* [3] 10.5.2.25b Dedicated mode or TBF */ // jl +! /* + * [3] 10.5.2.25c RR Packet Uplink Assignment + * [3] 10.5.2.25d RR Packet Downlink Assignment +! */ +! DE_RR_PAGE_MODE, /* [3] 10.5.2.26 Page Mode */ // jl +! /* + * [3] 10.5.2.26a (void) + * [3] 10.5.2.26b (void) + * [3] 10.5.2.26c (void) + * [3] 10.5.2.26d (void) + */ ++ DE_RR_NCC_PERMITTED, /* [3] 10.5.2.27 NCC Permitted */ // jl + DE_RR_POW_CMD, /* 10.5.2.28 Power Command */ + DE_RR_POW_CMD_AND_ACC_TYPE, /* 10.5.2.28a Power Command and access type */ +! DE_RR_RACH_CP, /* [3] 10.5.2.29 RACH Control Parameters */ // jl +! DE_RR_REQ_REF, /* [3] 10.5.2.30 Request Reference */ // jl +! DE_RR_CAUSE, /* 10.5.2.31 RR Cause */ + DE_RR_SYNC_IND, /* 10.5.2.39 Synchronization Indication */ +! DE_RR_SI_1_REST_OCTETS, /* [3] 10.5.2.32 SI 1 Rest Octets */ // jl +! /* + * [3] 10.5.2.33 SI 2bis Rest Octets + * [3] 10.5.2.33a SI 2ter Rest Octets + * [3] 10.5.2.33b SI 2quater Rest Octets +! */ +! DE_RR_SI_3_REST_OCTETS, /* [3] 10.5.2.34 SI 3 Rest Octets */ // jl +! DE_RR_SI_4_REST_OCTETS, /* [3] 10.5.2.35 SI 4 Rest Octets */ // jl +! /* + * [3] 10.5.2.35a SI 6 Rest Octets + * [3] 10.5.2.36 SI 7 Rest Octets + * [3] 10.5.2.37 SI 8 Rest Octets +*************** +*** 3463,3480 **** + de_cell_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) + { + guint32 curr_offset; + +! curr_offset = offset; + +- curr_offset += + /* 0x02 CI */ +! be_cell_id_aux(tvb, tree, offset, len, add_string, string_len, 0x02); + + /* no length check possible */ + + return(curr_offset - offset); + } + + /* + * [3] 10.5.1.3 + */ +--- 3511,3631 ---- + de_cell_id(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string, int string_len) + { + guint32 curr_offset; ++ proto_item *item; ++ proto_tree *subtree; + +! curr_offset = offset; +! +! item = proto_tree_add_text(tree, tvb, curr_offset, 2, gsm_dtap_elem_strings[DE_CELL_ID].strptr); +! subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_CELL_ID]); + + /* 0x02 CI */ +! curr_offset += be_cell_id_aux(tvb, subtree, offset, len, add_string, string_len, 0x02); + + /* no length check possible */ + + return(curr_offset - offset); + } + ++ ++ // jl -- got this list somewhere off the net... ++ typedef struct mcc_mnc_name_s { ++ char *mcc; ++ char *mnc; ++ char *name; ++ } mcc_mnc_name_t; ++ ++ static mcc_mnc_name_t mcc_mnc_names[] = { ++ {"310", "110", "Wireless 2000 PCS"}, ++ {"310", "020", "Union Telephone"}, ++ {"310", "260", "T-Mobile"}, ++ {"310", "030", "Centennial"}, ++ {"310", "310", "T-Mobile"}, ++ {"310", "040", "Concho Wireless"}, ++ {"310", "460", "Simmetry"}, ++ {"310", "070", "Highland Cellular"}, ++ {"310", "080", "Corr Wireless"}, ++ {"310", "090", "Edge Wireless"}, ++ {"310", "100", "Plateau Wireless"}, ++ {"310", "170", "T-Mobile (formerly Cingular Wireless CA/NV)"}, ++ {"310", "180", "West Central"}, ++ {"310", "190", "Alaska Wireless"}, ++ {"310", "320", "Cellular One"}, ++ {"310", "340", "WestLink"}, ++ {"310", "390", "Yorkville"}, ++ {"310", "410", "Cingular Wireless"}, ++ {"310", "420", "Cincinnati Bell"}, ++ {"310", "430", "Alaska DigiTel"}, ++ {"310", "440", "Cellular One"}, ++ {"310", "450", "Viaero Wireless"}, ++ {"310", "460", "Simmetry (formerly OneLink PCS)"}, ++ {"310", "490", "SunCom"}, ++ {"310", "500", "Alltel (formerly PSC Wireless - GA/AL region only)"}, ++ {"310", "530", "West VA Wireless"}, ++ {"310", "540", "Oklahoma Western"}, ++ {"310", "560", "Cellular One DCS"}, ++ {"310", "590", "Western Wireless (now parto of Alltel)"}, ++ {"310", "610", "Epic Touch"}, ++ {"310", "620", "Coleman Telecomm"}, ++ {"310", "630", "AmeriLink PCS"}, ++ {"310", "640", "Einstein PCS"}, ++ {"310", "680", "Cellular One DCS (Dobson. Formerly NPI Wireless)"}, ++ {"310", "690", "Immix Wireless"}, ++ {"310", "740", "Telemetrix"}, ++ {"310", "760", "Panhandle Telecomm"}, ++ {"310", "770", "Iowa Wireless"}, ++ {"310", "790", "PinPoint Wireless"}, ++ {"310", "830", "Caprock Cellular"}, ++ {"310", "870", "Kaplan"}, ++ {"310", "880", "Advantage Cellular"}, ++ {"310", "890", "RCC/Unicell"}, ++ {"310", "900", "Texas Cellular"}, ++ {"310", "910", "First Cellular"}, ++ {"310", "940", "Digital Cellular"}, ++ {"310", "950", "XIT Wireless"}, ++ {"310", "980", "Cingular Wireless (not in commercial use)"}, ++ {"310", "990", "Cingular Wireless (not in commercial use)"}, ++ {"311", "000", "Mid-Tex Cellular"}, ++ {"311", "030", "Indigo Wireless"}, ++ {"311", "040", "Commnet Wireless"}, ++ {"311", "050", "Wilkes Cellular"}, ++ {"311", "070", "Easterbrooke"}, ++ {"311", "080", "Pine Cellular"}, ++ {"311", "090", "Siouxland PCS"}, ++ {"311", "110", "High Plains Wireless"}, ++ {"311", "130", "Cell One Amarillo"}, ++ {"311", "140", "Sprocket (aka MBO Wireless)"}, ++ {"311", "150", "Wilkes Cellular"}, ++ {"311", "160", "Cellular One DCS (Dobson. Formerly EMW)"}, ++ {"311", "170", "PetroCom"}, ++ {"311", "180", "Cingular Wireless (not in commercial use)"}, ++ {"311", "190", "Cellular Properties Inc (aka CellOne East Central IL)"}, ++ {"311", "210", "Farmers Cellular"}, ++ {"311", "250", "USA i CAN"}, ++ {"310", "110", "Wireless 2000 PCS (no longer in business)"}, ++ {"310", "150", "Cingular Wireless (SE GA/SC/NC/E TN. Consolidated with 310-410)"}, ++ {"310", "160", "T-Mobile (consolidated with 310-260. Formerly Omnipoint)"}, ++ {"310", "200", "T-Mobile (consolidated with 310-260)"}, ++ {"310", "210", "T-Mobile (consolidated with 310-260)"}, ++ {"310", "220", "T-Mobile (consolidated with 310-260)"}, ++ {"310", "230", "T-Mobile (consolidated with 310-260)"}, ++ {"310", "240", "T-Mobile (consolidated with 310-260)"}, ++ {"310", "250", "T-Mobile (consolidated with 310-260)"}, ++ {"310", "260", "T-Mobile (consolidated with 310-260)"}, ++ {"310", "270", "T-Mobile (consolidated with 310-260. Former Powertel)"}, ++ {"310", "310", "T-Mobile (consolidated with 310-260. Former Aerial)"}, ++ {"310", "350", "Carolina Phone (No longer in business)"}, ++ {"310", "380", "Cingular Wireless (formerly AT&T Wireless)"}, ++ {"310", "400", "Minnesota Southern (never actually used)"}, ++ {"310", "580", "T-Mobile (consolidated with 310-260. Former PCS One)"}, ++ {"310", "660", "T-Mobile (consolidated with 310-260. Former DigiPH)"}, ++ {"310", "670", "Wireless 2000 PCS (No longer in business)"}, ++ {"310", "780", "AirLink PCS (No longer in business)"}, ++ {"310", "800", "T-Mobile (consolidated with 310-260)"}, ++ {0, 0, 0} ++ }; ++ ++ + /* + * [3] 10.5.1.3 + */ +*************** +*** 3485,3493 **** + guint16 value; + guint32 curr_offset; + proto_tree *subtree; +! proto_item *item; + gchar mcc[4]; + gchar mnc[4]; + + len = len; + curr_offset = offset; +--- 3636,3646 ---- + guint16 value; + guint32 curr_offset; + proto_tree *subtree; +! proto_item *item, *item_name; + gchar mcc[4]; + gchar mnc[4]; ++ mcc_mnc_name_t *mmn = &mcc_mnc_names[0]; ++ + + len = len; + curr_offset = offset; +*************** +*** 3506,3516 **** + mcc_mnc_aux(octs, mcc, mnc); + + +! proto_tree_add_text(subtree, + tvb, curr_offset, 3, + "Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s", + mcc, + mnc); + + curr_offset += 3; + +--- 3659,3676 ---- + mcc_mnc_aux(octs, mcc, mnc); + + +! item_name = proto_tree_add_text(subtree, + tvb, curr_offset, 3, + "Mobile Country Code (MCC): %s, Mobile Network Code (MNC): %s", + mcc, + mnc); ++ while(mmn->name) { ++ if((!strncmp(mcc, mmn->mcc, 3)) && (!strncmp(mnc, mmn->mnc, 3))) { ++ proto_item_append_text(item_name, " -- %s", mmn->name); ++ break; ++ } ++ mmn++; ++ } + + curr_offset += 3; + +*************** +*** 4051,4071 **** + guint8 oct,bit,byte; + guint16 arfcn; + proto_item *item; +! + + len = len; + curr_offset = offset; + + oct = tvb_get_guint8(tvb, curr_offset); + + /* FORMAT-ID, Format Identifier (part of octet 3)*/ +! proto_tree_add_item(tree, hf_gsm_a_rr_format_id, tvb, curr_offset, 1, FALSE); + /* Cell Channel Description */ + + if ((oct & 0xc0) == 0x00) + { + /* bit map 0 */ +! item = proto_tree_add_text(tree,tvb, curr_offset, 16,"list of ARFCN for hopping = "); + bit = 4; + arfcn = 125; + for (byte = 0;byte <= 15;byte++) +--- 4211,4237 ---- + guint8 oct,bit,byte; + guint16 arfcn; + proto_item *item; +! proto_tree *subtree; + + len = len; + curr_offset = offset; + ++ item = proto_tree_add_text(tree, tvb, curr_offset, 16, gsm_dtap_elem_strings[DE_RR_CELL_CH_DSC].strptr); ++ subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_CELL_CH_DSC]); ++ + oct = tvb_get_guint8(tvb, curr_offset); + ++ // mask out "spare" bits which can be used for other channel lists -- jl ++ oct = oct & 0xcf; ++ + /* FORMAT-ID, Format Identifier (part of octet 3)*/ +! proto_tree_add_item(subtree, hf_gsm_a_rr_format_id, tvb, curr_offset, 1, FALSE); + /* Cell Channel Description */ + + if ((oct & 0xc0) == 0x00) + { + /* bit map 0 */ +! item = proto_tree_add_text(subtree,tvb, curr_offset, 16,"list of ARFCN for hopping = "); + bit = 4; + arfcn = 125; + for (byte = 0;byte <= 15;byte++) +*************** +*** 4086,4117 **** + else if ((oct & 0xf8) == 0x80) + { + /* 1024 range */ +! proto_tree_add_text(tree,tvb, curr_offset, 16,"Cell Channel Description (1024 range) (Not decoded)"); + curr_offset = curr_offset + 16; + } + else if ((oct & 0xfe) == 0x88) + { + /* 512 range */ +! proto_tree_add_text(tree,tvb, curr_offset, 16,"Cell Channel Description (512 range) (Not decoded)"); + curr_offset = curr_offset + 16; + } + else if ((oct & 0xfe) == 0x8a) + { + /* 256 range */ +! proto_tree_add_text(tree,tvb, curr_offset, 16,"Cell Channel Description (256 range) (Not decoded)"); + curr_offset = curr_offset + 16; + } + else if ((oct & 0xfe) == 0x8c) + { + /* 128 range */ +! proto_tree_add_text(tree,tvb, curr_offset, 16,"Cell Channel Description (128 range) (Not decoded)"); + curr_offset = curr_offset + 16; + } + else if ((oct & 0xfe) == 0x8e) + { + /* variable bit map */ + arfcn = ((oct & 0x01) << 9) | (tvb_get_guint8(tvb, curr_offset+1) << 1) | ((tvb_get_guint8(tvb, curr_offset + 2) & 0x80) >> 7); +! item = proto_tree_add_text(tree,tvb, curr_offset, 16,"list of ARFCN for hopping = %d",arfcn); + curr_offset = curr_offset + 2; + bit = 7; + for (byte = 0;byte <= 13;byte++) +--- 4252,4283 ---- + else if ((oct & 0xf8) == 0x80) + { + /* 1024 range */ +! proto_tree_add_text(subtree,tvb, curr_offset, 16,"Cell Channel Description (1024 range) (Not decoded)"); + curr_offset = curr_offset + 16; + } + else if ((oct & 0xfe) == 0x88) + { + /* 512 range */ +! proto_tree_add_text(subtree,tvb, curr_offset, 16,"Cell Channel Description (512 range) (Not decoded)"); + curr_offset = curr_offset + 16; + } + else if ((oct & 0xfe) == 0x8a) + { + /* 256 range */ +! proto_tree_add_text(subtree,tvb, curr_offset, 16,"Cell Channel Description (256 range) (Not decoded)"); + curr_offset = curr_offset + 16; + } + else if ((oct & 0xfe) == 0x8c) + { + /* 128 range */ +! proto_tree_add_text(subtree,tvb, curr_offset, 16,"Cell Channel Description (128 range) (Not decoded)"); + curr_offset = curr_offset + 16; + } + else if ((oct & 0xfe) == 0x8e) + { + /* variable bit map */ + arfcn = ((oct & 0x01) << 9) | (tvb_get_guint8(tvb, curr_offset+1) << 1) | ((tvb_get_guint8(tvb, curr_offset + 2) & 0x80) >> 7); +! item = proto_tree_add_text(subtree,tvb, curr_offset, 16,"list of ARFCN for hopping = %d",arfcn); + curr_offset = curr_offset + 2; + bit = 7; + for (byte = 0;byte <= 13;byte++) +*************** +*** 4172,4181 **** + + return(curr_offset - offset); + } +! /* + * [3] 10.5.2.3 Cell Options (BCCH) + * [3] 10.5.2.3a Cell Options (SACCH) + * [3] 10.5.2.4 Cell Selection Parameters + * [3] 10.5.2.4a MAC Mode and Channel Coding Requested + * [3] 10.5.2.5 Channel Description + */ +--- 4338,4545 ---- + + return(curr_offset - offset); + } +! +! +! /* // jl + * [3] 10.5.2.3 Cell Options (BCCH) ++ * ++ * DN-IND, Dynamic ARFCN mapping indicator (octet 2) Note 4 ++ * 87654321 ++ * 0....... Dynamic ARFCN mapping is not used by the PLMN ++ * 1....... Dynamic ARFCN mapping is used by the PLMN ++ * ++ * PWRC Power control indicator (octet 2) Note 1 ++ * 87654321 ++ * .0...... PWRC is not set ++ * .1...... PWRC is set ++ * ++ * DTX, DTX indicator (octet 2) Note 3 ++ * 65 ++ * ..00.... The MSs may use uplink discontinuous transmission ++ * ..01.... The MSs shall use uplink discontinuous transmission ++ * ..10.... The MS shall not use uplink discontinuous transmission ++ * ++ * RADIO-LINK_TIMEOUT (octet 2) Note 2 ++ * 4321 ++ * ....0000 4 ++ * ....0001 8 ++ * ....0010 12 ++ * ++ * ....1110 60 ++ * ....1111 64 ++ * ++ * NOTE 1: The precise meaning of the PWRC parameter can be found in 3GPP TS 45.008. ++ * NOTE 2: The precise meaning of RADIO-LINK-TIMEOUT parameter can be found in 3GPP TS 45.008. ++ * NOTE 3: The DTX indicator field is not related to the use of downlink discontinuous transmission. ++ * NOTE 4: Dynamic ARFCN mapping is specified in 3GPP TS 45.005. ++ */ ++ static const value_string gsm_a_rr_co_bcch_dn_ind_vals[] = { ++ {0, "Dynamic ARFCN mapping is not used by the PLMN"}, ++ {1, "Dynamic ARFCN mapping is used by the PLMN"}, ++ {0, 0} ++ }; ++ ++ static const value_string gsm_a_rr_co_bcch_pwrc_vals[] = { ++ {0, "PWRC is not set"}, ++ {1, "PWRC is set"}, ++ {0, 0} ++ }; ++ ++ static const value_string gsm_a_rr_co_bcch_dtx_vals[] = { ++ {0, "The MSs may use uplink discontinuous transmission"}, ++ {1, "The MSs shall use uplink discontinuous transmission"}, ++ {2, "The MSs shall not use uplink discontinuous transmission"}, ++ {0, 0} ++ }; ++ ++ ++ static guint8 de_rr_co_bcch(tvbuff_t *tvb, proto_tree *tree, ++ guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { ++ ++ guint32 curr_offset; ++ guint8 oct; ++ int rl_timeout; ++ proto_tree *subtree; ++ proto_item *item; ++ ++ len = len; ++ curr_offset = offset; ++ ++ item = proto_tree_add_text(tree, tvb, curr_offset, 1, gsm_dtap_elem_strings[DE_RR_CO_BCCH].strptr); ++ subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_CO_BCCH]); ++ proto_tree_add_item(subtree, hf_gsm_a_rr_co_bcch_dn_ind, tvb, curr_offset, 1, FALSE); ++ proto_tree_add_item(subtree, hf_gsm_a_rr_co_bcch_pwrc, tvb, curr_offset, 1, FALSE); ++ proto_tree_add_item(subtree, hf_gsm_a_rr_co_bcch_dtx, tvb, curr_offset, 1, FALSE); ++ ++ oct = tvb_get_guint8(tvb, curr_offset); ++ rl_timeout = ((oct & 0xf) + 1) * 4; ++ proto_tree_add_text(subtree, tvb, curr_offset, 1, "radio-link timeout %d", rl_timeout); ++ ++ curr_offset++; ++ ++ return curr_offset - offset; ++ } ++ ++ ++ /* + * [3] 10.5.2.3a Cell Options (SACCH) ++ */ ++ ++ /* // jl + * [3] 10.5.2.4 Cell Selection Parameters ++ * ++ * CELL-RESELECT-HYSTERESIS (octet 2) ++ * The usage of this information is defined in 3GPP TS 45.008 ++ * ++ * 8 7 6 ++ * 0 0 0 0 dB RXLEV hysteresis for LA re-selection ++ * 0 0 1 2 dB RXLEV hysteresis for LA re-selection ++ * 0 1 0 4 dB RXLEV hysteresis for LA re-selection ++ * 0 1 1 6 dB RXLEV hysteresis for LA re-selection ++ * 1 0 0 8 dB RXLEV hysteresis for LA re-selection ++ * 1 0 1 10 dB RXLEV hysteresis for LA re-selection ++ * 1 1 0 12 dB RXLEV hysteresis for LA re-selection ++ * 1 1 1 14 dB RXLEV hysteresis for LA re-selection ++ * ++ * MS-TXPWR-MAX-CCH (octet 2) ++ * Bits 5 - 1: ++ * The MS-TXPWR-MAX-CCH field is coded as the binary representation ++ * of the "power control level" in 3GPP TS 45.005 corresponding to ++ * the maximum TX power level an MS may use when accessing on a ++ * Control Channel CCH. This value shall be used by the Mobile ++ * Station according to 3GPP TS 45.008. ++ * ++ * Range: 0 to 31. ++ * ++ * ACS, ADDITIONAL RESELECT PARAM IND (octet 3) ++ * Bit 8: In System Information type 3 message: ++ * 0 System information type 16 and 17 are not broadcast on the BCCH. ++ * 1 System information type 16 and 17 are broadcast on the ++ * BCCH. A mobile station which does not support System ++ * information type 16 and 17 may consider this bit as "0". ++ * ++ * In System Information type 4 message: ++ * 0 The SI 4 rest octets, if present, and SI 7 and SI 8 rest octets, if ++ * so indicated in the SI 4 rest octets shall be used to derive the value ++ * of PI and possibly C2 parameters and/or other parameters ++ * 1 The value of PI and possibly C2 parameters and/or other parameters ++ * in a System information type 7 or type 8 message shall be used ++ * ++ * NECI: HALF RATE SUPPORT (octet 3) ++ * Bit 7: ++ * 0 New establishment causes are not supported ++ * 1 New establishment causes are supported ++ * ++ * RXLEV-ACCESS-MIN (octet 3) ++ * Bits 6 - 1: ++ * The RXLEV-ACCESS-MIN field is coded as the binary representation ++ * of the minimum received signal level at the MS for which it is ++ * permitted to access the system. ++ * ++ * Range: 0 to 63. (See 3GPP TS 45.008). ++ */ ++ static guint8 de_rr_cell_sel_param(tvbuff_t *tvb, proto_tree *tree, ++ guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { ++ ++ guint32 curr_offset; ++ guint8 oct; ++ proto_tree *subtree; ++ proto_item *item; ++ int crh, mtmc, acs, hrs, ram; ++ ++ len = len; ++ curr_offset = offset; ++ ++ item = proto_tree_add_text(tree, tvb, curr_offset, 2, gsm_dtap_elem_strings[DE_RR_CELL_SEL_PARAM].strptr); ++ subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_CELL_SEL_PARAM]); ++ ++ oct = tvb_get_guint8(tvb, curr_offset); ++ ++ // CELL-RESELECT-HYSTERESIS ++ crh = ((oct & 0xe0) >> 5) * 2; ++ proto_tree_add_text(subtree, tvb, curr_offset, 1, "Cell Reselect Hysteresis: %d dB RXLEV hysteresis for LA re-selection", crh); ++ ++ // MS-TXPWR-MAX-CCH (octet 2) ++ mtmc = (oct & 0x1f); ++ proto_tree_add_text(subtree, tvb, curr_offset, 1, "Maximum TX power level an MS may use when accessing on a Control Channel CCH: %d", mtmc); ++ ++ curr_offset++; ++ oct = tvb_get_guint8(tvb, curr_offset); ++ ++ // ACS, System Information Type 3 ++ acs = (oct & 0x80) >> 7; ++ item = proto_tree_add_text(subtree, tvb, curr_offset, 1, "In System Information Type 3: "); ++ if(!acs) ++ proto_item_append_text(item, "System Information Types 16 and 17 are not broadcast on the BCCH"); ++ else ++ proto_item_append_text(item, "System Information Types 16 and 17 are broadcast on the BCCH"); ++ ++ item = proto_tree_add_text(subtree, tvb, curr_offset, 1, "In System Information Type 4: "); ++ if(!acs) ++ proto_item_append_text(item, "The SI 4, SI 7, and SI 8 rest octets shall be used to derive the value of PI and possibly C2 parameters"); ++ else ++ proto_item_append_text(item, "The value of PI and possibly C2 parameters in a System Information Type 7 or 8 message shall be used"); ++ ++ // NECI: HALF RATE SUPPORT (octet 3) ++ hrs = (oct & 0x40) >> 6; ++ item = proto_tree_add_text(subtree, tvb, curr_offset, 1, "Half Rate Support: "); ++ if(!hrs) ++ proto_item_append_text(item, "New establishment causes are not supported"); ++ else ++ proto_item_append_text(item, "New establishment causes are supported"); ++ ++ // RXLEV-ACCESS-MIN (octet 3) ++ ram = oct & 0x3f; ++ proto_tree_add_text(subtree, tvb, curr_offset, 1, "RXLEV-ACCESS-MIN: Minimum received signal level at the MS for which it is permitted to access " ++ "the system: %d", ram); ++ ++ curr_offset++; ++ ++ return curr_offset - offset; ++ } ++ ++ ++ /* + * [3] 10.5.2.4a MAC Mode and Channel Coding Requested + * [3] 10.5.2.5 Channel Description + */ +*************** +*** 4207,4212 **** +--- 4571,4578 ---- + } + else + { ++ subchannel = 0; ++ str = ""; + if ((oct8 & 0xf0) == 0x10) + { + str = "TCH/H + ACCHs, Subchannel"; +*************** +*** 4309,4314 **** +--- 4675,4682 ---- + } + else + { ++ subchannel = 0; ++ str = ""; + if ((oct8 & 0xf0) == 0x10) + { + str = "TCH/H + ACCHs, Subchannel"; +*************** +*** 4517,4534 **** + guint8 + de_rr_chnl_needed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) + { +! guint32 curr_offset; + +! len = len; +! curr_offset = offset; +! +! proto_tree_add_item(tree, hf_gsm_a_rr_chnl_needed_ch1, tvb, curr_offset, 1, FALSE); +! proto_tree_add_item(tree, hf_gsm_a_rr_chnl_needed_ch2, tvb, curr_offset, 1, FALSE); + + curr_offset = curr_offset + 1; + +! return(curr_offset - offset); + } + /* + * [3] 10.5.2.8a Channel Request Description + * [3] 10.5.2.8b Channel Request Description 2 +--- 4885,4910 ---- + guint8 + de_rr_chnl_needed(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) + { +! proto_tree *subtree; +! proto_item *item; +! guint32 curr_offset; + +! len = len; +! curr_offset = offset; +! +! item = proto_tree_add_text(tree, tvb, curr_offset, 1, gsm_dtap_elem_strings[DE_RR_CHNL_NEEDED].strptr); +! subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_CHNL_NEEDED]); +! proto_tree_add_item(subtree, hf_gsm_a_rr_chnl_needed_ch1, tvb, curr_offset, 1, FALSE); +! proto_tree_add_item(subtree, hf_gsm_a_rr_chnl_needed_ch2, tvb, curr_offset, 1, FALSE); +! +! // we're assuming that this is the second half octet, so go +! // ahead and increase curr_offset. + + curr_offset = curr_offset + 1; + +! return(curr_offset - offset); + } ++ + /* + * [3] 10.5.2.8a Channel Request Description + * [3] 10.5.2.8b Channel Request Description 2 +*************** +*** 4573,4579 **** + } + /* + * [3] 10.5.2.10 Cipher Response +! * [3] 10.5.2.11 Control Channel Description + * [3] 10.5.2.11a DTM Information Details + */ + /* +--- 4949,5079 ---- + } + /* + * [3] 10.5.2.10 Cipher Response +! */ +! +! +! /* +! * [3] 10.5.2.11 Control Channel Description // jl +! */ +! +! static const true_false_string gsm_a_rr_cc_dsc_mscr_tfs = { +! "MSC is Release 1999 onwards.", +! "MSC is Release 1998 or older." +! }; +! +! static const true_false_string gsm_a_rr_cc_dsc_att_tfs = { +! "MSs in the cell shall apply IMSI attach and detach procedure.", +! "MSs in the cell are not allowed to apply IMSI attach and detach " +! "procedure." +! }; +! +! static const value_string gsm_a_rr_cc_dsc_cbq3_vals[] = { +! {0, "Iu mode not supported."}, +! {1, "Iu mode capable MSs barred."}, +! {2, "Iu mode supported, cell not barred."}, +! {3, "Iu mode supported, cell not barred. The network shall not use " +! "this value."}, +! {0, 0} +! }; +! +! static const value_string gsm_a_rr_cc_dsc_ccch_vals[] = { +! {0, "1 basic physical channel used for CCCH, not combined with " +! "SDCCHs"}, +! {1, "1 basic physical channel used for CCCH, combined with SDCCHs"}, +! {2, "2 basic physical channels used for CCCH, not combined with " +! "SDCCHs"}, +! {3, "reserved"}, +! {4, "3 basic physical channels used for CCCH, not combined with " +! "SDCCHs"}, +! {5, "reserved"}, +! {6, "4 basic physical channels used for CCCH, not combined with " +! "SDCCHs"}, +! {7, "reserved"}, +! {0, 0} +! }; +! +! static guint8 de_rr_cc_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { +! +! guint32 curr_offset; +! guint8 oct; +! guint curr_len; +! proto_tree *subtree; +! proto_item *item; +! int bsagblksres, ccchconf, bspamfrms, psch; +! float t3212; +! +! curr_offset = offset; +! curr_len = len; +! +! item = proto_tree_add_text(tree, tvb, curr_offset, 3, +! gsm_dtap_elem_strings[DE_RR_CC_DSC].strptr); +! subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_CC_DSC]); +! +! proto_tree_add_item(subtree, hf_gsm_a_rr_cc_dsc_mscr, tvb, curr_offset, +! 1, FALSE); +! proto_tree_add_item(subtree, hf_gsm_a_rr_cc_dsc_att, tvb, curr_offset, +! 1, FALSE); +! +! oct = tvb_get_guint8(tvb, curr_offset); +! +! // BS-AG-BLKS-RES +! bsagblksres = (oct & 0x38) >> 3; +! +! // CCCH-CONF +! ccchconf = (oct & 7); +! +! item = proto_tree_add_text(subtree, tvb, curr_offset, 1, +! "BS-AG-BLKS-RES: "); +! +! if((ccchconf == 1) && (bsagblksres > 2)) +! proto_item_append_text(item, "reserved"); +! else +! proto_item_append_text(item, "%d", bsagblksres); +! +! proto_tree_add_item(subtree, hf_gsm_a_rr_cc_dsc_ccch, tvb, curr_offset, +! 1, FALSE); +! +! curr_offset++; curr_len--; +! proto_tree_add_item(subtree, hf_gsm_a_rr_cc_dsc_cbq3, tvb, curr_offset, +! 1, FALSE); +! +! oct = tvb_get_guint8(tvb, curr_offset); +! +! // BS-PA-MFRMS +! bspamfrms = (oct & 0x7) + 2; +! proto_tree_add_text(subtree, tvb, curr_offset, 1, "BS-PA-MFRMS: %d " +! "multiframes period for transmission of PAGING REQUEST messages " +! "to the same paging subgroup", bspamfrms); +! +! curr_offset++; curr_len--; +! oct = tvb_get_guint8(tvb, curr_offset); +! +! // T3212 +! t3212 = (float)oct / 10.0; +! item = proto_tree_add_text(subtree, tvb, curr_offset, 1, "T3212 " +! "timeout value: "); +! if(oct) +! proto_item_append_text(item, "%.1f hours (%d minutes)", +! t3212, (int)oct * 6); +! else +! proto_item_append_text(item, "infinite (periodic updating " +! "shall not be used within the cell)"); +! +! item = proto_tree_add_text(subtree, tvb, curr_offset - 2, 2, +! "The number of different paging subchannels on the CCCH is "); +! if(ccchconf == 1) +! psch = MAX(1, (3 - bsagblksres)) * bspamfrms; +! else +! psch = (9 - bsagblksres) * bspamfrms; +! proto_item_append_text(item, "%d", psch); +! +! curr_offset++; curr_len--; +! +! return curr_offset - offset; +! } +! +! +! /* + * [3] 10.5.2.11a DTM Information Details + */ + /* +*************** +*** 4755,4762 **** +--- 5255,5288 ---- + + return(curr_offset - offset); + } ++ ++ + /* + * [3] 10.5.2.16 IA Rest Octets ++ * ++ * XXX not done ++ */ ++ static guint8 de_rr_ia_rest_octets(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) ++ { ++ guint32 curr_offset; ++ guint curr_len; ++ // proto_tree *subtree; ++ proto_item *item; ++ ++ curr_offset = offset; ++ curr_len = len; ++ ++ item = proto_tree_add_text(tree, tvb, curr_offset, curr_len, gsm_dtap_elem_strings[DE_RR_IA_REST_OCTETS].strptr); ++ // subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_IA_REST_OCTETS]); ++ ++ // len is -1 for mandatory, so can't increase by this. ++ // curr_offset += curr_len; ++ ++ return curr_offset - offset; ++ } ++ ++ ++ /* + * [3] 10.5.2.17 IAR Rest Octets + * [3] 10.5.2.18 IAX Rest Octets + * [3] 10.5.2.19 L2 Pseudo Length +*************** +*** 4900,4925 **** + return(curr_offset - offset); + + } + /* + * [3] 10.5.2.21c NC mode +! * [3] 10.5.2.22 Neighbour Cell Description + * [3] 10.5.2.22a Neighbour Cell Description 2 + * [3] 10.5.2.22b (void) + * [3] 10.5.2.22c NT/N Rest Octets + * [3] 10.5.2.23 P1 Rest Octets + * [3] 10.5.2.24 P2 Rest Octets + * [3] 10.5.2.25 P3 Rest Octets + * [3] 10.5.2.25a Packet Channel Description + * [3] 10.5.2.25b Dedicated mode or TBF + * [3] 10.5.2.25c RR Packet Uplink Assignment + * [3] 10.5.2.25d RR Packet Downlink Assignment + * [3] 10.5.2.26 Page Mode + * [3] 10.5.2.26a (void) + * [3] 10.5.2.26b (void) + * [3] 10.5.2.26c (void) + * [3] 10.5.2.26d (void) +- * [3] 10.5.2.27 NCC Permitted + */ + /* + * [3] 10.5.2.28 Power Command + * +--- 5426,5786 ---- + return(curr_offset - offset); + + } ++ ++ + /* + * [3] 10.5.2.21c NC mode +! */ +! +! +! /* +! * [3] 10.5.2.22 Neighbour Cell Description // jl +! * +! * The purpose of the Neighbour Cell Description information +! * element is to provide the absolute radio frequency channel +! * numbers of the BCCH carriers to be monitored by the mobile +! * stations in the cell. +! * +! * The Neighbour Cell Description information element is coded as +! * the Cell Channel Description information element, as specified +! * in sub-clause 10.5.2.1b, with the exception of bits 5 and 6 of +! * octet 2. Figure 10.5.2.22.1 and table 10.5.2.22.1: contains the +! * difference of specifications. +! */ +! +! static const true_false_string gsm_a_rr_neigh_cell_dsc_ext_tfs = { +! "The information element carries only a part of the BA", +! "The information element carries the complete BA" +! }; +! +! static const true_false_string gsm_a_rr_neigh_cell_dsc_ba_tfs = { +! "Base Allocation for SACCH", +! "Base Allocation for BCCH" +! }; +! +! static guint8 de_rr_neigh_cell_dsc(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) +! { +! guint32 curr_offset; +! guint curr_len; +! proto_tree *subtree; +! proto_item *item; +! +! curr_offset = offset; +! curr_len = len; +! +! item = proto_tree_add_text(tree, tvb, curr_offset, 16, +! gsm_dtap_elem_strings[DE_RR_NEIGH_CELL_DSC].strptr); +! subtree = proto_item_add_subtree(item, +! ett_gsm_dtap_elem[DE_RR_NEIGH_CELL_DSC]); +! +! proto_tree_add_item(subtree, hf_gsm_a_rr_neigh_cell_dsc_ext, tvb, +! curr_offset, 1, FALSE); +! proto_tree_add_item(subtree, hf_gsm_a_rr_neigh_cell_dsc_ba, tvb, +! curr_offset, 1, FALSE); +! +! return de_rr_cell_ch_dsc(tvb, tree, curr_offset, curr_len, add_string, +! string_len); +! } +! +! +! /* + * [3] 10.5.2.22a Neighbour Cell Description 2 + * [3] 10.5.2.22b (void) + * [3] 10.5.2.22c NT/N Rest Octets ++ */ ++ ++ ++ /* // jl + * [3] 10.5.2.23 P1 Rest Octets ++ * ++ * XXX not done ++ */ ++ static guint8 de_rr_p1_rest_octets(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) ++ { ++ guint32 curr_offset; ++ guint curr_len; ++ // proto_tree *subtree; ++ proto_item *item; ++ ++ curr_offset = offset; ++ curr_len = len; ++ ++ item = proto_tree_add_text(tree, tvb, curr_offset, curr_len, gsm_dtap_elem_strings[DE_RR_P1_REST_OCTETS].strptr); ++ // subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_P1_REST_OCTETS]); ++ ++ // mandatory elements get len == -1, so we can't increase this ++ // curr_offset += curr_len; ++ return curr_offset - offset; ++ } ++ ++ ++ /* + * [3] 10.5.2.24 P2 Rest Octets + * [3] 10.5.2.25 P3 Rest Octets ++ */ ++ ++ ++ /* // jl + * [3] 10.5.2.25a Packet Channel Description ++ * ++ * < Packet Channel Description > ::= ++ * < Channel type : bit (5) > ++ * < TN : bit (3) > ++ * < TSC : bit (3) > ++ * { 0 ++ * { 0 ++ * < spare bit > ++ * < ARFCN : bit (10) > -- non-hopping RF channel configuraion ++ * | 1 ++ * < spare bit > ++ * < MAIO : bit (6) > -- indirect encoding of hopping RF channel configuration ++ * < MA_NUMBER_IND : bit > ++ * { 0 ++ * < spare bits : bit (2) > ++ * | 1 ++ * < CHANGE_MARK_1 : bit (2) > ++ * } ++ * } ++ * | 1 ++ * < MAIO : bit (6) > -- direct encoding of hopping RF channel configuration ++ * < HSN : bit (6) > ++ * }; ++ * ++ * 5 + 3 + 3 + 1 + 12 = 24 ++ */ ++ static guint8 de_rr_pcd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, char *add_string _U_, int string_len _U_) { ++ ++ guint32 curr_offset; ++ guint curr_len; ++ proto_tree *subtree; ++ proto_item *item; ++ int val, v; ++ ++ curr_offset = offset; ++ curr_len = len; ++ ++ item = proto_tree_add_text(tree, tvb, curr_offset, 3, gsm_dtap_elem_strings[DE_RR_PCD].strptr); ++ subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_PCD]); ++ ++ val = tvb_get_ntoh24(tvb, curr_offset); ++ ++ // channel type ++ other_decode_bitfield_value(a_bigbuf, val, 0x1f0000, 24); ++ proto_tree_add_text(subtree, tvb, curr_offset, 1, "%s : Channel Type: %x", a_bigbuf, (val >> 16) & 0x1f); ++ ++ // TN ++ other_decode_bitfield_value(a_bigbuf, val, 0xe00000, 24); ++ proto_tree_add_text(subtree, tvb, curr_offset, 1, "%s : Timeslot Number: %d", a_bigbuf, ((val >> 16) & 0xe0) >> 5); ++ ++ curr_offset++; ++ curr_len--; ++ ++ // TSC ++ other_decode_bitfield_value(a_bigbuf, val, 0x700, 24); ++ proto_tree_add_text(subtree, tvb, curr_offset, 1, "%s : Training Sequence Code: %d", a_bigbuf, (val >> 8) & 0x7); ++ ++ if(!(val & 0x800)) { ++ if(!(val & 0x1000)) { ++ other_decode_bitfield_value(a_bigbuf, val, 0xc0ff, 24); ++ v = ((val & 0xc000) >> 6) | (val & 0xff); ++ proto_tree_add_text(subtree, tvb, curr_offset, 2, "%s : RF Channel Number: %d", a_bigbuf, v); ++ ++ curr_offset += 2; ++ curr_len -= 2; ++ } else { ++ other_decode_bitfield_value(a_bigbuf, val, 0xc00f, 24); ++ v = ((val & 0xc000) >> 10) | (val & 0x0f); ++ proto_tree_add_text(subtree, tvb, curr_offset, 2, "%s : Mobile Allocation Index Offset: %d", a_bigbuf, v); ++ ++ curr_offset++; ++ curr_len--; ++ ++ other_decode_bitfield_value(a_bigbuf, val, 0x10, 24); ++ proto_tree_add_text(subtree, tvb, curr_offset, 1, "%s : MA_NUMBER = %d", a_bigbuf, (val & 0x10)? 15 : 14); ++ ++ if(val & 0x20) { ++ other_decode_bitfield_value(a_bigbuf, val, 0xc0, 24); ++ proto_tree_add_text(subtree, tvb, curr_offset, 1, "%s : CHANGE_MARK_1 = %d", a_bigbuf, (val & 0xc0) >> 6); ++ ++ curr_offset++; ++ curr_len--; ++ } ++ } ++ } else { ++ other_decode_bitfield_value(a_bigbuf, val, 0xf003, 24); ++ v = ((val & 0xf000) >> 10) | (val & 0x3); ++ proto_tree_add_text(subtree, tvb, curr_offset, 2, "%s : Mobile Allocation Index Offset: %d", a_bigbuf, v); ++ ++ curr_offset++; ++ curr_len--; ++ ++ other_decode_bitfield_value(a_bigbuf, val, 0xfc, 24); ++ proto_tree_add_text(subtree, tvb, curr_offset, 1, "%s : Hopping Sequence Number: %d", a_bigbuf, (val & 0xfc) >> 2); ++ ++ curr_offset++; ++ curr_len--; ++ } ++ ++ return curr_offset - offset; ++ } ++ ++ ++ /* // jl ++ * + * [3] 10.5.2.25b Dedicated mode or TBF ++ */ ++ static const value_string gsm_a_rr_dm_or_tbf_vals[] = { ++ {0, "This message assigns a dedicated resource"}, ++ {2, "Not Used (error)"}, ++ {4, "Not Used (error)"}, ++ {6, "Not Used (error)"}, ++ {1, "This message assigns an uplink TBF or is the second message of two in a two-message assignment of an uplink or downlink TBF"}, ++ {3, "This message assigns a downlink TBF to the mobile station identified in the IA Rest Octets IE"}, ++ {5, "This message is the first message of two in a two-message assignment of an uplink TBF"}, ++ {7, "This message is the first message of two in a two-message assignment of a downlink TBF to the mobile station identified in the IA Rest Octets IE"}, ++ {0, 0} ++ }; ++ ++ static int ia_dedicated_mode_resource = 0; ++ static int ia_tbf = 0; ++ ++ static guint8 de_rr_dm_or_tbf(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { ++ ++ guint32 curr_offset; ++ guint curr_len; ++ proto_tree *subtree; ++ proto_item *item; ++ guint8 oct; ++ ++ curr_offset = offset; ++ curr_len = len; ++ ++ item = proto_tree_add_text(tree, tvb, curr_offset, 1, gsm_dtap_elem_strings[DE_RR_DM_OR_TBF].strptr); ++ subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_DM_OR_TBF]); ++ ++ proto_tree_add_item(subtree, hf_gsm_a_rr_dm_or_tbf, tvb, curr_offset, 1, FALSE); ++ oct = tvb_get_guint8(tvb, curr_offset); ++ if(!(oct & 0x10)) ++ ia_dedicated_mode_resource = 1; ++ else ++ ia_tbf = 1; ++ ++ // XXX assuming 2nd half of the octet, increasing curr_offset ++ curr_offset++; ++ curr_len--; ++ ++ return curr_offset - offset; ++ } ++ ++ ++ /* + * [3] 10.5.2.25c RR Packet Uplink Assignment + * [3] 10.5.2.25d RR Packet Downlink Assignment ++ */ ++ ++ /* // jl + * [3] 10.5.2.26 Page Mode ++ * ++ * PM (octet 1) ++ * 2 1 ++ * 0 0 Normal paging. ++ * 0 1 Extended paging. ++ * 1 0 Paging reorganization. ++ * 1 1 Same as before. ++ * ++ * NOTE: The value "same as before" has been defined instead of ++ * "reserved" to allow the use of this coding with another meaning in an ++ * upwards compatible way in later phases of the GSM system. ++ */ ++ static guint8 de_rr_page_mode(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { ++ ++ guint32 curr_offset; ++ guint curr_len; ++ proto_tree *subtree; ++ proto_item *item; ++ guint8 oct; ++ int pm; ++ ++ curr_offset = offset; ++ curr_len = len; ++ ++ item = proto_tree_add_text(tree, tvb, curr_offset, 1, gsm_dtap_elem_strings[DE_RR_PAGE_MODE].strptr); ++ subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_PAGE_MODE]); ++ ++ /* ++ * XXX ++ * ++ * The page mode IE is a half octet. We're assuming that it ++ * comes in the bottom half octet. (That is, we assume that it ++ * is the first message at the start of an octet boundary.) ++ */ ++ oct = tvb_get_guint8(tvb, curr_offset); ++ pm = (oct & 3); ++ item = proto_tree_add_text(subtree, tvb, curr_offset, 1, "Page Mode: "); ++ switch(pm) { ++ case 0: ++ proto_item_append_text(item, "Normal paging"); ++ break; ++ case 1: ++ proto_item_append_text(item, "Extended paging"); ++ break; ++ case 2: ++ proto_item_append_text(item, "Paging reorganization"); ++ break; ++ case 3: ++ proto_item_append_text(item, "Same as before"); ++ break; ++ } ++ ++ // we didn't really grab the whole octet, so curr_offset ++ // is not increased. ++ ++ return curr_offset - offset; ++ } ++ ++ ++ /* + * [3] 10.5.2.26a (void) + * [3] 10.5.2.26b (void) + * [3] 10.5.2.26c (void) + * [3] 10.5.2.26d (void) + */ ++ ++ ++ /* // jl ++ * [3] 10.5.2.27 NCC Permitted ++ * ++ * The NCC permitted field is coded as a bit map, i.e. bit N is ++ * coded with a "0" if the BCCH carrier with NCC = N - 1 is not ++ * permitted for monitoring and with a "1" if the BCCH carrier with ++ * NCC = N - 1 is permitted for monitoring; N = 1, 2, .., 8. ++ */ ++ static guint8 de_rr_ncc_permitted(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) ++ { ++ guint32 curr_offset; ++ guint curr_len; ++ proto_tree *subtree; ++ proto_item *item; ++ guint8 oct; ++ int bit; ++ ++ curr_offset = offset; ++ curr_len = len; ++ ++ item = proto_tree_add_text(tree, tvb, curr_offset, 1, gsm_dtap_elem_strings[DE_RR_NCC_PERMITTED].strptr); ++ subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_NCC_PERMITTED]); ++ ++ item = proto_tree_add_text(subtree, tvb, curr_offset, 1, "Allowed NCC on BCCH carriers:"); ++ oct = tvb_get_guint8(tvb, curr_offset++); ++ ++ for(bit = 0; bit < 8; bit++) ++ if(oct & (1 << bit)) ++ proto_item_append_text(item, " %d", bit); ++ ++ return curr_offset - offset; ++ } ++ ++ + /* + * [3] 10.5.2.28 Power Command + * +*************** +*** 4978,5049 **** + proto_item *item; + guint32 curr_offset; + +! len = len; +! curr_offset = offset; + +! item = +! proto_tree_add_text(tree, +! tvb, curr_offset, 1, +! gsm_dtap_elem_strings[DE_RR_POW_CMD].strptr); + +! subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_POW_CMD]); + +! proto_tree_add_item(subtree, hf_gsm_a_b8spare, tvb, curr_offset, 1, FALSE); +! /*EPC mode */ +! proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_epc, tvb, curr_offset, 1, FALSE); +! /*FPC_EPC*/ +! proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_fpcepc, tvb, curr_offset, 1, FALSE); +! /*POWER LEVEL*/ +! proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_powlev, tvb, curr_offset, 1, FALSE); +! +! curr_offset = curr_offset + 1; + +! return(curr_offset - offset); + } + + /* +! * [3] 10.5.2.28a Power Command and access type + */ +! static guint8 +! de_rr_pow_cmd_and_acc_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) +! { +! proto_tree *subtree; +! proto_item *item; +! guint32 curr_offset; + +! len = len; +! curr_offset = offset; + +! item = +! proto_tree_add_text(tree, +! tvb, curr_offset, 1, +! gsm_dtap_elem_strings[DE_RR_POW_CMD_AND_ACC_TYPE].strptr); + +! subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_POW_CMD_AND_ACC_TYPE]); + +! /*ATC */ +! proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_atc, tvb, curr_offset, 1, FALSE); +! /*EPC mode */ +! proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_epc, tvb, curr_offset, 1, FALSE); +! /*FPC_EPC*/ +! proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_fpcepc, tvb, curr_offset, 1, FALSE); +! /*POWER LEVEL*/ +! proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_powlev, tvb, curr_offset, 1, FALSE); +! +! curr_offset = curr_offset + 1; + +! return(curr_offset - offset); + } +! /* +! * [3] 10.5.2.29 RACH Control Parameters +! * [3] 10.5.2.30 Request Reference +! */ + + /* + * [3] 10.5.2.31 + */ +! guint8 +! de_rr_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) + { + guint32 curr_offset; + +--- 5839,6099 ---- + proto_item *item; + guint32 curr_offset; + +! len = len; +! curr_offset = offset; +! +! item = +! proto_tree_add_text(tree, +! tvb, curr_offset, 1, +! gsm_dtap_elem_strings[DE_RR_POW_CMD].strptr); +! +! subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_POW_CMD]); +! +! proto_tree_add_item(subtree, hf_gsm_a_b8spare, tvb, curr_offset, 1, FALSE); +! /*EPC mode */ +! proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_epc, tvb, curr_offset, 1, FALSE); +! /*FPC_EPC*/ +! proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_fpcepc, tvb, curr_offset, 1, FALSE); +! /*POWER LEVEL*/ +! proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_powlev, tvb, curr_offset, 1, FALSE); +! +! curr_offset = curr_offset + 1; +! +! return(curr_offset - offset); +! } +! +! /* +! * [3] 10.5.2.28a Power Command and access type +! */ +! static guint8 +! de_rr_pow_cmd_and_acc_type(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) +! { +! proto_tree *subtree; +! proto_item *item; +! guint32 curr_offset; +! +! len = len; +! curr_offset = offset; +! +! item = +! proto_tree_add_text(tree, +! tvb, curr_offset, 1, +! gsm_dtap_elem_strings[DE_RR_POW_CMD_AND_ACC_TYPE].strptr); +! +! subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_POW_CMD_AND_ACC_TYPE]); +! +! /*ATC */ +! proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_atc, tvb, curr_offset, 1, FALSE); +! /*EPC mode */ +! proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_epc, tvb, curr_offset, 1, FALSE); +! /*FPC_EPC*/ +! proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_fpcepc, tvb, curr_offset, 1, FALSE); +! /*POWER LEVEL*/ +! proto_tree_add_item(subtree, hf_gsm_a_rr_pow_cmd_powlev, tvb, curr_offset, 1, FALSE); +! +! curr_offset = curr_offset + 1; +! +! return(curr_offset - offset); +! } +! +! +! /* +! * [3] 10.5.2.29 RACH Control Parameters +! * +! * Max retrans, Maximum number of retransmissions (octet 2) +! * +! * Bits +! * 8 7 +! * 0 0 Maximum 1 retransmission +! * 0 1 Maximum 2 retransmissions +! * 1 0 Maximum 4 retransmissions +! * 1 1 Maximum 7 retransmissions +! */ +! static const value_string gsm_a_rr_rach_cp_max_retrans_vals[] = { +! {0, "Maximum 1 retransmission"}, +! {1, "Maximum 2 retransmissions"}, +! {2, "Maximum 4 retransmissions"}, +! {3, "Maximum 7 retransmissions"}, +! {0, 0}, +! }; +! +! +! /* +! * Tx-integer, Number of slots to spread transmission (octet 2) +! * +! * Bits +! * 6 5 4 3 +! * 0 0 0 0 3 slots used to spread transmission +! * 0 0 0 1 4 slots used to spread transmission +! * 0 0 1 0 5 slots used to spread transmission +! * 0 0 1 1 6 slots used to spread transmission +! * 0 1 0 0 7 slots used to spread transmission +! * 0 1 0 1 8 slots used to spread transmission +! * 0 1 1 0 9 slots used to spread transmission +! * 0 1 1 1 10 slots used to spread transmission +! * 1 0 0 0 11 slots used to spread transmission +! * 1 0 0 1 12 slots used to spread transmission +! * 1 0 1 0 14 slots used to spread transmission +! * 1 0 1 1 16 slots used to spread transmission +! * 1 1 0 0 20 slots used to spread transmission +! * 1 1 0 1 25 slots used to spread transmission +! * 1 1 1 0 32 slots used to spread transmission +! * 1 1 1 1 50 slots used to spread transmission +! */ +! static const value_string gsm_a_rr_rach_cp_tx_integer_vals[] = { +! {0, "3 slots used to spread transmission"}, +! {1, "4 slots used to spread transmission"}, +! {2, "5 slots used to spread transmission"}, +! {3, "6 slots used to spread transmission"}, +! {4, "7 slots used to spread transmission"}, +! {5, "8 slots used to spread transmission"}, +! {6, "9 slots used to spread transmission"}, +! {7, "10 slots used to spread transmission"}, +! {8, "11 slots used to spread transmission"}, +! {9, "12 slots used to spread transmission"}, +! {10, "14 slots used to spread transmission"}, +! {11, "16 slots used to spread transmission"}, +! {12, "20 slots used to spread transmission"}, +! {13, "25 slots used to spread transmission"}, +! {14, "32 slots used to spread transmission"}, +! {15, "50 slots used to spread transmission"}, +! {0, 0}, +! }; +! +! /* +! * CELL_BAR_ACCESS, Cell Barred for Access (octet 2) +! * +! * Bit 2 +! * 0 The cell is not barred, see 3GPP TS 23.022 +! * 1 The cell is barred, see 3GPP TS 23.022 +! */ +! static const true_false_string gsm_a_rr_rach_cp_cell_bar_access_tfs = { +! "The cell is barred, see 3GPP TS 23.022", +! "The cell is not barred, see 3GPP TS 23.022" +! }; +! +! static const value_string gsm_a_rr_rach_cp_cell_bar_access_vals[] = { +! {0, "The cell is not barred"}, +! {1, "The cell is barred"}, +! {0, 0}, +! }; +! +! /* +! * RE, Call reestablishment allowed (octet 2) +! * +! * Bit 1 +! * 0 Call Reestablishment allowed in the cell +! * 1 Call Reestablishment not allowed in the cell +! */ +! static const true_false_string gsm_a_rr_rach_cp_re_tfs = { +! "Call Reestablishment not allowed in the cell", +! "Call Reestablishment allowed in the cell" +! }; +! +! static const value_string gsm_a_rr_rach_cp_re_vals[] = { +! {0, "Call Reestablishment is allowed in the cell"}, +! {1, "Call Reestablishment is not allowed in the cell"}, +! {0, 0}, +! }; +! +! /* +! * EC Emergency Call allowed (octet 3 bit 3) +! * +! * Bit 3 +! * 0 Emergency call allowed in the cell to all MSs +! * 1 Emergency call not allowed in the cell except for the MSs that belong to one of the classes between 11 to 15. +! */ +! static const true_false_string gsm_a_rr_rach_cp_ec_tfs = { +! "Emergency call not allowed in the cell except for the MSs that belong to one of the classes between 11 to 15.", +! "Emergency call allowed in the cell to all MSs" +! }; +! +! static const value_string gsm_a_rr_rach_cp_ec_vals[] = { +! {0, "Emergency call allowed in the cell to all MSs"}, +! {1, "Emergency call not allowed in the cell except for the MSs that belong to one of the classes between 11 and 15"}, +! {0, 0}, +! }; +! +! /* AC CN, Access Control Class N (octet 3 (except bit 3) and octet 4) +! * +! * For a mobile station with AC C = N access is not barred if the AC CN bit is coded with a "0"; N = 0, 1, .. 9,11, .., 15. +! */ +! +! static guint8 de_rr_rach_cp(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { + +! proto_tree *subtree; +! proto_item *item; +! guint16 accn; +! guint32 curr_offset; +! guint curr_len; +! guint bit; + +! curr_len = len; +! curr_offset = offset; + +! item = proto_tree_add_text(tree, tvb, curr_offset, 3, gsm_dtap_elem_strings[DE_RR_RACH_CP].strptr); +! subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_RACH_CP]); + +! proto_tree_add_item(subtree, hf_gsm_a_rr_rach_cp_max_retrans, tvb, curr_offset, 1, FALSE); +! proto_tree_add_item(subtree, hf_gsm_a_rr_rach_cp_tx_integer, tvb, curr_offset, 1, FALSE); +! proto_tree_add_item(subtree, hf_gsm_a_rr_rach_cp_cell_bar_access, tvb, curr_offset, 1, FALSE); +! proto_tree_add_item(subtree, hf_gsm_a_rr_rach_cp_re, tvb, curr_offset, 1, FALSE); +! proto_tree_add_item(subtree, hf_gsm_a_rr_rach_cp_ec, tvb, curr_offset + 1, 1, FALSE); +! +! curr_offset++; +! accn = tvb_get_ntohs(tvb, curr_offset); +! item = proto_tree_add_text(subtree, tvb, curr_offset, 2, "Access Classes not barred:"); +! bit = 16; +! while(bit-- > 0) +! if(bit != 10) +! if((accn & (1 << bit)) == 0) +! proto_item_append_text(item, " %d", bit); +! +! curr_offset += 2; +! return curr_offset - offset; + } + ++ + /* +! * [3] 10.5.2.30 Request Reference + */ +! static guint8 de_rr_req_ref(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) { + +! proto_tree *subtree; +! proto_item *item; +! guint32 curr_offset; +! guint curr_len; +! int v, t1p, t2, t3; + +! curr_len = len; +! curr_offset = offset; + +! item = proto_tree_add_text(tree, tvb, curr_offset, 3, gsm_dtap_elem_strings[DE_RR_REQ_REF].strptr); +! subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_REQ_REF]); + +! v = tvb_get_guint8(tvb, curr_offset); +! proto_tree_add_text(subtree, tvb, curr_offset, 1, "Random Access Information: %x", v); + +! curr_offset++; +! curr_len--; +! +! v = tvb_get_ntohs(tvb, curr_offset); +! t1p = (v & 0xf800) >> 11; +! t3 = ((v & 0x700) >> 5) | ((v & 0xe0) >> 5); +! t2 = v & 0x1f; +! proto_tree_add_text(subtree, tvb, curr_offset, 2, "FN modulo 42432: %d", 51 * ((t3 - t2) % 26) + t3 + 51 * 26 * t1p); +! +! curr_offset += 2; +! curr_len -= 2; +! +! return curr_offset - offset; + } +! + + /* + * [3] 10.5.2.31 + */ +! guint8 de_rr_cause(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) + { + guint32 curr_offset; + +*************** +*** 5056,5068 **** + + return(curr_offset - offset); + } + /* +- * [3] 10.5.2.32 SI 1 Rest Octets + * [3] 10.5.2.33 SI 2bis Rest Octets + * [3] 10.5.2.33a SI 2ter Rest Octets + * [3] 10.5.2.33b SI 2quater Rest Octets + * [3] 10.5.2.34 SI 3 Rest Octets + * [3] 10.5.2.35 SI 4 Rest Octets + * [3] 10.5.2.35a SI 6 Rest Octets + * [3] 10.5.2.36 SI 7 Rest Octets + * [3] 10.5.2.37 SI 8 Rest Octets +--- 6106,6288 ---- + + return(curr_offset - offset); + } ++ ++ ++ /* ++ * [4] 10.5.2.32 SI 1 Rest Octets ++ * ++ * NCH Position (5 bits) | Band Indicator | Spare ++ * ++ * NCH Position on the CCCH ++ * ++ * The values in the NCH Position field indicates the block ++ * number of the CCCH block which is used for the first NCH ++ * block and the number of blocks used for the NCH. (The ++ * block numbering corresponds to table 5 in clause 7 of ++ * 3GPP TS 45.002) The absence of the NCH position field ++ * indicates that there is no NCH in the cell/on the ++ * carrying CCCH slot The following coding applies if 1 or ++ * more basic physical channels are used for CCCH, not ++ * combined with SDCCHs. ++ * ++ * Value # blocks # of 1 block ++ * 00000 1 0 ++ * 00001 1 1 ++ * 00010 1 2 ++ * 00011 1 3 ++ * 00100 1 4 ++ * 00101 1 5 ++ * 00110 1 6 ++ * 00111 2 0 ++ * 01000 2 1 ++ * 01001 2 2 ++ * 01010 2 3 ++ * 01011 2 4 ++ * 01100 2 5 ++ * 01101 3 0 ++ * 01110 3 1 ++ * 01111 3 2 ++ * 10000 3 3 ++ * 10001 3 4 ++ * 10010 4 0 ++ * 10011 4 1 ++ * 10100 4 2 ++ * 10101 4 3 ++ * 10110 5 0 ++ * 10111 5 1 ++ * 11000 5 2 ++ * 11001 6 0 ++ * 11010 6 1 ++ * 11011 7 0 ++ * ++ * Other values are reserved for future use. A mobile ++ * station receiving a reserved value shall behave as if ++ * the NCH position was not present ++ * ++ * Band Indicator ++ * ++ * 0 ARFCN indicates 1800 band ++ * 1 ARFCN indicates 1900 band ++ */ ++ static const value_string gsm_a_rr_si_1_rest_octets_vals[] = { ++ {0x0, "NCH position on the CCCH: 1 block starting at block 0"}, ++ {0x1, "NCH position on the CCCH: 1 block starting at block 1"}, ++ {0x2, "NCH position on the CCCH: 1 block starting at block 2"}, ++ {0x3, "NCH position on the CCCH: 1 block starting at block 3"}, ++ {0x4, "NCH position on the CCCH: 1 block starting at block 4"}, ++ {0x5, "NCH position on the CCCH: 1 block starting at block 5"}, ++ {0x6, "NCH position on the CCCH: 1 block starting at block 6"}, ++ {0x7, "NCH position on the CCCH: 2 blocks starting at block 0"}, ++ {0x8, "NCH position on the CCCH: 2 blocks starting at block 1"}, ++ {0x9, "NCH position on the CCCH: 2 blocks starting at block 2"}, ++ {0xa, "NCH position on the CCCH: 2 blocks starting at block 3"}, ++ {0xb, "NCH position on the CCCH: 2 blocks starting at block 4"}, ++ {0xc, "NCH position on the CCCH: 2 blocks starting at block 5"}, ++ {0xd, "NCH position on the CCCH: 3 blocks starting at block 0"}, ++ {0xe, "NCH position on the CCCH: 3 blocks starting at block 1"}, ++ {0xf, "NCH position on the CCCH: 3 blocks starting at block 2"}, ++ {0x10, "NCH position on the CCCH: 3 blocks starting at block 3"}, ++ {0x11, "NCH position on the CCCH: 3 blocks starting at block 4"}, ++ {0x12, "NCH position on the CCCH: 4 blocks starting at block 0"}, ++ {0x13, "NCH position on the CCCH: 4 blocks starting at block 1"}, ++ {0x14, "NCH position on the CCCH: 4 blocks starting at block 2"}, ++ {0x15, "NCH position on the CCCH: 4 blocks starting at block 3"}, ++ {0x16, "NCH position on the CCCH: 5 blocks starting at block 0"}, ++ {0x17, "NCH position on the CCCH: 5 blocks starting at block 1"}, ++ {0x18, "NCH position on the CCCH: 5 blocks starting at block 2"}, ++ {0x19, "NCH position on the CCCH: 6 blocks starting at block 0"}, ++ {0x1a, "NCH position on the CCCH: 6 blocks starting at block 1"}, ++ {0x1b, "NCH position on the CCCH: 7 blocks starting at block 0"}, ++ {0, 0}, ++ }; ++ ++ static guint8 de_rr_si_1_rest_octets(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) ++ { ++ proto_tree *subtree; ++ proto_item *item; ++ guint32 curr_offset; ++ guint curr_len; ++ guint8 oct; ++ ++ curr_len = len; ++ curr_offset = offset; ++ ++ item = proto_tree_add_text(tree, tvb, curr_offset, 1, gsm_dtap_elem_strings[DE_RR_SI_1_REST_OCTETS].strptr); ++ subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_SI_1_REST_OCTETS]); ++ proto_tree_add_item(subtree, hf_gsm_a_rr_si_1_rest_octets, tvb, curr_offset, 1, FALSE); ++ ++ // ??? oct = tvb_get_guint8(tvb, curr_offset) & 0x4; ++ oct = tvb_get_guint8(tvb, curr_offset) & 0x20; ++ ++ item = proto_tree_add_text(subtree, tvb, curr_offset, 1, "ARFCN: "); ++ if(!oct) ++ proto_item_append_text(item, "1800 band"); ++ else ++ proto_item_append_text(item, "1900 band"); ++ ++ curr_offset++; ++ ++ return curr_offset - offset; ++ } ++ ++ + /* + * [3] 10.5.2.33 SI 2bis Rest Octets + * [3] 10.5.2.33a SI 2ter Rest Octets + * [3] 10.5.2.33b SI 2quater Rest Octets ++ */ ++ ++ /* // jl + * [3] 10.5.2.34 SI 3 Rest Octets ++ * ++ * XXX not done ++ */ ++ static guint8 de_rr_si_3_rest_octets(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) ++ { ++ proto_item *item; ++ // proto_tree *subtree; ++ guint32 curr_offset; ++ guint curr_len; ++ ++ curr_len = len; ++ curr_offset = offset; ++ ++ item = proto_tree_add_text(tree, tvb, curr_offset, 4, gsm_dtap_elem_strings[DE_RR_SI_3_REST_OCTETS].strptr); ++ // subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_SI_3_REST_OCTETS]); ++ ++ curr_offset += 4; ++ ++ return curr_offset - offset; ++ } ++ ++ ++ /* // jl + * [3] 10.5.2.35 SI 4 Rest Octets ++ * ++ * XXX not done ++ */ ++ static guint8 de_rr_si_4_rest_octets(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_) ++ { ++ // proto_tree *subtree; ++ proto_item *item; ++ guint32 curr_offset; ++ guint curr_len; ++ ++ curr_len = len; ++ curr_offset = offset; ++ ++ item = proto_tree_add_text(tree, tvb, curr_offset, curr_len, gsm_dtap_elem_strings[DE_RR_SI_4_REST_OCTETS].strptr); ++ // subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_RR_SI_4_REST_OCTETS]); ++ ++ // len is -1 on mandatory elements, so we can't increase by ++ // this. ++ //curr_offset += curr_len; ++ ++ return curr_offset - offset; ++ } ++ ++ ++ /* + * [3] 10.5.2.35a SI 6 Rest Octets + * [3] 10.5.2.36 SI 7 Rest Octets + * [3] 10.5.2.37 SI 8 Rest Octets +*************** +*** 12736,12745 **** + * [3] 10.5.2.1e Cell selection indicator after release of all TCH and SDCCH IE + */ + de_rr_cell_dsc, /* 10.5.2.2 RR Cell Description */ + /* +- * [3] 10.5.2.3 Cell Options (BCCH) + * [3] 10.5.2.3a Cell Options (SACCH) +! * [3] 10.5.2.4 Cell Selection Parameters + * [3] 10.5.2.4a (void) + */ + de_rr_ch_dsc, /* [3] 10.5.2.5 Channel Description */ +--- 13956,13967 ---- + * [3] 10.5.2.1e Cell selection indicator after release of all TCH and SDCCH IE + */ + de_rr_cell_dsc, /* 10.5.2.2 RR Cell Description */ ++ de_rr_co_bcch, /* [3] 10.5.2.3 Cell Options (BCCH) */ + /* + * [3] 10.5.2.3a Cell Options (SACCH) +! */ +! de_rr_cell_sel_param, /* [3] 10.5.2.4 Cell Selection Parameters */ +! /* + * [3] 10.5.2.4a (void) + */ + de_rr_ch_dsc, /* [3] 10.5.2.5 Channel Description */ +*************** +*** 12757,12765 **** + * [3] 10.5.2.8b Channel Request Description 2 */ + /* Pos 20 */ + de_rr_cip_mode_set, /* [3] 10.5.2.9 Cipher Mode Setting */ +! /* [3] 10.5.2.10 Cipher Response +! * [3] 10.5.2.11 Control Channel Description +! * [3] 10.5.2.11a DTM Information Details */ + de_rr_dyn_arfcn_map, /* [3] 10.5.2.11b Dynamic ARFCN Mapping */ + de_rr_freq_ch_seq, /* [3] 10.5.2.12 Frequency Channel Sequence */ + de_rr_freq_list, /* [3] 10.5.2.13 Frequency List */ +--- 13979,13987 ---- + * [3] 10.5.2.8b Channel Request Description 2 */ + /* Pos 20 */ + de_rr_cip_mode_set, /* [3] 10.5.2.9 Cipher Mode Setting */ +! /* [3] 10.5.2.10 Cipher Response */ +! de_rr_cc_dsc, /* [3] 10.5.2.11 Control Channel Description */ +! /* [3] 10.5.2.11a DTM Information Details */ + de_rr_dyn_arfcn_map, /* [3] 10.5.2.11b Dynamic ARFCN Mapping */ + de_rr_freq_ch_seq, /* [3] 10.5.2.12 Frequency Channel Sequence */ + de_rr_freq_list, /* [3] 10.5.2.13 Frequency List */ +*************** +*** 12771,12778 **** + * [3] 10.5.2.14e Enhanced DTM CS Release Indication + */ + de_rr_ho_ref, /* 10.5.2.15 Handover Reference */ + /* +- * [3] 10.5.2.16 IA Rest Octets + * [3] 10.5.2.17 IAR Rest Octets + * [3] 10.5.2.18 IAX Rest Octets + * [3] 10.5.2.19 L2 Pseudo Length +--- 13993,14000 ---- + * [3] 10.5.2.14e Enhanced DTM CS Release Indication + */ + de_rr_ho_ref, /* 10.5.2.15 Handover Reference */ ++ de_rr_ia_rest_octets, /* [3] 10.5.2.16 IA Rest Octets */ + /* + * [3] 10.5.2.17 IAR Rest Octets + * [3] 10.5.2.18 IAX Rest Octets + * [3] 10.5.2.19 L2 Pseudo Length +*************** +*** 12786,12823 **** + de_rr_mult_all, /* [3] 10.5.2.21b Multislot Allocation */ + /* + * [3] 10.5.2.21c NC mode +! * [3] 10.5.2.22 Neighbour Cell Description + * [3] 10.5.2.22a Neighbour Cell Description 2 + * [3] 10.5.2.22b (void) + * [3] 10.5.2.22c NT/N Rest Octets +! * [3] 10.5.2.23 P1 Rest Octets + * [3] 10.5.2.24 P2 Rest Octets + * [3] 10.5.2.25 P3 Rest Octets +! * [3] 10.5.2.25a Packet Channel Description +! * [3] 10.5.2.25b Dedicated mode or TBF + * [3] 10.5.2.25c RR Packet Uplink Assignment + * [3] 10.5.2.25d RR Packet Downlink Assignment +! * [3] 10.5.2.26 Page Mode + * [3] 10.5.2.26a (void) + * [3] 10.5.2.26b (void) + * [3] 10.5.2.26c (void) + * [3] 10.5.2.26d (void) +- * [3] 10.5.2.27 NCC Permitted +- */ +- de_rr_pow_cmd, /* 10.5.2.28 Power Command */ +- de_rr_pow_cmd_and_acc_type, /* 10.5.2.28a Power Command and access type */ +- /* +- * [3] 10.5.2.29 RACH Control Parameters +- * [3] 10.5.2.30 Request Reference + */ +! de_rr_cause, /* 10.5.2.31 RR Cause */ +! de_rr_sync_ind, /* 10.5.2.39 Synchronization Indication */ + /* [3] 10.5.2.32 SI 1 Rest Octets + * [3] 10.5.2.33 SI 2bis Rest Octets + * [3] 10.5.2.33a SI 2ter Rest Octets + * [3] 10.5.2.33b SI 2quater Rest Octets +! * [3] 10.5.2.34 SI 3 Rest Octets +! * [3] 10.5.2.35 SI 4 Rest Octets + * [3] 10.5.2.35a SI 6 Rest Octets + * [3] 10.5.2.36 SI 7 Rest Octets + * [3] 10.5.2.37 SI 8 Rest Octets +--- 14008,14054 ---- + de_rr_mult_all, /* [3] 10.5.2.21b Multislot Allocation */ + /* + * [3] 10.5.2.21c NC mode +! */ +! de_rr_neigh_cell_dsc, /* [3] 10.5.2.22 Neighbour Cell Description */ // jl +! /* + * [3] 10.5.2.22a Neighbour Cell Description 2 + * [3] 10.5.2.22b (void) + * [3] 10.5.2.22c NT/N Rest Octets +! */ +! de_rr_p1_rest_octets, /* [3] 10.5.2.23 P1 Rest Octets */ // jl +! /* + * [3] 10.5.2.24 P2 Rest Octets + * [3] 10.5.2.25 P3 Rest Octets +! */ +! de_rr_pcd, /* [3] 10.5.2.25a Packet Channel Description */ +! de_rr_dm_or_tbf, /* [3] 10.5.2.25b Dedicated mode or TBF */ +! /* + * [3] 10.5.2.25c RR Packet Uplink Assignment + * [3] 10.5.2.25d RR Packet Downlink Assignment +! */ +! de_rr_page_mode, /* [3] 10.5.2.26 Page Mode */ // jl +! /* + * [3] 10.5.2.26a (void) + * [3] 10.5.2.26b (void) + * [3] 10.5.2.26c (void) + * [3] 10.5.2.26d (void) + */ +! de_rr_ncc_permitted, /* [3] 10.5.2.27 NCC Permitted */ +! de_rr_pow_cmd, /* [3] 10.5.2.28 Power Command */ +! de_rr_pow_cmd_and_acc_type, /* [3] 10.5.2.28a Power Command and access type */ +! de_rr_rach_cp, /* [3] 10.5.2.29 RACH Control Parameters */ // jl +! de_rr_req_ref, /* [3] 10.5.2.30 Request Reference */ +! de_rr_cause, /* [3] 10.5.2.31 RR Cause */ +! de_rr_sync_ind, /* [3] 10.5.2.39 Synchronization Indication */ +! de_rr_si_1_rest_octets, /* [3] 10.5.2.32 SI 1 Rest Octets */ + /* [3] 10.5.2.32 SI 1 Rest Octets + * [3] 10.5.2.33 SI 2bis Rest Octets + * [3] 10.5.2.33a SI 2ter Rest Octets + * [3] 10.5.2.33b SI 2quater Rest Octets +! */ +! de_rr_si_3_rest_octets, /* [3] 10.5.2.34 SI 3 Rest Octets */ +! de_rr_si_4_rest_octets, /* [3] 10.5.2.35 SI 4 Rest Octets */ +! /* + * [3] 10.5.2.35a SI 6 Rest Octets + * [3] 10.5.2.36 SI 7 Rest Octets + * [3] 10.5.2.37 SI 8 Rest Octets +*************** +*** 15275,15280 **** +--- 16506,16556 ---- + + EXTRANEOUS_DATA_CHECK(curr_len, 0); + } ++ ++ ++ /* // jl ++ * ++ * 44.018 9.1.18 Immediate Assignment ++ * ++ * 10.5.2.26 Page Mode M V .5 ++ * 10.5.2.25b Dedicated Mode or TBF M V .5 ++ * 10.5.2.5 Channel Description C V 3 ++ * 10.5.2.25a Packet Channel Description C V 3 ++ * 10.5.2.30 Request Reference M V 3 ++ * 10.5.2.40 Timing Advance M V 1 ++ * 10.5.2.21 Mobile Allocation M LV 1-9 ++ * 10.5.2.38 Starting Time O TV 3 (0x7c) ++ * 10.5.2.16 IA Rest Octets M V 0-11 ++ */ ++ ++ void dtap_rr_immediate_assignment(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) { ++ ++ guint32 curr_offset; ++ guint32 consumed; ++ guint curr_len; ++ ++ curr_offset = offset; ++ curr_len = len; ++ ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_PAGE_MODE); ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_DM_OR_TBF); ++ if(ia_dedicated_mode_resource) { ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_CELL_CH_DSC); ++ ia_dedicated_mode_resource = 0; ++ } else if(ia_tbf) { ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_PCD); ++ ia_tbf = 0; ++ } ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_REQ_REF); ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_TIMING_ADV); ++ ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_RR_MOB_ALL, " - Immediate Assignment Mobile Allocation"); ++ ELEM_OPT_TV(0x7c, BSSAP_PDU_TYPE_DTAP, DE_RR_STARTING_TIME, " - Immediate Assignment Starting Time"); ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_IA_REST_OCTETS); ++ ++ // EXTRANEOUS_DATA_CHECK(curr_len, 0); ++ } ++ ++ + /* 3GPP TS 24.008 version 4.7.0 Release 4 + * [3] 9.1.15 + */ +*************** +*** 15404,15409 **** +--- 16680,16715 ---- + EXTRANEOUS_DATA_CHECK(len, curr_offset - offset); + + } ++ ++ ++ /* // jl ++ * 44.018 9.1.22 Paging Request Type 1 ++ * ++ * 10.5.2.26 Page Mode M V .5 ++ * 10.5.2.8 Channels Needed M V .5 ++ * 10.5.1.4 Mobile Identity 1 M LV 2 - 9 ++ * 10.5.1.4 Mobile Identity 2 O TLV 3 - 10 (0x17) ++ * 10.5.2.23 P1 Rest Octets M V 0-17 ++ */ ++ static void dtap_rr_paging_req_1(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) { ++ ++ guint32 curr_offset; ++ guint32 consumed; ++ guint curr_len; ++ ++ curr_offset = offset; ++ curr_len = len; ++ ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_PAGE_MODE); ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_CHNL_NEEDED); ++ ELEM_MAND_LV(BSSAP_PDU_TYPE_DTAP, DE_MID, " 1"); ++ ELEM_OPT_TLV(0x17, BSSAP_PDU_TYPE_DTAP, DE_MID, " 2"); ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_P1_REST_OCTETS); ++ ++ // EXTRANEOUS_DATA_CHECK(curr_len, 0); ++ } ++ ++ + /* + * [4] 9.1.25 + */ +*************** +*** 15498,15503 **** +--- 16804,16930 ---- + EXTRANEOUS_DATA_CHECK(curr_len, 0); + } + ++ ++ /* ++ * 44.018 9.1.31 System Information Type 1 ++ * ++ * 10.5.2.19 L2 pseudo length M V 1 ++ * 10.2 RR Protocol Discriminator M V .5 ++ * 10.3.1 Skip Indicator M V .5 ++ * 10.4 System Information Type 1 Message Type M V 1 ++ * 10.5.2.1b Cell Channel Description M V 16 ++ * 10.5.2.29 RACH Control Parameters M V 3 ++ * 10.5.2.32 SI 1 Rest Octects M V 1 ++ */ ++ static void dtap_rr_system_information_1(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) { ++ ++ guint32 curr_offset; ++ guint32 consumed; ++ guint curr_len; ++ ++ curr_offset = offset; ++ curr_len = len; ++ ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_CELL_CH_DSC); ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_RACH_CP); ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_SI_1_REST_OCTETS); ++ ++ EXTRANEOUS_DATA_CHECK(curr_len, 0); ++ } ++ ++ ++ /* ++ * 44.018 9.1.32 System Information Type 2 ++ * ++ * ++ * 10.5.2.19 L2 pseudo length M V 1 ++ * 10.2 RR Protocol Discriminator M V .5 ++ * 10.3.1 Skip Indicator M V .5 ++ * 10.4 System Information Type 1 Message Type M V 1 ++ * 10.5.2.22 BCCH Frequency List Neighbor Cell Desc M V 16 ++ * 10.5.2.27 NCC Permitted M V 1 ++ * 10.5.2.29 RACH Control Parameters M V 3 ++ */ ++ static void dtap_rr_system_information_2(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) { ++ ++ guint32 curr_offset; ++ guint32 consumed; ++ guint curr_len; ++ ++ curr_offset = offset; ++ curr_len = len; ++ ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_NEIGH_CELL_DSC); ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_NCC_PERMITTED); ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_RACH_CP); ++ ++ EXTRANEOUS_DATA_CHECK(curr_len, 0); ++ } ++ ++ ++ /* ++ * 44.018 9.1.35 System Information Type 3 ++ * ++ * 10.5.1.1 Cell Identity M V 2 ++ * 10.5.1.3 Location Area Identification M V 5 ++ * 10.5.2.11 Control Channel Description M V 3 ++ * 10.5.2.3 Cell Options BCCH M V 1 ++ * 10.5.2.4 Cell Selection Parameters M V 2 ++ * 10.5.2.29 RACH Control Parameters M V 3 ++ * 10.5.2.34 SI 3 Rest Octets M V 4 ++ */ ++ static void dtap_rr_system_information_3(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) { ++ ++ guint32 curr_offset; ++ guint32 consumed; ++ guint curr_len; ++ ++ curr_offset = offset; ++ curr_len = len; ++ ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_CELL_ID); ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LAI); ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_CC_DSC); ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_CO_BCCH); ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_CELL_SEL_PARAM); ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_RACH_CP); ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_SI_3_REST_OCTETS); ++ ++ EXTRANEOUS_DATA_CHECK(curr_len, 0); ++ } ++ ++ ++ /* ++ * 44.018 9.1.36 System Information Type 4 ++ * ++ * 10.5.1.3 Location Area Identification M V 5 ++ * 10.5.2.4 Cell Selection Parameters M V 2 ++ * 10.5.2.29 RACH Control Parameters M V 3 ++ * 10.5.2.5 CBCH Channel Description O TV 4 (64) ++ * 10.5.2.21 CBCH Mobile Allocation C TLV 3-6 (72) ++ * 10.5.2.35 SI 4 Rest Octets M V 0-10 ++ */ ++ static void dtap_rr_system_information_4(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) { ++ ++ guint32 curr_offset; ++ guint32 consumed; ++ guint curr_len; ++ ++ curr_offset = offset; ++ curr_len = len; ++ ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_LAI); ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_CELL_SEL_PARAM); ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_RACH_CP); ++ ELEM_OPT_TV(0x64, BSSAP_PDU_TYPE_DTAP, DE_RR_CH_DSC, "CBCH Channel Description"); ++ // next is actually conditional ++ ELEM_OPT_TLV(0x72, BSSAP_PDU_TYPE_DTAP, DE_RR_MOB_ALL, "CBCH Mobile Allocation"); ++ ELEM_MAND_V(BSSAP_PDU_TYPE_DTAP, DE_RR_SI_4_REST_OCTETS); ++ ++ // EXTRANEOUS_DATA_CHECK(curr_len, 0); ++ } ++ ++ + /* + * [4] 9.3.1 + */ +*************** +*** 17738,17744 **** + static void (*dtap_msg_rr_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = { + NULL, /* RR Initialisation Request */ + NULL, /* Additional Assignment */ +! NULL, /* Immediate Assignment */ + NULL, /* Immediate Assignment Extended */ + NULL, /* Immediate Assignment Reject */ + +--- 19165,19171 ---- + static void (*dtap_msg_rr_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len) = { + NULL, /* RR Initialisation Request */ + NULL, /* Additional Assignment */ +! dtap_rr_immediate_assignment, /* Immediate Assignment */ + NULL, /* Immediate Assignment Extended */ + NULL, /* Immediate Assignment Reject */ + +*************** +*** 17771,17777 **** + NULL, /* Partial Release */ + NULL, /* Partial Release Complete */ + +! NULL, /* Paging Request Type 1 */ + NULL, /* Paging Request Type 2 */ + NULL, /* Paging Request Type 3 */ + dtap_rr_paging_resp, /* Paging Response */ +--- 19198,19204 ---- + NULL, /* Partial Release */ + NULL, /* Partial Release Complete */ + +! dtap_rr_paging_req_1, /* Paging Request Type 1 */ + NULL, /* Paging Request Type 2 */ + NULL, /* Paging Request Type 3 */ + dtap_rr_paging_resp, /* Paging Response */ +*************** +*** 17788,17797 **** + NULL, /* Inter System to cdma2000 Handover Command */ + + NULL, /* System Information Type 8 */ +! NULL, /* System Information Type 1 */ +! NULL, /* System Information Type 2 */ +! NULL, /* System Information Type 3 */ +! NULL, /* System Information Type 4 */ + NULL, /* System Information Type 5 */ + NULL, /* System Information Type 6 */ + NULL, /* System Information Type 7 */ +--- 19215,19224 ---- + NULL, /* Inter System to cdma2000 Handover Command */ + + NULL, /* System Information Type 8 */ +! dtap_rr_system_information_1, /* System Information Type 1 */ // jl +! dtap_rr_system_information_2, /* System Information Type 2 */ // jl +! dtap_rr_system_information_3, /* System Information Type 3 */ // jl +! dtap_rr_system_information_4, /* System Information Type 4 */ // jl + NULL, /* System Information Type 5 */ + NULL, /* System Information Type 6 */ + NULL, /* System Information Type 7 */ +*************** +*** 18203,18212 **** +--- 19630,19649 ---- + return; + } + ++ /* ++ * XXX assuming GNU Radio input ++ */ ++ if(check_col(pinfo->cinfo, COL_PROTOCOL)) ++ col_set_str(pinfo->cinfo, COL_PROTOCOL, "GSM"); ++ if(check_col(pinfo->cinfo, COL_INFO)) ++ col_clear(pinfo->cinfo, COL_INFO); ++ ++ /* XXX orig + if (check_col(pinfo->cinfo, COL_INFO)) + { + col_append_str(pinfo->cinfo, COL_INFO, "(DTAP) "); + } ++ */ + + /* + * set tap record pointer +*************** +*** 18460,18465 **** +--- 19897,20061 ---- + + static hf_register_info hf[] = + { ++ // jl ++ { ++ &hf_gsm_a_rr_rach_cp_max_retrans, ++ { ++ "Maximum number of retransmissions", ++ "gsm_a.rr.rach_cp.max_retrans", FT_UINT8, ++ BASE_HEX, ++ VALS(gsm_a_rr_rach_cp_max_retrans_vals), ++ 0xc0, "Maximum number of retransmissions", ++ HFILL ++ } ++ }, ++ // jl ++ { ++ &hf_gsm_a_rr_rach_cp_tx_integer, ++ { ++ "Number of slots to spread transmissions", ++ "gsm_a.rr.rach_cp.tx_integer", FT_UINT8, ++ BASE_HEX, ++ VALS(gsm_a_rr_rach_cp_tx_integer_vals), ++ 0x3c, "Tx-integer, Number of slots to " ++ "spread tranmissions", HFILL ++ } ++ }, ++ // jl ++ { ++ &hf_gsm_a_rr_rach_cp_cell_bar_access, ++ { ++ "Cell Barred for Access", ++ "gsm_a.rr.rach_cp.cell_bar_access", ++ FT_UINT8, 1, ++ VALS( ++ &gsm_a_rr_rach_cp_cell_bar_access_vals), ++ 0x2, ++ "CELL_BAR_ACCESS, Cell Barred for Access", ++ HFILL ++ } ++ }, ++ // jl ++ { ++ &hf_gsm_a_rr_rach_cp_re, ++ { ++ "Call reestablishment allowed", ++ "gsm_a.rr.rach_cp.re", FT_UINT8, 1, ++ VALS(&gsm_a_rr_rach_cp_re_vals), 0x1, ++ "RE, Call reestablishment allowed", HFILL ++ } ++ }, ++ // jl ++ { ++ &hf_gsm_a_rr_si_1_rest_octets, ++ { ++ "SI 1 Rest Octets", ++ "gsm_a.rr.si_1.rest_octets", FT_UINT8, ++ BASE_HEX, ++ VALS(gsm_a_rr_si_1_rest_octets_vals), 0x1f, ++ "SI 1 Rest Octets", HFILL ++ } ++ }, ++ // jl ++ { ++ &hf_gsm_a_rr_neigh_cell_dsc_ext, ++ { ++ "Extension Indication", ++ "gsm_a.rr.neigh_cell_dsc.ext", FT_BOOLEAN, ++ 1, TFS(&gsm_a_rr_neigh_cell_dsc_ext_tfs), ++ 0x20, "Extension Indication", HFILL ++ } ++ }, ++ // jl ++ { ++ &hf_gsm_a_rr_neigh_cell_dsc_ba, ++ { ++ "BACCH allocation sequence number indication", ++ "gsm_a.rr.neigh_cell_dsc.ba", FT_BOOLEAN, 1, ++ TFS(&gsm_a_rr_neigh_cell_dsc_ba_tfs), 0x10, ++ "BACCH allocation sequence number " ++ "indication", HFILL ++ } ++ }, ++ // jl ++ { ++ &hf_gsm_a_rr_cc_dsc_mscr, ++ { ++ "MSC Release", "gsm_a.rr.cc_dsc.mscr", ++ FT_BOOLEAN, 1, ++ TFS(&gsm_a_rr_cc_dsc_mscr_tfs), 0x80, ++ "MSC Release", HFILL ++ } ++ }, ++ // jl ++ { ++ &hf_gsm_a_rr_cc_dsc_att, ++ { ++ "Attach-detach allowed", "gsm_a.rr.cc_dsc.att", ++ FT_BOOLEAN, 1, ++ TFS(&gsm_a_rr_cc_dsc_att_tfs), 0x40, ++ "Attach-detach allowed", HFILL ++ } ++ }, ++ // jl ++ { ++ &hf_gsm_a_rr_cc_dsc_cbq3, ++ { ++ "Cell Bar Qualify 3", "gsm_a.rr.cc_dsc.cbq3", ++ FT_UINT8, BASE_HEX, ++ VALS(gsm_a_rr_cc_dsc_cbq3_vals), 0x60, ++ "Cell Bar Qualify 3", HFILL ++ } ++ }, ++ // jl ++ { ++ &hf_gsm_a_rr_cc_dsc_ccch, ++ { ++ "CCCH Configuration", "gsm_a.rr.cc_dsc.ccch", ++ FT_UINT8, BASE_HEX, ++ VALS(gsm_a_rr_cc_dsc_ccch_vals), 0x7, ++ "CCCH Configuration", HFILL ++ } ++ }, ++ // jl ++ { ++ &hf_gsm_a_rr_co_bcch_dn_ind, ++ { ++ "DN-IND Dynamic ARFCN mapping indicator", "gsm_a.rr.co_bcch.dn_ind", ++ FT_UINT8, BASE_HEX, VALS(gsm_a_rr_co_bcch_dn_ind_vals), 0x80, ++ "Dynamic ARFCN mapping indicator", HFILL ++ } ++ }, ++ // jl ++ { ++ &hf_gsm_a_rr_co_bcch_pwrc, ++ { ++ "PWRC Power Control indicator", "gsm_a.rr.co_bcch.pwrc", ++ FT_UINT8, BASE_HEX, VALS(gsm_a_rr_co_bcch_pwrc_vals), 0x40, ++ "Power Control indicator", HFILL ++ } ++ }, ++ // jl ++ { ++ &hf_gsm_a_rr_co_bcch_dtx, ++ { ++ "DTX indicator", "gsm_a.rr.co_bcch.dtx", ++ FT_UINT8, BASE_HEX, VALS(gsm_a_rr_co_bcch_dtx_vals), 0x30, ++ "DTX indicator", HFILL ++ } ++ }, ++ // jl ++ { ++ &hf_gsm_a_rr_dm_or_tbf, ++ { ++ "Dedicated Mode or Temporary Block Flow", "gsm_a.rr.dm_or_tbf", ++ FT_UINT8, BASE_HEX, VALS(gsm_a_rr_dm_or_tbf_vals), 0x70, // assuming this is the 2nd IE in octet ++ "Dedicated Mode or TBF", HFILL ++ } ++ }, ++ ++ // ---------------------------------- ++ + { &hf_gsm_a_bssmap_msg_type, + { "BSSMAP Message Type", "gsm_a.bssmap_msgtype", + FT_UINT8, BASE_HEX, VALS(gsm_a_bssmap_msg_strings), 0x0, +*************** +*** 18875,18880 **** +--- 20471,20488 ---- + FT_UINT8,BASE_DEC, VALS(gsm_a_gmm_cn_spec_drs_cycle_len_coef_strings), 0xf0, + "CN Specific DRX cycle length coefficient", HFILL } + }, ++ ++ // jl ++ { ++ &hf_gsm_a_rr_rach_cp_ec, ++ { ++ "Emergency Call allowed", "gsm_a.rr.rach_cp_ec", ++ FT_BOOLEAN, 1, TFS(&gsm_a_rr_rach_cp_ec_tfs), 0x4, ++ "EC, Emergency Call allowed", HFILL ++ } ++ }, ++ // ++ + { &hf_gsm_a_rr_RR_cause, + { "RR cause value","gsm_a.rr.RRcause", + FT_UINT8,BASE_DEC, VALS(gsm_a_rr_RR_cause_vals), 0x0, +*************** +*** 19338,19343 **** +--- 20946,20955 ---- + dissector_add("bssap.pdu_type", BSSAP_PDU_TYPE_DTAP, dtap_handle); + dissector_add("ranap.nas_pdu", BSSAP_PDU_TYPE_DTAP, dtap_handle); + dissector_add("llcgprs.sapi", 1 , dtap_handle); ++ ++ // GNU Radio ++ dissector_add("ethertype", 0xfed5, dtap_handle); ++ + data_handle = find_dissector("data"); + } + diff --git a/gssm/src/Makefile.am b/gssm/src/Makefile.am new file mode 100644 index 0000000..afa6595 --- /dev/null +++ b/gssm/src/Makefile.am @@ -0,0 +1,4 @@ +include $(top_srcdir)/Makefile.common + +SUBDIRS = lib mktun +DIST_SUBDIRS = lib mktun diff --git a/gssm/src/lib/Makefile.am b/gssm/src/lib/Makefile.am new file mode 100644 index 0000000..be3775c --- /dev/null +++ b/gssm/src/lib/Makefile.am @@ -0,0 +1,44 @@ +# $Id: Makefile.am,v 1.1.1.1 2007-06-01 04:26:57 jl Exp $ + +include $(top_srcdir)/Makefile.common + +ourpythondir = $(pythondir) +ourlibdir = $(pyexecdir) + +INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) + +SWIGCPPPYTHONARGS = -c++ -python $(PYTHON_CPPFLAGS) -I$(swigincludedir) -I$(grincludedir) + +LOCAL_IFILES = gssm.i +NON_LOCAL_IFILES = $(GNURADIO_CORE_INCLUDEDIR)/swig/gnuradio.i +ALL_IFILES = $(LOCAL_IFILES) $(NON_LOCAL_IFILES) + +BUILT_SOURCES = gssm_glue.cc gssm.py + +ourpython_PYTHON = gssm.py + +ourlib_LTLIBRARIES = _gssm.la + +# source files that go into the shared library +_gssm_la_SOURCES = \ + gssm_glue.cc \ + gssm_sink.cc \ + bursts.cc \ + sch.cc \ + cch.cc \ + rr_decode.cc \ + tun.cc \ + display.cc + +_gssm_la_LDFLAGS = -module -avoid-version + +_gssm_la_LIBADD = $(PYTHON_LDFLAGS) -lstdc++ + +gssm_glue.cc gssm.py: gssm.i $(ALL_IFILES) + $(SWIG) $(SWIGCPPPYTHONARGS) -module gssm -o gssm_glue.cc $< + +grinclude_HEADERS = gssm_sink.h + +swiginclude_HEADERS = $(LOCAL_IFILES) + +MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc diff --git a/gssm/src/lib/buffer.h b/gssm/src/lib/buffer.h new file mode 100644 index 0000000..038cba6 --- /dev/null +++ b/gssm/src/lib/buffer.h @@ -0,0 +1,4 @@ +#pragma once + +static const int BUFFER_QD_SIZE = 16384; +static const int BUFFER_MM_SIZE = 16384; diff --git a/gssm/src/lib/burst_types.h b/gssm/src/lib/burst_types.h new file mode 100644 index 0000000..fc8fa4a --- /dev/null +++ b/gssm/src/lib/burst_types.h @@ -0,0 +1,217 @@ +// $Id: burst_types.h,v 1.2 2007-07-07 16:31:42 jl Exp $ + +#pragma once + +#include "gsm_constants.h" + +static const int TB_LEN = 3; +static const int TB_OS1 = 0; +static const int TB_OS2 = 145; +static const unsigned char tail_bits[TB_LEN] = {0, 0, 0}; + +/* + * The normal burst is used to carry information on traffic and control + * channels. + */ +static const int N_TSC_NUM = 8; // number of training sequence codes +static const int N_TSC_CODE_LEN = 26; // length of tsc +static const int N_TSC_OS = 61; // tsc offset +static const int N_EDATA_LEN_1 = 58; // length of first data section +static const int N_EDATA_OS_1 = 3; // offset of first data section +static const int N_EDATA_LEN_2 = 58; // length of second data section +static const int N_EDATA_OS_2 = 87; // offset of second data section +static const unsigned char n_tsc[N_TSC_NUM][N_TSC_CODE_LEN] = { +/* 0 */ { + 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, + 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1 + }, +/* 1 */ { + 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, + 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1 + }, +/* 2 */ { + 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, + 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0 + }, +/* 3 */ { + 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, + 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0 + }, +/* 4 */ { + 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, + 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1 + }, +/* 5 */ { + 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, + 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0 + }, +/* 6 */ { + 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, + 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1 + }, +/* 7 */ { + 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, + 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0 + } +}; + + +/* + * The frequency correction burst is used for frequency synchronization + * of the mobile. This is broadcast in TS0 together with the SCH and + * BCCH. + * + * Modulating the bits below causes a spike at 62.5kHz above (below for + * COMPACT) the center frequency. One can use this spike with a narrow + * band filter to accurately determine the center of the channel. + */ +static const int FC_CODE_LEN = 142; +static const int FC_OS = 3; +static const unsigned char fc_fb[FC_CODE_LEN] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +static const unsigned char fc_fb_de[TB_LEN + FC_CODE_LEN + TB_LEN] = { + 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1 +}; + +static const unsigned char fc_compact_fb[FC_CODE_LEN] = { + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 +}; + + +/* + * The synchronization burst is used for time synchronization of the + * mobile. The bits given below were chosen for their correlation + * properties. The synchronization channel (SCH) contains a long + * training sequence (given below) and carries the TDMA frame number and + * base station identity code. It is broadcast in TS0 in the frame + * following the frequency correction burst. + */ +static const int SB_CODE_LEN = 64; +static const int SB_ETS_OS = 42; +static const int SB_EDATA_LEN_1 = 39; +static const int SB_EDATA_OS_1 = 3; +static const int SB_EDATA_LEN_2 = 39; +static const int SB_EDATA_OS_2 = 106; +static const unsigned char sb_etsc[SB_CODE_LEN] = { + 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, + 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, + 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1 +}; + +static const unsigned char sb_cts_etsc[SB_CODE_LEN] = { + 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, + 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, + 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1 +}; + +static const unsigned char sb_compact_etsc[SB_CODE_LEN] = { + 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, + 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, + 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0 +}; + + +/* + * A base tranceiver station must transmit a burst in every timeslot of + * every TDMA frame in channel C0. The dummy burst will be transmitted + * on all timeslots of all TDMA frames for which no other channel + * requires a burst to be transmitted. + */ +static const int D_CODE_LEN = 142; +static const int D_MB_OS = 3; +static const unsigned char d_mb[D_CODE_LEN] = { + 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, + 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, + 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, + 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, + 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, + 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, + 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, + 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0 +}; + + +/* + * The access burst is used for random access from a mobile. + */ +static const int AB_ETB_CODE_LEN = 8; +static const int AB_ETB_OS = 0; +static const unsigned char ab_etb[AB_ETB_CODE_LEN] = { + 0, 0, 1, 1, 1, 0, 1, 0 +}; + +static const int AB_SSB_CODE_LEN = 41; +static const int AB_SSB_OS = 8; +static const unsigned char ab_ssb[AB_SSB_CODE_LEN] = { + 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, + 0, 0, 1, 1, 1, 1, 0, 0, 0 +}; + +static const unsigned char ab_ts1_ssb[AB_SSB_CODE_LEN] = { + 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, + 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, + 0, 0, 1, 0, 0, 1, 1, 0, 1 +}; + +static const unsigned char ab_ts2_ssb[AB_SSB_CODE_LEN] = { + 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, + 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, + 1, 0, 1, 1, 1, 0, 1, 1, 1 +}; + + +typedef enum { + burst_n_0, + burst_n_1, + burst_n_2, + burst_n_3, + burst_n_4, + burst_n_5, + burst_n_6, + burst_n_7, + burst_fc, + burst_fc_c, + burst_s, + burst_s_cts, + burst_s_c, + burst_d, + burst_a, + burst_a_ts1, + burst_a_ts2, + burst_not_a_burst +} burst_t; + +static const int N_BURST_TYPES = ((int)(burst_not_a_burst) + 1); diff --git a/gssm/src/lib/bursts.cc b/gssm/src/lib/bursts.cc new file mode 100644 index 0000000..cd35382 --- /dev/null +++ b/gssm/src/lib/bursts.cc @@ -0,0 +1,153 @@ +// $Id: bursts.cc,v 1.1.1.1 2007-06-01 04:26:57 jl Exp $ + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include "burst_types.h" + +void display_burst_type(burst_t t) { + + switch(t) { + case burst_n_0: + case burst_n_1: + case burst_n_2: + case burst_n_3: + case burst_n_4: + case burst_n_5: + case burst_n_6: + case burst_n_7: + printf("normal burst %d", t); + break; + case burst_fc: + printf("frequency correction burst"); + break; + case burst_fc_c: + printf("frequency correction burst (COMPACT)"); + break; + case burst_s: + printf("synchronization burst"); + break; + case burst_s_cts: + printf("synchronization burst (CTS)"); + break; + case burst_s_c: + printf("synchronization burst (COMPACT)"); + break; + case burst_d: + printf("dummy burst"); + break; + case burst_a: + printf("access burst"); + break; + case burst_a_ts1: + printf("access burst (TS1)"); + break; + case burst_a_ts2: + printf("access burst (TS2)"); + break; + default: + printf("unknown burst type"); + break; + } +} + + +static int burst_diff(const unsigned char *b1, const unsigned char *b2, + unsigned int l) { + + int d = 0; + unsigned int i; + + for(i = 0; i < l; i++) + d += (b1[i] ^ b2[i]); + return d; +} + + +int search_fc(unsigned char *buf) { + + return !(burst_diff(buf + TB_OS1, tail_bits, TB_LEN) + + burst_diff(buf + TB_OS2, tail_bits, TB_LEN) + + burst_diff(buf + FC_OS, fc_fb, FC_CODE_LEN)); +} + + +int is_dummy_burst(const unsigned char *buf) { + + int i; + + for(i = 0; i < D_CODE_LEN; i++) + if(buf[i + D_MB_OS] != d_mb[i]) + return 0; + return 1; +} + + +burst_t search_burst(unsigned char *buf, int max_burst_errors, int *rmin_o) { + + int i, d_burst[N_BURST_TYPES], t_d, d_min, rmin; + burst_t bt_min; + + for(i = 0; i < N_BURST_TYPES; i++) + d_burst[i] = max_burst_errors + 1; + + // access burst (uplink only) + t_d = burst_diff(buf + AB_ETB_OS, ab_etb, AB_ETB_CODE_LEN); + d_burst[(int)burst_a] = + t_d + burst_diff(buf + AB_SSB_OS, ab_ssb, AB_SSB_CODE_LEN); + + d_burst[(int)burst_a_ts1] = + t_d + burst_diff(buf + AB_SSB_OS, ab_ts1_ssb, AB_SSB_CODE_LEN); + + d_burst[(int)burst_a_ts2] = + t_d + burst_diff(buf + AB_SSB_OS, ab_ts2_ssb, AB_SSB_CODE_LEN); + + // check tail bits + t_d = + burst_diff(buf + TB_OS1, tail_bits, TB_LEN) + + burst_diff(buf + TB_OS2, tail_bits, TB_LEN); + + // normal bursts + for(i = 0; i < N_TSC_NUM; i++) + d_burst[(int)burst_n_0 + i] = + t_d + burst_diff(buf + N_TSC_OS, n_tsc[i], N_TSC_CODE_LEN); + + // frequency correction + d_burst[(int)burst_fc] = + t_d + burst_diff(buf + FC_OS, fc_fb, FC_CODE_LEN); + + d_burst[(int)burst_fc_c] = + t_d + burst_diff(buf + FC_OS, fc_compact_fb, FC_CODE_LEN); + + // synchronization burst + d_burst[(int)burst_s] = + t_d + burst_diff(buf + SB_ETS_OS, sb_etsc, SB_CODE_LEN); + + d_burst[(int)burst_s_cts] = + t_d + burst_diff(buf + SB_ETS_OS, sb_cts_etsc, SB_CODE_LEN); + + d_burst[(int)burst_s_c] = + t_d + burst_diff(buf + SB_ETS_OS, sb_compact_etsc, SB_CODE_LEN); + + // dummy + d_burst[(int)burst_d] = + t_d + burst_diff(buf + D_MB_OS, d_mb, D_CODE_LEN); + + d_burst[(int)burst_not_a_burst] = max_burst_errors; + + rmin = BURST_LENGTH; + d_min = max_burst_errors + 1; + bt_min = burst_not_a_burst; + for(i = 0; i < N_BURST_TYPES; i++) { + if(d_burst[i] < d_min) { + bt_min = (burst_t)i; + d_min = d_burst[i]; + } + if((d_burst[i] < rmin) && ((burst_t)i != burst_not_a_burst)) + rmin = d_burst[i]; + } + if(rmin_o) + *rmin_o = rmin; + return bt_min; +} diff --git a/gssm/src/lib/bursts.h b/gssm/src/lib/bursts.h new file mode 100644 index 0000000..c8a5096 --- /dev/null +++ b/gssm/src/lib/bursts.h @@ -0,0 +1,10 @@ +// $Id: bursts.h,v 1.1.1.1 2007-06-01 04:26:57 jl Exp $ + +#pragma once + +#include "burst_types.h" + +void display_burst_type(burst_t); +burst_t search_burst(unsigned char *, int, int *); +int search_fc(unsigned char *); +int is_dummy_burst(const unsigned char *); diff --git a/gssm/src/lib/cch.cc b/gssm/src/lib/cch.cc new file mode 100644 index 0000000..5659440 --- /dev/null +++ b/gssm/src/lib/cch.cc @@ -0,0 +1,460 @@ +// $Id: cch.cc,v 1.1.1.1 2007-06-01 04:26:57 jl Exp $ + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <ctype.h> + +#include <exception> +#include <stdexcept> + +#include "burst_types.h" +#include "cch.h" + +/* + * GSM SACCH -- Slow Associated Control Channel + * + * These messages are encoded exactly the same as on the BCCH. + * (Broadcast Control Channel.) + * + * Input: 184 bits + * + * 1. Add parity and flushing bits. + * 2. Convolutional encode. + * 3. Interleave. + * 4. Map on bursts. + */ + + +/* + * Parity (FIRE) for the GSM SACCH channel. + * + * g(x) = (x^23 + 1)(x^17 + x^3 + 1) + * = x^40 + x^26 + x^23 + x^17 + x^3 + 1 + */ + +static const unsigned char parity_polynomial[PARITY_SIZE + 1] = { + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, + 0, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, + 1 +}; + +// remainder after dividing data polynomial by g(x) +static const unsigned char parity_remainder[PARITY_SIZE] = { + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1 +}; + + +/* +static void parity_encode(unsigned char *d, unsigned char *p) { + + int i; + unsigned char buf[DATA_BLOCK_SIZE + PARITY_SIZE], *q; + + memcpy(buf, d, DATA_BLOCK_SIZE); + memset(buf + DATA_BLOCK_SIZE, 0, PARITY_SIZE); + + for(q = buf; q < buf + DATA_BLOCK_SIZE; q++) + if(*q) + for(i = 0; i < PARITY_SIZE + 1; i++) + q[i] ^= parity_polynomial[i]; + for(i = 0; i < PARITY_SIZE; i++) + p[i] = !buf[DATA_BLOCK_SIZE + i]; +} + */ + + +static int parity_check(unsigned char *d) { + + unsigned int i; + unsigned char buf[DATA_BLOCK_SIZE + PARITY_SIZE], *q; + + memcpy(buf, d, DATA_BLOCK_SIZE + PARITY_SIZE); + + for(q = buf; q < buf + DATA_BLOCK_SIZE; q++) + if(*q) + for(i = 0; i < PARITY_SIZE + 1; i++) + q[i] ^= parity_polynomial[i]; + return memcmp(buf + DATA_BLOCK_SIZE, parity_remainder, PARITY_SIZE); +} + + +/* + * Convolutional encoding and Viterbi decoding for the GSM SACCH channel. + */ + +/* + * Convolutional encoding: + * + * G_0 = 1 + x^3 + x^4 + * G_1 = 1 + x + x^3 + x^4 + * + * i.e., + * + * c_{2k} = u_k + u_{k - 3} + u_{k - 4} + * c_{2k + 1} = u_k + u_{k - 1} + u_{k - 3} + u_{k - 4} + */ +#define K 5 +#define MAX_ERROR (2 * CONV_INPUT_SIZE + 1) + + +/* + * Given the current state and input bit, what are the output bits? + * + * encode[current_state][input_bit] + */ +static const unsigned int encode[1 << (K - 1)][2] = { + {0, 3}, {3, 0}, {3, 0}, {0, 3}, + {0, 3}, {3, 0}, {3, 0}, {0, 3}, + {1, 2}, {2, 1}, {2, 1}, {1, 2}, + {1, 2}, {2, 1}, {2, 1}, {1, 2} +}; + + +/* + * Given the current state and input bit, what is the next state? + * + * next_state[current_state][input_bit] + */ +static const unsigned int next_state[1 << (K - 1)][2] = { + {0, 8}, {0, 8}, {1, 9}, {1, 9}, + {2, 10}, {2, 10}, {3, 11}, {3, 11}, + {4, 12}, {4, 12}, {5, 13}, {5, 13}, + {6, 14}, {6, 14}, {7, 15}, {7, 15} +}; + + +/* + * Given the previous state and the current state, what input bit caused + * the transition? If it is impossible to transition between the two + * states, the value is 2. + * + * prev_next_state[previous_state][current_state] + */ +static const unsigned int prev_next_state[1 << (K - 1)][1 << (K - 1)] = { + { 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2}, + { 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2}, + { 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2}, + { 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2}, + { 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2}, + { 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2}, + { 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2}, + { 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2}, + { 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2}, + { 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2}, + { 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2}, + { 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2}, + { 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2}, + { 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2}, + { 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1}, + { 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1} +}; + + +static inline unsigned int hamming_distance2(unsigned int w) { + + return (w & 1) + !!(w & 2); +} + + +/* +static void conv_encode(unsigned char *data, unsigned char *output) { + + unsigned int i, state = 0, o; + + // encode data + for(i = 0; i < CONV_INPUT_SIZE; i++) { + o = encode[state][data[i]]; + state = next_state[state][data[i]]; + *output++ = !!(o & 2); + *output++ = o & 1; + } +} + */ + + +static int conv_decode(unsigned char *output, unsigned char *data) { + + int i, t; + unsigned int rdata, state, nstate, b, o, distance, accumulated_error, + min_state, min_error, cur_state; + + unsigned int ae[1 << (K - 1)]; + unsigned int nae[1 << (K - 1)]; // next accumulated error + unsigned int state_history[1 << (K - 1)][CONV_INPUT_SIZE + 1]; + + // initialize accumulated error, assume starting state is 0 + for(i = 0; i < (1 << (K - 1)); i++) + ae[i] = nae[i] = MAX_ERROR; + ae[0] = 0; + + // build trellis + for(t = 0; t < CONV_INPUT_SIZE; t++) { + + // get received data symbol + rdata = (data[2 * t] << 1) | data[2 * t + 1]; + + // for each state + for(state = 0; state < (1 << (K - 1)); state++) { + + // make sure this state is possible + if(ae[state] >= MAX_ERROR) + continue; + + // find all states we lead to + for(b = 0; b < 2; b++) { + + // get next state given input bit b + nstate = next_state[state][b]; + + // find output for this transition + o = encode[state][b]; + + // calculate distance from received data + distance = hamming_distance2(rdata ^ o); + + // choose surviving path + accumulated_error = ae[state] + distance; + if(accumulated_error < nae[nstate]) { + + // save error for surviving state + nae[nstate] = accumulated_error; + + // update state history + state_history[nstate][t + 1] = state; + } + } + } + + // get accumulated error ready for next time slice + for(i = 0; i < (1 << (K - 1)); i++) { + ae[i] = nae[i]; + nae[i] = MAX_ERROR; + } + } + + // the final state is the state with the fewest errors + min_state = (unsigned int)-1; + min_error = MAX_ERROR; + for(i = 0; i < (1 << (K - 1)); i++) { + if(ae[i] < min_error) { + min_state = i; + min_error = ae[i]; + } + } + + // trace the path + cur_state = min_state; + for(t = CONV_INPUT_SIZE; t >= 1; t--) { + min_state = cur_state; + cur_state = state_history[cur_state][t]; // get previous + output[t - 1] = prev_next_state[cur_state][min_state]; + } + + // return the number of errors detected (hard-decision) + return min_error; +} + + +/* + * GSM SACCH interleaving and burst mapping + * + * Interleaving: + * + * Given 456 coded input bits, form 4 blocks of 114 bits: + * + * i(B, j) = c(n, k) k = 0, ..., 455 + * n = 0, ..., N, N + 1, ... + * B = B_0 + 4n + (k mod 4) + * j = 2(49k mod 57) + ((k mod 8) div 4) + * + * Mapping on Burst: + * + * e(B, j) = i(B, j) + * e(B, 59 + j) = i(B, 57 + j) j = 0, ..., 56 + * e(B, 57) = h_l(B) + * e(B, 58) = h_n(B) + * + * Where h_l(B) and h_n(B) are bits in burst B indicating flags. + */ + +/* +static void interleave(unsigned char *data, unsigned char *iBLOCK) { + + int j, k, B; + + // for each bit in input data + for(k = 0; k < CONV_SIZE; k++) { + B = k % 4; + j = 2 * ((49 * k) % 57) + ((k % 8) / 4); + iBLOCK[B * iBLOCK_SIZE + j] = data[k]; + } +} + */ + + +static void decode_interleave(unsigned char *data, unsigned char *iBLOCK) { + + int j, k, B; + + for(k = 0; k < CONV_SIZE; k++) { + B = k % 4; + j = 2 * ((49 * k) % 57) + ((k % 8) / 4); + data[k] = iBLOCK[B * iBLOCK_SIZE + j]; + } +} + + +/* +static void burstmap(unsigned char *iBLOCK, unsigned char *eBLOCK, + unsigned char hl, unsigned char hn) { + + int j; + + for(j = 0; j < 57; j++) { + eBLOCK[j] = iBLOCK[j]; + eBLOCK[j + 59] = iBLOCK[j + 57]; + } + eBLOCK[57] = hl; + eBLOCK[58] = hn; +} + */ + + +static void decode_burstmap(unsigned char *iBLOCK, unsigned char *eBLOCK, + unsigned char *hl, unsigned char *hn) { + + int j; + + for(j = 0; j < 57; j++) { + iBLOCK[j] = eBLOCK[j]; + iBLOCK[j + 57] = eBLOCK[j + 59]; + } + *hl = eBLOCK[57]; + *hn = eBLOCK[58]; +} + + +/* + * Transmitted bits are sent least-significant first. + */ +static int compress_bits(unsigned char *dbuf, unsigned int dbuf_len, + unsigned char *sbuf, unsigned int sbuf_len) { + + unsigned int i, j, c, pos = 0; + + if(dbuf_len < ((sbuf_len + 7) >> 3)) + return -1; + + for(i = 0; i < sbuf_len; i += 8) { + for(j = 0, c = 0; (j < 8) && (i + j < sbuf_len); j++) + c |= (!!sbuf[i + j]) << j; + dbuf[pos++] = c & 0xff; + } + return pos; +} + + +int get_ns_l3_len(unsigned char *data, unsigned int datalen) { + + if((data[0] & 3) != 1) { + fprintf(stderr, "error: get_ns_l3_len: pseudo-length reserved " + "bits bad (%2.2x)\n", data[0] & 3); + return -1; + } + return (data[0] >> 2); +} + + +static unsigned char *decode_sacch(unsigned char *e0, unsigned char *e1, + unsigned char *e2, unsigned char *e3, unsigned int *datalen) { + + int errors, len, data_size = (DATA_BLOCK_SIZE + 7) >> 3; + unsigned char conv_data[CONV_SIZE], iBLOCK[BLOCKS][iBLOCK_SIZE], + hl, hn, decoded_data[PARITY_OUTPUT_SIZE], *data; + + if(!(data = (unsigned char *)malloc(data_size))) { + throw std::runtime_error("error: decode_cch: malloc"); + } + + if(datalen) + *datalen = 0; + + // unmap the bursts + decode_burstmap(iBLOCK[0], e0, &hl, &hn); // XXX ignore stealing bits + decode_burstmap(iBLOCK[1], e1, &hl, &hn); + decode_burstmap(iBLOCK[2], e2, &hl, &hn); + decode_burstmap(iBLOCK[3], e3, &hl, &hn); + + // remove interleave + decode_interleave(conv_data, (unsigned char *)iBLOCK); + + // Viterbi decode + errors = conv_decode(decoded_data, conv_data); + + // check parity + if(errors || parity_check(decoded_data)) { + // fprintf(stderr, "error: sacch: parity error (%d)\n", errors); + return 0; + } + if((len = compress_bits(data, data_size, decoded_data, + DATA_BLOCK_SIZE)) < 0) { + fprintf(stderr, "error: compress_bits\n"); + return 0; + } + if((unsigned int)len < data_size) { + fprintf(stderr, "error: buf too small (%d < %d)\n", + sizeof(data), len); + return 0; + } + + if(datalen) + *datalen = (unsigned int)len; + return data; +} + + +/* + * decode_cch + * + * Decode a "common" control channel. Most control channels use + * the same burst, interleave, Viterbi and parity configuration. + * The documentation for the control channels defines SACCH first + * and then just keeps referring to that. + * + * The current (investigated) list is as follows: + * + * BCCH Norm + * BCCH Ext + * PCH + * AGCH + * CBCH (SDCCH/4) + * CBCH (SDCCH/8) + * SDCCH/4 + * SACCH/C4 + * SDCCH/8 + * SACCH/C8 + * + * We provide two functions, one for where all four bursts are + * contiguous, and one where they aren't. + */ +unsigned char *decode_cch(unsigned char *e0, unsigned char *e1, + unsigned char *e2, unsigned char *e3, unsigned int *datalen) { + + return decode_sacch(e0, e1, e2, e3, datalen); +} + + +unsigned char *decode_cch(unsigned char *e, unsigned int *datalen) { + + return decode_sacch(e, e + eBLOCK_SIZE, e + 2 * eBLOCK_SIZE, + e + 3 * eBLOCK_SIZE, datalen); +} diff --git a/gssm/src/lib/cch.h b/gssm/src/lib/cch.h new file mode 100644 index 0000000..bb1d629 --- /dev/null +++ b/gssm/src/lib/cch.h @@ -0,0 +1,42 @@ +// $Id: cch.h,v 1.1.1.1 2007-06-01 04:26:57 jl Exp $ + +/* + * decode_cch + * + * Decode a "common" control channel. Most control channels use + * the same burst, interleave, Viterbi and parity configuration. + * The documentation for the control channels defines SACCH first + * and then just keeps referring to that. + * + * The current (investigated) list is as follows: + * + * BCCH Norm + * BCCH Ext + * PCH + * AGCH + * CBCH (SDCCH/4) + * CBCH (SDCCH/8) + * SDCCH/4 + * SACCH/C4 + * SDCCH/8 + * SACCH/C8 + * + * We provide two functions, one for where all four bursts are + * contiguous, and one where they aren't. + */ + +#define DATA_BLOCK_SIZE 184 +#define PARITY_SIZE 40 +#define FLUSH_BITS_SIZE 4 +#define PARITY_OUTPUT_SIZE (DATA_BLOCK_SIZE + PARITY_SIZE + FLUSH_BITS_SIZE) + +#define CONV_INPUT_SIZE PARITY_OUTPUT_SIZE +#define CONV_SIZE (2 * CONV_INPUT_SIZE) + +#define BLOCKS 4 +#define iBLOCK_SIZE (CONV_SIZE / BLOCKS) +#define eBLOCK_SIZE (iBLOCK_SIZE + 2) + +unsigned char *decode_cch(unsigned char *, unsigned char *, unsigned char *, + unsigned char *, unsigned int *); +unsigned char *decode_cch(unsigned char *, unsigned int *); diff --git a/gssm/src/lib/display.cc b/gssm/src/lib/display.cc new file mode 100644 index 0000000..086b48a --- /dev/null +++ b/gssm/src/lib/display.cc @@ -0,0 +1,46 @@ +// $Id: display.cc,v 1.1.1.1 2007-06-01 04:26:57 jl Exp $ + +#include <stdio.h> +#include <stdlib.h> + + +void dump_raw(unsigned char *buf, unsigned int len) { + + unsigned int i; + + for(i = 0; i < len; i++) { + printf("%2.2x", buf[i]); + if(!((i + 1) % 4)) + printf(" "); + } + printf("\n"); +} + + +void display_raw(unsigned char *buf, unsigned int len) { + + unsigned int i, j, c; + unsigned long long v; + + for(i = 0; i < len; i += 64) { + v = 0; + for(j = 0; (j < 64) && (i + j < len); j++) { + printf("%d", buf[i + j]); + if(!((j + 1) % 4)) + printf(" "); + v = (v << 1) | buf[i + j]; + } + for(; j < 64; j++) { + printf(" "); + if(!((j + 1) % 4)) + printf(" "); + v <<= 1; + } + printf("\t"); + for(j = 0; j < 8; j++) { + c = (v >> (8 * (7 - j))) & 0xff; + printf("%2.2x ", c); + } + printf("\n"); + } +} diff --git a/gssm/src/lib/display.h b/gssm/src/lib/display.h new file mode 100644 index 0000000..cacd931 --- /dev/null +++ b/gssm/src/lib/display.h @@ -0,0 +1,4 @@ +// $Id: display.h,v 1.1.1.1 2007-06-01 04:26:57 jl Exp $ + +void dump_raw(unsigned char *, unsigned int); +void display_raw(unsigned char *, unsigned int); diff --git a/gssm/src/lib/gsm_constants.h b/gssm/src/lib/gsm_constants.h new file mode 100644 index 0000000..6f4f07e --- /dev/null +++ b/gssm/src/lib/gsm_constants.h @@ -0,0 +1,76 @@ +// $Id: gsm_constants.h,v 1.1.1.1 2007-06-01 04:26:57 jl Exp $ + +#pragma once + +static const double QN_TIME = 12.0l / 13.0l / 1000000.0l; +static const double BN_TIME = 4.0l * QN_TIME; +static const double TN_TIME = 156.25l * BN_TIME; +static const double FN_TIME = 8.0l * TN_TIME; + +static const double GSM_RATE = 812500.0l / 3.0l; +static const int MAX_FN = 26 * 51 * 2048; + +static const int BURST_LENGTH = 156; + + +/* + * frequency correction: + * tn = 0 fnm51 = 0 + * + * sync: + * tn = 0 fnm51 = 1 + * tn = 0 fnm51 = 11 + * tn = 0 fnm51 = 21 + * tn = 0 fnm51 = 31 + * tn = 0 fnm51 = 41 + * + * bcch: + * tn = 0 fnm51 = 2, 3, 4, 5 + * tn = 2 fnm51 = 2, 3, 4, 5 + * tn = 4 fnm51 = 2, 3, 4, 5 + * tn = 6 fnm51 = 2, 3, 4, 5 + * + * bcch_ext: + * tn = 0 fnm51 = 6, 7, 8, 9 + * tn = 2 fnm51 = 6, 7, 8, 9 + * tn = 4 fnm51 = 6, 7, 8, 9 + * tn = 6 fnm51 = 6, 7, 8, 9 + * + * pch and agch: + * tn = 0 fnm51 = 6, 7, 8, 9 + * tn = 0 fnm51 = 12, 13, 14, 15 + * tn = 0 fnm51 = 16, 17, 18, 19 + * tn = 0 fnm51 = 22, 23, 24, 25 + * tn = 0 fnm51 = 26, 27, 28, 29 + * tn = 0 fnm51 = 32, 33, 34, 35 + * tn = 0 fnm51 = 36, 37, 38, 39 + * tn = 0 fnm51 = 42, 43, 44, 45 + * tn = 0 fnm51 = 46, 47, 48, 49 + * tn = 2 fnm51 = 6, 7, 8, 9 + * tn = 2 fnm51 = 12, 13, 14, 15 + * tn = 2 fnm51 = 16, 17, 18, 19 + * tn = 2 fnm51 = 22, 23, 24, 25 + * tn = 2 fnm51 = 26, 27, 28, 29 + * tn = 2 fnm51 = 32, 33, 34, 35 + * tn = 2 fnm51 = 36, 37, 38, 39 + * tn = 2 fnm51 = 42, 43, 44, 45 + * tn = 2 fnm51 = 46, 47, 48, 49 + * tn = 4 fnm51 = 6, 7, 8, 9 + * tn = 4 fnm51 = 12, 13, 14, 15 + * tn = 4 fnm51 = 16, 17, 18, 19 + * tn = 4 fnm51 = 22, 23, 24, 25 + * tn = 4 fnm51 = 26, 27, 28, 29 + * tn = 4 fnm51 = 32, 33, 34, 35 + * tn = 4 fnm51 = 36, 37, 38, 39 + * tn = 4 fnm51 = 42, 43, 44, 45 + * tn = 4 fnm51 = 46, 47, 48, 49 + * tn = 6 fnm51 = 6, 7, 8, 9 + * tn = 6 fnm51 = 12, 13, 14, 15 + * tn = 6 fnm51 = 16, 17, 18, 19 + * tn = 6 fnm51 = 22, 23, 24, 25 + * tn = 6 fnm51 = 26, 27, 28, 29 + * tn = 6 fnm51 = 32, 33, 34, 35 + * tn = 6 fnm51 = 36, 37, 38, 39 + * tn = 6 fnm51 = 42, 43, 44, 45 + * tn = 6 fnm51 = 46, 47, 48, 49 + */ diff --git a/gssm/src/lib/gssm.i b/gssm/src/lib/gssm.i new file mode 100644 index 0000000..fbac240 --- /dev/null +++ b/gssm/src/lib/gssm.i @@ -0,0 +1,28 @@ +// $Id: gssm.i,v 1.2 2007-07-07 16:31:42 jl Exp $ + +%include "exception.i" +%import "gnuradio.i" + +%{ +#include "gnuradio_swig_bug_workaround.h" +#include "gssm_sink.h" +#include <stdexcept> +%} + + +GR_SWIG_BLOCK_MAGIC(gssm, sink); +gssm_sink_sptr gssm_make_sink(double); + +class gssm_sink : public gr_sync_block { + +public: + int d_search_fc_count; + int d_found_fc_count; + int d_valid_s; + int d_invalid_s; + + void stats(); + +private: + gssm_sink(double); +}; diff --git a/gssm/src/lib/gssm_sink.cc b/gssm/src/lib/gssm_sink.cc new file mode 100644 index 0000000..62c6f33 --- /dev/null +++ b/gssm/src/lib/gssm_sink.cc @@ -0,0 +1,765 @@ +/* + * $Id: gssm_sink.cc,v 1.2 2007-07-07 16:31:42 jl Exp $ + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <exception> +#include <stdexcept> +#include <string.h> + +#include <gr_io_signature.h> +#include <gr_buffer.h> +#include <gr_math.h> + +#include "gssm_sink.h" +#include "gsm_constants.h" +#include "burst_types.h" +#include "bursts.h" +#include "sch.h" +#include "cch.h" +#include "gssm_state.h" +#include "tun.h" +#include "rr_decode.h" +#include "display.h" +#include "buffer.h" + + +gssm_sink_sptr gssm_make_sink(double sps) { + + return gssm_sink_sptr(new gssm_sink(sps)); +} + + +static const char *chan_name = "gsm"; // GSM TUN interface name + + +gssm_sink::gssm_sink(double sps) : + gr_sync_block("gssm_sink", + gr_make_io_signature(1, 1, sizeof(gr_complex)), + gr_make_io_signature(0, 0, 0)) { + + if((d_tunfd = mktun(chan_name, d_ether_addr)) == -1) { + fprintf(stderr, "warning: was not able to open TUN device, " + "disabling Wireshark interface\n"); + // throw std::runtime_error("cannot open TUN device"); + } + + // allocate memory for physical channel to logical channel mapping + if(!(d_phy_buf = (unsigned char *)malloc(8 * 51 * eBLOCK_SIZE))) { + perror("malloc"); + close(d_tunfd); + throw std::runtime_error("cannot allocate buffer memory"); + } + + // allocate memory to specify which physical data is present + if(!(d_phy_ind = (int *)malloc(8 * 51 * sizeof(int)))) { + perror("malloc"); + close(d_tunfd); + throw std::runtime_error("cannot allocate index memory"); + } + memset(d_phy_ind, 0, 8 * 51 * sizeof(int)); + + // buffers to hold quadrature demod and clock recovery output + d_buf_qd = gr_make_buffer(BUFFER_QD_SIZE, sizeof(float)); + d_qd_reader = gr_buffer_add_reader(d_buf_qd, 0); + d_buf_mm = gr_make_buffer(BUFFER_MM_SIZE, sizeof(float)); + d_mm_reader = gr_buffer_add_reader(d_buf_mm, 0); + + // indicate to clock recovery that we are not sync'ed + d_bitno = -1; + + // set samples per second and symbol + d_sps = sps; + d_samples_per_symbol = d_sps / GSM_RATE; + + // initial program state + d_state = state_fc; + + // initial base station synchronization + d_tn = -1; + d_fn = -1; + d_bsic = -1; + + // stats + d_search_fc_count = d_found_fc_count = d_valid_s = d_invalid_s = + d_invalid_s_1 = d_valid_bcch = d_invalid_bcch = d_valid_ia = + d_invalid_ia = d_valid_sdcch4 = d_invalid_sdcch4 = + d_valid_sacchc4 = d_invalid_sacchc4 = d_valid_sdcch8 = + d_invalid_sdcch8 = d_valid_sacchc8 = d_invalid_sacchc8 = 0; + + // interpolator + d_interp = new gri_mmse_fir_interpolator(); + + // M&M clock recovery + reset_clock(); + + // set quad demod constants + d_qd_last = 0; + d_qd_gain = M_PI_2l / d_samples_per_symbol; // rate at quad demod + + // we always want multiples of the burst length + set_output_multiple( + (int)ceil((BURST_LENGTH + 1) * d_samples_per_symbol) + + d_interp->ntaps() + 10); +} + + +gssm_sink::~gssm_sink() { + + // close TUN interface + close(d_tunfd); + + // free phy memory + free(d_phy_buf); + free(d_phy_ind); +} + + +int gssm_sink::check_logical_channel(int b1, int b2, int b3, int b4) { + + int r = 0; + unsigned int data_len; + unsigned char *data; + + if(d_phy_ind[b1] && d_phy_ind[b2] && d_phy_ind[b3] && + d_phy_ind[b4]) { + // channel data present + data = decode_cch( + d_phy_buf + b1 * eBLOCK_SIZE, + d_phy_buf + b2 * eBLOCK_SIZE, + d_phy_buf + b3 * eBLOCK_SIZE, + d_phy_buf + b4 * eBLOCK_SIZE, + &data_len); + if(data) { + write_interface(d_tunfd, data + 1, data_len - 1, + d_ether_addr); + + // since we decoded this data, clear present flag + d_phy_ind[b1] = d_phy_ind[b2] = d_phy_ind[b3] = + d_phy_ind[b4] = 0; + + free(data); + + return 0; + } + return -1; + } + + return -2; // channel data not present +} + + +void gssm_sink::check_logical_channels() { + + int o, o_s, ts, rl, fn_s; + + // do we have complete data for various logical channels? + + // BCCH Norm + rl = 51; + fn_s = 2; + for(ts = 0; ts < 8; ts += 2) { + o = ts * rl + fn_s; + if(check_logical_channel(o, o + 1, o + 2, o + 3) == -1) + fprintf(stderr, "error: BCCH Norm (%d, %d)\n", ts, + fn_s); + } + + // BCCH Ext + rl = 51; + fn_s = 6; + for(ts = 0; ts < 8; ts += 2) { + o = ts * rl + fn_s; + if(check_logical_channel(o, o + 1, o + 2, o + 3) == -1) + fprintf(stderr, "error: BCCH Ext (%d, %d)\n", ts, + fn_s); + } + + // PCH, AGCH, SDCCH, SACCHC4 + rl = 51; + for(ts = 0; ts < 8; ts += 2) { + o_s = ts * rl; + + fn_s = 6; + o = o_s + fn_s; + if(check_logical_channel(o, o + 1, o + 2, o + 3) == -1) + fprintf(stderr, "error: PCH, AGCH (%d, %d)\n", ts, + fn_s); + + fn_s = 12; + o = o_s + fn_s; + if(check_logical_channel(o, o + 1, o + 2, o + 3) == -1) + fprintf(stderr, "error: PCH, AGCH (%d, %d)\n", ts, + fn_s); + + fn_s = 16; + o = o_s + fn_s; + if(check_logical_channel(o, o + 1, o + 2, o + 3) == -1) + fprintf(stderr, "error: PCH, AGCH (%d, %d)\n", ts, + fn_s); + + fn_s = 22; + o = o_s + fn_s; + if(check_logical_channel(o, o + 1, o + 2, o + 3) == -1) + fprintf(stderr, "error: PCH, AGCH (%d, %d)\n", ts, + fn_s); + + fn_s = 26; + o = o_s + fn_s; + if(check_logical_channel(o, o + 1, o + 2, o + 3) == -1) + fprintf(stderr, "error: PCH, AGCH (%d, %d)\n", ts, + fn_s); + + fn_s = 32; + o = o_s + fn_s; + if(check_logical_channel(o, o + 1, o + 2, o + 3) == -1) + fprintf(stderr, "error: PCH, AGCH (%d, %d)\n", ts, + fn_s); + + fn_s = 36; + o = o_s + fn_s; + if(check_logical_channel(o, o + 1, o + 2, o + 3) == -1) + fprintf(stderr, "error: PCH, AGCH (%d, %d)\n", ts, + fn_s); + + fn_s = 42; + o = o_s + fn_s; + if(check_logical_channel(o, o + 1, o + 2, o + 3) == -1) + fprintf(stderr, "error: PCH, AGCH (%d, %d)\n", ts, + fn_s); + + fn_s = 46; + o = o_s + fn_s; + if(check_logical_channel(o, o + 1, o + 2, o + 3) == -1) + fprintf(stderr, "error: PCH, AGCH (%d, %d)\n", ts, + fn_s); + } + + // SDCCH8 + rl = 51; + for(ts = 0; ts < 8; ts++) { + o_s = ts * rl; + for(fn_s = 0; fn_s < 32; fn_s += 4) { + o = o_s + fn_s; + if(check_logical_channel(o, o + 1, o + 2, o + 3) == -1) + fprintf(stderr, "error: SDCCH8 (%d, %d)\n", + ts, fn_s); + } + } + + // SACCHC8 + // XXX ignoring subchannel numbers + rl = 51; + for(ts = 0; ts < 8; ts++) { + o_s = ts * rl; + for(fn_s = 32; fn_s < 48; fn_s += 4) { + o = o_s + fn_s; + if(check_logical_channel(o, o + 1, o + 2, o + 3) == -1) + fprintf(stderr, "error: SACCH8 (%d, %d)\n", + ts, fn_s); + } + } + +} + + +void gssm_sink::next_timeslot() { + + d_tn++; + if(d_tn >= 8) { + d_tn %= 8; + d_fn = (d_fn + 1) % MAX_FN; + d_fnm51 = d_fn % 51; + d_fnm102 = d_fn % 102; + } +} + + +static void differential_decode(const unsigned char *in, unsigned char *out) { + + int i; + unsigned char is = 1; + + for(i = 0; i < BURST_LENGTH; i++) + is = out[i] = !in[i] ^ is; +} + + +static void differential_decode(const float *in, unsigned char *out) { + + int i; + unsigned char is = 1; + + for(i = 0; i < BURST_LENGTH; i++) + is = out[i] = (in[i] < 0) ^ is; +} + + +static const unsigned int MAX_INVALID_S = 10; +//static const unsigned int MAX_INVALID_S = 1; + +int gssm_sink::check_num_invalid_s() { + + if(d_invalid_s - d_invalid_s_1 >= MAX_INVALID_S) { + d_invalid_s_1 = d_invalid_s; + memset(d_phy_ind, 0, 8 * 51 * sizeof(int)); + + return 1; + } + return 0; +} + + +int gssm_sink::handle_sch(const unsigned char *buf, int *fn, int *bsic) { + + int ret; + + if(ret = !decode_sch(buf, fn, bsic)) { + d_valid_s++; + d_invalid_s_1 = d_invalid_s; + } else { + d_invalid_s++; + } + return ret; +} + + +/* + * search_s + * + * Searches for the synchronization packet. We assume that we have + * just seen the frequency correction packet. Hence: + * + * 1. We first enter with tn = 1. + * 2. The sync burst is the next burst in this channel. + */ +int gssm_sink::search_state_s(const float *in, int nitems) { + + int i, imax, wl; + unsigned char buf[BURST_LENGTH]; + float fbuf[BURST_LENGTH]; + + // assume that we are at the start of a burst + + imax = nitems - (int)ceil((BURST_LENGTH + 1) * d_samples_per_symbol) - + d_interp->ntaps() - (int)d_mu; + + for(i = 0; i < imax;) { + wl = BURST_LENGTH; + i += mm_demod(in + i, nitems - i, fbuf, wl); + if(!d_tn) { + differential_decode(fbuf, buf); + if(handle_sch(buf, &d_fn, &d_bsic)) { + + d_fnm51 = d_fn % 51; + d_fnm102 = d_fn % 102; + + next_timeslot(); + + d_state = state_data; + + return i; + } else if(check_num_invalid_s()) { + reset_state(); + return 0; + } + } + next_timeslot(); + } + return i; +} + + +static int is_sch(int tn, int fnm51) { + + return ((!tn) && ((fnm51 == 1) || (fnm51 == 11) || (fnm51 == 21) || + (fnm51 == 31) || (fnm51 == 41))); +} + + +void gssm_sink::search_sch(const unsigned char *buf) { + + int fn, bsic; + + if(is_sch(d_tn, d_fnm51)) { + if(handle_sch(buf, &fn, &bsic)) { + if(d_fn != fn) { + fprintf(stderr, "error: lost sync " + "(%d != %d [%d])\n", fn, d_fn, fn - d_fn); + d_fn = fn; + d_fnm51 = fn % 51; + d_fnm102 = fn % 102; + } + if(d_bsic != bsic) { + fprintf(stderr, "warning: bsic changed " + "(%d -> %d)\n", d_bsic, bsic); + d_bsic = bsic; + } + + } else { + if(check_num_invalid_s()) { + reset_state(); + } + } + } +} + + +int gssm_sink::search_state_data(const float *in, int nitems) { + + int i, imax, wl; + unsigned int offset, offset_i; + unsigned char buf[BURST_LENGTH]; + float fbuf[BURST_LENGTH]; + + imax = nitems - (int)ceil((BURST_LENGTH + 1) * d_samples_per_symbol) - + d_interp->ntaps() - (int)d_mu; + + for(i = 0; i < imax;) { + wl = BURST_LENGTH; + i += mm_demod(in + i, nitems - i, fbuf, wl); + + differential_decode(fbuf, buf); + + /* + for(int ii = 0; ii < BURST_LENGTH; ii++) + printf("%f\n", fbuf[ii]); + */ + + /* + if(is_sch(d_tn, d_fnm51)) + printf("S"); + else + printf(" "); + printf("%2d:%d: ", d_fnm51, d_tn); + for(int ii = 0; ii < BURST_LENGTH; ii++) + printf("%d", buf[ii]); + printf("\n"); + */ + + /* + if((buf[0] == 1) || (buf[1] == 1) || (buf[2] == 1)) + printf("%2d:%d: %d%d%d:%d%d%d %f %f %f : %f %f %f\n", + d_fnm51, d_tn, buf[0], buf[1], buf[2], buf[145], + buf[146], buf[147], fbuf[0], fbuf[1], fbuf[2], + fbuf[145], fbuf[146], fbuf[147]); + */ + + search_sch(buf); + if(d_state != state_data) + return 0; + + if(!is_dummy_burst(buf)) { + offset_i = (d_tn * 51 + (d_fn % 51)); + offset = offset_i * eBLOCK_SIZE; + memcpy(d_phy_buf + offset, buf + N_EDATA_OS_1, + N_EDATA_LEN_1); + memcpy(d_phy_buf + offset + N_EDATA_LEN_1, + buf + N_EDATA_OS_2, N_EDATA_LEN_2); + d_phy_ind[offset_i] = 1; + } + + // check_logical_channels(); + + if((!d_tn) && (!d_fnm51)) { + check_logical_channels(); + memset(d_phy_ind, 0, 8 * 51 * sizeof(int)); + } + + next_timeslot(); + } + return i; +} + + +static int slice(float f) { + + return (f >= 0); +} + + +int gssm_sink::mm_demod(const float *in, int nitems, float *out, int &nitems_out) { + int i, o; + float mm_val, v, f; + + f = floor(d_mu); + i = (int)f; + d_mu -= f; + + for(o = 0; (i < nitems - d_interp->ntaps()) && (o < nitems_out); o++) { + /* + * Produce output sample interpolated by d_mu where d_mu + * represents the normalized distance between the first and + * second sample of the given sequence. + * + * For example, d_mu = 0.5 interpolates a sample halfway + * in-between the current sample and the next. + */ + v = d_interp->interpolate(&in[i], d_mu); + + // adjust how fast and in which direction we modify omega + mm_val = slice(d_last_sample) * v - slice(v) * d_last_sample; + + // write output + // out[o] = (d_last_sample = v) >= 0; // hard decision + out[o] = d_last_sample = v; // soft decision + + // adjust the sample time for the next symbol + d_omega = d_omega + d_gain_omega * mm_val; + + // don't allow it to exceed extrema + if(d_omega > d_max_omega) + d_omega = d_max_omega; + else if(d_omega < d_min_omega) + d_omega = d_min_omega; + + // advance to next symbol + d_mu += d_omega + d_gain_mu * mm_val; + + // if we're sync'ed + if(d_bitno > -1) { + d_bitno++; + + // skip the quarter-bit at the end of a burst + if(d_bitno >= BURST_LENGTH) { + d_mu += d_omega / 4.0l; + d_bitno = 0; + } + } + + // d_mu is now the number of samples to the next symbol + f = floor(d_mu); + i += (int)f; // integer advance + d_mu -= f; // fractional advance + } + + // we may have advanced past the buffer + i -= (int)f; + d_mu += f; + + nitems_out = o; + + return i; // returns number consumed +} + + +int gssm_sink::quad_demod(const gr_complex *in, int nitems, float *out, int &nitems_out) { + + int r, M; + gr_complex product; + + M = std::min(nitems, nitems_out); + for(r = 0; r < M; r++) { + product = in[r] * conj(d_qd_last); + d_qd_last = in[r]; + out[r] = d_qd_gain * gr_fast_atan2f(imag(product), real(product)); + } + + nitems_out = r; + return r; // returns number consumed +} + + +int gssm_sink::process_input(const gr_complex *in, const int nitems) { + + float *w; + const float *r; + int wl, rl, rrl, ret; + + w = (float *)d_buf_qd->write_pointer(); + wl = d_buf_qd->space_available(); + ret = quad_demod(in, nitems, w, wl); + d_buf_qd->update_write_pointer(wl); + + r = (const float *)d_qd_reader->read_pointer(); + rl = d_qd_reader->items_available(); + w = (float *)d_buf_mm->write_pointer(); + wl = d_buf_mm->space_available(); + rrl = mm_demod(r, rl, w, wl); + d_qd_reader->update_read_pointer(rrl); + d_buf_mm->update_write_pointer(wl); + + return ret; +} + + +void gssm_sink::flush_buffers() { + + d_qd_reader->update_read_pointer(d_qd_reader->items_available()); + d_mm_reader->update_read_pointer(d_mm_reader->items_available()); +} + + +void gssm_sink::save_clock() { + + d_mu_bak = d_mu; + d_omega_bak = d_omega; + d_last_sample_bak = d_last_sample; +} + + +void gssm_sink::restore_clock() { + + d_mu = d_mu_bak; + d_omega = d_omega_bak; + d_last_sample = d_last_sample_bak; +} + + +void gssm_sink::reset_state() { + + d_state = state_fc; + d_bitno = -1; + flush_buffers(); + d_tn = -1; + d_fn = -1; + d_fnm51 = -1; + d_fnm102 = -1; + d_bsic = -1; + + reset_clock(); +} + + +void gssm_sink::reset_clock() { + + // M&M clock recovery + d_mu = 0.0; + d_gain_mu = 0.01; + d_omega = d_samples_per_symbol; + //d_omega_relative_limit = 0.01; + d_omega_relative_limit = 0.3; + d_max_omega = d_omega * (1.0 + d_omega_relative_limit); + d_min_omega = d_omega * (1.0 - d_omega_relative_limit); + d_gain_omega = 0.25 * d_gain_mu * d_gain_mu; +} + + +/* + * search_fc + * + * Searches for the frequency correction burst. + */ +int gssm_sink::search_state_fc(const float *in, int nitems) { + + int i, j, slen = sizeof(fc_fb_de) / sizeof(*fc_fb_de), + imax, c, nbits; + float w[BURST_LENGTH]; + double f; + const unsigned char *s = fc_fb_de; + + f = floor(d_mu); + i = (int)f; + d_mu -= f; + + imax = nitems - (int)ceil((BURST_LENGTH + 1) * d_samples_per_symbol) - + d_interp->ntaps() - i; + + while(i < imax) { + + // update stats + d_search_fc_count++; + + // save current clock parameters + save_clock(); + + // calculate burst + nbits = BURST_LENGTH; + c = mm_demod(in + i, nitems - i, w, nbits); + + // compare fixed and tail bits + for(j = 0; j < std::min(slen, nbits); j++) + if(slice(w[j]) != s[j]) + break; + + // was the fc burst detected? + if(j == slen) { + + // update stats + d_found_fc_count++; + + d_mu += d_omega / 4.0l; // advance quarter-bit + d_bitno = 0; // burst sync'ed now + d_tn = 0; // fc always in timeslot 0 + next_timeslot(); + d_state = state_s; + + return i + c; + } + + // restore clock to start of attempt + restore_clock(); + + // skip 1 bit and start again + nbits = 1; + i += mm_demod(in + i, nitems - i, w, nbits); + } + + return i; +} + + +void gssm_sink::stats() { + + printf("search fc:\t%d\n", d_search_fc_count); + printf("found fc:\t%d\n", d_found_fc_count); + printf("valid s:\t%d\n", d_valid_s); + printf("invalid s:\t%d\n", d_invalid_s); +} + + +int gssm_sink::process_qd(const gr_complex *in, int nitems) { + + float *w; + int wl, ret; + + w = (float *)d_buf_qd->write_pointer(); + wl = d_buf_qd->space_available(); + ret = quad_demod(in, nitems, w, wl); + d_buf_qd->update_write_pointer(wl); + + return ret; +} + + +int gssm_sink::work(int nitems, gr_vector_const_void_star &input_items, + gr_vector_void_star &) { + + const gr_complex *in = (gr_complex *)input_items[0]; + const float *r; + int rl, ret, i, imax, n; + + ret = process_qd(in, nitems); + + r = (const float *)d_qd_reader->read_pointer(); + rl = d_qd_reader->items_available(); + + imax = rl - + (int)(ceil((BURST_LENGTH + 1) * d_samples_per_symbol + d_mu) + + d_interp->ntaps()); + + for(i = 0; i < imax;) { + switch(d_state) { + case state_fc: + n = search_state_fc(r + i, rl - i); + break; + case state_s: + n = search_state_s(r + i, rl - i); + break; + case state_data: + n = search_state_data(r + i, rl - i); + break; + default: + fprintf(stderr, "error: bad state\n"); + reset_state(); + return 0; + } + i += n; + } + d_qd_reader->update_read_pointer(i); + + return ret; +} diff --git a/gssm/src/lib/gssm_sink.h b/gssm/src/lib/gssm_sink.h new file mode 100644 index 0000000..3e8a57f --- /dev/null +++ b/gssm/src/lib/gssm_sink.h @@ -0,0 +1,125 @@ +// $Id: gssm_sink.h,v 1.2 2007-07-07 16:31:42 jl Exp $ + +#pragma once + +#include <linux/if_ether.h> +#include <gr_sync_block.h> +#include <gri_mmse_fir_interpolator.h> +#include "gssm_state.h" + +class gssm_sink; +typedef boost::shared_ptr<gssm_sink> gssm_sink_sptr; +gssm_sink_sptr gssm_make_sink(double); + +class gssm_sink : public gr_sync_block { + +public: + ~gssm_sink(void); + + int work(int nitems, gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); + +private: + // sample speeds + double d_sps; // samples per second + double d_samples_per_symbol; + + // M&M clock recovery + gri_mmse_fir_interpolator *d_interp; + double d_mu; + double d_gain_mu; + double d_omega; + double d_gain_omega; + double d_omega_relative_limit; + double d_max_omega; + double d_min_omega; + float d_last_sample; + + double d_mu_bak; + double d_omega_bak; + double d_last_sample_bak; + + int d_bitno; + + // buffers + gr_buffer_sptr d_buf_qd; + gr_buffer_reader_sptr d_qd_reader; + gr_buffer_sptr d_buf_mm; + gr_buffer_reader_sptr d_mm_reader; + + // quad demod + gr_complex d_qd_last; + double d_qd_gain; + + // GSM BTS timing + int d_tn; // time slot + int d_fn; // frame number + int d_fnm51; // frame number mod 51 + int d_fnm102; // frame number mod 102 + int d_bsic; // current bsic + + // program state + gssm_state_t d_state; + + // buffer to hold physical data + unsigned char * d_phy_buf; + int * d_phy_ind; + + // Wireshark interface + int d_tunfd; // TUN fd + unsigned char d_ether_addr[ETH_ALEN]; + + /*******************************************************************/ + + friend gssm_sink_sptr gssm_make_sink(double); + gssm_sink(double); + + int search_state_fc(const float *, int); + int search_state_s(const float *, int); + int search_state_data(const float *, int); + + void search_sch(const unsigned char *); + int handle_sch(const unsigned char *, int *, int *); + + void next_timeslot(void); + + int check_logical_channel(int, int, int, int); + void check_logical_channels(void); + + int mm_demod(const float *, int, float *, int &); + int quad_demod(const gr_complex *, int, float *, int &); + int process_input(const gr_complex *, int); + int process_qd(const gr_complex *, int); + + void save_clock(); + void restore_clock(); + void reset_clock(); + void flush_buffers(); + void reset_state(); + + + /*******************************************************************/ + // Debug + + int check_num_invalid_s(); + +public: + int d_search_fc_count, + d_found_fc_count, + d_valid_s, + d_invalid_s, + d_invalid_s_1, + d_valid_bcch, + d_invalid_bcch, + d_valid_ia, + d_invalid_ia, + d_valid_sdcch4, + d_invalid_sdcch4, + d_valid_sacchc4, + d_invalid_sacchc4, + d_valid_sdcch8, + d_invalid_sdcch8, + d_valid_sacchc8, + d_invalid_sacchc8; + void stats(); +}; diff --git a/gssm/src/lib/gssm_state.h b/gssm/src/lib/gssm_state.h new file mode 100644 index 0000000..44400a2 --- /dev/null +++ b/gssm/src/lib/gssm_state.h @@ -0,0 +1,9 @@ +// $Id: gssm_state.h,v 1.1.1.1 2007-06-01 04:26:57 jl Exp $ + +#pragma once + +typedef enum { + state_fc, + state_s, + state_data +} gssm_state_t; diff --git a/gssm/src/lib/rr_decode.cc b/gssm/src/lib/rr_decode.cc new file mode 100644 index 0000000..312c883 --- /dev/null +++ b/gssm/src/lib/rr_decode.cc @@ -0,0 +1,236 @@ +// $Id: rr_decode.cc,v 1.1.1.1 2007-06-01 04:26:57 jl Exp $ + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> + +static char *pd_string(unsigned char pd) { + + switch(pd) { + case 0: + return "group call control"; + case 1: + return "broadcast call control"; + case 2: + return "reserved (PDSS1 in earlier phases)"; + case 3: + return "call control; call related SS messages"; + case 4: + return "GPRS Transparent Transport Protocol (GTTP)"; + case 5: + return "mobility management messages"; + case 6: + return "radio resources management messages"; + case 8: + return "GPRS mobility management messages"; + case 9: + return "SMS messages"; + case 10: + return "GPRS session management messages"; + case 11: + return "non-call related SS messages"; + case 12: + return "location services"; + case 14: + return "reserved for extension of the PD"; + case 15: + return "reserved for tests procedures"; + default: + return "unknown PD"; + } +} + + +static char *message_type_rrm_string(unsigned char mt) { + + switch(mt) { + case 0x3c: + return "channel establishment message: RR " + "initialization request"; + case 0x3b: + return "channel establishment message: aditional " + "assignment"; + case 0x3f: + return "channel establishment message: immediate " + "assignment"; + case 0x39: + return "channel establishment message: immediate " + "assignment extended"; + case 0x3a: + return "channel establishment message: immediate " + "assignment reject"; + + case 0x35: + return "ciphering message: ciphering mode command"; + case 0x32: + return "ciphering message: ciphering mode complete"; + + case 0x30: + return "configuration change message: configuration " + "change command"; + case 0x31: + return "configuration change message: configuration " + "change acknowledgement"; + case 0x33: + return "configuration change message: configuration " + "change reject"; + + case 0x2e: + return "handover message: assignment command"; + case 0x29: + return "handover message: assignment complete"; + case 0x2f: + return "handover message: assignment failure"; + case 0x2b: + return "handover message: handover command"; + case 0x2c: + return "handover message: handover complete"; + case 0x28: + return "handover message: handover failure"; + case 0x2d: + return "handover message: physical information"; + + case 0x08: + return "RR-cell change order"; + + case 0x23: + return "PDCH assignment command"; + + case 0x0d: + return "channel release message: channel release"; + case 0x0a: + return "channel release message: partial release"; + case 0x0f: + return "channel release message: partial release " + "complete"; + + case 0x21: + return "paging and notification message: paging " + "request type 1"; + case 0x22: + return "paging and notification message: paging " + "request type 2"; + case 0x24: + return "paging and notification message: paging " + "request type 3"; + case 0x27: + return "paging and notification message: paging " + "response"; + case 0x20: + return "paging and notification message: " + "notification / NCH"; + case 0x25: + return "paging and notification message: " + "notification / FACCH"; + case 0x26: + return "paging and notification message: " + "notification response"; + + case 0x0b: + return "reserved"; + + case 0x18: + return "system information message: type 8"; + case 0x19: + return "system information message: type 1"; + case 0x1a: + return "system information message: type 2"; + case 0x1b: + return "system information message: type 3"; + case 0x1c: + return "system information message: type 4"; + case 0x1d: + return "system information message: type 5"; + case 0x1e: + return "system information message: type 6"; + case 0x1f: + return "system information message: type 7"; + case 0x02: + return "system information message: type 2bis"; + case 0x03: + return "system information message: type 2ter"; + case 0x05: + return "system information message: type 5bis"; + case 0x06: + return "system information message: type 5ter"; + case 0x04: + return "system information message: type 9"; + case 0x00: + return "system information message: type 13"; + case 0x3d: + return "system information message: type 16"; + case 0x3e: + return "system information message: type 17"; + + case 0x10: + return "miscellaneous message: channel mode modify"; + case 0x12: + return "miscellaneous message: RR status"; + case 0x17: + return "miscellaneous message: channel mode modify " + "acknowledge"; + case 0x14: + return "miscellaneous message: frequency redefinition"; + case 0x15: + return "miscellaneous message: measurement report"; + case 0x16: + return "miscellaneous message: classmark change"; + case 0x13: + return "miscellaneous message: classmark enquiry"; + case 0x36: + return "miscellaneous message: extended measurement " + "report"; + case 0x37: + return "miscellaneous message: extended measurement " + "order"; + case 0x34: + return "miscellaneous message: GPRS suspension request"; + + case 0x09: + return "VGCS uplink control message: uplink grant"; + case 0x0e: + return "VGCS uplink control message: uplink release"; + case 0x0c: + return "VGCS uplink control message: uplink free"; + case 0x2a: + return "VGCS uplink control message: uplink busy"; + case 0x11: + return "VGCS uplink control message: talker indication"; + + case 0x38: + return "application message: application information"; + + default: + return "unknown radio resource management message " + "type"; + } +} + + +void display_l3(unsigned char *buf, unsigned int buflen) { + + printf("(%d) PD: %s: (%2.2x) %s\n", buflen, pd_string(buf[0] & 0xf), + buf[1], message_type_rrm_string(buf[1])); +} + + +void display_ns_l3(unsigned char *data, unsigned int datalen) { + + int len; + + // bit 1 == 1, bit 2 == 0 + if((data[0] & 3) != 1) { + fprintf(stderr, "error: display_ns_l3: pseudo-length reserved " + "bits bad (%2.2x)\n", data[0] & 3); + return; + } + len = data[0] >> 2; + if(datalen < len) { + fprintf(stderr, "error: display_ns_l3: bad data length " + "(%d < %d)\n", datalen, len); + return; + } + + printf("L3 length: %d\n", len); + display_l3(data + 1, datalen - 1); +} diff --git a/gssm/src/lib/rr_decode.h b/gssm/src/lib/rr_decode.h new file mode 100644 index 0000000..42d6266 --- /dev/null +++ b/gssm/src/lib/rr_decode.h @@ -0,0 +1,4 @@ +// $Id: rr_decode.h,v 1.1.1.1 2007-06-01 04:26:57 jl Exp $ + +void display_l3(unsigned char *, unsigned int); +void display_ns_l3(unsigned char *, unsigned int); diff --git a/gssm/src/lib/rrm.h b/gssm/src/lib/rrm.h new file mode 100644 index 0000000..52be6a5 --- /dev/null +++ b/gssm/src/lib/rrm.h @@ -0,0 +1,22 @@ +// $Id: rrm.h,v 1.1.1.1 2007-06-01 04:26:57 jl Exp $ + +#pragma once + +typedef struct { + unsigned char b0:1, + b1:1, + len:6; +} l2_pseudo_length_s; + +typedef union { + unsigned char v; + l2_pseudo_length_s b; +} l2_pseudo_length_t; + + +typedef struct { + unsigned char pd:4, + si:4; + unsigned char mt; + unsigned char ie[0]; +} l3_h_t; diff --git a/gssm/src/lib/sch.cc b/gssm/src/lib/sch.cc new file mode 100644 index 0000000..c336dc1 --- /dev/null +++ b/gssm/src/lib/sch.cc @@ -0,0 +1,320 @@ +// $Id: sch.cc,v 1.1.1.1 2007-06-01 04:26:57 jl Exp $ + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include "burst_types.h" + +/* + * Synchronization channel. + * + * Timeslot Repeat length Frame Number (mod repeat length) + * 0 51 1, 11, 21, 31, 41 + */ + +/* + * Parity (FIRE) for the GSM SCH. + * + * g(x) = x^10 + x^8 + x^6 + x^5 + x^4 + x^2 + 1 + */ +#define DATA_BLOCK_SIZE 25 +#define PARITY_SIZE 10 +#define TAIL_BITS_SIZE 4 +#define PARITY_OUTPUT_SIZE (DATA_BLOCK_SIZE + PARITY_SIZE + TAIL_BITS_SIZE) + +static const unsigned char parity_polynomial[PARITY_SIZE + 1] = { + 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1 +}; + +static const unsigned char parity_remainder[PARITY_SIZE] = { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +}; + + +static void parity_encode(unsigned char *d, unsigned char *p) { + + unsigned int i; + unsigned char buf[DATA_BLOCK_SIZE + PARITY_SIZE], *q; + + memcpy(buf, d, DATA_BLOCK_SIZE); + memset(buf + DATA_BLOCK_SIZE, 0, PARITY_SIZE); + + for(q = buf; q < buf + DATA_BLOCK_SIZE; q++) + if(*q) + for(i = 0; i < PARITY_SIZE + 1; i++) + q[i] ^= parity_polynomial[i]; + for(i = 0; i < PARITY_SIZE; i++) + p[i] = !buf[DATA_BLOCK_SIZE + i]; +} + + +static int parity_check(unsigned char *d) { + + unsigned int i; + unsigned char buf[DATA_BLOCK_SIZE + PARITY_SIZE], *q; + + memcpy(buf, d, DATA_BLOCK_SIZE + PARITY_SIZE); + + for(q = buf; q < buf + DATA_BLOCK_SIZE; q++) + if(*q) + for(i = 0; i < PARITY_SIZE + 1; i++) + q[i] ^= parity_polynomial[i]; + return memcmp(buf + DATA_BLOCK_SIZE, parity_remainder, PARITY_SIZE); +} + + +/* + * Convolutional encoding and Viterbi decoding for the GSM SCH. + * (Equivalent to the GSM SACCH.) + * + * G_0 = 1 + x^3 + x^4 + * G_1 = 1 + x + x^3 + x^4 + * + * i.e., + * + * c_{2k} = u_k + u_{k - 3} + u_{k - 4} + * c_{2k + 1} = u_k + u_{k - 1} + u_{k - 3} + u_{k - 4} + */ +#define CONV_INPUT_SIZE PARITY_OUTPUT_SIZE +#define CONV_SIZE (2 * CONV_INPUT_SIZE) +#define K 5 +#define MAX_ERROR (2 * CONV_INPUT_SIZE + 1) + + +/* + * Given the current state and input bit, what are the output bits? + * + * encode[current_state][input_bit] + */ +static const unsigned int encode[1 << (K - 1)][2] = { + {0, 3}, {3, 0}, {3, 0}, {0, 3}, + {0, 3}, {3, 0}, {3, 0}, {0, 3}, + {1, 2}, {2, 1}, {2, 1}, {1, 2}, + {1, 2}, {2, 1}, {2, 1}, {1, 2} +}; + + +/* + * Given the current state and input bit, what is the next state? + * + * next_state[current_state][input_bit] + */ +static const unsigned int next_state[1 << (K - 1)][2] = { + {0, 8}, {0, 8}, {1, 9}, {1, 9}, + {2, 10}, {2, 10}, {3, 11}, {3, 11}, + {4, 12}, {4, 12}, {5, 13}, {5, 13}, + {6, 14}, {6, 14}, {7, 15}, {7, 15} +}; + + +/* + * Given the previous state and the current state, what input bit caused + * the transition? If it is impossible to transition between the two + * states, the value is 2. + * + * prev_next_state[previous_state][current_state] + */ +static const unsigned int prev_next_state[1 << (K - 1)][1 << (K - 1)] = { + { 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2}, + { 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2}, + { 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2}, + { 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2}, + { 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2}, + { 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2}, + { 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2}, + { 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2}, + { 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2}, + { 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2}, + { 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2}, + { 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2}, + { 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2}, + { 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1, 2}, + { 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1}, + { 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1} +}; + + +static inline unsigned int hamming_distance2(unsigned int w) { + + return (w & 1) + !!(w & 2); +} + + +static void conv_encode(unsigned char *data, unsigned char *output) { + + unsigned int i, state = 0, o; + + // encode data + for(i = 0; i < CONV_INPUT_SIZE; i++) { + o = encode[state][data[i]]; + state = next_state[state][data[i]]; + *output++ = !!(o & 2); + *output++ = o & 1; + } +} + + +static int conv_decode(unsigned char *data, unsigned char *output) { + + int i, t; + unsigned int rdata, state, nstate, b, o, distance, accumulated_error, + min_state, min_error, cur_state; + + unsigned int ae[1 << (K - 1)]; + unsigned int nae[1 << (K - 1)]; // next accumulated error + unsigned int state_history[1 << (K - 1)][CONV_INPUT_SIZE + 1]; + + // initialize accumulated error, assume starting state is 0 + for(i = 0; i < (1 << (K - 1)); i++) + ae[i] = nae[i] = MAX_ERROR; + ae[0] = 0; + + // build trellis + for(t = 0; t < CONV_INPUT_SIZE; t++) { + + // get received data symbol + rdata = (data[2 * t] << 1) | data[2 * t + 1]; + + // for each state + for(state = 0; state < (1 << (K - 1)); state++) { + + // make sure this state is possible + if(ae[state] >= MAX_ERROR) + continue; + + // find all states we lead to + for(b = 0; b < 2; b++) { + + // get next state given input bit b + nstate = next_state[state][b]; + + // find output for this transition + o = encode[state][b]; + + // calculate distance from received data + distance = hamming_distance2(rdata ^ o); + + // choose surviving path + accumulated_error = ae[state] + distance; + if(accumulated_error < nae[nstate]) { + + // save error for surviving state + nae[nstate] = accumulated_error; + + // update state history + state_history[nstate][t + 1] = state; + } + } + } + + // get accumulated error ready for next time slice + for(i = 0; i < (1 << (K - 1)); i++) { + ae[i] = nae[i]; + nae[i] = MAX_ERROR; + } + } + + // the final state is the state with the fewest errors + min_state = (unsigned int)-1; + min_error = MAX_ERROR; + for(i = 0; i < (1 << (K - 1)); i++) { + if(ae[i] < min_error) { + min_state = i; + min_error = ae[i]; + } + } + + // trace the path + cur_state = min_state; + for(t = CONV_INPUT_SIZE; t >= 1; t--) { + min_state = cur_state; + cur_state = state_history[cur_state][t]; // get previous + output[t - 1] = prev_next_state[cur_state][min_state]; + } + + // return the number of errors detected (hard-decision) + return min_error; +} + + +int decode_sch(const unsigned char *buf, int *fn_o, int *bsic_o) { + + int errors, bsic, t1, t2, t3p, t3, fn, tt; + unsigned char data[CONV_SIZE], decoded_data[PARITY_OUTPUT_SIZE]; + + // extract encoded data from synchronization burst + memcpy(data, buf + SB_EDATA_OS_1, SB_EDATA_LEN_1); + memcpy(data + SB_EDATA_LEN_1, buf + SB_EDATA_OS_2, SB_EDATA_LEN_2); + + // Viterbi decode + if(errors = conv_decode(data, decoded_data)) { + // fprintf(stderr, "error: sch: conv_decode (%d)\n", errors); + return errors; + } + + // check parity + if(parity_check(decoded_data)) { + // fprintf(stderr, "error: sch: parity failed\n"); + return 1; + } + + // Synchronization channel information, 44.018 page 171. (V7.2.0) + bsic = + (decoded_data[ 7] << 5) | + (decoded_data[ 6] << 4) | + (decoded_data[ 5] << 3) | + (decoded_data[ 4] << 2) | + (decoded_data[ 3] << 1) | + (decoded_data[ 2] << 0); + t1 = + (decoded_data[ 1] << 10) | + (decoded_data[ 0] << 9) | + (decoded_data[15] << 8) | + (decoded_data[14] << 7) | + (decoded_data[13] << 6) | + (decoded_data[12] << 5) | + (decoded_data[11] << 4) | + (decoded_data[10] << 3) | + (decoded_data[ 9] << 2) | + (decoded_data[ 8] << 1) | + (decoded_data[23] << 0); + t2 = + (decoded_data[22] << 4) | + (decoded_data[21] << 3) | + (decoded_data[20] << 2) | + (decoded_data[19] << 1) | + (decoded_data[18] << 0); + t3p = + (decoded_data[17] << 2) | + (decoded_data[16] << 1) | + (decoded_data[24] << 0); + + t3 = 10 * t3p + 1; + + // modulo arithmetic + tt = t3; + while(tt < t2) + tt += 26; + tt = (tt - t2) % 26; + fn = (51 * 26 * t1) + (51 * tt) + t3; + + /* + * BSIC: Base Station Identification Code + * BCC: Base station Color Code + * NCC: Network Color Code + * + * FN: Frame Number + */ + /* + printf("bsic: %x (bcc: %u; ncc: %u)\tFN: %u\n", bsic, bsic & 7, + (bsic >> 3) & 7, fn); + */ + + if(fn_o) + *fn_o = fn; + if(bsic_o) + *bsic_o = bsic; + + return 0; +} diff --git a/gssm/src/lib/sch.h b/gssm/src/lib/sch.h new file mode 100644 index 0000000..5f8b217 --- /dev/null +++ b/gssm/src/lib/sch.h @@ -0,0 +1,3 @@ +// $Id: sch.h,v 1.1.1.1 2007-06-01 04:26:57 jl Exp $ + +int decode_sch(const unsigned char *, int *, int *); diff --git a/gssm/src/lib/tun.cc b/gssm/src/lib/tun.cc new file mode 100644 index 0000000..2abda90 --- /dev/null +++ b/gssm/src/lib/tun.cc @@ -0,0 +1,125 @@ +// $Id: tun.cc,v 1.2 2007-07-07 16:31:42 jl Exp $ + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <libgen.h> +#include <fcntl.h> +#include <sys/ioctl.h> +#include <sys/socket.h> +#include <linux/if_tun.h> +#include <linux/if.h> +#include <linux/if_ether.h> +#include <arpa/inet.h> + +int mktun(const char *chan_name, unsigned char *ether_addr) { + + struct ifreq ifr; + // struct ifreq ifw; + char if_name[IFNAMSIZ]; + int fd, one = 1; + // int sd; + + // construct TUN interface + if((fd = open("/dev/net/tun", O_RDWR)) == -1) { + perror("open"); + return -1; + } + memset(&ifr, 0, sizeof(ifr)); + ifr.ifr_flags = IFF_TAP | IFF_NO_PI; + snprintf(ifr.ifr_name, IFNAMSIZ, "%s", chan_name); + if(ioctl(fd, TUNSETIFF, (void *)&ifr) == -1) { + perror("TUNSETIFF"); + close(fd); + return -1; + } + + // save actual name + memcpy(if_name, ifr.ifr_name, IFNAMSIZ); + + // get ether addr + memset(&ifr, 0, sizeof(ifr)); + memcpy(ifr.ifr_name, if_name, IFNAMSIZ); + if(ioctl(fd, SIOCGIFHWADDR, (void *)&ifr) == -1) { + perror("SIOCGIFHWADDR"); + close(fd); + return -1; + } + memcpy(ether_addr, ifr.ifr_hwaddr.sa_data, ETH_ALEN); + + // set persistent + if(ioctl(fd, TUNSETPERSIST, (void *)&one) == -1) { + perror("TUNSETPERSIST"); + close(fd); + return -1; + } + + // set interface up + /* XXX must be root + if((sd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { + perror("socket"); + close(fd); + return -1; + } + + // get current flags + memset(&ifr, 0, sizeof(ifr)); + strncpy(ifr.ifr_name, if_name, IFNAMSIZ - 1); + if(ioctl(sd, SIOCGIFFLAGS, &ifr) == -1) { + perror("SIOCGIFFLAGS"); + close(sd); + close(fd); + return -1; + } + + // set up + memset(&ifw, 0, sizeof(ifw)); + strncpy(ifw.ifr_name, if_name, IFNAMSIZ - 1); + ifw.ifr_flags = ifr.ifr_flags | IFF_UP | IFF_RUNNING; + if(ioctl(sd, SIOCSIFFLAGS, &ifw) == -1) { + perror("SIOCSIFFLAGS"); + close(sd); + close(fd); + return -1; + } + close(sd); + */ + + return fd; +} + + +static inline int min(int a, int b) { + + return (a < b)? a : b; +} + + +static const unsigned int DEFAULT_MTU = 1500; +static const unsigned short ether_type = 0xfed5; // current dtap ethertype + +int write_interface(int fd, unsigned char *data, unsigned int data_len, + unsigned char *ether_addr) { + + unsigned char frame[DEFAULT_MTU]; // XXX buffer overflow? + struct ethhdr eh; + + if(fd < 0) + return data_len; + + memcpy(eh.h_dest, ether_addr, ETH_ALEN); + memcpy(eh.h_source, ether_addr, ETH_ALEN); + eh.h_proto = htons(ether_type); + + memcpy(frame, &eh, sizeof(eh)); + memcpy(frame + sizeof(eh), data, + min(data_len, sizeof(frame) - sizeof(eh))); + + if(write(fd, frame, sizeof(eh) + data_len) == -1) { + perror("write"); + return -1; + } + + return data_len; +} diff --git a/gssm/src/lib/tun.h b/gssm/src/lib/tun.h new file mode 100644 index 0000000..a7868c4 --- /dev/null +++ b/gssm/src/lib/tun.h @@ -0,0 +1,4 @@ +// $Id: tun.h,v 1.1.1.1 2007-06-01 04:26:57 jl Exp $ + +int mktun(const char *, unsigned char *); +int write_interface(int, unsigned char *, unsigned int, unsigned char *); diff --git a/gssm/src/mktun/Makefile.am b/gssm/src/mktun/Makefile.am new file mode 100644 index 0000000..95dc50a --- /dev/null +++ b/gssm/src/mktun/Makefile.am @@ -0,0 +1,7 @@ +# $Id: Makefile.am,v 1.3 2007-06-01 05:35:59 jl Exp $ + +#include $(top_srcdir)/Makefile.common + +bin_PROGRAMS = mktun +mktun_SOURCES = mktun.c + diff --git a/gssm/src/mktun/mktun.c b/gssm/src/mktun/mktun.c new file mode 100644 index 0000000..e22d496 --- /dev/null +++ b/gssm/src/mktun/mktun.c @@ -0,0 +1,125 @@ +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <libgen.h> +#include <getopt.h> +#include <fcntl.h> +#include <sys/ioctl.h> +#include <sys/socket.h> +#include <linux/if_tun.h> +#include <linux/if.h> +#include <linux/if_ether.h> +#include <arpa/inet.h> + + +static struct option long_options[] = { + { "delete", no_argument, 0, 'd'}, + { "help", no_argument, 0, 'h'}, + { 0, 0, 0, 0} +}; + + +void usage(char *prog) { + + fprintf(stderr, "note: you must be root (except perhaps to delete " + "the interface)\n"); + fprintf(stderr, "usage: %s [--help | -h] | [--delete | -d] " + "<interface_name>\n", basename(prog)); + exit(-1); +} + + +int main(int argc, char **argv) { + + struct ifreq ifr, ifw; + char if_name[IFNAMSIZ], *chan_name = "gsm"; + int option_index = 0, c, delete_if = 0, persist = 1, fd, sd; + + while((c = getopt_long(argc, argv, "dh?", long_options, &option_index)) + != -1) { + switch(c) { + case 'd': + delete_if = 1; + break; + case 'h': + case '?': + default: + usage(argv[0]); + break; + } + } + + if(optind >= argc) + usage(argv[0]); + + chan_name = argv[optind]; + + if(!delete_if && getuid() && geteuid()) + usage(argv[0]); + + // construct TUN interface + if((fd = open("/dev/net/tun", O_RDWR)) == -1) { + perror("open"); + return -1; + } + + memset(&ifr, 0, sizeof(ifr)); + ifr.ifr_flags = IFF_TAP | IFF_NO_PI; + snprintf(ifr.ifr_name, IFNAMSIZ, "%s", chan_name); + if(ioctl(fd, TUNSETIFF, (void *)&ifr) == -1) { + perror("TUNSETIFF"); + close(fd); + return -1; + } + + // save actual name + memcpy(if_name, ifr.ifr_name, IFNAMSIZ); + + if(delete_if) + persist = 0; + + if(ioctl(fd, TUNSETPERSIST, (void *)persist) == -1) { + perror("TUNSETPERSIST"); + close(fd); + return -1; + } + + if(delete_if) { + close(fd); + return 0; + } + + // set interface up + if((sd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { + perror("socket"); + close(fd); + return -1; + } + + // get current flags + memset(&ifr, 0, sizeof(ifr)); + strncpy(ifr.ifr_name, if_name, IFNAMSIZ - 1); + if(ioctl(sd, SIOCGIFFLAGS, &ifr) == -1) { + perror("SIOCGIFFLAGS"); + close(sd); + close(fd); + return -1; + } + + // set up + memset(&ifw, 0, sizeof(ifw)); + strncpy(ifw.ifr_name, if_name, IFNAMSIZ - 1); + ifw.ifr_flags = ifr.ifr_flags | IFF_UP | IFF_RUNNING; + if(ioctl(sd, SIOCSIFFLAGS, &ifw) == -1) { + perror("SIOCSIFFLAGS"); + close(sd); + close(fd); + return -1; + } + + close(sd); + close(fd); + + return 0; +} diff --git a/gssm/src/python/file_gssm.py b/gssm/src/python/file_gssm.py new file mode 100755 index 0000000..defff00 --- /dev/null +++ b/gssm/src/python/file_gssm.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python + +# $Id: file_gssm.py,v 1.3 2007-07-07 16:31:44 jl Exp $ + +from gnuradio import gr, usrp, db_dbs_rx, blks +from gnuradio.blksimpl import gmsk +import gssm +import sys + +#sps = 1000e3 + +usrp_rate = 64e6 +decim_rate = 112 +sps = usrp_rate / decim_rate + +gsm_rate = 1625000.0 / 6.0 + +#xcf = 150e3 +#xtw = 50e3 +#xm = -31127.933289 + +file_name = "signal.data" + + +class gssm_graph(gr.flow_graph): + def __init__(self, fname): + gr.flow_graph.__init__(self) + + src = gr.file_source(gr.sizeof_gr_complex, fname) + gs = gssm.sink(sps) + self.connect(src, gs) + +def main(): + fname = file_name + if len(sys.argv) == 2: + fname = sys.argv[1] + try: + gg = gssm_graph(fname) + gg.run() + + except KeyboardInterrupt: + pass + +if __name__ == '__main__': + main() diff --git a/gssm/src/python/file_stats.py b/gssm/src/python/file_stats.py new file mode 100755 index 0000000..cf8a109 --- /dev/null +++ b/gssm/src/python/file_stats.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python + +# $Id: file_stats.py,v 1.1 2007-07-07 16:26:33 jl Exp $ + +from gnuradio import gr, usrp, db_dbs_rx, blks +from gnuradio.blksimpl import gmsk +import gssm +import sys + +#sps = 1000e3 + +usrp_rate = 64e6 +decim_rate = 112 +sps = usrp_rate / decim_rate + +gsm_rate = 1625000.0 / 6.0 + +#xcf = 150e3 +#xtw = 50e3 +#xm = -31127.933289 + +file_name = "signal.data" + + +class gssm_graph(gr.flow_graph): + def __init__(self, fname): + gr.flow_graph.__init__(self) + + src = gr.file_source(gr.sizeof_gr_complex, fname) + self.gs = gs = gssm.sink(sps) + self.connect(src, gs) + +def main(): + fname = file_name + if len(sys.argv) == 2: + fname = sys.argv[1] + try: + gg = gssm_graph(fname) + gg.run() + gg.gs.stats() + + except KeyboardInterrupt: + pass + +if __name__ == '__main__': + main() diff --git a/gssm/src/python/gssm_stats.py b/gssm/src/python/gssm_stats.py new file mode 100755 index 0000000..f68833b --- /dev/null +++ b/gssm/src/python/gssm_stats.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +# $Id: gssm_stats.py,v 1.2 2007-07-07 16:31:44 jl Exp $ + +from gnuradio import gr, usrp, db_dbs_rx, blks +from gnuradio.blksimpl import gmsk +import usrp_dbid +import gssm +import sys +import time +import thread + +# constant +gsm_rate = 1625000.0 / 6.0 + +# script constant +decim = 112 +gain = 32 + +# bts channel +c0 = 874e6 + +# experimental constant +default_usrp_offset = 4e3 + +# filter constants +xcf = 150e3 +xtw = 50e3 + +def display_stats(gs): + while 1: + print "%d:\t%d:%d" % \ + (gs.d_found_fc_count, gs.d_valid_s, gs.d_invalid_s) + time.sleep(1) + + +class gssm_flow_graph(gr.flow_graph): + def __init__(self, usrp_offset): + gr.flow_graph.__init__(self) + + print "decim = %d, gain = %d, offset = %.2f" % \ + (decim, gain, usrp_offset) + print "filter center %.2f, filter width %.2f" % \ + (xcf, xtw) + + u = usrp.source_c(decim_rate = decim) + s = usrp.pick_subdev(u, (usrp_dbid.DBS_RX,)) + u.set_mux(usrp.determine_rx_mux_value(u, s)) + subdev = usrp.selected_subdev(u, s) + + if subdev.dbid() != usrp_dbid.DBS_RX: + raise Exception('dbs daughterboard not detected!') + + subdev.set_gain(gain) + + sps = u.adc_freq() / u.decim_rate() + if sps < 2 * gsm_rate: + raise Exception('sample rate too low') + + u.tune(0, subdev, c0 + usrp_offset) + + xt = gr.firdes.low_pass(1.0, sps, xcf, xtw, + gr.firdes.WIN_HAMMING) + xf = gr.fir_filter_ccf(1, xt) + + self.gs = gs = gssm.sink(sps) + + self.connect(u, xf, gs) + +def main(): + if len(sys.argv) == 2: + uo = float(sys.argv[1]) + else: + uo = default_usrp_offset + g = gssm_flow_graph(uo) + # thread.start_new_thread(display_stats, (g.gs,)) + # g.run() + g.start() + time.sleep(10.0) + g.stop() + g.gs.stats() + +if __name__ == '__main__': + main() + diff --git a/gssm/src/python/gssm_usrp.py b/gssm/src/python/gssm_usrp.py new file mode 100755 index 0000000..f8ea583 --- /dev/null +++ b/gssm/src/python/gssm_usrp.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python + +# $Id: gssm_usrp.py,v 1.2 2007-07-07 16:31:44 jl Exp $ + +from gnuradio import gr, usrp, db_dbs_rx, blks +from gnuradio.blksimpl import gmsk +from usrpm import usrp_dbid +import gssm +import sys + +# constant +gsm_rate = 1625000.0 / 6.0 + +# script constant +decim = 112 +gain = 70 + +# bts channel +c0 = 875.4e6 + +# experimental constant +default_usrp_offset = 12e3 + +class gssm_flow_graph(gr.flow_graph): + def __init__(self, usrp_offset): + gr.flow_graph.__init__(self) + + u = usrp.source_c(decim_rate = decim) + s = usrp.pick_subdev(u, (usrp_dbid.DBS_RX,)) + u.set_mux(usrp.determine_rx_mux_value(u, s)) + subdev = usrp.selected_subdev(u, s) + + if subdev.dbid() != usrp_dbid.DBS_RX: + raise Exception('dbs daughterboard not detected!') + + subdev.set_gain(gain) + + sps = u.adc_freq() / u.decim_rate() + if sps < 2 * gsm_rate: + raise Exception('sample rate too low') + + u.tune(0, subdev, c0 + usrp_offset) + + xcf = 150e3 + xtw = 50e3 + xt = gr.firdes.low_pass(1.0, sps, xcf, xtw, + gr.firdes.WIN_HAMMING) + xf = gr.fir_filter_ccf(1, xt) + + g = gssm.sink(sps) + + self.connect(u, xf, g) + +def main(): + if len(sys.argv) == 2: + uo = float(sys.argv[1]) + else: + uo = default_usrp_offset + g = gssm_flow_graph(uo) + g.run() + +if __name__ == '__main__': + main() diff --git a/viterbi-detector/test.cpp b/viterbi-detector/test.cpp new file mode 100644 index 0000000..7a1775b --- /dev/null +++ b/viterbi-detector/test.cpp @@ -0,0 +1,717 @@ +#include <stdio.h> +/* +** viterbi_detector: +** This part does the detection of received sequnece. +** Employed algorithm is viterbi Maximum Likehood Sequence Estimation. +** At this moment it gives hard decisions on the output, but +** it was designed with soft decisions in mind. +** +** SYNTAX: void viterbi_detector( +** const gr_complex * input, +** unsigned int samples_num, +** gr_complex * rhh, +** unsigned int start_state, +** const unsigned int * stop_states, +** unsigned int stops_num, +** float * output) +** +** INPUT: input: Complex received signal afted matched filtering. +** samples_num: Number of samples in the input table. +** rhh: The autocorrelation of the estimated channel +** impulse response. +** start_state: Number of the start point. In GSM each burst +** starts with sequence of three bits (0,0,0) which +** indicates start point of the algorithm. +** stop_states: Table with numbers of possible stop states. +** stops_num: Number of possible stop states +** +** +** OUTPUT: output: Differentially decoded hard output of the algorithm: +** -1 for logical "0" and 1 for logical "1" +** +** SUB_FUNC: none +** +** TEST(S): Tested with real world normal burst. +*/ + +#include <gnuradio/gr_complex.h> +#define BURST_SIZE 148 +#define PATHS_NUM 16 + +void viterbi_detector(const gr_complex * input, unsigned int samples_num, gr_complex * rhh, unsigned int start_state, const unsigned int * stop_states, unsigned int stops_num, float * output) +{ + float increment[8]; + float path_metrics1[16]; + float path_metrics2[16]; + float * new_path_metrics; + float * old_path_metrics; + float * tmp; + float trans_table[BURST_SIZE][16]; + float pm_candidate1, pm_candidate2; + bool real_imag; + float input_symbol_real, input_symbol_imag; + unsigned int i, sample_nr; + +/* +* Setup first path metrics, so only state pointed by start_state is possible. +* Start_state metric is equal to zero, the rest is written with some very low value, +* which makes them practically impossible to occur. +*/ + for(i=0; i<PATHS_NUM; i++){ + path_metrics1[i]=(-10e30); + } + path_metrics1[start_state]=0; + +/* +* Compute Increment - a table of values which does not change for subsequent input samples. +* Increment is table of reference levels for computation of branch metrics: +* branch metric = (+/-)received_sample (+/-) reference_level +*/ + increment[0] = -rhh[1].imag() -rhh[2].real() -rhh[3].imag() +rhh[4].real(); + increment[1] = rhh[1].imag() -rhh[2].real() -rhh[3].imag() +rhh[4].real(); + increment[2] = -rhh[1].imag() +rhh[2].real() -rhh[3].imag() +rhh[4].real(); + increment[3] = rhh[1].imag() +rhh[2].real() -rhh[3].imag() +rhh[4].real(); + increment[4] = -rhh[1].imag() -rhh[2].real() +rhh[3].imag() +rhh[4].real(); + increment[5] = rhh[1].imag() -rhh[2].real() +rhh[3].imag() +rhh[4].real(); + increment[6] = -rhh[1].imag() +rhh[2].real() +rhh[3].imag() +rhh[4].real(); + increment[7] = rhh[1].imag() +rhh[2].real() +rhh[3].imag() +rhh[4].real(); + + +/* +* Computation of path metrics and decisions (Add-Compare-Select). +* It's composed of two parts: one for odd input samples (imaginary numbers) +* and one for even samples (real numbers). +* Each part is composed of independent (parallelisable) statements like +* this one: +* pm_candidate1 = old_path_metrics[0] - input_symbol_real - increment[7]; +* pm_candidate2 = old_path_metrics[8] - input_symbol_real + increment[0]; +* if(pm_candidate1 > pm_candidate2){ +* new_path_metrics[0] = pm_candidate1; +* trans_table[sample_nr][0] = -1.0; +* } +* else{ +* new_path_metrics[0] = pm_candidate2; +* trans_table[sample_nr][0] = 1.0; +* } +* This is very good point for optimisations (SIMD or OpenMP) as it's most time +* consuming part of this function. +*/ + printf("# name: path_metrics_test_result\n# type: matrix\n# rows: 148\n# columns: 16\n"); + sample_nr=0; + old_path_metrics=path_metrics1; + new_path_metrics=path_metrics2; + while(sample_nr<samples_num){ + //Processing imag states + real_imag=1; + input_symbol_imag = input[sample_nr].imag(); + + pm_candidate1 = old_path_metrics[0] + input_symbol_imag - increment[2]; + pm_candidate2 = old_path_metrics[8] + input_symbol_imag + increment[5]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[0] = pm_candidate1; + trans_table[sample_nr][0] = -1.0; + } + else{ + new_path_metrics[0] = pm_candidate2; + trans_table[sample_nr][0] = 1.0; + } + + pm_candidate1 = old_path_metrics[0] - input_symbol_imag + increment[2]; + pm_candidate2 = old_path_metrics[8] - input_symbol_imag - increment[5]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[1] = pm_candidate1; + trans_table[sample_nr][1] = -1.0; + } + else{ + new_path_metrics[1] = pm_candidate2; + trans_table[sample_nr][1] = 1.0; + } + + pm_candidate1 = old_path_metrics[1] + input_symbol_imag - increment[3]; + pm_candidate2 = old_path_metrics[9] + input_symbol_imag + increment[4]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[2] = pm_candidate1; + trans_table[sample_nr][2] = -1.0; + } + else{ + new_path_metrics[2] = pm_candidate2; + trans_table[sample_nr][2] = 1.0; + } + + pm_candidate1 = old_path_metrics[1] - input_symbol_imag + increment[3]; + pm_candidate2 = old_path_metrics[9] - input_symbol_imag - increment[4]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[3] = pm_candidate1; + trans_table[sample_nr][3] = -1.0; + } + else{ + new_path_metrics[3] = pm_candidate2; + trans_table[sample_nr][3] = 1.0; + } + + pm_candidate1 = old_path_metrics[2] + input_symbol_imag - increment[0]; + pm_candidate2 = old_path_metrics[10] + input_symbol_imag + increment[7]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[4] = pm_candidate1; + trans_table[sample_nr][4] = -1.0; + } + else{ + new_path_metrics[4] = pm_candidate2; + trans_table[sample_nr][4] = 1.0; + } + + pm_candidate1 = old_path_metrics[2] - input_symbol_imag + increment[0]; + pm_candidate2 = old_path_metrics[10] - input_symbol_imag - increment[7]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[5] = pm_candidate1; + trans_table[sample_nr][5] = -1.0; + } + else{ + new_path_metrics[5] = pm_candidate2; + trans_table[sample_nr][5] = 1.0; + } + + pm_candidate1 = old_path_metrics[3] + input_symbol_imag - increment[1]; + pm_candidate2 = old_path_metrics[11] + input_symbol_imag + increment[6]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[6] = pm_candidate1; + trans_table[sample_nr][6] = -1.0; + } + else{ + new_path_metrics[6] = pm_candidate2; + trans_table[sample_nr][6] = 1.0; + } + + pm_candidate1 = old_path_metrics[3] - input_symbol_imag + increment[1]; + pm_candidate2 = old_path_metrics[11] - input_symbol_imag - increment[6]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[7] = pm_candidate1; + trans_table[sample_nr][7] = -1.0; + } + else{ + new_path_metrics[7] = pm_candidate2; + trans_table[sample_nr][7] = 1.0; + } + + pm_candidate1 = old_path_metrics[4] + input_symbol_imag - increment[6]; + pm_candidate2 = old_path_metrics[12] + input_symbol_imag + increment[1]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[8] = pm_candidate1; + trans_table[sample_nr][8] = -1.0; + } + else{ + new_path_metrics[8] = pm_candidate2; + trans_table[sample_nr][8] = 1.0; + } + + pm_candidate1 = old_path_metrics[4] - input_symbol_imag + increment[6]; + pm_candidate2 = old_path_metrics[12] - input_symbol_imag - increment[1]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[9] = pm_candidate1; + trans_table[sample_nr][9] = -1.0; + } + else{ + new_path_metrics[9] = pm_candidate2; + trans_table[sample_nr][9] = 1.0; + } + + pm_candidate1 = old_path_metrics[5] + input_symbol_imag - increment[7]; + pm_candidate2 = old_path_metrics[13] + input_symbol_imag + increment[0]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[10] = pm_candidate1; + trans_table[sample_nr][10] = -1.0; + } + else{ + new_path_metrics[10] = pm_candidate2; + trans_table[sample_nr][10] = 1.0; + } + + pm_candidate1 = old_path_metrics[5] - input_symbol_imag + increment[7]; + pm_candidate2 = old_path_metrics[13] - input_symbol_imag - increment[0]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[11] = pm_candidate1; + trans_table[sample_nr][11] = -1.0; + } + else{ + new_path_metrics[11] = pm_candidate2; + trans_table[sample_nr][11] = 1.0; + } + + pm_candidate1 = old_path_metrics[6] + input_symbol_imag - increment[4]; + pm_candidate2 = old_path_metrics[14] + input_symbol_imag + increment[3]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[12] = pm_candidate1; + trans_table[sample_nr][12] = -1.0; + } + else{ + new_path_metrics[12] = pm_candidate2; + trans_table[sample_nr][12] = 1.0; + } + + pm_candidate1 = old_path_metrics[6] - input_symbol_imag + increment[4]; + pm_candidate2 = old_path_metrics[14] - input_symbol_imag - increment[3]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[13] = pm_candidate1; + trans_table[sample_nr][13] = -1.0; + } + else{ + new_path_metrics[13] = pm_candidate2; + trans_table[sample_nr][13] = 1.0; + } + + pm_candidate1 = old_path_metrics[7] + input_symbol_imag - increment[5]; + pm_candidate2 = old_path_metrics[15] + input_symbol_imag + increment[2]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[14] = pm_candidate1; + trans_table[sample_nr][14] = -1.0; + } + else{ + new_path_metrics[14] = pm_candidate2; + trans_table[sample_nr][14] = 1.0; + } + + pm_candidate1 = old_path_metrics[7] - input_symbol_imag + increment[5]; + pm_candidate2 = old_path_metrics[15] - input_symbol_imag - increment[2]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[15] = pm_candidate1; + trans_table[sample_nr][15] = -1.0; + } + else{ + new_path_metrics[15] = pm_candidate2; + trans_table[sample_nr][15] = 1.0; + } + + for(i=0; i<16; i++){ + printf(" %0.6f", new_path_metrics[i]); + } + printf("\n"); + + tmp=old_path_metrics; + old_path_metrics=new_path_metrics; + new_path_metrics=tmp; + + sample_nr++; + if(sample_nr==samples_num) + break; + + //Processing real states + real_imag=0; + input_symbol_real = input[sample_nr].real(); + + pm_candidate1 = old_path_metrics[0] - input_symbol_real - increment[7]; + pm_candidate2 = old_path_metrics[8] - input_symbol_real + increment[0]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[0] = pm_candidate1; + trans_table[sample_nr][0] = -1.0; + } + else{ + new_path_metrics[0] = pm_candidate2; + trans_table[sample_nr][0] = 1.0; + } + + pm_candidate1 = old_path_metrics[0] + input_symbol_real + increment[7]; + pm_candidate2 = old_path_metrics[8] + input_symbol_real - increment[0]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[1] = pm_candidate1; + trans_table[sample_nr][1] = -1.0; + } + else{ + new_path_metrics[1] = pm_candidate2; + trans_table[sample_nr][1] = 1.0; + } + + pm_candidate1 = old_path_metrics[1] - input_symbol_real - increment[6]; + pm_candidate2 = old_path_metrics[9] - input_symbol_real + increment[1]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[2] = pm_candidate1; + trans_table[sample_nr][2] = -1.0; + } + else{ + new_path_metrics[2] = pm_candidate2; + trans_table[sample_nr][2] = 1.0; + } + + pm_candidate1 = old_path_metrics[1] + input_symbol_real + increment[6]; + pm_candidate2 = old_path_metrics[9] + input_symbol_real - increment[1]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[3] = pm_candidate1; + trans_table[sample_nr][3] = -1.0; + } + else{ + new_path_metrics[3] = pm_candidate2; + trans_table[sample_nr][3] = 1.0; + } + + pm_candidate1 = old_path_metrics[2] - input_symbol_real - increment[5]; + pm_candidate2 = old_path_metrics[10] - input_symbol_real + increment[2]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[4] = pm_candidate1; + trans_table[sample_nr][4] = -1.0; + } + else{ + new_path_metrics[4] = pm_candidate2; + trans_table[sample_nr][4] = 1.0; + } + + pm_candidate1 = old_path_metrics[2] + input_symbol_real + increment[5]; + pm_candidate2 = old_path_metrics[10] + input_symbol_real - increment[2]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[5] = pm_candidate1; + trans_table[sample_nr][5] = -1.0; + } + else{ + new_path_metrics[5] = pm_candidate2; + trans_table[sample_nr][5] = 1.0; + } + + pm_candidate1 = old_path_metrics[3] - input_symbol_real - increment[4]; + pm_candidate2 = old_path_metrics[11] - input_symbol_real + increment[3]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[6] = pm_candidate1; + trans_table[sample_nr][6] = -1.0; + } + else{ + new_path_metrics[6] = pm_candidate2; + trans_table[sample_nr][6] = 1.0; + } + + pm_candidate1 = old_path_metrics[3] + input_symbol_real + increment[4]; + pm_candidate2 = old_path_metrics[11] + input_symbol_real - increment[3]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[7] = pm_candidate1; + trans_table[sample_nr][7] = -1.0; + } + else{ + new_path_metrics[7] = pm_candidate2; + trans_table[sample_nr][7] = 1.0; + } + + pm_candidate1 = old_path_metrics[4] - input_symbol_real - increment[3]; + pm_candidate2 = old_path_metrics[12] - input_symbol_real + increment[4]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[8] = pm_candidate1; + trans_table[sample_nr][8] = -1.0; + } + else{ + new_path_metrics[8] = pm_candidate2; + trans_table[sample_nr][8] = 1.0; + } + + pm_candidate1 = old_path_metrics[4] + input_symbol_real + increment[3]; + pm_candidate2 = old_path_metrics[12] + input_symbol_real - increment[4]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[9] = pm_candidate1; + trans_table[sample_nr][9] = -1.0; + } + else{ + new_path_metrics[9] = pm_candidate2; + trans_table[sample_nr][9] = 1.0; + } + + pm_candidate1 = old_path_metrics[5] - input_symbol_real - increment[2]; + pm_candidate2 = old_path_metrics[13] - input_symbol_real + increment[5]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[10] = pm_candidate1; + trans_table[sample_nr][10] = -1.0; + } + else{ + new_path_metrics[10] = pm_candidate2; + trans_table[sample_nr][10] = 1.0; + } + + pm_candidate1 = old_path_metrics[5] + input_symbol_real + increment[2]; + pm_candidate2 = old_path_metrics[13] + input_symbol_real - increment[5]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[11] = pm_candidate1; + trans_table[sample_nr][11] = -1.0; + } + else{ + new_path_metrics[11] = pm_candidate2; + trans_table[sample_nr][11] = 1.0; + } + + pm_candidate1 = old_path_metrics[6] - input_symbol_real - increment[1]; + pm_candidate2 = old_path_metrics[14] - input_symbol_real + increment[6]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[12] = pm_candidate1; + trans_table[sample_nr][12] = -1.0; + } + else{ + new_path_metrics[12] = pm_candidate2; + trans_table[sample_nr][12] = 1.0; + } + + pm_candidate1 = old_path_metrics[6] + input_symbol_real + increment[1]; + pm_candidate2 = old_path_metrics[14] + input_symbol_real - increment[6]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[13] = pm_candidate1; + trans_table[sample_nr][13] = -1.0; + } + else{ + new_path_metrics[13] = pm_candidate2; + trans_table[sample_nr][13] = 1.0; + } + + pm_candidate1 = old_path_metrics[7] - input_symbol_real - increment[0]; + pm_candidate2 = old_path_metrics[15] - input_symbol_real + increment[7]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[14] = pm_candidate1; + trans_table[sample_nr][14] = -1.0; + } + else{ + new_path_metrics[14] = pm_candidate2; + trans_table[sample_nr][14] = 1.0; + } + + pm_candidate1 = old_path_metrics[7] + input_symbol_real + increment[0]; + pm_candidate2 = old_path_metrics[15] + input_symbol_real - increment[7]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[15] = pm_candidate1; + trans_table[sample_nr][15] = -1.0; + } + else{ + new_path_metrics[15] = pm_candidate2; + trans_table[sample_nr][15] = 1.0; + } + + for(i=0; i<16; i++){ + printf(" %0.6f", new_path_metrics[i]); + } + printf("\n"); + + tmp=old_path_metrics; + old_path_metrics=new_path_metrics; + new_path_metrics=tmp; + + sample_nr++; + } + +/* +* Find the best from the stop states by comparing their path metrics. +* Not every stop state is always possible, so we are searching in +* a subset of them. +*/ + unsigned int best_stop_state; + float stop_state_metric, max_stop_state_metric; + best_stop_state = stop_states[0]; + max_stop_state_metric = old_path_metrics[best_stop_state]; + for(i=1; i< stops_num; i++){ + stop_state_metric = old_path_metrics[stop_states[i]]; + if(stop_state_metric > max_stop_state_metric){ + max_stop_state_metric = stop_state_metric; + best_stop_state = stop_states[i]; + } + } + +/* +* This table was generated with hope that it gives a litle speedup during +* traceback stage. +* Received bit is related to the number of state in the trellis. +* I've numbered states so their parity (number of ones) is related +* to a received bit. +*/ + static const unsigned int parity_table[PATHS_NUM] = { 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, }; + +/* +* Table of previous states in the trellis diagram. +* For GMSK modulation every state has two previous states. +* Example: +* previous_state_nr1 = prev_table[current_state_nr][0] +* previous_state_nr2 = prev_table[current_state_nr][1] +*/ + static const unsigned int prev_table[PATHS_NUM][2] = { {0,8}, {0,8}, {1,9}, {1,9}, {2,10}, {2,10}, {3,11}, {3,11}, {4,12}, {4,12}, {5,13}, {5,13}, {6,14}, {6,14}, {7,15}, {7,15}, }; + +/* +* Traceback and differential decoding of received sequence. +* Decisions stored in trans_table are used to restore best path in the trellis. +*/ + sample_nr=samples_num; + unsigned int state_nr=best_stop_state; + unsigned int decision; + bool out_bit=0; + + while(sample_nr>0){ + sample_nr--; + decision = (trans_table[sample_nr][state_nr]>0); + + if(decision != out_bit) + output[sample_nr]=-trans_table[sample_nr][state_nr]; + else + output[sample_nr]=trans_table[sample_nr][state_nr]; + + out_bit = out_bit ^ real_imag ^ parity_table[state_nr]; + state_nr = prev_table[state_nr][decision]; + real_imag = !real_imag; + } +} +int main() +{ + gr_complex rhh[5]; + gr_complex input[BURST_SIZE]; + float output[BURST_SIZE]; + float path_metrics[16]; + unsigned int i; + + rhh[0] = gr_complex(6681134.2347451737,0.0000000000); + rhh[1] = gr_complex(4315167.0637422213,-860367.8252039659); + rhh[2] = gr_complex(935284.8973972955,-371780.5098627206); + rhh[3] = gr_complex(-51462.6871850645,50393.6755332753); + rhh[4] = gr_complex(-7439.8044847587,8028.1598971039); + input[0] = gr_complex(7977179.5758423340,-2764222.4174382309); + input[1] = gr_complex(6856794.8374158992,4865869.9717015224); + input[2] = gr_complex(9811374.7624817826,5183732.8837238941); + input[3] = gr_complex(6679440.9549223864,-4428971.3826953433); + input[4] = gr_complex(-4696701.8298753574,-5933567.0446173064); + input[5] = gr_complex(-6541783.9135319907,4653341.9806263465); + input[6] = gr_complex(2084689.1360897610,10178136.3338905703); + input[7] = gr_complex(6147479.6545689385,8874496.3001975510); + input[8] = gr_complex(5904918.0852984637,8800690.9255027324); + input[9] = gr_complex(6748883.3597641187,8777701.9989523701); + input[10] = gr_complex(6778221.8454960939,8045655.9501006966); + input[11] = gr_complex(6364128.8660152592,8022191.0277904849); + input[12] = gr_complex(8722069.2811547928,4776436.4937707158); + input[13] = gr_complex(10932320.6634155307,-1558217.3467115229); + input[14] = gr_complex(8712591.8296174519,-1858753.9812126879); + input[15] = gr_complex(2379782.5548789091,2932506.6217711852); + input[16] = gr_complex(-5444416.7791099474,5946987.8123247186); + input[17] = gr_complex(-5424576.3013667949,8041132.5497372206); + input[18] = gr_complex(4060723.5737396451,5559136.6484692302); + input[19] = gr_complex(9867910.7169802599,-1816506.5368241861); + input[20] = gr_complex(9116570.9774469398,-6509021.2122100489); + input[21] = gr_complex(5005755.5616738033,-8815847.5133575164); + input[22] = gr_complex(-2234914.8963576080,-10346435.2929649707); + input[23] = gr_complex(-7202255.9594532764,-9713796.9845253937); + input[24] = gr_complex(-9190470.4906416610,-4700539.2048025727); + input[25] = gr_complex(-10344677.5631833095,3164735.0763911339); + input[26] = gr_complex(-8144676.0358214928,3689244.8448072611); + input[27] = gr_complex(-2187512.8785404381,-2405086.8007661770); + input[28] = gr_complex(4192422.7355999672,-2302450.1948127761); + input[29] = gr_complex(7246362.6484694732,4298058.7434391864); + input[30] = gr_complex(6556902.8967612814,8229181.3319309540); + input[31] = gr_complex(6142925.0144970221,8026586.9547691522); + input[32] = gr_complex(8129663.3146255473,4033126.4267871310); + input[33] = gr_complex(5840297.4751724107,-4620492.6748427916); + input[34] = gr_complex(-1914675.1103647740,-10020347.7468968201); + input[35] = gr_complex(-2940115.4495635680,-8372239.2818623800); + input[36] = gr_complex(4008522.1739267618,-6826920.4027512996); + input[37] = gr_complex(8135500.9140075976,-7047328.2304275325); + input[38] = gr_complex(8405763.8657652065,-6931698.9773707138); + input[39] = gr_complex(8929684.6084167603,-6179537.9078161716); + input[40] = gr_complex(8180060.2347036134,-2186703.0895569432); + input[41] = gr_complex(3091335.4318671110,4054954.8339853790); + input[42] = gr_complex(-4295697.1578283813,7927174.1333465036); + input[43] = gr_complex(-8473978.8917866647,8708279.0942377765); + input[44] = gr_complex(-8307511.0194505267,8912587.7116757408); + input[45] = gr_complex(-3924398.3662469061,9788935.7640386801); + input[46] = gr_complex(3578818.1363314060,9475507.7755236719); + input[47] = gr_complex(7878887.0608754344,8305521.6216092538); + input[48] = gr_complex(7661073.4441334298,8193166.0088053150); + input[49] = gr_complex(7711201.6565008871,8476321.8633535057); + input[50] = gr_complex(8106392.3937723571,8574168.6601282097); + input[51] = gr_complex(4338938.6736003347,8161180.2535219444); + input[52] = gr_complex(-2892764.5596533259,7908598.1890047276); + input[53] = gr_complex(-7361426.2291188771,8354406.9966570400); + input[54] = gr_complex(-7399748.1998513071,9027400.1381105371); + input[55] = gr_complex(-2985443.1269021751,10343848.6311076693); + input[56] = gr_complex(4056164.2682814910,10098505.0940024592); + input[57] = gr_complex(3662304.4839048819,7612823.1212739553); + input[58] = gr_complex(-3973366.8165788800,7937078.9175711880); + input[59] = gr_complex(-4235798.1452934938,10334281.0868006106); + input[60] = gr_complex(3036808.0689534992,9898067.6488185041); + input[61] = gr_complex(7473543.5356334411,7807926.3775777007); + input[62] = gr_complex(9079322.0398128927,3406424.4956655651); + input[63] = gr_complex(9858644.6258316785,-3257437.0358347511); + input[64] = gr_complex(8880394.8906779401,-7679278.0091405679); + input[65] = gr_complex(3363837.0022190632,-9429173.7162515502); + input[66] = gr_complex(-5976744.0335793961,-5385450.6034509651); + input[67] = gr_complex(-9557981.0088688023,3050312.8082751348); + input[68] = gr_complex(-7022882.0701328497,3640309.4189949362); + input[69] = gr_complex(-6956342.7005542396,-3448204.4347535190); + input[70] = gr_complex(-7352343.4183843154,-7661573.7851171279); + input[71] = gr_complex(-2991151.1712345490,-7200411.9186981265); + input[72] = gr_complex(2885118.0445274930,-2984883.7704812000); + input[73] = gr_complex(7032828.1064425148,3581754.7941750460); + input[74] = gr_complex(10088763.7540586796,3662867.8467899580); + input[75] = gr_complex(10564181.4445688296,-3225930.1012457302); + input[76] = gr_complex(8350222.2591632884,-3732983.7871769890); + input[77] = gr_complex(7833973.7142023239,2987993.6910825032); + input[78] = gr_complex(9706408.6739433222,3052094.8092914429); + input[79] = gr_complex(9745006.6094854400,-3935102.0540104648); + input[80] = gr_complex(7816404.5637982106,-8252538.7267344501); + input[81] = gr_complex(2986277.6633892348,-9487975.5299777929); + input[82] = gr_complex(-5695845.6292771958,-5169515.8120368905); + input[83] = gr_complex(-10054151.1938444097,3411496.4582903101); + input[84] = gr_complex(-8051379.2657383084,2941255.2196879322); + input[85] = gr_complex(-3549464.5857489500,-3756761.7516137050); + input[86] = gr_complex(2758228.0974008231,-3356159.6927887732); + input[87] = gr_complex(3030904.7997136060,2423714.1793336859); + input[88] = gr_complex(-4312484.6648249906,6565622.5327912308); + input[89] = gr_complex(-8292628.1023570709,7907719.3416422373); + input[90] = gr_complex(-7526932.9695930025,8014555.7987554707); + input[91] = gr_complex(-7845877.0589824449,7739528.8884838661); + input[92] = gr_complex(-8621562.5281414296,7418568.3737750174); + input[93] = gr_complex(-8417158.0598517433,7181224.2163500283); + input[94] = gr_complex(-8512688.8578708004,7987622.6814399734); + input[95] = gr_complex(-4394195.2836061195,9949034.4722546078); + input[96] = gr_complex(5266129.2915991358,6195329.6856880505); + input[97] = gr_complex(10194253.6950446907,-2784736.7088111811); + input[98] = gr_complex(8824963.8092368357,-7786593.4880886609); + input[99] = gr_complex(3396738.8080786392,-9691138.5840958729); + input[100] = gr_complex(-5722550.5051566781,-5556953.7173151653); + input[101] = gr_complex(-5714701.2187169204,5472711.9084113399); + input[102] = gr_complex(3332017.2621497451,9704527.7971289307); + input[103] = gr_complex(7342514.5288135549,7753950.5122191338); + input[104] = gr_complex(6818048.9879954616,8189460.3032278512); + input[105] = gr_complex(3394201.9642735380,7945062.7654534997); + input[106] = gr_complex(-4167885.5119835120,6895554.1659005154); + input[107] = gr_complex(-8619065.5479442235,6801211.7162556173); + input[108] = gr_complex(-7427938.6338890027,2908143.9905314222); + input[109] = gr_complex(-6703266.9973377967,-4149571.8933691182); + input[110] = gr_complex(-7397979.4083190663,-8091927.8271739502); + input[111] = gr_complex(-8023643.3861837359,-8148580.2711619306); + input[112] = gr_complex(-9593984.7424030975,-3401373.7567658830); + input[113] = gr_complex(-9949905.4782167133,3693487.8505923129); + input[114] = gr_complex(-7643884.0559280366,3256209.4725131588); + input[115] = gr_complex(-2697566.6721224338,-3206105.0871117339); + input[116] = gr_complex(3377896.5469162161,-3637995.9373872238); + input[117] = gr_complex(7053276.0410971297,2764169.1462154472); + input[118] = gr_complex(8628643.1609179415,3396969.9720182270); + input[119] = gr_complex(8591483.6933623832,-3571890.2316942490); + input[120] = gr_complex(7631932.3620410990,-7892583.3345261374); + input[121] = gr_complex(3523270.0499849520,-9235294.6299457569); + input[122] = gr_complex(-5210049.1886767643,-5470018.0261554671); + input[123] = gr_complex(-5729032.9836538611,4597120.7055899110); + input[124] = gr_complex(4722045.6474561440,5593554.0462966477); + input[125] = gr_complex(9943005.2302960120,-3058974.8321727011); + input[126] = gr_complex(7338276.2722858489,-3095524.7280114950); + input[127] = gr_complex(6924101.7894357592,4679671.4725222811); + input[128] = gr_complex(9394305.4008450378,4311128.9848157102); + input[129] = gr_complex(9835558.7182324342,-3667900.0077023208); + input[130] = gr_complex(8223108.7120001484,-8579057.2975662407); + input[131] = gr_complex(2845955.6588687100,-9157587.9910129588); + input[132] = gr_complex(-5965686.3459505001,-4635464.3736052224); + input[133] = gr_complex(-9515672.9792508632,3206974.9185256958); + input[134] = gr_complex(-8344649.1418864401,7073463.4248667136); + input[135] = gr_complex(-8254731.1990081621,7048210.7404652704); + input[136] = gr_complex(-7504645.1065991390,3469527.9779098351); + input[137] = gr_complex(-6905884.6544481078,-4071500.7763075172); + input[138] = gr_complex(-7265828.0211983416,-8724546.7090917714); + input[139] = gr_complex(-3159001.5446096850,-7599002.0958460663); + input[140] = gr_complex(4820872.7249604221,-7688968.4836491412); + input[141] = gr_complex(4538964.4842799734,-10655536.8874594998); + input[142] = gr_complex(-4627802.4763165191,-6342339.7226147177); + input[143] = gr_complex(-5229789.9845531741,4793436.5098953182); + input[144] = gr_complex(3023641.9008085518,9426626.5553139690); + input[145] = gr_complex(3151170.4858403988,7510483.1565964483); + input[146] = gr_complex(-3112381.9596595298,6480539.7998312227); + input[147] = gr_complex(-3526072.3028905988,4305425.6301188134); + unsigned int stop_states[1] = { 4, }; + + viterbi_detector(input, BURST_SIZE, rhh, 3, stop_states, 1, output); + printf("# name: output\n# type: matrix\n# rows: 1\n# columns: 148\n"); + for(i=0; i<BURST_SIZE ; i++){ + printf(" %d\n", output[i]>0); + } + printf("\n"); + +} diff --git a/viterbi-detector/viterbi_detector_lh4.cpp b/viterbi-detector/viterbi_detector_lh4.cpp new file mode 100644 index 0000000..45da39d --- /dev/null +++ b/viterbi-detector/viterbi_detector_lh4.cpp @@ -0,0 +1,552 @@ +/*************************************************************************** + * Copyright (C) 2008 by Piotr Krysik * + * pkrysik@stud.pw.edu.pl * + * * + * 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. * + ***************************************************************************/ + +/* +** viterbi_detector: +** This part does the detection of received sequnece. +** Employed algorithm is viterbi Maximum Likehood Sequence Estimation. +** At this moment it gives hard decisions on the output, but +** it was designed with soft decisions in mind. +** +** SYNTAX: void viterbi_detector( +** const gr_complex * input, +** unsigned int samples_num, +** gr_complex * rhh, +** unsigned int start_state, +** const unsigned int * stop_states, +** unsigned int stops_num, +** float * output) +** +** INPUT: input: Complex received signal afted matched filtering. +** samples_num: Number of samples in the input table. +** rhh: The autocorrelation of the estimated channel +** impulse response. +** start_state: Number of the start point. In GSM each burst +** starts with sequence of three bits (0,0,0) which +** indicates start point of the algorithm. +** stop_states: Table with numbers of possible stop states. +** stops_num: Number of possible stop states +** +** +** OUTPUT: output: Differentially decoded hard output of the algorithm: +** -1 for logical "0" and 1 for logical "1" +** +** SUB_FUNC: none +** +** TEST(S): Tested with real world normal burst. +*/ + +#include <gnuradio/gr_complex.h> +#define BURST_SIZE 148 +#define PATHS_NUM 16 + +void viterbi_detector(const gr_complex * input, unsigned int samples_num, gr_complex * rhh, unsigned int start_state, const unsigned int * stop_states, unsigned int stops_num, float * output) +{ + float increment[8]; + float path_metrics1[16]; + float path_metrics2[16]; + float * new_path_metrics; + float * old_path_metrics; + float * tmp; + float trans_table[BURST_SIZE][16]; + float pm_candidate1, pm_candidate2; + bool real_imag; + float input_symbol_real, input_symbol_imag; + unsigned int i, sample_nr; + +/* +* Setup first path metrics, so only state pointed by start_state is possible. +* Start_state metric is equal to zero, the rest is written with some very low value, +* which makes them practically impossible to occur. +*/ + for(i=0; i<PATHS_NUM; i++){ + path_metrics1[i]=(-10e30); + } + path_metrics1[start_state]=0; + +/* +* Compute Increment - a table of values which does not change for subsequent input samples. +* Increment is table of reference levels for computation of branch metrics: +* branch metric = (+/-)received_sample (+/-) reference_level +*/ + increment[0] = -rhh[1].imag() -rhh[2].real() -rhh[3].imag() +rhh[4].real(); + increment[1] = rhh[1].imag() -rhh[2].real() -rhh[3].imag() +rhh[4].real(); + increment[2] = -rhh[1].imag() +rhh[2].real() -rhh[3].imag() +rhh[4].real(); + increment[3] = rhh[1].imag() +rhh[2].real() -rhh[3].imag() +rhh[4].real(); + increment[4] = -rhh[1].imag() -rhh[2].real() +rhh[3].imag() +rhh[4].real(); + increment[5] = rhh[1].imag() -rhh[2].real() +rhh[3].imag() +rhh[4].real(); + increment[6] = -rhh[1].imag() +rhh[2].real() +rhh[3].imag() +rhh[4].real(); + increment[7] = rhh[1].imag() +rhh[2].real() +rhh[3].imag() +rhh[4].real(); + + +/* +* Computation of path metrics and decisions (Add-Compare-Select). +* It's composed of two parts: one for odd input samples (imaginary numbers) +* and one for even samples (real numbers). +* Each part is composed of independent (parallelisable) statements like +* this one: +* pm_candidate1 = old_path_metrics[0] - input_symbol_real - increment[7]; +* pm_candidate2 = old_path_metrics[8] - input_symbol_real + increment[0]; +* if(pm_candidate1 > pm_candidate2){ +* new_path_metrics[0] = pm_candidate1; +* trans_table[sample_nr][0] = -1.0; +* } +* else{ +* new_path_metrics[0] = pm_candidate2; +* trans_table[sample_nr][0] = 1.0; +* } +* This is very good point for optimisations (SIMD or OpenMP) as it's most time +* consuming part of this function. +*/ + sample_nr=0; + old_path_metrics=path_metrics1; + new_path_metrics=path_metrics2; + while(sample_nr<samples_num){ + //Processing imag states + real_imag=1; + input_symbol_imag = input[sample_nr].imag(); + + pm_candidate1 = old_path_metrics[0] + input_symbol_imag - increment[2]; + pm_candidate2 = old_path_metrics[8] + input_symbol_imag + increment[5]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[0] = pm_candidate1; + trans_table[sample_nr][0] = -1.0; + } + else{ + new_path_metrics[0] = pm_candidate2; + trans_table[sample_nr][0] = 1.0; + } + + pm_candidate1 = old_path_metrics[0] - input_symbol_imag + increment[2]; + pm_candidate2 = old_path_metrics[8] - input_symbol_imag - increment[5]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[1] = pm_candidate1; + trans_table[sample_nr][1] = -1.0; + } + else{ + new_path_metrics[1] = pm_candidate2; + trans_table[sample_nr][1] = 1.0; + } + + pm_candidate1 = old_path_metrics[1] + input_symbol_imag - increment[3]; + pm_candidate2 = old_path_metrics[9] + input_symbol_imag + increment[4]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[2] = pm_candidate1; + trans_table[sample_nr][2] = -1.0; + } + else{ + new_path_metrics[2] = pm_candidate2; + trans_table[sample_nr][2] = 1.0; + } + + pm_candidate1 = old_path_metrics[1] - input_symbol_imag + increment[3]; + pm_candidate2 = old_path_metrics[9] - input_symbol_imag - increment[4]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[3] = pm_candidate1; + trans_table[sample_nr][3] = -1.0; + } + else{ + new_path_metrics[3] = pm_candidate2; + trans_table[sample_nr][3] = 1.0; + } + + pm_candidate1 = old_path_metrics[2] + input_symbol_imag - increment[0]; + pm_candidate2 = old_path_metrics[10] + input_symbol_imag + increment[7]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[4] = pm_candidate1; + trans_table[sample_nr][4] = -1.0; + } + else{ + new_path_metrics[4] = pm_candidate2; + trans_table[sample_nr][4] = 1.0; + } + + pm_candidate1 = old_path_metrics[2] - input_symbol_imag + increment[0]; + pm_candidate2 = old_path_metrics[10] - input_symbol_imag - increment[7]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[5] = pm_candidate1; + trans_table[sample_nr][5] = -1.0; + } + else{ + new_path_metrics[5] = pm_candidate2; + trans_table[sample_nr][5] = 1.0; + } + + pm_candidate1 = old_path_metrics[3] + input_symbol_imag - increment[1]; + pm_candidate2 = old_path_metrics[11] + input_symbol_imag + increment[6]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[6] = pm_candidate1; + trans_table[sample_nr][6] = -1.0; + } + else{ + new_path_metrics[6] = pm_candidate2; + trans_table[sample_nr][6] = 1.0; + } + + pm_candidate1 = old_path_metrics[3] - input_symbol_imag + increment[1]; + pm_candidate2 = old_path_metrics[11] - input_symbol_imag - increment[6]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[7] = pm_candidate1; + trans_table[sample_nr][7] = -1.0; + } + else{ + new_path_metrics[7] = pm_candidate2; + trans_table[sample_nr][7] = 1.0; + } + + pm_candidate1 = old_path_metrics[4] + input_symbol_imag - increment[6]; + pm_candidate2 = old_path_metrics[12] + input_symbol_imag + increment[1]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[8] = pm_candidate1; + trans_table[sample_nr][8] = -1.0; + } + else{ + new_path_metrics[8] = pm_candidate2; + trans_table[sample_nr][8] = 1.0; + } + + pm_candidate1 = old_path_metrics[4] - input_symbol_imag + increment[6]; + pm_candidate2 = old_path_metrics[12] - input_symbol_imag - increment[1]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[9] = pm_candidate1; + trans_table[sample_nr][9] = -1.0; + } + else{ + new_path_metrics[9] = pm_candidate2; + trans_table[sample_nr][9] = 1.0; + } + + pm_candidate1 = old_path_metrics[5] + input_symbol_imag - increment[7]; + pm_candidate2 = old_path_metrics[13] + input_symbol_imag + increment[0]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[10] = pm_candidate1; + trans_table[sample_nr][10] = -1.0; + } + else{ + new_path_metrics[10] = pm_candidate2; + trans_table[sample_nr][10] = 1.0; + } + + pm_candidate1 = old_path_metrics[5] - input_symbol_imag + increment[7]; + pm_candidate2 = old_path_metrics[13] - input_symbol_imag - increment[0]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[11] = pm_candidate1; + trans_table[sample_nr][11] = -1.0; + } + else{ + new_path_metrics[11] = pm_candidate2; + trans_table[sample_nr][11] = 1.0; + } + + pm_candidate1 = old_path_metrics[6] + input_symbol_imag - increment[4]; + pm_candidate2 = old_path_metrics[14] + input_symbol_imag + increment[3]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[12] = pm_candidate1; + trans_table[sample_nr][12] = -1.0; + } + else{ + new_path_metrics[12] = pm_candidate2; + trans_table[sample_nr][12] = 1.0; + } + + pm_candidate1 = old_path_metrics[6] - input_symbol_imag + increment[4]; + pm_candidate2 = old_path_metrics[14] - input_symbol_imag - increment[3]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[13] = pm_candidate1; + trans_table[sample_nr][13] = -1.0; + } + else{ + new_path_metrics[13] = pm_candidate2; + trans_table[sample_nr][13] = 1.0; + } + + pm_candidate1 = old_path_metrics[7] + input_symbol_imag - increment[5]; + pm_candidate2 = old_path_metrics[15] + input_symbol_imag + increment[2]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[14] = pm_candidate1; + trans_table[sample_nr][14] = -1.0; + } + else{ + new_path_metrics[14] = pm_candidate2; + trans_table[sample_nr][14] = 1.0; + } + + pm_candidate1 = old_path_metrics[7] - input_symbol_imag + increment[5]; + pm_candidate2 = old_path_metrics[15] - input_symbol_imag - increment[2]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[15] = pm_candidate1; + trans_table[sample_nr][15] = -1.0; + } + else{ + new_path_metrics[15] = pm_candidate2; + trans_table[sample_nr][15] = 1.0; + } + tmp=old_path_metrics; + old_path_metrics=new_path_metrics; + new_path_metrics=tmp; + + sample_nr++; + if(sample_nr==samples_num) + break; + + //Processing real states + real_imag=0; + input_symbol_real = input[sample_nr].real(); + + pm_candidate1 = old_path_metrics[0] - input_symbol_real - increment[7]; + pm_candidate2 = old_path_metrics[8] - input_symbol_real + increment[0]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[0] = pm_candidate1; + trans_table[sample_nr][0] = -1.0; + } + else{ + new_path_metrics[0] = pm_candidate2; + trans_table[sample_nr][0] = 1.0; + } + + pm_candidate1 = old_path_metrics[0] + input_symbol_real + increment[7]; + pm_candidate2 = old_path_metrics[8] + input_symbol_real - increment[0]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[1] = pm_candidate1; + trans_table[sample_nr][1] = -1.0; + } + else{ + new_path_metrics[1] = pm_candidate2; + trans_table[sample_nr][1] = 1.0; + } + + pm_candidate1 = old_path_metrics[1] - input_symbol_real - increment[6]; + pm_candidate2 = old_path_metrics[9] - input_symbol_real + increment[1]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[2] = pm_candidate1; + trans_table[sample_nr][2] = -1.0; + } + else{ + new_path_metrics[2] = pm_candidate2; + trans_table[sample_nr][2] = 1.0; + } + + pm_candidate1 = old_path_metrics[1] + input_symbol_real + increment[6]; + pm_candidate2 = old_path_metrics[9] + input_symbol_real - increment[1]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[3] = pm_candidate1; + trans_table[sample_nr][3] = -1.0; + } + else{ + new_path_metrics[3] = pm_candidate2; + trans_table[sample_nr][3] = 1.0; + } + + pm_candidate1 = old_path_metrics[2] - input_symbol_real - increment[5]; + pm_candidate2 = old_path_metrics[10] - input_symbol_real + increment[2]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[4] = pm_candidate1; + trans_table[sample_nr][4] = -1.0; + } + else{ + new_path_metrics[4] = pm_candidate2; + trans_table[sample_nr][4] = 1.0; + } + + pm_candidate1 = old_path_metrics[2] + input_symbol_real + increment[5]; + pm_candidate2 = old_path_metrics[10] + input_symbol_real - increment[2]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[5] = pm_candidate1; + trans_table[sample_nr][5] = -1.0; + } + else{ + new_path_metrics[5] = pm_candidate2; + trans_table[sample_nr][5] = 1.0; + } + + pm_candidate1 = old_path_metrics[3] - input_symbol_real - increment[4]; + pm_candidate2 = old_path_metrics[11] - input_symbol_real + increment[3]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[6] = pm_candidate1; + trans_table[sample_nr][6] = -1.0; + } + else{ + new_path_metrics[6] = pm_candidate2; + trans_table[sample_nr][6] = 1.0; + } + + pm_candidate1 = old_path_metrics[3] + input_symbol_real + increment[4]; + pm_candidate2 = old_path_metrics[11] + input_symbol_real - increment[3]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[7] = pm_candidate1; + trans_table[sample_nr][7] = -1.0; + } + else{ + new_path_metrics[7] = pm_candidate2; + trans_table[sample_nr][7] = 1.0; + } + + pm_candidate1 = old_path_metrics[4] - input_symbol_real - increment[3]; + pm_candidate2 = old_path_metrics[12] - input_symbol_real + increment[4]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[8] = pm_candidate1; + trans_table[sample_nr][8] = -1.0; + } + else{ + new_path_metrics[8] = pm_candidate2; + trans_table[sample_nr][8] = 1.0; + } + + pm_candidate1 = old_path_metrics[4] + input_symbol_real + increment[3]; + pm_candidate2 = old_path_metrics[12] + input_symbol_real - increment[4]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[9] = pm_candidate1; + trans_table[sample_nr][9] = -1.0; + } + else{ + new_path_metrics[9] = pm_candidate2; + trans_table[sample_nr][9] = 1.0; + } + + pm_candidate1 = old_path_metrics[5] - input_symbol_real - increment[2]; + pm_candidate2 = old_path_metrics[13] - input_symbol_real + increment[5]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[10] = pm_candidate1; + trans_table[sample_nr][10] = -1.0; + } + else{ + new_path_metrics[10] = pm_candidate2; + trans_table[sample_nr][10] = 1.0; + } + + pm_candidate1 = old_path_metrics[5] + input_symbol_real + increment[2]; + pm_candidate2 = old_path_metrics[13] + input_symbol_real - increment[5]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[11] = pm_candidate1; + trans_table[sample_nr][11] = -1.0; + } + else{ + new_path_metrics[11] = pm_candidate2; + trans_table[sample_nr][11] = 1.0; + } + + pm_candidate1 = old_path_metrics[6] - input_symbol_real - increment[1]; + pm_candidate2 = old_path_metrics[14] - input_symbol_real + increment[6]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[12] = pm_candidate1; + trans_table[sample_nr][12] = -1.0; + } + else{ + new_path_metrics[12] = pm_candidate2; + trans_table[sample_nr][12] = 1.0; + } + + pm_candidate1 = old_path_metrics[6] + input_symbol_real + increment[1]; + pm_candidate2 = old_path_metrics[14] + input_symbol_real - increment[6]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[13] = pm_candidate1; + trans_table[sample_nr][13] = -1.0; + } + else{ + new_path_metrics[13] = pm_candidate2; + trans_table[sample_nr][13] = 1.0; + } + + pm_candidate1 = old_path_metrics[7] - input_symbol_real - increment[0]; + pm_candidate2 = old_path_metrics[15] - input_symbol_real + increment[7]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[14] = pm_candidate1; + trans_table[sample_nr][14] = -1.0; + } + else{ + new_path_metrics[14] = pm_candidate2; + trans_table[sample_nr][14] = 1.0; + } + + pm_candidate1 = old_path_metrics[7] + input_symbol_real + increment[0]; + pm_candidate2 = old_path_metrics[15] + input_symbol_real - increment[7]; + if(pm_candidate1 > pm_candidate2){ + new_path_metrics[15] = pm_candidate1; + trans_table[sample_nr][15] = -1.0; + } + else{ + new_path_metrics[15] = pm_candidate2; + trans_table[sample_nr][15] = 1.0; + } + tmp=old_path_metrics; + old_path_metrics=new_path_metrics; + new_path_metrics=tmp; + + sample_nr++; + } + +/* +* Find the best from the stop states by comparing their path metrics. +* Not every stop state is always possible, so we are searching in +* a subset of them. +*/ + unsigned int best_stop_state; + float stop_state_metric, max_stop_state_metric; + best_stop_state = stop_states[0]; + max_stop_state_metric = old_path_metrics[best_stop_state]; + for(i=1; i< stops_num; i++){ + stop_state_metric = old_path_metrics[stop_states[i]]; + if(stop_state_metric > max_stop_state_metric){ + max_stop_state_metric = stop_state_metric; + best_stop_state = stop_states[i]; + } + } + +/* +* This table was generated with hope that it gives a litle speedup during +* traceback stage. +* Received bit is related to the number of state in the trellis. +* I've numbered states so their parity (number of ones) is related +* to a received bit. +*/ + static const unsigned int parity_table[PATHS_NUM] = { 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, }; + +/* +* Table of previous states in the trellis diagram. +* For GMSK modulation every state has two previous states. +* Example: +* previous_state_nr1 = prev_table[current_state_nr][0] +* previous_state_nr2 = prev_table[current_state_nr][1] +*/ + static const unsigned int prev_table[PATHS_NUM][2] = { {0,8}, {0,8}, {1,9}, {1,9}, {2,10}, {2,10}, {3,11}, {3,11}, {4,12}, {4,12}, {5,13}, {5,13}, {6,14}, {6,14}, {7,15}, {7,15}, }; + +/* +* Traceback and differential decoding of received sequence. +* Decisions stored in trans_table are used to restore best path in the trellis. +*/ + sample_nr=samples_num; + unsigned int state_nr=best_stop_state; + unsigned int decision; + bool out_bit=0; + + while(sample_nr>0){ + sample_nr--; + decision = (trans_table[sample_nr][state_nr]>0); + + if(decision != out_bit) + output[sample_nr]=-trans_table[sample_nr][state_nr]; + else + output[sample_nr]=trans_table[sample_nr][state_nr]; + + out_bit = out_bit ^ real_imag ^ parity_table[state_nr]; + state_nr = prev_table[state_nr][decision]; + real_imag = !real_imag; + } +} diff --git a/viterbi_generator/COPYING b/viterbi_generator/COPYING new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/viterbi_generator/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + 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 3 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, see <http://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<http://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/viterbi_generator/Makefile b/viterbi_generator/Makefile new file mode 100644 index 0000000..4730a7c --- /dev/null +++ b/viterbi_generator/Makefile @@ -0,0 +1,22 @@ +Lh=4 +CXX=g++ +CFLAGS=-O + +viterbi_detector.c: ./utils/viterbi_generator.m ./utils/lower_utils/equations_gen.m make_function.m + @./make_function.m $(Lh) + +test: tests/test_gen.m tests/test_check.m ./utils/viterbi_generator.m ./utils/lower_utils/equations_gen.m + @./tests/$@_gen.m $(Lh) + @$(CXX) $(LDFLAGS) $(CFLAGS) $@.cpp -o $@ + @./$@ > $@_result +# @less $@_result +# @rm $@.c + @rm $@ + @./tests/$@_check.m $(Lh) + @rm $@_result + + +clean: + rm -f *.o + rm -f *.c + rm *~ diff --git a/viterbi_generator/README b/viterbi_generator/README new file mode 100644 index 0000000..d9502fd --- /dev/null +++ b/viterbi_generator/README @@ -0,0 +1,16 @@ +This is generator for Viterbi Algorithm part of Viterbi Equalizer. +It is able to generate viterbi detector for channels with memory lengths +of 2,3,4,5 symbols. + +To generate function in C++ for channel memory length of four symbols (Lh=4) +just type: +$ make + + +To generate function for some other channel memory length type: +$ make Lh=x +where 'x' is channel memory length (value from 2 to 5) + +To check if algorithm works properly type: +$ make test Lh=x + diff --git a/viterbi_generator/make_function.m b/viterbi_generator/make_function.m new file mode 100755 index 0000000..98eae81 --- /dev/null +++ b/viterbi_generator/make_function.m @@ -0,0 +1,54 @@ +#!/usr/bin/octave --silent + + ########################################################################### + # Copyright (C) 2008 by Piotr Krysik # + # pkrysik@stud.elka.pw.edu.pl # + # # + # 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 3 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. # + ########################################################################### + +addpath("./utils"); +addpath("./utils/lower_utils"); +addpath("./utils/lower_utils/lower_utils"); +arg_list=argv(); +Lh=sscanf(arg_list{1}, "%d", "C"); +license_statement="\ +/***************************************************************************\n\ + * Copyright (C) 2008 by Piotr Krysik *\n\ + * pkrysik@stud.elka.pw.edu.pl *\n\ + * *\n\ + * This program is free software; you can redistribute it and/or modify *\n\ + * it under the terms of the GNU General Public License as published by *\n\ + * the Free Software Foundation; either version 2 of the License, or *\n\ + * (at your option) any later version. *\n\ + * *\n\ + * This program is distributed in the hope that it will be useful, *\n\ + * but WITHOUT ANY WARRANTY; without even the implied warranty of *\n\ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *\n\ + * GNU General Public License for more details. *\n\ + * *\n\ + * You should have received a copy of the GNU General Public License *\n\ + * along with this program; if not, write to the *\n\ + * Free Software Foundation, Inc., *\n\ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *\n\ + ***************************************************************************/\n\n"; +f_name="viterbi_detector"; +viterbi_detector_file = fopen([f_name '.cpp'],'w'); +viterbi_detector = viterbi_generator(Lh); +fprintf(viterbi_detector_file, "%s", license_statement); +fprintf(viterbi_detector_file, "%s", viterbi_detector); + + diff --git a/viterbi_generator/tests/data/normal_burst.dat b/viterbi_generator/tests/data/normal_burst.dat new file mode 100644 index 0000000..cbde38a --- /dev/null +++ b/viterbi_generator/tests/data/normal_burst.dat @@ -0,0 +1,6 @@ +# Created by Octave 3.0.0, Sun Dec 07 22:10:44 2008 CET <piotr@piotr-laptop> +# name: normal_burst +# type: complex matrix +# rows: 1 +# columns: 148 + (7977179.575842334,-2764222.417438231) (6856794.837415899,4865869.971701522) (9811374.762481783,5183732.883723894) (6679440.954922386,-4428971.382695343) (-4696701.829875357,-5933567.044617306) (-6541783.913531991,4653341.980626347) (2084689.136089761,10178136.33389057) (6147479.654568939,8874496.300197551) (5904918.085298464,8800690.925502732) (6748883.359764119,8777701.99895237) (6778221.845496094,8045655.950100697) (6364128.866015259,8022191.027790485) (8722069.281154793,4776436.493770716) (10932320.66341553,-1558217.346711523) (8712591.829617452,-1858753.981212688) (2379782.554878909,2932506.621771185) (-5444416.779109947,5946987.812324719) (-5424576.301366795,8041132.549737221) (4060723.573739645,5559136.64846923) (9867910.71698026,-1816506.536824186) (9116570.97744694,-6509021.212210049) (5005755.561673803,-8815847.513357516) (-2234914.896357608,-10346435.29296497) (-7202255.959453276,-9713796.984525394) (-9190470.490641661,-4700539.204802573) (-10344677.56318331,3164735.076391134) (-8144676.035821493,3689244.844807261) (-2187512.878540438,-2405086.800766177) (4192422.735599967,-2302450.194812776) (7246362.648469473,4298058.743439186) (6556902.896761281,8229181.331930954) (6142925.014497022,8026586.954769152) (8129663.314625547,4033126.426787131) (5840297.475172411,-4620492.674842792) (-1914675.110364774,-10020347.74689682) (-2940115.449563568,-8372239.28186238) (4008522.173926762,-6826920.4027513) (8135500.914007598,-7047328.230427532) (8405763.865765207,-6931698.977370714) (8929684.60841676,-6179537.907816172) (8180060.234703613,-2186703.089556943) (3091335.431867111,4054954.833985379) (-4295697.157828381,7927174.133346504) (-8473978.891786665,8708279.094237776) (-8307511.019450527,8912587.711675741) (-3924398.366246906,9788935.76403868) (3578818.136331406,9475507.775523672) (7878887.060875434,8305521.621609254) (7661073.44413343,8193166.008805315) (7711201.656500887,8476321.863353506) (8106392.393772357,8574168.66012821) (4338938.673600335,8161180.253521944) (-2892764.559653326,7908598.189004728) (-7361426.229118877,8354406.99665704) (-7399748.199851307,9027400.138110537) (-2985443.126902175,10343848.63110767) (4056164.268281491,10098505.09400246) (3662304.483904882,7612823.121273955) (-3973366.81657888,7937078.917571188) (-4235798.145293494,10334281.08680061) (3036808.068953499,9898067.648818504) (7473543.535633441,7807926.377577701) (9079322.039812893,3406424.495665565) (9858644.625831679,-3257437.035834751) (8880394.89067794,-7679278.009140568) (3363837.002219063,-9429173.71625155) (-5976744.033579396,-5385450.603450965) (-9557981.008868802,3050312.808275135) (-7022882.07013285,3640309.418994936) (-6956342.70055424,-3448204.434753519) (-7352343.418384315,-7661573.785117128) (-2991151.171234549,-7200411.918698126) (2885118.044527493,-2984883.7704812) (7032828.106442515,3581754.794175046) (10088763.75405868,3662867.846789958) (10564181.44456883,-3225930.10124573) (8350222.259163288,-3732983.787176989) (7833973.714202324,2987993.691082503) (9706408.673943322,3052094.809291443) (9745006.60948544,-3935102.054010465) (7816404.563798211,-8252538.72673445) (2986277.663389235,-9487975.529977793) (-5695845.629277196,-5169515.812036891) (-10054151.19384441,3411496.45829031) (-8051379.265738308,2941255.219687932) (-3549464.58574895,-3756761.751613705) (2758228.097400823,-3356159.692788773) (3030904.799713606,2423714.179333686) (-4312484.664824991,6565622.532791231) (-8292628.102357071,7907719.341642237) (-7526932.969593002,8014555.798755471) (-7845877.058982445,7739528.888483866) (-8621562.52814143,7418568.373775017) (-8417158.059851743,7181224.216350028) (-8512688.8578708,7987622.681439973) (-4394195.283606119,9949034.472254608) (5266129.291599136,6195329.68568805) (10194253.69504469,-2784736.708811181) (8824963.809236836,-7786593.488088661) (3396738.808078639,-9691138.584095873) (-5722550.505156678,-5556953.717315165) (-5714701.21871692,5472711.90841134) (3332017.262149745,9704527.797128931) (7342514.528813555,7753950.512219134) (6818048.987995462,8189460.303227851) (3394201.964273538,7945062.7654535) (-4167885.511983512,6895554.165900515) (-8619065.547944224,6801211.716255617) (-7427938.633889003,2908143.990531422) (-6703266.997337797,-4149571.893369118) (-7397979.408319066,-8091927.82717395) (-8023643.386183736,-8148580.271161931) (-9593984.742403097,-3401373.756765883) (-9949905.478216713,3693487.850592313) (-7643884.055928037,3256209.472513159) (-2697566.672122434,-3206105.087111734) (3377896.546916216,-3637995.937387224) (7053276.04109713,2764169.146215447) (8628643.160917941,3396969.972018227) (8591483.693362383,-3571890.231694249) (7631932.362041099,-7892583.334526137) (3523270.049984952,-9235294.629945757) (-5210049.188676764,-5470018.026155467) (-5729032.983653861,4597120.705589911) (4722045.647456144,5593554.046296648) (9943005.230296012,-3058974.832172701) (7338276.272285849,-3095524.728011495) (6924101.789435759,4679671.472522281) (9394305.400845038,4311128.98481571) (9835558.718232434,-3667900.007702321) (8223108.712000148,-8579057.297566241) (2845955.65886871,-9157587.991012959) (-5965686.3459505,-4635464.373605222) (-9515672.979250863,3206974.918525696) (-8344649.14188644,7073463.424866714) (-8254731.199008162,7048210.74046527) (-7504645.106599139,3469527.977909835) (-6905884.654448108,-4071500.776307517) (-7265828.021198342,-8724546.709091771) (-3159001.544609685,-7599002.095846066) (4820872.724960422,-7688968.483649141) (4538964.484279973,-10655536.8874595) (-4627802.476316519,-6342339.722614718) (-5229789.984553174,4793436.509895318) (3023641.900808552,9426626.555313969) (3151170.485840399,7510483.156596448) (-3112381.95965953,6480539.799831223) (-3526072.302890599,4305425.630118813) diff --git a/viterbi_generator/tests/data/rhh.dat b/viterbi_generator/tests/data/rhh.dat new file mode 100644 index 0000000..4a06772 --- /dev/null +++ b/viterbi_generator/tests/data/rhh.dat @@ -0,0 +1,6 @@ +# Created by Octave 3.0.0, Sun Dec 07 22:10:44 2008 CET <piotr@piotr-laptop> +# name: Rhh +# type: complex matrix +# rows: 1 +# columns: 6 + (6681134.234745174,3.462940897916484e-11) (4315167.063742221,-860367.8252039659) (935284.8973972955,-371780.5098627206) (-51462.68718506447,50393.67553327526) (-7439.804484758702,8028.159897103877) (-0.804484758702,0.159897103877) diff --git a/viterbi_generator/tests/test_check.m b/viterbi_generator/tests/test_check.m new file mode 100755 index 0000000..a08c801 --- /dev/null +++ b/viterbi_generator/tests/test_check.m @@ -0,0 +1,56 @@ +#!/usr/bin/octave --silent +addpath("./tests/utils"); +addpath("./utils"); +addpath("./utils/lower_utils"); +addpath("./utils/lower_utils/lower_utils"); + +arg_list=argv(); +Lh=sscanf(arg_list{1}, "%d", "C"); +PATHS_NUM=2**(Lh); +load tests/data/rhh.dat; +load tests/data/normal_burst.dat; +load test_result; + +[r BURST_SIZE] = size(normal_burst); + +[ SYMBOLS , PREVIOUS , NEXT , START , STOPS ] = viterbi_init(Lh); + +path_metrics_test_result = path_metrics_test_result.'; +[rx_burst METRIC] = viterbi_detector(SYMBOLS,NEXT,PREVIOUS,START,STOPS,normal_burst,Rhh); +[r,burst_size] = size(METRIC); +sum_check=0; %number of errors + +%find branch metrics computation errors number (errors bigger than 1000) +for i=1:2:burst_size, + check_matrix = (abs(METRIC(1:2:r,i)-path_metrics_test_result(:,i))); + suma=sum( check_matrix > ones(PATHS_NUM,1)*1000); + sum_check = sum_check + suma; + + check_matrix = (abs(METRIC(2:2:r,i+1)-path_metrics_test_result(:,i+1))); + suma=sum( check_matrix > ones(PATHS_NUM,1)*1000); + sum_check = sum_check + suma; +end + +%compute expected number of errors (errors from the beginning) +q=2; +expected_result=0; +while(q<PATHS_NUM), + expected_result=expected_result + (PATHS_NUM-q); + q=q*2; +end + +%check result +if(sum_check == expected_result), + printf("Path metrics test: ok\n"); +else + sum_check + printf("Path metrics test: failed\n"); +end + +%check output of the viterbi_detector function +if(sum(output==rx_burst) == BURST_SIZE), + printf("Final result test: ok\n"); +else + printf("Final result test: failed\n"); +end + diff --git a/viterbi_generator/tests/test_gen.m b/viterbi_generator/tests/test_gen.m new file mode 100755 index 0000000..a2639fb --- /dev/null +++ b/viterbi_generator/tests/test_gen.m @@ -0,0 +1,83 @@ +#!/usr/bin/octave --silent + +addpath("./tests/utils"); +addpath("./utils"); +addpath("./utils/lower_utils"); +addpath("./utils/lower_utils/lower_utils"); +arg_list=argv(); +Lh=sscanf(arg_list{1}, "%d", "C"); + +INCREMENT_NUM=2**(Lh-1); +BRANCH_NUM=2**(Lh+1); +PATHS_NUM=2**(Lh); + +load tests/data/rhh.dat; +load tests/data/normal_burst.dat; + +[r BURST_SIZE] = size(normal_burst); + +SYMBOLS = make_symbols(Lh); +START = make_start(Lh,SYMBOLS); +STOP = make_stops(Lh,SYMBOLS); + +[increment, pm_candidates_imag, pm_candidates_real] = equations_gen(Lh); + +f_name="test"; +test_file = fopen([f_name '.cpp'],'w'); + +print_matrix_type=sprintf(" printf(\"# name: path_metrics_test_result\\n# type: matrix\\n# rows: %d\\n# columns: %d\\n\");\n", BURST_SIZE, PATHS_NUM);; + +print_path_metrics=[ "\n\ + for(i=0; i<" int2str(PATHS_NUM) "; i++){\n\ + printf(\" %0.6f\", new_path_metrics[i]);\n\ + }\n\ + printf(\"\\n\");\n\n" ]; + +viterbi_detector = viterbi_generator(Lh, print_matrix_type, print_path_metrics); + +fprintf(test_file, "\ +#include <stdio.h>\n", BURST_SIZE); + +fprintf(test_file, "%s", viterbi_detector); + +fprintf(test_file, [ "\ +int main()\n\ +{\n\ + gr_complex rhh[" int2str(Lh+1) "];\n\ + gr_complex input[BURST_SIZE];\n\ + float output[BURST_SIZE];\n\ + float path_metrics[" int2str(PATHS_NUM) "];\n\ + unsigned int i;\n\n" ]); + +for i=1:Lh+1, + fprintf(test_file," rhh[%d] = gr_complex(%0.10f,%0.10f);\n",i-1, real(Rhh(i)), imag(Rhh(i))); +end + +for i=1:BURST_SIZE, + fprintf(test_file," input[%d] = gr_complex(%0.10f,%0.10f);\n",i-1, real(normal_burst(i)), imag(normal_burst(i))); +end + +[STOPS_NUM c] = size(STOP); + +stop_states=[" unsigned int stop_states[" int2str(STOPS_NUM) "] = { "]; +for i=1:STOPS_NUM, + stop_states=[ stop_states int2str(ceil(STOP(i)/2)-1) ", "]; +end +stop_states=[ stop_states " };\n\n" ]; + +fprintf(test_file, stop_states); + +fprintf(test_file, [" viterbi_detector(input, BURST_SIZE, rhh, " int2str(ceil(START/2)-1) ", stop_states, " int2str(STOPS_NUM) ", output);" ]); + +print_output=[ "\n\ + printf(\"# name: output\\n# type: matrix\\n# rows: 1\\n# columns: " int2str(BURST_SIZE) "\\n\");\n\ + for(i=0; i<BURST_SIZE ; i++){\n\ + printf(\" %d\\n\", output[i]>0);\n\ + }\n\ + printf(\"\\n\");\n" ]; + +fprintf(test_file, "%s", print_output); + +fprintf(test_file, "\n}\n"); + + diff --git a/viterbi_generator/tests/utils/make_increment.m b/viterbi_generator/tests/utils/make_increment.m new file mode 100644 index 0000000..91cc0ae --- /dev/null +++ b/viterbi_generator/tests/utils/make_increment.m @@ -0,0 +1,70 @@ +function [ INCREMENT ] = make_increment(SYMBOLS,NEXT,Rhh) +% +% MAKE_INCREMENT: +% This function returns a lookuptable containing the +% metric increments related to moving from state n to m. +% The data is arranged so that the increment accosiated +% with a move from state n to m is located in +% INCREMENT(n,m). To minimize computations only legal +% transitions are considdered. +% +% SYNTAX: [ INCREMENT ] = make_increment(SYMBOLS,NEXT,Rhh) +% +% INPUT: SYMBOLS: The table of symbols corresponding the the state- +% numbers. +% NEXT: A transition table containing the next legal +% states, as it is generated by the code make_next. +% Rhh: The autocorrelation as estimated by mf.m. +% +% OUTPUT: INCREMENT: +% The increment table as described above. +% +% SUB_FUNC: None +% +% WARNINGS: There is no syntax checking on input or output. +% +% TEST(S): By hand, against expected values. +% +% AUTOR: Jan H. Mikkelsen / Arne Norre Ekstrøm +% EMAIL: hmi@kom.auc.dk / aneks@kom.auc.dk +% +% $Id: make_increment.m,v 1.6 1997/09/22 11:39:34 aneks Exp $ + +% IN THIS PEACE OF CODE THE SYNTAX CHECKING IS MINIMAL +% THIS HAS BEEN CHOSEN TO AVOID THE OVERHEAD. RECALL THAT +% THIS CODE IS EXECUTED EACH TIME A BURST IS RECEIVED. + +% FIND THE NUMBER OF SYMBOLS THAT WE HAVE +% +[M,Lh]=size(SYMBOLS); + +% INITIALIZE THE INCREMENT MATRIX +% +INCREMENT=zeros(M); + +% RECALL THAT THE I SEQUENCE AS IT IS STORED IN STORED AS: +% [ I(n-1) I(n-2) I(n-3) ... I(n-Lh) ] +% +% ALSO RECALL THAT Rhh IS STORED AS: +% [ Rhh(1) Rhh(2) Rhh(3) ... Rhh(Lh) ] +% +% THE FORMULA TO USE IS: +% INCREMENT(n,m) +% = +% real(conj(I(n))*(I(n-Lh)*Rhh(Lh)+I(n-Lh+1)*Rhh(Lh-1)+...+I(n-1)*Rhh(1)) +% +% THEY CAN THUS BE MULTIPLIED DIRECTLY WITH EACH OTHER + +% LOOP OVER THE STATES, AS FOUND IN THE ROWS IN SYMBOLS. +% +for n=1:M, + % ONLY TWO LEGAL NEXT STATES EXIST, SO THE LOOP IS UNROLLED + % + m=NEXT(n,1); + + INCREMENT(n,m)=real((conj(SYMBOLS(m,1))*SYMBOLS(n,:))*Rhh(2:Lh+1).'); + m=NEXT(n,2); + + INCREMENT(n,m)=real((conj(SYMBOLS(m,1))*SYMBOLS(n,:))*Rhh(2:Lh+1).'); +end + diff --git a/viterbi_generator/tests/utils/make_next.m b/viterbi_generator/tests/utils/make_next.m new file mode 100644 index 0000000..f5af8dc --- /dev/null +++ b/viterbi_generator/tests/utils/make_next.m @@ -0,0 +1,54 @@ +function [ NEXT ] = make_next(SYMBOLS) +% +% MAKE_NEXT: +% This function returns a lookuptable containing a mapping +% between the present state and the legal next states. +% Each row correspond to a state, and the two legal states +% related to state n is located in NEXT(n,1) and in +% NEXT(n,2). States are represented by their related +% numbers. +% +% SYNTAX: [ NEXT ] = make_next(SYMBOLS) +% +% INPUT: SYMBOLS: The table of symbols corresponding the the state- +% numbers. +% +% OUTPUT: NEXT: The transition table describing the legal next +% states asdescribed above. +% +% SUB_FUNC: None +% +% WARNINGS: None +% +% TEST(S): The function has been verified to return the expected +% results. +% +% AUTOR: Jan H. Mikkelsen / Arne Norre Ekstrøm +% EMAIL: hmi@kom.auc.dk / aneks@kom.auc.dk +% +% $Id: make_next.m,v 1.3 1997/09/22 08:13:29 aneks Exp $ + +% FIRST WE NEED TO FIND THE NUMBER OF LOOPS WE SHOULD RUN. +% THIS EQUALS THE NUMBER OF SYMBOLS. ALSO MAXSUM IS NEEDED FOR +% LATER OPERATIONS. +% +[ states , maxsum ]=size(SYMBOLS); + +search_matrix=SYMBOLS(:,2:maxsum); +maxsum=maxsum-1; + +% LOOP OVER THE SYMBOLS. +% +for this_state=1:states, + search_vector=SYMBOLS(this_state,1:maxsum); + k=0; + for search=1:states, + if (sum(search_matrix(search,:)==search_vector)==maxsum) + k=k+1; + NEXT(this_state,k)=search; + if k > 2, + error('Error: identified too many next states'); + end + end + end +end
\ No newline at end of file diff --git a/viterbi_generator/tests/utils/make_previous.m b/viterbi_generator/tests/utils/make_previous.m new file mode 100644 index 0000000..678fa43 --- /dev/null +++ b/viterbi_generator/tests/utils/make_previous.m @@ -0,0 +1,54 @@ +function [ PREVIOUS ] = make_previous(SYMBOLS) +% +% MAKE_PREVIOUS: +% This function returns a lookuptable containing a mapping +% between the present state and the legal previous states. +% Each row correspond to a state, and the two legal states +% related to state n is located in PREVIOUS(n,1) and in +% previous(n,2). States are represented by their related +% numbers. +% +% SYNTAX: [ PREVIOUS ] = make_previous(SYMBOLS) +% +% INPUT: SYMBOLS: The table of symbols corresponding the the state- +% numbers. +% +% OUTPUT: PREVIOUS: +% The transition table describing the legal previous +% states asdescribed above. +% +% SUB_FUNC: None +% +% WARNINGS: None +% +% TEST(S): Verified against expected result. +% +% AUTOR: Jan H. Mikkelsen / Arne Norre Ekstrøm +% EMAIL: hmi@kom.auc.dk / aneks@kom.auc.dk +% +% $Id: make_previous.m,v 1.3 1997/09/22 08:14:27 aneks Exp $ + +% FIRST WE NEED TO FIND THE NUMBER OF LOOPS WE SHOULD RUN. +% THIS EQUALS THE NUMBER OF SYMBOLS. ALSO MAXSUM IS NEEDED FOR +% LATER OPERATIONS. +% +[ states , maxsum ]=size(SYMBOLS); + +maxsum=maxsum-1; +search_matrix=SYMBOLS(:,1:maxsum); + +% LOOP OVER THE SYMBOLS. +% +for this_state=1:states, + search_vector=SYMBOLS(this_state,2:maxsum+1); + k=0; + for search=1:states, + if (sum(search_matrix(search,:)==search_vector)==maxsum) + k=k+1; + PREVIOUS(this_state,k)=search; + if k > 2, + error('Error: identified too many previous states'); + end + end + end +end
\ No newline at end of file diff --git a/viterbi_generator/tests/utils/make_start.m b/viterbi_generator/tests/utils/make_start.m new file mode 100644 index 0000000..83275fd --- /dev/null +++ b/viterbi_generator/tests/utils/make_start.m @@ -0,0 +1,63 @@ +function [ START ] = make_start(Lh,SYMBOLS) +% +% MAKE_START: +% This code returns a statenumber corresponding to the start +% state as it is found from Lh. The method is to use the table +% of symbolic start states as it is listed in the report made +% by 95gr870T. For the table lookups are made in SYMBOLS. in +% order to map from the symbol representation to the state number +% representation. +% +% SYNTAX: [ START ] = make_start(Lh,SYMBOLS) +% +% INPUT: SYMBOLS: The table of symbols corresponding the the state- +% numbers. +% Lh: Length of the estimated impulseresponse. +% +% OUTPUT: START: The number representation of the legal start state. +% +% SUB_FUNC: None +% +% WARNINGS: The table of symbolic representations has not been verified +% but is used directly as it is listed in the report made +% by 95gr870T. +% +% TEST(S): The function has been verified to return a state number +% which matches the symbolic representation. +% +% AUTOR: Jan H. Mikkelsen / Arne Norre Ekstrøm +% EMAIL: hmi@kom.auc.dk / aneks@kom.auc.dk +% +% $Id: make_start.m,v 1.2 1997/09/22 11:40:17 aneks Exp $ + +% WE HAVEN'T FOUND IT YET. +% +START_NOT_FOUND = 1; + +% OBTAIN THE SYMBOLS FROM Lh. THIS IS THE TABLE LISTED IN THE REPORT MADE +% BY 95gr870T. (SATEREPRESENTATION IS SLIGHTLY CHANGED). +% +if Lh==1, + start_symbols = [ 1 ]; +elseif Lh==2, + start_symbols = [ 1 -j ]; +elseif Lh==3, + start_symbols = [ 1 -j -1 ]; +elseif Lh==4, + start_symbols = [ 1 -j -1 j ]; +elseif Lh==5, + start_symbols = [ 1 -j -1 j 1]; +else + fprintf('\n\nError: Illegal value of Lh, terminating...'); +end + +% NOW MAP FROM THE SYMBOLS TO A STATE NUMBER BY SEARCHING +% SYMBOLS. +% +START=0; +while START_NOT_FOUND, + START=START+1; + if sum(SYMBOLS(START,:)==start_symbols)==Lh, + START_NOT_FOUND=0; + end +end diff --git a/viterbi_generator/tests/utils/make_stops.m b/viterbi_generator/tests/utils/make_stops.m new file mode 100644 index 0000000..98734c9 --- /dev/null +++ b/viterbi_generator/tests/utils/make_stops.m @@ -0,0 +1,67 @@ +function [ STOPS ] = make_stops(Lh,SYMBOLS) +% +% MAKE_STOPS: +% This code returns a statenumber corresponding to the set of +% legal stop states as found from Lh. The method is to use the table +% of symbolic stop states as it is listed in the report made +% by 95gr870T. For the table lookups are made in SYMBOLS. in +% order to map from the symbol representation to the state number +% representation. +% +% SYNTAX: [ STOPS ] = make_stops(Lh,SYMBOLS) +% +% INPUT: SYMBOLS: The table of symbols corresponding the the state- +% numbers. +% Lh: Length of the estimated impulseresponse. +% +% OUTPUT: STOPS: The number representation of the set of legal stop +% states. +% +% SUB_FUNC: None +% +% WARNINGS: The table of symbolic representations has not been verified +% but is used directly as it is listed in the report made +% by 95gr870T. +% +% TEST(S): The function has been verified to return a state number +% which matches the symbolic representation. +% +% AUTOR: Jan H. Mikkelsen / Arne Norre Ekstrøm +% EMAIL: hmi@kom.auc.dk / aneks@kom.auc.dk +% +% $Id: make_stops.m,v 1.2 1997/09/22 11:44:21 aneks Exp $ + +% OBTAIN THE SYMBOLS FROM Lh. THIS IS THE TABLE LISTED IN THE REPORT MADE +% BY 95gr870T. (SATEREPRESENTATION IS SLIGHTLY CHANGED). +% +if Lh==1, + stop_symbols = [ -1 ]; + count=1; +elseif Lh==2, + stop_symbols = [ -1 j ]; + count=1; +elseif Lh==3, + stop_symbols = [ -1 j 1 ]; + count=1; +elseif Lh==4, + stop_symbols = [ [ -1 j 1 j ] ; [ -1 j 1 -j ] ]; + count=2; +elseif Lh==5, + stop_symbols = [ [ -1 j 1 j -1] ; [ -1 j 1 -j -1] ; [ -1 j 1 j 1] ; [ -1 j 1 -j 1] ]; + count=2; +else + fprintf('\n\nError: Illegal value of Lh, terminating...'); +end + +% NOW THAT WE HAVE THE SYMBOL REPRESENTATION THE REMAINING JOB IS +% TO MAP THE MSK SYMBOLS TO STATE NUMBERS +% +index = 0; +stops_found=0; +while stops_found < count, + index=index+1; + if sum(SYMBOLS(index,:)==stop_symbols(stops_found+1,:))==Lh, + stops_found=stops_found+1; + STOPS(stops_found)=index; + end +end diff --git a/viterbi_generator/tests/utils/viterbi_detector.m b/viterbi_generator/tests/utils/viterbi_detector.m new file mode 100644 index 0000000..31e8f93 --- /dev/null +++ b/viterbi_generator/tests/utils/viterbi_detector.m @@ -0,0 +1,218 @@ +function [ rx_burst METRIC] = viterbi_detector(SYMBOLS,NEXT,PREVIOUS,START,STOPS,Y,Rhh) +% +% VITERBI_DETECTOR: +% This matlab code does the actual detection of the +% received sequence. As indicated by the name the algorithm +% is the viterbi algorithm, which is a MLSE. At this time +% the approch is to use Ungerboecks modified algorithm, and +% to return hard output only. +% +% SYNTAX: [ rx_burst ] +% = +% viterbi_detector(SYMBOLS,NEXT,PREVIOUS,START,STOPS,Y,Rhh) +% +% INPUT: SYMBOLS: The table of symbols corresponding the the state- +% numbers. Format as made by make_symbols.m +% NEXT: A transition table containing the next legal +% states, as it is generated by the code make_next.m +% PREVIOUS: The transition table describing the legal previous +% states as generated by make_previous.m +% START: The start state of the algorithm. +% STOPS: The legal stop states. +% Y: Complex baseband representation of the matched +% filtered and down converted received signal, as it +% is returned by mf.m +% Rhh: The autocorrelation as estimated by mf.m +% +% OUTPUT: rx_burst: The most likely sequence of symbols. +% +% SUB_FUNC: make_increment +% +% WARNINGS: None. +% +% TEST(S): Tested with no noise, perfect syncronization, and channel +% estimation/filtering. (Refer to viterbi_ill.m) +% +% AUTOR: Jan H. Mikkelsen / Arne Norre Ekstrøm +% EMAIL: hmi@kom.auc.dk / aneks@kom.auc.dk +% +% $Id: viterbi_detector.m,v 1.7 1997/11/18 12:41:26 aneks Exp $ + +% KNOWLEDGE OF Lh AND M IS NEEDED FOR THE ALGORITHM TO OPERATE +% +[ M , Lh ] = size(SYMBOLS); + +% THE NUMBER OF STEPS IN THE VITERBI +% +STEPS=length(Y); +% INITIALIZE TABLES (THIS YIELDS A SLIGHT SPEEDUP). +% +METRIC = zeros(M,STEPS); +SURVIVOR = zeros(M,STEPS); + +% DETERMINE PRECALCULATABLE PART OF METRIC +% +INCREMENT=make_increment(SYMBOLS,NEXT,Rhh); +%INCREMENT +% THE FIRST THING TO DO IS TO ROLL INTO THE ALGORITHM BY SPREADING OUT +% FROM THE START STATE TO ALL THE LEGAL STATES. +% +PS=START; + +% NOTE THAT THE START STATE IS REFERRED TO AS STATE TO TIME 0 +% AND THAT IT HAS NO METRIC. +% +S=NEXT(START,1); + +METRIC(S,1)=real(conj(SYMBOLS(S,1))*Y(1))-INCREMENT(PS,S); +SURVIVOR(S,1)=START; + +S=NEXT(START,2); +METRIC(S,1)=real(conj(SYMBOLS(S,1))*Y(1))-INCREMENT(PS,S); +SURVIVOR(S,1)=START; + +PREVIOUS_STATES=NEXT(START,:); + +% MARK THE NEXT STATES AS REAL. N.B: COMPLEX INDICATES THE POLARITY +% OF THE NEXT STATE, E.G. STATE 2 IS REAL. +% +COMPLEX=0; + +for N = 2:Lh, + if COMPLEX, + COMPLEX=0; + else + COMPLEX=1; + end + STATE_CNTR=0; + for PS = PREVIOUS_STATES, + STATE_CNTR=STATE_CNTR+1; + S=NEXT(PS,1); + METRIC(S,N)=METRIC(PS,N-1)+real(conj(SYMBOLS(S,1))*Y(N))-INCREMENT(PS,S); + SURVIVOR(S,N)=PS; + USED(STATE_CNTR)=S; + STATE_CNTR=STATE_CNTR+1; + S=NEXT(PS,2); + METRIC(S,N)=METRIC(PS,N-1)+real(conj(SYMBOLS(S,1))*Y(N))-INCREMENT(PS,S); + SURVIVOR(S,N)=PS; + USED(STATE_CNTR)=S; + end + PREVIOUS_STATES=USED; +end +% AT ANY RATE WE WILL HAVE PROCESSED Lh STATES AT THIS TIME +% +PROCESSED=Lh; + +% WE WANT AN EQUAL NUMBER OF STATES TO BE REMAINING. THE NEXT LINES ENSURE +% THIS. +% + +if ~COMPLEX, + COMPLEX=1; + PROCESSED=PROCESSED+1; + N=PROCESSED; + for S = 2:2:M, + PS=PREVIOUS(S,1); + M1=METRIC(PS,N-1)+real(conj(SYMBOLS(S,1))*Y(N)-INCREMENT(PS,S)); + PS=PREVIOUS(S,2); + M2=METRIC(PS,N-1)+real(conj(SYMBOLS(S,1))*Y(N)-INCREMENT(PS,S)); + if M1 > M2, + METRIC(S,N)=M1; + SURVIVOR(S,N)=PREVIOUS(S,1); + else + METRIC(S,N)=M2; + SURVIVOR(S,N)=PREVIOUS(S,2); + end + end +end + +% NOW THAT WE HAVE MADE THE RUN-IN THE REST OF THE METRICS ARE +% CALCULATED IN THE STRAIGHT FORWARD MANNER. OBSERVE THAT ONLY +% THE RELEVANT STATES ARE CALCULATED, THAT IS REAL FOLLOWS COMPLEX +% AND VICE VERSA. +% +N=PROCESSED+1; +while N <= STEPS, + for S = 1:2:M-1, + PS=PREVIOUS(S,1); + M1=METRIC(PS,N-1)+real(conj(SYMBOLS(S,1))*Y(N)-INCREMENT(PS,S)); + PS=PREVIOUS(S,2); + M2=METRIC(PS,N-1)+real(conj(SYMBOLS(S,1))*Y(N)-INCREMENT(PS,S)); + if M1 > M2, + METRIC(S,N)=M1; + SURVIVOR(S,N)=PREVIOUS(S,1); + else + METRIC(S,N)=M2; + SURVIVOR(S,N)=PREVIOUS(S,2); + end + end + N=N+1; + for S = 2:2:M, + PS=PREVIOUS(S,1); + M1=METRIC(PS,N-1)+real(conj(SYMBOLS(S,1))*Y(N)-INCREMENT(PS,S)); + PS=PREVIOUS(S,2); + M2=METRIC(PS,N-1)+real(conj(SYMBOLS(S,1))*Y(N)-INCREMENT(PS,S)); + if M1 > M2, + METRIC(S,N)=M1; + SURVIVOR(S,N)=PREVIOUS(S,1); + else + METRIC(S,N)=M2; + SURVIVOR(S,N)=PREVIOUS(S,2); + end + end + N=N+1; +end + + +% HAVING CALCULATED THE METRICS, THE MOST PROBABLE STATESEQUENCE IS +% INITIALIZED BY CHOOSING THE HIGHEST METRIC AMONG THE LEGAL STOP +% STATES. +% +BEST_LEGAL=0; +for FINAL = STOPS, + if METRIC(FINAL,STEPS) > BEST_LEGAL, + S=FINAL; + BEST_LEGAL=METRIC(FINAL,STEPS); + end +end + +% UNCOMMENT FOR TEST OF METRIC +% +% METRIC +% BEST_LEGAL +% S +% pause + +% HAVING FOUND THE FINAL STATE, THE MSK SYMBOL SEQUENCE IS ESTABLISHED +% + +IEST(STEPS)=SYMBOLS(S,1); +N=STEPS-1; +while N > 0, + +% if(N>STEPS-40), +% previo=ceil(S/2) +% end + S=SURVIVOR(S,N+1); + IEST(N)=SYMBOLS(S,1); + N=N-1; +end + +% THE ESTIMATE IS NOW FOUND FROM THE FORMULA: +% IEST(n)=j*rx_burst(n)*rx_burst(n-1)*IEST(n-1) +% THE FORMULA IS REWRITTEN AS: +% rx_burst(n)=IEST(n)/(j*rx_burst(n-1)*IEST(n-1)) +% FOR INITIALIZATION THE FOLLOWING IS USED: +% IEST(0)=1 og rx_burst(0)=1 +% +rx_burst(1)=IEST(1)/(j*1*1); +for n = 2:STEPS, + rx_burst(n)=IEST(n)/(j*rx_burst(n-1)*IEST(n-1)); +end + +% rx_burst IS POLAR (-1 AND 1), THIS TRANSFORMS IT TO +% BINARY FORM (0 AND 1). +% + +rx_burst=(rx_burst+1)./2; + diff --git a/viterbi_generator/tests/utils/viterbi_init.m b/viterbi_generator/tests/utils/viterbi_init.m new file mode 100644 index 0000000..a43b801 --- /dev/null +++ b/viterbi_generator/tests/utils/viterbi_init.m @@ -0,0 +1,38 @@ +function [ SYMBOLS , PREVIOUS , NEXT , START , STOPS ] = viterbi_init(Lh) +% VITERBI_INIT: +% This function returns the tables which are used by the +% viterbi demodulator which is implemented in the GSMsim +% package. +% +% SYNTAX: [ SYMBOLS , PREVIOUS , NEXT , START , STOPS ] +% = +% viterbi_init(Lh) +% +% INPUT: Lh: The length of the channel impulse response +% minus one. +% +% OUTPUT: SYMBOLS: Statenumber to MSK-symbols mapping table. +% PREVIOUS: This state to legal previous state mapping table. +% NEXT: This state to legal next state mapping table. +% START: The start state of the viterbi algorithm. +% STOPS: The set of legal stop states for the viterbi +% algorithm. +% +% GLOBAL: None +% +% SUB_FUNC: make_symbols,make_previous,make_next,make_start,make_stops +% +% WARNINGS: None +% +% TEST: Verified that the function actually runs the subfunctions. +% +% AUTHOR: Jan H. Mikkelsen / Arne Norre Ekstrøm +% EMAIL: hmi@kom.auc.dk / aneks@kom.auc.dk +% +% $Id: viterbi_init.m,v 1.4 1998/02/12 10:52:15 aneks Exp $ + +SYMBOLS = make_symbols(Lh); +PREVIOUS = make_previous(SYMBOLS); +NEXT = make_next(SYMBOLS); +START = make_start(Lh,SYMBOLS); +STOPS = make_stops(Lh,SYMBOLS); diff --git a/viterbi_generator/utils/lower_utils/equations_gen.m b/viterbi_generator/utils/lower_utils/equations_gen.m new file mode 100644 index 0000000..af7d37e --- /dev/null +++ b/viterbi_generator/utils/lower_utils/equations_gen.m @@ -0,0 +1,124 @@ +function [increment, pm_candidates_imag, pm_candidates_real]= equations_gen(Lh) + + ########################################################################### + # Copyright (C) 2008 by Piotr Krysik # + # pkrysik@stud.elka.pw.edu.pl # + # # + # 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 3 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. # + ########################################################################### + +INCREMENT_NUM=2**(Lh-1); + +SYMBOLS = make_symbols(Lh); +PREVIOUS = generate_previous(Lh); + +load tests/data/rhh.dat + +[INCREMENT NUMBERS] = generate_increment(SYMBOLS,PREVIOUS); + +function_real="real"; +function_imag="imag"; +sign=""; +fction=""; +equation_num=""; +increment = { }; +equation=""; + +for equation_num=1:INCREMENT_NUM, + for part_num=1:Lh, + coefficient=INCREMENT(equation_num,part_num); + if(coefficient==1 || coefficient==-1), + fction=function_real; + else + fction=function_imag; + coefficient=coefficient*j; + end + + if(coefficient==1 && part_num != 1), + sign="+"; + elseif(coefficient==-1), + sign="-"; + else + sign=""; + end + + equation = [equation " " sign "rhh[" int2str(part_num) "]." fction "()" ]; + end + + increment(equation_num) = ["increment[" int2str(equation_num-1) "] =" equation]; + equation=""; +end + + +BRANCH_NUM=2**(Lh+1); + + +%make path metrics +pm_candidates_real={}; +pm_candidates_imag={}; +for symbol_num=1:BRANCH_NUM, + + inc1_num=NUMBERS(PREVIOUS(symbol_num,1),symbol_num); + inc2_num=NUMBERS(PREVIOUS(symbol_num,2),symbol_num); + + symbol=SYMBOLS(symbol_num,1); + + if(inc1_num<0) + inc1_sign="+"; + inc1_num=-inc1_num; + else + inc1_sign="-"; + end + + if(inc2_num<0) + inc2_sign="+"; + inc2_num=-inc2_num; + else + inc2_sign="-"; + end + + inc1_num=inc1_num-1; + inc2_num=inc2_num-1; + + if(symbol==1 || symbol==-1), + fction=function_real; + else + fction=function_imag; + symbol=symbol*(-j); + end + + if(symbol==1), + symbol_sign="+"; + else + symbol_sign="-"; + end + + branch_metric1=[" " symbol_sign " input_symbol_" fction " " inc1_sign " increment[" int2str(inc1_num) "]" ]; + branch_metric2=[" " symbol_sign " input_symbol_" fction " " inc2_sign " increment[" int2str(inc2_num) "]" ]; + + num = ceil((symbol_num)/2); + prev1_num = ceil((PREVIOUS(symbol_num,1))/2)-1; + prev2_num = ceil((PREVIOUS(symbol_num,2))/2)-1; + + if(mod(symbol_num,2)==1), + pm_candidates_imag(num, 1)=[ "pm_candidate1 = old_path_metrics[" int2str(prev1_num) "]" branch_metric1 ]; + pm_candidates_imag(num, 2)=[ "pm_candidate2 = old_path_metrics[" int2str(prev2_num) "]" branch_metric2 ]; + else + pm_candidates_real(num, 1)=[ "pm_candidate1 = old_path_metrics[" int2str(prev1_num) "]" branch_metric1 ]; + pm_candidates_real(num, 2)=[ "pm_candidate2 = old_path_metrics[" int2str(prev2_num) "]" branch_metric2 ]; + end +end + diff --git a/viterbi_generator/utils/lower_utils/generate_increment.m b/viterbi_generator/utils/lower_utils/generate_increment.m new file mode 100644 index 0000000..9575796 --- /dev/null +++ b/viterbi_generator/utils/lower_utils/generate_increment.m @@ -0,0 +1,72 @@ +function [INCREMENT NUMBERS] = generate_increment(SYMBOLS,PREVIOUS)%,Rhh) + + ########################################################################### + # Copyright (C) 2008 by Piotr Krysik # + # pkrysik@stud.elka.pw.edu.pl # + # # + # 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 3 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. # + ########################################################################### + +MSK_STATES_NUM=4; % 1,-1,j,-j +[POSIBLE_SEQ_NUM,Lh]=size(SYMBOLS); +INCREMENT_NUM=2**(Lh-1); +%Lh - channel memory length +%POSIBLE_SEQ_NUM - number of posible sequences of MSK symbols (1,-1,j,-j) for given Lh + +%INCREMENT=zeros(2,Lh,POSIBLE_SEQ_NUM/8); + +% Rhh IS STORED AS: +% [ Rhh(1) Rhh(2) Rhh(3) ... Rhh(Lh) ] +INCREMENT=zeros(INCREMENT_NUM, Lh); + +for n=1:POSIBLE_SEQ_NUM, + % ONLY TWO LEGAL PREVIOUS STATES EXIST, SO THE LOOP IS UNROLLED + m=PREVIOUS(n,1); + vector=[conj(SYMBOLS(n,1))* SYMBOLS(m,:)]; + number=complex_vect2number(vector); + if(number>0) + INCREMENT(number,:)=vector; + end + + NUMBERS(m,n)=number; + + m=PREVIOUS(n,2); + vector=[conj(SYMBOLS(n,1))* SYMBOLS(m,:)]; + number=complex_vect2number(vector); + if(number>0) + INCREMENT(number,:)=vector; + end + NUMBERS(m,n)=number; +end + +%test_inc=zeros(2**(Lh+1),2**(Lh+1)); +%for n=1:2**(Lh+1), +% for m=1:2**(Lh+1), +% number=NUMBERS(m,n); + +% if(number!=0) +% sign=1; +% if(number<0), +% sign=-1; +% number=-number; +% end +% test_inc(m,n)=real(sign*INCREMENT(number,:)*Rhh(2:Lh+1).'); +% end +% end +%end +%INCREMENT +%test_inc +%NUMBERS diff --git a/viterbi_generator/utils/lower_utils/lower_utils/complex_vect2number.m b/viterbi_generator/utils/lower_utils/lower_utils/complex_vect2number.m new file mode 100644 index 0000000..f0d6d25 --- /dev/null +++ b/viterbi_generator/utils/lower_utils/lower_utils/complex_vect2number.m @@ -0,0 +1,44 @@ +function [ number ] = complex_vect2number(vector) + + ########################################################################### + # Copyright (C) 2008 by Piotr Krysik # + # pkrysik@stud.elka.pw.edu.pl # + # # + # 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 3 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. # + ########################################################################### + +% Change complex vector of values: 1,-1 or j,-j +% into a integer number. + + number=0; + [r,Lh] = size(vector); + for l=1:Lh, + position=2**(l-1); + if(vector(l)==1), + number=number+position*(1); + elseif(vector(l)==-1), + number=number+position*(-1); + elseif(vector(l)==-j), + number=number+position*(1); + elseif(vector(l)==j), + number=number+position*(-1); + end + end + if number < 0, + number=floor(number/2); + else + number=ceil(number/2); + end diff --git a/viterbi_generator/utils/lower_utils/lower_utils/generate_previous.m b/viterbi_generator/utils/lower_utils/lower_utils/generate_previous.m new file mode 100644 index 0000000..942c4dc --- /dev/null +++ b/viterbi_generator/utils/lower_utils/lower_utils/generate_previous.m @@ -0,0 +1,35 @@ +function [ PREVIOUS ] = generate_previous(Lh) + + ########################################################################### + # Copyright (C) 2008 by Piotr Krysik # + # pkrysik@stud.elka.pw.edu.pl # + # # + # 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 3 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. # + ########################################################################### + +SYMBOLS_NUM = 2**(Lh+1); +n=1; +for i=1:4:SYMBOLS_NUM, + PREVIOUS(i,1) = n+1; + PREVIOUS(i,2) = n+SYMBOLS_NUM/2+1; + PREVIOUS(i+1,1) = n; + PREVIOUS(i+1,2) = n+SYMBOLS_NUM/2; + PREVIOUS(i+2,1) = n+1; + PREVIOUS(i+2,2) = n+SYMBOLS_NUM/2+1; + PREVIOUS(i+3,1) = n; + PREVIOUS(i+3,2) = n+SYMBOLS_NUM/2; + n=n+2; +end diff --git a/viterbi_generator/utils/lower_utils/lower_utils/make_symbols.m b/viterbi_generator/utils/lower_utils/lower_utils/make_symbols.m new file mode 100644 index 0000000..3849fbd --- /dev/null +++ b/viterbi_generator/utils/lower_utils/lower_utils/make_symbols.m @@ -0,0 +1,35 @@ +function [ SYMBOLS ] = make_symbols(Lh) + + ########################################################################### + # Copyright (C) 2008 by Piotr Krysik # + # pkrysik@stud.elka.pw.edu.pl # + # # + # 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 3 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. # + ########################################################################### + +BRANCH_NUM=2**(Lh+1); +SYMBOLS=ones(BRANCH_NUM, Lh); + +for column=1:Lh, + for i=1:(2**column), + SYMBOLS(i:(2**(column+1)):BRANCH_NUM,column)=-1; + end + +end + +SYMBOLS(1:2:BRANCH_NUM, 1:2:Lh) = SYMBOLS(1:2:BRANCH_NUM, 1:2:Lh).*(-j); +SYMBOLS(2:2:BRANCH_NUM, 2:2:Lh) = SYMBOLS(2:2:BRANCH_NUM, 2:2:Lh).*(-j); + diff --git a/viterbi_generator/utils/viterbi_generator.m b/viterbi_generator/utils/viterbi_generator.m new file mode 100644 index 0000000..f9a9621 --- /dev/null +++ b/viterbi_generator/utils/viterbi_generator.m @@ -0,0 +1,305 @@ +function [viterbi_detector] = viterbi_generator(Lh, varargin) + + ########################################################################### + # Copyright (C) 2008 by Piotr Krysik # + # pkrysik@stud.elka.pw.edu.pl # + # # + # 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 3 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. # + ########################################################################### + +if(nargin!=1 && nargin !=3), + printf("Bad number of arguments in viterbi_generator(...)"); + exit(1) +elseif(nargin==1) + print_matrix_type=""; + print_path_metrics=""; +elseif(nargin==3) + %additional parameters for test + print_matrix_type=varargin{1}; + print_path_metrics=varargin{2}; +end + +INCREMENT_NUM=2**(Lh-1); +BRANCH_NUM=2**(Lh+1); +PATHS_NUM=2**(Lh); +PREVIOUS = generate_previous(Lh); + +[increment, pm_candidates_imag, pm_candidates_real] = equations_gen(Lh); + +function_interface_comment="\ +/*\n\ +** viterbi_detector:\n\ +** This part does the detection of received sequnece.\n\ +** Employed algorithm is viterbi Maximum Likehood Sequence Estimation.\n\ +** At this moment it gives hard decisions on the output, but\n\ +** it was designed with soft decisions in mind.\n\ +**\n\ +** SYNTAX: void viterbi_detector(\n\ +** const gr_complex * input, \n\ +** unsigned int samples_num, \n\ +** gr_complex * rhh, \n\ +** unsigned int start_state, \n\ +** const unsigned int * stop_states, \n\ +** unsigned int stops_num, \n\ +** float * output)\n\ +**\n\ +** INPUT: input: Complex received signal afted matched filtering.\n\ +** samples_num: Number of samples in the input table.\n\ +** rhh: The autocorrelation of the estimated channel \n\ +** impulse response.\n\ +** start_state: Number of the start point. In GSM each burst \n\ +** starts with sequence of three bits (0,0,0) which \n\ +** indicates start point of the algorithm.\n\ +** stop_states: Table with numbers of possible stop states.\n\ +** stops_num: Number of possible stop states\n\ +** \n\ +**\n\ +** OUTPUT: output: Differentially decoded hard output of the algorithm: \n\ +** -1 for logical \"0\" and 1 for logical \"1\"\n\ +**\n\ +** SUB_FUNC: none\n\ +**\n\ +** TEST(S): Tested with real world normal burst.\n\ +*/\n\n"; + +beginning=[ "\ +#include <gnuradio/gr_complex.h>\n\ +#define BURST_SIZE 148\n\ +#define PATHS_NUM " int2str(PATHS_NUM) "\n\ +\n\ +void viterbi_detector(const gr_complex * input, unsigned int samples_num, gr_complex * rhh, unsigned int start_state, const unsigned int * stop_states, unsigned int stops_num, float * output)\n\ +{\n\ + float increment[" int2str(INCREMENT_NUM) "];\n\ + float path_metrics1[" int2str(PATHS_NUM) "];\n\ + float path_metrics2[" int2str(PATHS_NUM) "];\n\ + float * new_path_metrics;\n\ + float * old_path_metrics;\n\ + float * tmp;\n\ + float trans_table[BURST_SIZE][" int2str(PATHS_NUM) "];\n\ + float pm_candidate1, pm_candidate2;\n\ + bool real_imag;\n\ + float input_symbol_real, input_symbol_imag;\n\ + unsigned int i, sample_nr;\n\n" ]; + + + +start_point_comment="\ +/*\n\ +* Setup first path metrics, so only state pointed by start_state is possible.\n\ +* Start_state metric is equal to zero, the rest is written with some very low value,\n\ +* which makes them practically impossible to occur.\n\ +*/\n"; + +start_point=[ "\ + for(i=0; i<PATHS_NUM; i++){\n\ + path_metrics1[i]=(-10e30);\n\ + }\n\ + path_metrics1[start_state]=0;\n\n" ]; + + + +increment_comment="\ +/*\n\ +* Compute Increment - a table of values which does not change for subsequent input samples.\n\ +* Increment is table of reference levels for computation of branch metrics:\n\ +* branch metric = (+/-)received_sample (+/-) reference_level\n\ +*/\n"; + +increment_block=""; +for i=1:INCREMENT_NUM, + increment_block = [increment_block sprintf(" %s;\n",increment(i))]; +end + + + +path_metrics_comment="\n\n\ +/*\n\ +* Computation of path metrics and decisions (Add-Compare-Select).\n\ +* It's composed of two parts: one for odd input samples (imaginary numbers)\n\ +* and one for even samples (real numbers).\n\ +* Each part is composed of independent (parallelisable) statements like \n\ +* this one:\n\ +* pm_candidate1 = old_path_metrics[0] - input_symbol_real - increment[7];\n\ +* pm_candidate2 = old_path_metrics[8] - input_symbol_real + increment[0];\n\ +* if(pm_candidate1 > pm_candidate2){\n\ +* new_path_metrics[0] = pm_candidate1;\n\ +* trans_table[sample_nr][0] = -1.0;\n\ +* }\n\ +* else{\n\ +* new_path_metrics[0] = pm_candidate2;\n\ +* trans_table[sample_nr][0] = 1.0;\n\ +* }\n\ +* This is very good point for optimisations (SIMD or OpenMP) as it's most time \n\ +* consuming part of this function. \n\ +*/\n"; + +path_metrics_block=" sample_nr=0;\n"; + +path_metrics_block=[path_metrics_block " old_path_metrics=path_metrics1;\n"]; +path_metrics_block=[path_metrics_block " new_path_metrics=path_metrics2;\n"]; + +path_metrics_block=[path_metrics_block "\ + while(sample_nr<samples_num){\n\ + //Processing imag states\n\ + real_imag=1;\n\ + input_symbol_imag = input[sample_nr].imag();\n"]; + + + for i=1:PATHS_NUM, + path_metrics_block=[path_metrics_block sprintf("\n %s;\n %s;\n", pm_candidates_imag(i, 1), pm_candidates_imag(i, 2)) ]; + + path_metrics_block=[path_metrics_block "\ + if(pm_candidate1 > pm_candidate2){\n\ + new_path_metrics[" int2str(i-1) "] = pm_candidate1;\n\ + trans_table[sample_nr][" int2str(i-1) "] = -1.0;\n\ + }\n\ + else{\n\ + new_path_metrics[" int2str(i-1) "] = pm_candidate2;\n\ + trans_table[sample_nr][" int2str(i-1) "] = 1.0;\n\ + }\n"]; + end + + path_metrics_block=[path_metrics_block print_path_metrics]; + %change new metrics into old metrics + path_metrics_block=[path_metrics_block " tmp=old_path_metrics;\n"]; + path_metrics_block=[path_metrics_block " old_path_metrics=new_path_metrics;\n"]; + path_metrics_block=[path_metrics_block " new_path_metrics=tmp;\n\n"]; + + path_metrics_block=[path_metrics_block " sample_nr++;\n"]; + path_metrics_block=[path_metrics_block " if(sample_nr==samples_num)\n break;\n\n"]; + path_metrics_block=[path_metrics_block " //Processing real states\n"]; + path_metrics_block=[path_metrics_block " real_imag=0;\n"]; + path_metrics_block=[path_metrics_block " input_symbol_real = input[sample_nr].real();\n"]; + for i=1:PATHS_NUM, + path_metrics_block=[path_metrics_block sprintf("\n %s;\n %s;\n", pm_candidates_real(i, 1), pm_candidates_real(i, 2)) ]; + path_metrics_block=[path_metrics_block "\ + if(pm_candidate1 > pm_candidate2){\n\ + new_path_metrics[" int2str(i-1) "] = pm_candidate1;\n\ + trans_table[sample_nr][" int2str(i-1) "] = -1.0;\n\ + }\n\ + else{\n\ + new_path_metrics[" int2str(i-1) "] = pm_candidate2;\n\ + trans_table[sample_nr][" int2str(i-1) "] = 1.0;\n\ + }\n"]; + end + path_metrics_block=[path_metrics_block print_path_metrics]; + %change new metrics into old metrics + path_metrics_block=[path_metrics_block " tmp=old_path_metrics;\n"]; + path_metrics_block=[path_metrics_block " old_path_metrics=new_path_metrics;\n"]; + path_metrics_block=[path_metrics_block " new_path_metrics=tmp;\n"]; + + path_metrics_block=[path_metrics_block "\n sample_nr++;\n"]; + +path_metrics_block=[path_metrics_block " }\n\n"]; + + + +find_best_stop_comment="\ +/*\n\ +* Find the best from the stop states by comparing their path metrics.\n\ +* Not every stop state is always possible, so we are searching in\n\ +* a subset of them.\n\ +*/\n"; + +find_best_stop=[ " unsigned int best_stop_state;\n"]; +find_best_stop=[ find_best_stop " float stop_state_metric, max_stop_state_metric;\n" ]; +find_best_stop=[ find_best_stop " best_stop_state = stop_states[0];\n"]; +find_best_stop=[ find_best_stop " max_stop_state_metric = old_path_metrics[best_stop_state];\n"]; +find_best_stop=[ find_best_stop " for(i=1; i< stops_num; i++){\n"]; +find_best_stop=[ find_best_stop " stop_state_metric = old_path_metrics[stop_states[i]];\n"]; +find_best_stop=[ find_best_stop " if(stop_state_metric > max_stop_state_metric){\n"]; +find_best_stop=[ find_best_stop " max_stop_state_metric = stop_state_metric;\n"]; +find_best_stop=[ find_best_stop " best_stop_state = stop_states[i];\n"]; +find_best_stop=[ find_best_stop " }\n"]; +find_best_stop=[ find_best_stop " }\n\n"]; + + + +parity_table_comment="\ +/*\n\ +* This table was generated with hope that it gives a litle speedup during\n\ +* traceback stage. \n\ +* Received bit is related to the number of state in the trellis.\n\ +* I've numbered states so their parity (number of ones) is related\n\ +* to a received bit. \n\ +*/\n"; + +parity_table=[" static const unsigned int parity_table[PATHS_NUM] = { "]; +for i=1:PATHS_NUM/4, + parity_table=[ parity_table "0, 1, 1, 0, " ]; %int2str(even_parity(i-1)) +end +parity_table=[ parity_table " };\n\n" ]; + + + +prev_table_comment="\ +/*\n\ +* Table of previous states in the trellis diagram.\n\ +* For GMSK modulation every state has two previous states.\n\ +* Example:\n\ +* previous_state_nr1 = prev_table[current_state_nr][0]\n\ +* previous_state_nr2 = prev_table[current_state_nr][1]\n\ +*/\n"; + +prev=ceil(PREVIOUS(1:2:2**(Lh+1),:)/2); +prev_table=[" static const unsigned int prev_table[PATHS_NUM][2] = { "]; +for i=1:PATHS_NUM, + prev_table=[ prev_table "{" int2str(prev(i,1)-1) "," int2str(prev(i,2)-1) "}, " ]; +end +prev_table=[ prev_table " };\n\n" ]; + + + +traceback_comment="\ +/*\n\ +* Traceback and differential decoding of received sequence.\n\ +* Decisions stored in trans_table are used to restore best path in the trellis.\n\ +*/\n"; + +traceback = [ " sample_nr=samples_num;\n"]; +traceback = [traceback " unsigned int state_nr=best_stop_state;\n"]; +traceback = [traceback " unsigned int decision;\n"]; +traceback = [traceback " bool out_bit=0;\n\n"]; +traceback = [traceback " while(sample_nr>0){\n" ]; +traceback = [traceback " sample_nr--;\n" ]; +traceback = [traceback " decision = (trans_table[sample_nr][state_nr]>0);\n\n" ]; + +traceback = [traceback " if(decision != out_bit)\n"]; +traceback = [traceback " output[sample_nr]=-trans_table[sample_nr][state_nr];\n" ]; +traceback = [traceback " else\n" ]; +traceback = [traceback " output[sample_nr]=trans_table[sample_nr][state_nr];\n\n" ]; + +traceback = [traceback " out_bit = out_bit ^ real_imag ^ parity_table[state_nr];\n" ]; +traceback = [traceback " state_nr = prev_table[state_nr][decision];\n" ]; +traceback = [traceback " real_imag = !real_imag;\n"]; +traceback = [traceback " }\n" ]; + + + +end_of_viterbi_detector = [ "}\n" ]; + +viterbi_detector=[function_interface_comment \ + beginning \ + start_point_comment start_point \ + increment_comment increment_block \ + path_metrics_comment print_matrix_type path_metrics_block \ + find_best_stop_comment find_best_stop \ + parity_table_comment parity_table \ + prev_table_comment prev_table \ + traceback_comment traceback \ + end_of_viterbi_detector]; + + diff --git a/wireshark/wireshark-wtap-gsm.patch b/wireshark/wireshark-wtap-gsm.patch new file mode 100644 index 0000000..c4db575 --- /dev/null +++ b/wireshark/wireshark-wtap-gsm.patch @@ -0,0 +1,372 @@ +Index: wsutil/encap_util.c +=================================================================== +--- wsutil/encap_util.c (revision 26844) ++++ wsutil/encap_util.c (working copy) +@@ -331,6 +331,8 @@ + { 214, WTAP_ENCAP_X2E_XORAYA }, + /* IEEE 802.15.4 Wireless PAN non-ASK PHY */ + { 215, WTAP_ENCAP_IEEE802_15_4_NONASK_PHY }, ++ { 2342, WTAP_ENCAP_GSMTAP_UM }, ++ { 2343, WTAP_ENCAP_GSMTAP_ABIS }, + + /* + * To repeat: +Index: epan/dissectors/packet-gsmtap.c +=================================================================== +--- epan/dissectors/packet-gsmtap.c (revision 0) ++++ epan/dissectors/packet-gsmtap.c (revision 0) +@@ -0,0 +1,256 @@ ++/* packet-gsmtap.c ++ * Routines for GSMTAP captures ++ * ++ * (C) 2008 by Harald Welte <laforge@gnumonks.org> ++ * ++ * Wireshark - Network traffic analyzer ++ * By Gerald Combs <gerald@wireshark.org> ++ * Copyright 1998 Gerald Combs ++ * ++ * 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. ++ * ++ */ ++ ++#ifdef HAVE_CONFIG_H ++# include "config.h" ++#endif ++ ++#include <glib.h> ++#include <epan/packet.h> ++#include <epan/prefs.h> ++ ++#include "packet-gsmtap.h" ++ ++static int proto_gsmtap = -1; ++ ++static int hf_gsmtap_version = -1; ++static int hf_gsmtap_hdrlen = -1; ++static int hf_gsmtap_type = -1; ++static int hf_gsmtap_timeslot = -1; ++static int hf_gsmtap_arfcn = -1; ++static int hf_gsmtap_noise_db = -1; ++static int hf_gsmtap_signal_db = -1; ++static int hf_gsmtap_frame_nr = -1; ++static int hf_gsmtap_burst_type = -1; ++static int hf_gsmtap_antenna = -1; ++ ++static gint ett_gsmtap = -1; ++ ++enum { ++ SUB_DATA = 0, ++ SUB_UM, ++ SUB_ABIS, ++ ++ SUB_MAX ++}; ++ ++typedef gboolean (*sub_checkfunc_t)(packet_info *); ++ ++static dissector_handle_t sub_handles[SUB_MAX]; ++ ++static const char *gsmtap_bursts[] = { ++ [GSMTAP_BURST_UNKNOWN] = "UNKNOWN", ++ [GSMTAP_BURST_FCCH] = "FCCH", ++ [GSMTAP_BURST_PARTIAL_SCH] = "PARTIAL_SCH", ++ [GSMTAP_BURST_SCH] = "SCH", ++ [GSMTAP_BURST_CTS_SCH] = "CTS_SCH", ++ [GSMTAP_BURST_COMPACT_SCH] = "COMPACT_SCH", ++ [GSMTAP_BURST_NORMAL] = "NORMAL", ++ [GSMTAP_BURST_DUMMY] = "DUMMY", ++ [GSMTAP_BURST_ACCESS] = "ACCESS", ++}; ++ ++static const char *gsmtap_get_burst(unsigned int burst_type) ++{ ++ const char *desc = "UNSUPPORTED"; ++ ++ if (burst_type >= sizeof(gsmtap_bursts)/sizeof(const char *)) ++ return desc; ++ if (gsmtap_bursts[burst_type] == NULL) ++ return desc; ++ ++ return gsmtap_bursts[burst_type]; ++} ++ ++static const char *gsmtap_get_type(int type) ++{ ++ const char *desc; ++ ++ switch (type) { ++ case GSMTAP_TYPE_UM: ++ desc = "GSM Um (MS<->BTS)"; ++ break; ++ case GSMTAP_TYPE_ABIS: ++ desc = "GSM Abis (BTS<->BSC)"; ++ break; ++ case GSMTAP_TYPE_UM_BURST: ++ desc = "GSM Um burst (BTS<->BSC)"; ++ break; ++ default: ++ desc = "<unknown type>"; ++ break; ++ } ++ ++ return desc; ++} ++ ++static void ++dissect_gsmtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ++{ ++ int sub_handle, len, offset = 0; ++ proto_item *ti; ++ proto_tree *gsmtap_tree = NULL; ++ tvbuff_t *payload_tvb; ++ ++ u_int8_t version, hdr_len, type, ts, noise_db, signal_db; ++ u_int8_t burst_type, antenna; ++ u_int16_t arfcn; ++ u_int32_t frame_nr; ++ ++ len = tvb_length(tvb); ++ ++ //pinfo->ptype = PT_I2C; ++ ++ version = tvb_get_guint8(tvb, offset + 0); ++ hdr_len = tvb_get_guint8(tvb, offset + 1) <<2; ++ type = tvb_get_guint8(tvb, offset + 2); ++ ts = tvb_get_guint8(tvb, offset + 3); ++ ++ arfcn = tvb_get_ntohs(tvb, offset + 4); ++ noise_db = tvb_get_guint8(tvb, offset + 6); ++ signal_db = tvb_get_guint8(tvb, offset + 7); ++ ++ frame_nr = tvb_get_ntohl(tvb, offset + 8); ++ ++ burst_type = tvb_get_guint8(tvb, offset + 12); ++ antenna = tvb_get_guint8(tvb, offset + 13); ++ ++ payload_tvb = tvb_new_subset(tvb, hdr_len, len-hdr_len, len-hdr_len); ++ ++#if 0 ++ if (check_col(pinfo->cinfo, COL_PROTOCOL)) { ++ if (is_event) ++ col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "I2C Event"); ++ else ++ col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "I2C %s", ++ (flags & I2C_FLAG_RD) ? "Read" : "Write"); ++ } ++ ++ if (check_col(pinfo->cinfo, COL_DEF_SRC)) { ++ col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "I2C-%d", bus); ++ } ++ ++ if (check_col(pinfo->cinfo, COL_DEF_DST)) { ++ if (is_event) ++ col_add_fstr(pinfo->cinfo, COL_DEF_DST, "----"); ++ else ++ col_add_fstr(pinfo->cinfo, COL_DEF_DST, "0x%02x", addr); ++ } ++ ++#endif ++ if (check_col(pinfo->cinfo, COL_INFO)) { ++ col_add_fstr(pinfo->cinfo, COL_INFO, "GSM TAP, %d bytes", len); ++ } ++ ++ if (tree) { ++ ti = proto_tree_add_protocol_format(tree, proto_gsmtap, tvb, ++ 0, hdr_len, ++ "GSM TAP Header"); ++ gsmtap_tree = proto_item_add_subtree(ti, ett_gsmtap); ++ proto_tree_add_item(gsmtap_tree, hf_gsmtap_version, ++ tvb, offset, 1, FALSE); ++ proto_tree_add_uint_format(gsmtap_tree, hf_gsmtap_hdrlen, ++ tvb, offset+1, 1, hdr_len, ++ "Header length: %u bytes", hdr_len); ++ proto_tree_add_uint_format(gsmtap_tree, hf_gsmtap_type, ++ tvb, offset+2, 1, type, ++ "Type: %s (0x%02x)", ++ gsmtap_get_type(type), type); ++ proto_tree_add_uint_format(gsmtap_tree, hf_gsmtap_burst_type, ++ tvb, offset+12, 1, burst_type, ++ "Burst: %s", ++ gsmtap_get_burst(burst_type)); ++ proto_tree_add_uint_format(gsmtap_tree, hf_gsmtap_arfcn, ++ tvb, offset+4, 2, arfcn, ++ "ARFCN: %u", arfcn); ++ proto_tree_add_item(gsmtap_tree, hf_gsmtap_timeslot, ++ tvb, offset+3, 1, FALSE); ++ proto_tree_add_item(gsmtap_tree, hf_gsmtap_antenna, ++ tvb, offset+13, 1, FALSE); ++ proto_tree_add_uint_format(gsmtap_tree, hf_gsmtap_noise_db, ++ tvb, offset+6, 1, noise_db, ++ "Noise level: %u dB", noise_db); ++ proto_tree_add_uint_format(gsmtap_tree, hf_gsmtap_signal_db, ++ tvb, offset+7, 1, signal_db, ++ "Signal level: %u dB", signal_db); ++ proto_tree_add_uint_format(gsmtap_tree, hf_gsmtap_frame_nr, ++ tvb, offset+8, 4, frame_nr, ++ "Frame Number: %u", frame_nr); ++ } ++ switch (type) { ++ case GSMTAP_TYPE_UM: ++ switch (burst_type) { ++ case GSMTAP_BURST_NORMAL: ++ sub_handle = SUB_UM; ++ break; ++ default: ++ sub_handle = SUB_DATA; ++ break; ++ } ++ break; ++ case GSMTAP_TYPE_UM_BURST: ++ default: ++ sub_handle = SUB_DATA; ++ break; ++ } ++ call_dissector(sub_handles[sub_handle], payload_tvb, pinfo, tree); ++} ++ ++void ++proto_register_gsmtap(void) ++{ ++ static hf_register_info hf[] = { ++ { &hf_gsmtap_version, { "Version", "gsmtap.version", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }}, ++ { &hf_gsmtap_hdrlen, { "Header Length", "gsmtap.hdr_len", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }}, ++ { &hf_gsmtap_type, { "Type", "gsmtap.type", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }}, ++ { &hf_gsmtap_timeslot, { "Time Slot", "gsmtap.ts", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }}, ++ { &hf_gsmtap_arfcn, { "ARFCN", "gsmtap.arfcn", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }}, ++ { &hf_gsmtap_noise_db, { "Noise dB", "gsmtap.noise_db", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }}, ++ { &hf_gsmtap_signal_db, { "Signal dB", "gsmtap.signal_db", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }}, ++ { &hf_gsmtap_frame_nr, { "Frame Number", "gsmtap.frame_nr", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }}, ++ { &hf_gsmtap_burst_type, { "Burst Type", "gsmtap.burst_type", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }}, ++ { &hf_gsmtap_antenna, { "Antenna Number", "gsmtap.antenna", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }}, ++ }; ++ static gint *ett[] = { ++ &ett_gsmtap ++ }; ++ ++ proto_gsmtap = proto_register_protocol("GSM Radiotap", "GSMTAP", "gsmtap"); ++ proto_register_field_array(proto_gsmtap, hf, array_length(hf)); ++ proto_register_subtree_array(ett, array_length(ett)); ++} ++ ++void ++proto_reg_handoff_gsmtap(void) ++{ ++ dissector_handle_t gsmtap_handle; ++ ++ sub_handles[SUB_DATA] = find_dissector("data"); ++ sub_handles[SUB_UM] = find_dissector("gsm_a_ccch"); ++ sub_handles[SUB_ABIS] = find_dissector("gsm_a_dtap"); ++ gsmtap_handle = create_dissector_handle(dissect_gsmtap, proto_gsmtap); ++ dissector_add("wtap_encap", WTAP_ENCAP_GSMTAP_UM, gsmtap_handle); ++} +Index: epan/dissectors/packet-gsmtap.h +=================================================================== +--- epan/dissectors/packet-gsmtap.h (revision 0) ++++ epan/dissectors/packet-gsmtap.h (revision 0) +@@ -0,0 +1,41 @@ ++#ifndef _GSMTAP_H ++#define _GSMTAP_H ++ ++/* gsmtap header, pseudo-header in front of the actua GSM payload*/ ++ ++#include <sys/types.h> ++ ++#define GSMTAP_VERSION 0x01 ++ ++#define GSMTAP_TYPE_UM 0x01 ++#define GSMTAP_TYPE_ABIS 0x02 ++#define GSMTAP_TYPE_UM_BURST 0x03 /* raw burst bits */ ++ ++#define GSMTAP_BURST_UNKNOWN 0x00 ++#define GSMTAP_BURST_FCCH 0x01 ++#define GSMTAP_BURST_PARTIAL_SCH 0x02 ++#define GSMTAP_BURST_SCH 0x03 ++#define GSMTAP_BURST_CTS_SCH 0x04 ++#define GSMTAP_BURST_COMPACT_SCH 0x05 ++#define GSMTAP_BURST_NORMAL 0x06 ++#define GSMTAP_BURST_DUMMY 0x07 ++#define GSMTAP_BURST_ACCESS 0x08 ++ ++struct gsmtap_hdr { ++ u_int8_t version; /* version, set to 0x01 currently */ ++ u_int8_t hdr_len; /* length in number of 32bit words */ ++ u_int8_t type; /* see GSMTAP_TYPE_* */ ++ u_int8_t timeslot; /* timeslot (0..7 on Um) */ ++ ++ u_int16_t arfcn; /* ARFCN (frequency) */ ++ u_int8_t noise_db; /* noise figure in dB */ ++ u_int8_t signal_db; /* signal level in dB */ ++ ++ u_int32_t frame_number; /* GSM Frame Number (FN) */ ++ ++ u_int8_t burst_type; /* Type of burst, see above */ ++ u_int8_t antenna_nr; /* Antenna Number */ ++ u_int16_t res; /* reserved for future use (RFU) */ ++ ++} __attribute__((packed)); ++#endif /* _GSMTAP_H */ +Index: epan/dissectors/Makefile.common +=================================================================== +--- epan/dissectors/Makefile.common (revision 26844) ++++ epan/dissectors/Makefile.common (working copy) +@@ -453,6 +453,7 @@ + packet-gsm_bssmap_le.c \ + packet-gsm_sms.c \ + packet-gsm_sms_ud.c \ ++ packet-gsmtap.c \ + packet-gssapi.c \ + packet-gtp.c \ + packet-gvrp.c \ +@@ -974,6 +975,7 @@ + packet-gsm_a_common.h \ + packet-gsm_map.h \ + packet-gsm_sms.h \ ++ packet-gsmtap.h \ + packet-gssapi.h \ + packet-gtp.h \ + packet-h223.h \ +Index: wiretap/wtap.c +=================================================================== +--- wiretap/wtap.c (revision 26844) ++++ wiretap/wtap.c (working copy) +@@ -430,7 +430,13 @@ + { "I2C", "i2c" }, + + /* WTAP_ENCAP_IEEE802_15_4_NONASK_PHY */ +- { "IEEE 802.15.4 Wireless PAN non-ASK PHY", "wpan-nonask-phy" } ++ { "IEEE 802.15.4 Wireless PAN non-ASK PHY", "wpan-nonask-phy" }, ++ ++ /* WTAP_GSMTAP_UM */ ++ { "GSMTAP Um Interface (MS<->BTS)", "gsmtap-um" }, ++ ++ /* WTAP_GSMTAP_ABIS */ ++ { "GSMTAP Abis Interface (BTS<->BSC)", "gsmtap-abis" } + }; + + gint wtap_num_encap_types = sizeof(encap_table_base) / sizeof(struct encap_type_info); +Index: wiretap/wtap.h +=================================================================== +--- wiretap/wtap.h (revision 26844) ++++ wiretap/wtap.h (working copy) +@@ -204,6 +204,8 @@ + #define WTAP_ENCAP_X2E_SERIAL 111 + #define WTAP_ENCAP_I2C 112 + #define WTAP_ENCAP_IEEE802_15_4_NONASK_PHY 113 ++#define WTAP_ENCAP_GSMTAP_UM 114 ++#define WTAP_ENCAP_GSMTAP_ABIS 115 + + #define WTAP_NUM_ENCAP_TYPES wtap_get_num_encap_types() + |
