Compare commits
2 commits
179944575d
...
1699293385
Author | SHA1 | Date | |
---|---|---|---|
1699293385 | |||
36fe29e3d5 |
417 changed files with 366762 additions and 0 deletions
409
src/pplib/.cproject
Normal file
409
src/pplib/.cproject
Normal file
|
@ -0,0 +1,409 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<?fileVersion 4.0.0?><cproject>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||||
|
<cconfiguration id="converted.config.93810054">
|
||||||
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="converted.config.93810054" moduleId="org.eclipse.cdt.core.settings" name="Configuration1">
|
||||||
|
<externalSettings/>
|
||||||
|
<extensions>
|
||||||
|
<extension id="org.eclipse.cdt.core.nullindexer" point="org.eclipse.cdt.core.CIndexer"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
</extensions>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings">
|
||||||
|
<doc-comment-owner id="org.eclipse.cdt.ui.doxygen">
|
||||||
|
<path value=""/>
|
||||||
|
</doc-comment-owner>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<configuration artifactName="PPL7 - SVN" buildProperties="" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.VCErrorParser" id="converted.config.93810054" name="Configuration1" parent="org.eclipse.cdt.build.core.prefbase.cfg">
|
||||||
|
<folderInfo id="converted.config.93810054." name="/" resourcePath="">
|
||||||
|
<toolChain id="cdt.managedbuild.toolchain.llvm.clang.linux.base.1587122097" name="LLVM with Clang (Linux)" superClass="cdt.managedbuild.toolchain.llvm.clang.linux.base">
|
||||||
|
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.llvm.platform.base.619710203" isAbstract="true" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.llvm.platform.base"/>
|
||||||
|
<builder appendEnvironment="true" buildPath="${workspace_loc:/PPL7}/Configuration1" environment="" id="cdt.managedbuild.target.llvm.builder.base.1137982095" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="cdt.managedbuild.target.llvm.builder.base"/>
|
||||||
|
<tool id="cdt.managedbuild.tool.llvm.assembler.base.1992323027" name="LLVM assembler" superClass="cdt.managedbuild.tool.llvm.assembler.base"/>
|
||||||
|
<tool id="cdt.managedbuild.tool.llvm.archiver.base.51186090" name="LLVM archiver" superClass="cdt.managedbuild.tool.llvm.archiver.base"/>
|
||||||
|
<tool id="cdt.managedbuild.tool.llvm.c.compiler.base.1733591885" name="LLVM Clang" superClass="cdt.managedbuild.tool.llvm.c.compiler.base">
|
||||||
|
<option id="llvm.c_cpp.compiler.option.include.paths.468219924" name="Include paths (-I)" superClass="llvm.c_cpp.compiler.option.include.paths" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value=""C:\jenkins\local\include""/>
|
||||||
|
<listOptionValue builtIn="false" value="/usr/local/gtest-1.7.0/include"/>
|
||||||
|
<listOptionValue builtIn="false" value="/usr/include"/>
|
||||||
|
</option>
|
||||||
|
<option id="llvm.c_cpp.compiler.option.preprocessor.def.1358268360" name="Defined symbols (-D)" superClass="llvm.c_cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
|
||||||
|
<listOptionValue builtIn="false" value="PPL7LIB=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="HAVE_CONFIG_H=1"/>
|
||||||
|
</option>
|
||||||
|
<inputType id="cdt.managedbuild.tool.llvm.c.compiler.input.1849789181" superClass="cdt.managedbuild.tool.llvm.c.compiler.input"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="cdt.managedbuild.tool.llvm.cpp.compiler.base.375125671" name="LLVM Clang++" superClass="cdt.managedbuild.tool.llvm.cpp.compiler.base">
|
||||||
|
<option id="llvm.c_cpp.compiler.option.include.paths.614324950" name="Include paths (-I)" superClass="llvm.c_cpp.compiler.option.include.paths" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value="/msys64/usr/include"/>
|
||||||
|
<listOptionValue builtIn="false" value="/msys64/mingw64/include/SDL2"/>
|
||||||
|
<listOptionValue builtIn="false" value="/jenkins/include"/>
|
||||||
|
<listOptionValue builtIn="false" value="/msys64/usr/local/gtest-1.7.0/include"/>
|
||||||
|
<listOptionValue builtIn="false" value="/usr/local/gtest-1.7.0/include"/>
|
||||||
|
<listOptionValue builtIn="false" value="/usr/local/llvm60/include"/>
|
||||||
|
<listOptionValue builtIn="false" value="/usr/include"/>
|
||||||
|
</option>
|
||||||
|
<option id="llvm.c_cpp.compiler.option.preprocessor.def.918920336" name="Defined symbols (-D)" superClass="llvm.c_cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
|
||||||
|
<listOptionValue builtIn="false" value="PPL7LIB=1"/>
|
||||||
|
<listOptionValue builtIn="false" value="HAVE_CONFIG_H=1"/>
|
||||||
|
</option>
|
||||||
|
<inputType id="cdt.managedbuild.tool.llvm.cpp.compiler.input.1520616570" superClass="cdt.managedbuild.tool.llvm.cpp.compiler.input"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="cdt.managedbuild.tool.llvm.c.linker.base.655509769" name="LLVM Clang C linker" superClass="cdt.managedbuild.tool.llvm.c.linker.base"/>
|
||||||
|
<tool id="cdt.managedbuild.tool.llvm.cpp.linker.base.2055298512" name="LLVM Clang C++ linker" superClass="cdt.managedbuild.tool.llvm.cpp.linker.base">
|
||||||
|
<inputType id="cdt.managedbuild.tool.llvm.c.linker.input.2047286980" superClass="cdt.managedbuild.tool.llvm.c.linker.input">
|
||||||
|
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||||
|
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||||
|
</inputType>
|
||||||
|
</tool>
|
||||||
|
</toolChain>
|
||||||
|
</folderInfo>
|
||||||
|
</configuration>
|
||||||
|
</storageModule>
|
||||||
|
</cconfiguration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||||
|
<configuration configurationName="Configuration1">
|
||||||
|
<resource resourceType="PROJECT" workspacePath="/PPL7 - SVN"/>
|
||||||
|
</configuration>
|
||||||
|
<configuration configurationName="convertedConfig">
|
||||||
|
<resource resourceType="PROJECT" workspacePath="/PPL7 - SVN"/>
|
||||||
|
</configuration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.pathentry">
|
||||||
|
<pathentry kind="mac" name="PPL7LIB" path="" value="1"/>
|
||||||
|
<pathentry base-path="PPL7 - SVN" include="include" kind="inc" path="" system="true"/>
|
||||||
|
<pathentry kind="out" path=""/>
|
||||||
|
<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
|
||||||
|
<pathentry kind="src" path=""/>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<project id="PPL7 - SVN.null.400560975" name="PPL7 - SVN"/>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
|
||||||
|
<buildTargets>
|
||||||
|
<target name="debug" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||||
|
<buildCommand>make</buildCommand>
|
||||||
|
<buildArguments>-j6</buildArguments>
|
||||||
|
<buildTarget>install_debug</buildTarget>
|
||||||
|
<stopOnError>true</stopOnError>
|
||||||
|
<useDefaultCommand>true</useDefaultCommand>
|
||||||
|
<runAllBuilders>true</runAllBuilders>
|
||||||
|
</target>
|
||||||
|
</buildTargets>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="scannerConfiguration">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="makefileGenerator">
|
||||||
|
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<scannerConfigBuildInfo instanceId="converted.config.93810054;converted.config.93810054.;org.eclipse.linuxtools.cdt.autotools.core.toolchain.tool.gpp.759528567;cdt.managedbuild.tool.gnu.cpp.compiler.input.444355472">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="makefileGenerator">
|
||||||
|
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="converted.config.93810054;converted.config.93810054.;org.eclipse.linuxtools.cdt.autotools.core.toolchain.tool.gpp.1774392251;cdt.managedbuild.tool.gnu.cpp.compiler.input.354986712">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="makefileGenerator">
|
||||||
|
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="converted.config.93810054;converted.config.93810054.;org.eclipse.linuxtools.cdt.autotools.core.toolchain.tool.gpp.1206095395;cdt.managedbuild.tool.gnu.cpp.compiler.input.1419406729">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="makefileGenerator">
|
||||||
|
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="converted.config.93810054;converted.config.93810054.;org.eclipse.linuxtools.cdt.autotools.core.toolchain.tool.gcc.389611427;cdt.managedbuild.tool.gnu.c.compiler.input.1460018740">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="makefileGenerator">
|
||||||
|
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="converted.config.93810054">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="converted.config.93810054;converted.config.93810054.;org.eclipse.linuxtools.cdt.autotools.core.toolchain.tool.gcc.882322743;cdt.managedbuild.tool.gnu.c.compiler.input.1930661638">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="makefileGenerator">
|
||||||
|
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="converted.config.93810054;converted.config.93810054.;org.eclipse.linuxtools.cdt.autotools.core.toolchain.tool.gcc.1348013222;cdt.managedbuild.tool.gnu.c.compiler.input.322443003">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="makefileGenerator">
|
||||||
|
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="false" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="false"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
</storageModule>
|
||||||
|
</cproject>
|
16
src/pplib/.gitignore
vendored
Normal file
16
src/pplib/.gitignore
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
/debug/
|
||||||
|
/release/
|
||||||
|
/config.log
|
||||||
|
/config.status
|
||||||
|
/Makefile
|
||||||
|
/ppl7-config
|
||||||
|
/autom4te.cache
|
||||||
|
/PPL7.config
|
||||||
|
/PPL7.creator
|
||||||
|
/PPL7.creator.user
|
||||||
|
/PPL7.files
|
||||||
|
/PPL7.includes
|
||||||
|
/x64/
|
||||||
|
/documentation/
|
||||||
|
/.settings/
|
||||||
|
.vscode/
|
93
src/pplib/.project
Normal file
93
src/pplib/.project
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>PPL7</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||||
|
<triggers>clean,full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
<dictionary>
|
||||||
|
<key>?name?</key>
|
||||||
|
<value></value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
||||||
|
<value>install_debug</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||||
|
<value>-j1</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||||
|
<value>make</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
||||||
|
<value></value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||||
|
<value>clean</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.contents</key>
|
||||||
|
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.environment</key>
|
||||||
|
<value></value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
||||||
|
<value>install_debug</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||||
|
<triggers>full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||||
|
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||||
|
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
File diff suppressed because one or more lines are too long
12
src/pplib/.settings/language.settings.xml
Normal file
12
src/pplib/.settings/language.settings.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<project>
|
||||||
|
<configuration id="converted.config.93810054" name="Configuration1">
|
||||||
|
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||||
|
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||||
|
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
|
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
|
||||||
|
<provider-reference id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" ref="shared-provider"/>
|
||||||
|
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||||
|
</extension>
|
||||||
|
</configuration>
|
||||||
|
</project>
|
73
src/pplib/.settings/org.eclipse.cdt.codan.core.prefs
Normal file
73
src/pplib/.settings/org.eclipse.cdt.codan.core.prefs
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.cdt.codan.checkers.errnoreturn=Warning
|
||||||
|
org.eclipse.cdt.codan.checkers.errnoreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return\\")",implicit\=>false}
|
||||||
|
org.eclipse.cdt.codan.checkers.errreturnvalue=Error
|
||||||
|
org.eclipse.cdt.codan.checkers.errreturnvalue.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused return value\\")"}
|
||||||
|
org.eclipse.cdt.codan.checkers.nocommentinside=-Error
|
||||||
|
org.eclipse.cdt.codan.checkers.nocommentinside.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Nesting comments\\")"}
|
||||||
|
org.eclipse.cdt.codan.checkers.nolinecomment=-Error
|
||||||
|
org.eclipse.cdt.codan.checkers.nolinecomment.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Line comments\\")"}
|
||||||
|
org.eclipse.cdt.codan.checkers.noreturn=Error
|
||||||
|
org.eclipse.cdt.codan.checkers.noreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return value\\")",implicit\=>false}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Abstract class cannot be instantiated\\")"}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Ambiguous problem\\")"}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment in condition\\")"}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment to itself\\")"}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No break at end of case\\")",no_break_comment\=>"no break",last_case_param\=>false,empty_case_param\=>false}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.CatchByReference=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Catching by reference is recommended\\")",unknown\=>false,exceptions\=>()}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Circular inheritance\\")"}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class members should be properly initialized\\")",skip\=>true}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Field cannot be resolved\\")"}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Function cannot be resolved\\")"}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.InvalidArguments=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid arguments\\")"}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid template argument\\")"}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Label statement not found\\")"}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Member declaration not found\\")"}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Method cannot be resolved\\")"}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=-Info
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Name convention for function\\")",pattern\=>"^[a-z]",macro\=>true,exceptions\=>()}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class has a virtual method and non-virtual destructor\\")"}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.OverloadProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid overload\\")"}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redeclaration\\")"}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redefinition\\")"}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Return with parenthesis\\")"}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Format String Vulnerability\\")"}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Statement has no effect\\")",macro\=>true,exceptions\=>()}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suggested parenthesis around expression\\")",paramNot\=>false}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suspicious semicolon\\")",else\=>false,afterelse\=>false}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Type cannot be resolved\\")"}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused function declaration\\")",macro\=>true}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused static function\\")",macro\=>true}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused variable declaration in file scope\\")",macro\=>true,exceptions\=>("@(\#)","$Id")}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Symbol is not resolved\\")"}
|
||||||
|
org.eclipse.cdt.qt.core.qtproblem=Warning
|
||||||
|
org.eclipse.cdt.qt.core.qtproblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_ON_FILE_OPEN\=>true,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>null}
|
3
src/pplib/.settings/org.eclipse.core.resources.prefs
Normal file
3
src/pplib/.settings/org.eclipse.core.resources.prefs
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
encoding//src/core/File.cpp=UTF-8
|
||||||
|
encoding/<project>=UTF-8
|
|
@ -0,0 +1,3 @@
|
||||||
|
#Sat Nov 03 10:37:37 CET 2012
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
|
2507
src/pplib/Doxyfile
Normal file
2507
src/pplib/Doxyfile
Normal file
File diff suppressed because it is too large
Load diff
1675
src/pplib/HISTORY.TXT
Normal file
1675
src/pplib/HISTORY.TXT
Normal file
File diff suppressed because it is too large
Load diff
22
src/pplib/LICENSE.TXT
Normal file
22
src/pplib/LICENSE.TXT
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
Copyright (c) 2019, Patrick Fedick <patrick@pfp.de>
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
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 above 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 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.
|
2702
src/pplib/Makefile.in
Normal file
2702
src/pplib/Makefile.in
Normal file
File diff suppressed because it is too large
Load diff
334
src/pplib/PPL7.vcxproj
Normal file
334
src/pplib/PPL7.vcxproj
Normal file
|
@ -0,0 +1,334 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<VCProjectVersion>15.0</VCProjectVersion>
|
||||||
|
<ProjectGuid>{771F38E9-2735-4C7D-ABAC-2A1FAE923BD5}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>PPL7</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="Shared">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<IncludePath>D:\jenkins\local\include;D:\jenkins\local\include\freetype2;include;$(IncludePath)</IncludePath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<IncludePath>D:\jenkins\local\include;D:\jenkins\local\include\freetype2;include;$(IncludePath)</IncludePath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>PPL7LIB;PPLVISUALC;_DEBUG;_LIB;PPL7LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>copy include\ppl7.h c:\local\include
|
||||||
|
|
||||||
|
copy include\ppl7-algorithms.h c:\local\include
|
||||||
|
copy include\ppl7-audio.h c:\local\include
|
||||||
|
copy include\ppl7-crypto.h c:\local\include
|
||||||
|
copy include\ppl7-db.h c:\local\include
|
||||||
|
copy include\ppl7-exceptions.h c:\local\include
|
||||||
|
copy include\ppl7-grafix.h c:\local\include
|
||||||
|
copy include\ppl7-inet.h c:\local\include
|
||||||
|
copy include\ppl7-tk.h c:\local\include
|
||||||
|
copy include\ppl7-types.h c:\local\include
|
||||||
|
copy include\ppl7-visualc-config.h c:\local\include\ppl7-config.h
|
||||||
|
|
||||||
|
copy "$(OutputPath)\PPL7.lib" c:\local\lib\ppl7_debug.lib
|
||||||
|
|
||||||
|
</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>PPL7LIB;PPLVISUALC;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>copy include\ppl7.h c:\local\include
|
||||||
|
|
||||||
|
copy include\ppl7-algorithms.h c:\local\include
|
||||||
|
copy include\ppl7-audio.h c:\local\include
|
||||||
|
copy include\ppl7-crypto.h c:\local\include
|
||||||
|
copy include\ppl7-db.h c:\local\include
|
||||||
|
copy include\ppl7-exceptions.h c:\local\include
|
||||||
|
copy include\ppl7-grafix.h c:\local\include
|
||||||
|
copy include\ppl7-inet.h c:\local\include
|
||||||
|
copy include\ppl7-tk.h c:\local\include
|
||||||
|
copy include\ppl7-types.h c:\local\include
|
||||||
|
copy include\ppl7-visualc-config.h c:\local\include\ppl7-config.h
|
||||||
|
|
||||||
|
copy "$(OutputPath)\PPL7.lib" c:\local\lib\ppl7.lib</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Text Include="ReadMe.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="include\compat.h" />
|
||||||
|
<ClInclude Include="include\crypto.h" />
|
||||||
|
<ClInclude Include="include\ppl7-algorithms.h" />
|
||||||
|
<ClInclude Include="include\ppl7-audio.h" />
|
||||||
|
<ClInclude Include="include\ppl7-crypto.h" />
|
||||||
|
<ClInclude Include="include\ppl7-db.h" />
|
||||||
|
<ClInclude Include="include\ppl7-exceptions.h" />
|
||||||
|
<ClInclude Include="include\ppl7-grafix.h" />
|
||||||
|
<ClInclude Include="include\ppl7-inet.h" />
|
||||||
|
<ClInclude Include="include\ppl7-tk.h" />
|
||||||
|
<ClInclude Include="include\ppl7-types.h" />
|
||||||
|
<ClInclude Include="include\ppl7-visualc-config.h" />
|
||||||
|
<ClInclude Include="include\ppl7.h" />
|
||||||
|
<ClInclude Include="include\prolog.h" />
|
||||||
|
<ClInclude Include="include\socket.h" />
|
||||||
|
<ClInclude Include="include\threads.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\core\AVLTree.cpp" />
|
||||||
|
<ClCompile Include="src\core\Compat.cpp" />
|
||||||
|
<ClCompile Include="src\core\Compression.cpp" />
|
||||||
|
<ClCompile Include="src\core\ConfigParser.cpp" />
|
||||||
|
<ClCompile Include="src\core\cpu.cpp" />
|
||||||
|
<ClCompile Include="src\core\Dir.cpp" />
|
||||||
|
<ClCompile Include="src\core\DirEntry.cpp" />
|
||||||
|
<ClCompile Include="src\core\Exceptions.cpp" />
|
||||||
|
<ClCompile Include="src\core\File.cpp" />
|
||||||
|
<ClCompile Include="src\core\FileObject.cpp" />
|
||||||
|
<ClCompile Include="src\core\Functions.cpp" />
|
||||||
|
<ClCompile Include="src\core\GzFile.cpp" />
|
||||||
|
<ClCompile Include="src\core\Iconv.cpp" />
|
||||||
|
<ClCompile Include="src\core\Logger.cpp" />
|
||||||
|
<ClCompile Include="src\core\MemFile.cpp" />
|
||||||
|
<ClCompile Include="src\core\MemoryGroup.cpp" />
|
||||||
|
<ClCompile Include="src\core\MemoryHeap.cpp" />
|
||||||
|
<ClCompile Include="src\core\Mutex.cpp" />
|
||||||
|
<ClCompile Include="src\core\PerlHelper.cpp" />
|
||||||
|
<ClCompile Include="src\core\PFPFile.cpp" />
|
||||||
|
<ClCompile Include="src\core\Resource.cpp" />
|
||||||
|
<ClCompile Include="src\core\Resourcen.cpp" />
|
||||||
|
<ClCompile Include="src\core\Signal.cpp" />
|
||||||
|
<ClCompile Include="src\core\StringFunctions.cpp" />
|
||||||
|
<ClCompile Include="src\core\Threads.cpp" />
|
||||||
|
<ClCompile Include="src\core\Time.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\Color.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\Drawable.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\DrawableBlit.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\DrawableColor.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\DrawableLines.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\DrawablePixel.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\DrawableShapes.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\Font4.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\Font5.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\Font6.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\FontFreeType.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\Fonts.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\Grafix.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\Image.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\ImageFilter.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\ImageFilter_BMP.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\ImageFilter_GIF.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\ImageFilter_JPEG.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\ImageFilter_PNG.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\ImageFilter_PPM.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\ImageFilter_TGA.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\ImageFilter_TIFF.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\ImageList.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\Point.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\Point3D.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\Rect.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\RGBFormat.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\Size.cpp" />
|
||||||
|
<ClCompile Include="src\grafix\Sprite.cpp" />
|
||||||
|
<ClCompile Include="src\math\calc.cpp" />
|
||||||
|
<ClCompile Include="src\math\crc32.cpp" />
|
||||||
|
<ClCompile Include="src\math\md5.cpp" />
|
||||||
|
<ClCompile Include="src\math\random.cpp" />
|
||||||
|
<ClCompile Include="src\types\Array.cpp" />
|
||||||
|
<ClCompile Include="src\types\AssocArray.cpp" />
|
||||||
|
<ClCompile Include="src\types\ByteArray.cpp" />
|
||||||
|
<ClCompile Include="src\types\ByteArrayPtr.cpp" />
|
||||||
|
<ClCompile Include="src\types\DateTime.cpp" />
|
||||||
|
<ClCompile Include="src\types\Pointer.cpp" />
|
||||||
|
<ClCompile Include="src\types\String.cpp" />
|
||||||
|
<ClCompile Include="src\types\Variant.cpp" />
|
||||||
|
<ClCompile Include="src\types\WideString.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<CustomBuild Include="src\asm\blt.asm">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||||
|
<FileType>Document</FileType>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\msys64\usr\bin\nasm.exe -f win64 -l $(IntDir)/asm_blt.lst -o $(IntDir)/asm_blt.obj src/asm/blt.asm</Command>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)/asm_blt.obj</Outputs>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\msys64\usr\bin\nasm.exe -f win64 -l $(IntDir)/asm_blt.lst -o $(IntDir)/asm_blt.obj src/asm/blt.asm</Command>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)/asm_blt.obj</Outputs>
|
||||||
|
</CustomBuild>
|
||||||
|
<CustomBuild Include="src\asm\blt_blend.asm">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||||
|
<FileType>Document</FileType>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\msys64\usr\bin\nasm.exe -f win64 -l $(IntDir)/asm_blt_blend.lst -o $(IntDir)/asm_blt_blend.obj src/asm/blt_blend.asm</Command>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)/asm_blt_blend.obj</Outputs>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\msys64\usr\bin\nasm.exe -f win64 -l $(IntDir)/asm_blt_blend.lst -o $(IntDir)/asm_blt_blend.obj src/asm/blt_blend.asm</Command>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)/asm_blt_blend.obj</Outputs>
|
||||||
|
</CustomBuild>
|
||||||
|
<CustomBuild Include="src\asm\chromakey.asm">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||||
|
<FileType>Document</FileType>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\msys64\usr\bin\nasm.exe -f win64 -l $(IntDir)/asm_chromakey.lst -o $(IntDir)/asm_chromakey.obj src/asm/chromakey.asm</Command>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)/asm_chromakey.obj</Outputs>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\msys64\usr\bin\nasm.exe -f win64 -l $(IntDir)/asm_chromakey.lst -o $(IntDir)/asm_chromakey.obj src/asm/chromakey.asm</Command>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)/asm_chromakey.obj</Outputs>
|
||||||
|
</CustomBuild>
|
||||||
|
<CustomBuild Include="src\asm\colors.asm">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||||
|
<FileType>Document</FileType>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\msys64\usr\bin\nasm.exe -f win64 -l $(IntDir)/asm_colors.lst -o $(IntDir)/asm_colors.obj src/asm/colors.asm</Command>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)/asm_colors.obj</Outputs>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\msys64\usr\bin\nasm.exe -f win64 -l $(IntDir)/asm_colors.lst -o $(IntDir)/asm_colors.obj src/asm/colors.asm</Command>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)/asm_colors.obj</Outputs>
|
||||||
|
</CustomBuild>
|
||||||
|
<None Include="src\asm\common.asm" />
|
||||||
|
<CustomBuild Include="src\asm\cpu.asm">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||||
|
<FileType>Document</FileType>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\msys64\usr\bin\nasm.exe -f win64 -l $(IntDir)/asm_cpu.lst -o $(IntDir)/asm_cpu.obj src/asm/cpu.asm</Command>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)/asm_cpu.obj</Outputs>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\msys64\usr\bin\nasm.exe -f win64 -l $(IntDir)/asm_cpu.lst -o $(IntDir)/asm_cpu.obj src/asm/cpu.asm</Command>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)/asm_cpu.obj</Outputs>
|
||||||
|
</CustomBuild>
|
||||||
|
<CustomBuild Include="src\asm\fonts.asm">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||||
|
<FileType>Document</FileType>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\msys64\usr\bin\nasm.exe -f win64 -l $(IntDir)/asm_fonts.lst -o $(IntDir)/asm_fonts.obj src/asm/fonts.asm</Command>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)/asm_fonts.obj</Outputs>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\msys64\usr\bin\nasm.exe -f win64 -l $(IntDir)/asm_fonts.lst -o $(IntDir)/asm_fonts.obj src/asm/fonts.asm</Command>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)/asm_fonts.obj</Outputs>
|
||||||
|
</CustomBuild>
|
||||||
|
<CustomBuild Include="src\asm\pixel.asm">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||||
|
<FileType>Document</FileType>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\msys64\usr\bin\nasm.exe -f win64 -l $(IntDir)/asm_pixel.lst -o $(IntDir)/asm_pixel.obj src/asm/pixel.asm</Command>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)/asm_pixel.obj</Outputs>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\msys64\usr\bin\nasm.exe -f win64 -l $(IntDir)/asm_pixel.lst -o $(IntDir)/asm_pixel.obj src/asm/pixel.asm</Command>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)/asm_pixel.obj</Outputs>
|
||||||
|
</CustomBuild>
|
||||||
|
<CustomBuild Include="src\asm\rect.asm">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||||
|
<FileType>Document</FileType>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\msys64\usr\bin\nasm.exe -f win64 -l $(IntDir)/asm_rect.lst -o $(IntDir)/asm_rect.obj src/asm/rect.asm</Command>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)/asm_rect.obj</Outputs>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\msys64\usr\bin\nasm.exe -f win64 -l $(IntDir)/asm_rect.lst -o $(IntDir)/asm_rect.obj src/asm/rect.asm</Command>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)/asm_rect.obj</Outputs>
|
||||||
|
</CustomBuild>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
322
src/pplib/PPL7.vcxproj.filters
Normal file
322
src/pplib/PPL7.vcxproj.filters
Normal file
|
@ -0,0 +1,322 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Quelldateien">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Headerdateien">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Ressourcendateien">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Quelldateien\Types">
|
||||||
|
<UniqueIdentifier>{66e3414f-3a67-4d52-8ffc-53c1959c915e}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Quelldateien\Core">
|
||||||
|
<UniqueIdentifier>{3a8e2399-8b23-4023-853c-954a5915e0cd}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Quelldateien\Assembler">
|
||||||
|
<UniqueIdentifier>{95507578-a2c6-4b6b-b375-3f35bfbb6f93}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Quelldateien\Math">
|
||||||
|
<UniqueIdentifier>{c7dafec5-b489-48f2-8678-407c3550fc4e}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Quelldateien\Grafix">
|
||||||
|
<UniqueIdentifier>{d39b4bf7-3477-4635-83c3-5f81b0149947}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Text Include="ReadMe.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="include\compat.h">
|
||||||
|
<Filter>Headerdateien</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\crypto.h">
|
||||||
|
<Filter>Headerdateien</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\ppl7.h">
|
||||||
|
<Filter>Headerdateien</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\ppl7-algorithms.h">
|
||||||
|
<Filter>Headerdateien</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\ppl7-audio.h">
|
||||||
|
<Filter>Headerdateien</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\ppl7-crypto.h">
|
||||||
|
<Filter>Headerdateien</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\ppl7-db.h">
|
||||||
|
<Filter>Headerdateien</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\ppl7-exceptions.h">
|
||||||
|
<Filter>Headerdateien</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\ppl7-grafix.h">
|
||||||
|
<Filter>Headerdateien</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\ppl7-inet.h">
|
||||||
|
<Filter>Headerdateien</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\ppl7-tk.h">
|
||||||
|
<Filter>Headerdateien</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\ppl7-types.h">
|
||||||
|
<Filter>Headerdateien</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\prolog.h">
|
||||||
|
<Filter>Headerdateien</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\socket.h">
|
||||||
|
<Filter>Headerdateien</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\threads.h">
|
||||||
|
<Filter>Headerdateien</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\ppl7-visualc-config.h">
|
||||||
|
<Filter>Headerdateien</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\types\Variant.cpp">
|
||||||
|
<Filter>Quelldateien\Types</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\types\Pointer.cpp">
|
||||||
|
<Filter>Quelldateien\Types</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\types\Array.cpp">
|
||||||
|
<Filter>Quelldateien\Types</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\types\String.cpp">
|
||||||
|
<Filter>Quelldateien\Types</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\Compat.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\types\ByteArray.cpp">
|
||||||
|
<Filter>Quelldateien\Types</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\types\ByteArrayPtr.cpp">
|
||||||
|
<Filter>Quelldateien\Types</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\types\AssocArray.cpp">
|
||||||
|
<Filter>Quelldateien\Types</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\types\DateTime.cpp">
|
||||||
|
<Filter>Quelldateien\Types</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\types\WideString.cpp">
|
||||||
|
<Filter>Quelldateien\Types</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\AVLTree.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\Compression.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\ConfigParser.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\cpu.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\DirEntry.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\Exceptions.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\Functions.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\StringFunctions.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\math\calc.cpp">
|
||||||
|
<Filter>Quelldateien\Math</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\math\crc32.cpp">
|
||||||
|
<Filter>Quelldateien\Math</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\math\md5.cpp">
|
||||||
|
<Filter>Quelldateien\Math</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\math\random.cpp">
|
||||||
|
<Filter>Quelldateien\Math</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\MemoryGroup.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\MemoryHeap.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\Iconv.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\Time.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\Mutex.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\PerlHelper.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\PFPFile.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\Resource.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\Resourcen.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\Threads.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\Color.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\Drawable.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\DrawableBlit.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\DrawableColor.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\DrawableLines.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\DrawablePixel.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\DrawableShapes.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\Font4.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\Font5.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\Font6.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\FontFreeType.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\Fonts.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\Grafix.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\Image.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\ImageFilter.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\ImageFilter_BMP.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\ImageFilter_GIF.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\ImageFilter_JPEG.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\ImageFilter_PNG.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\ImageFilter_PPM.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\ImageFilter_TGA.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\ImageFilter_TIFF.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\ImageList.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\Point.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\Point3D.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\Rect.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\RGBFormat.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\Size.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\grafix\Sprite.cpp">
|
||||||
|
<Filter>Quelldateien\Grafix</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\FileObject.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\MemFile.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\File.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\GzFile.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\Logger.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\Signal.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\core\Dir.cpp">
|
||||||
|
<Filter>Quelldateien\Core</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="src\asm\common.asm">
|
||||||
|
<Filter>Quelldateien\Assembler</Filter>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<CustomBuild Include="src\asm\blt.asm">
|
||||||
|
<Filter>Quelldateien</Filter>
|
||||||
|
</CustomBuild>
|
||||||
|
<CustomBuild Include="src\asm\blt_blend.asm">
|
||||||
|
<Filter>Quelldateien</Filter>
|
||||||
|
</CustomBuild>
|
||||||
|
<CustomBuild Include="src\asm\chromakey.asm">
|
||||||
|
<Filter>Quelldateien</Filter>
|
||||||
|
</CustomBuild>
|
||||||
|
<CustomBuild Include="src\asm\colors.asm">
|
||||||
|
<Filter>Quelldateien</Filter>
|
||||||
|
</CustomBuild>
|
||||||
|
<CustomBuild Include="src\asm\cpu.asm">
|
||||||
|
<Filter>Quelldateien</Filter>
|
||||||
|
</CustomBuild>
|
||||||
|
<CustomBuild Include="src\asm\fonts.asm">
|
||||||
|
<Filter>Quelldateien</Filter>
|
||||||
|
</CustomBuild>
|
||||||
|
<CustomBuild Include="src\asm\pixel.asm">
|
||||||
|
<Filter>Quelldateien</Filter>
|
||||||
|
</CustomBuild>
|
||||||
|
<CustomBuild Include="src\asm\rect.asm">
|
||||||
|
<Filter>Quelldateien</Filter>
|
||||||
|
</CustomBuild>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
133
src/pplib/README.TXT
Normal file
133
src/pplib/README.TXT
Normal file
|
@ -0,0 +1,133 @@
|
||||||
|
PPLib - Patrick's Programming Library
|
||||||
|
===========================================================================
|
||||||
|
|
||||||
|
INDEX
|
||||||
|
|
||||||
|
1. What is PPLib?
|
||||||
|
2. Installation
|
||||||
|
2.1 UNIX
|
||||||
|
2.2 Windows
|
||||||
|
3. Usage
|
||||||
|
4. Documentation
|
||||||
|
5. Credits
|
||||||
|
6. Copyright
|
||||||
|
7. Licence
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
1. What is PPLib?
|
||||||
|
|
||||||
|
PPLib (or PPL) stands for "Patrick's Programming Library" and is a
|
||||||
|
collection of functions and classes for C++ applications, written by
|
||||||
|
Patrick Fedick. It covers file and directory functions, strings and
|
||||||
|
arrays, time, math, threads, graphics, sound, database access and
|
||||||
|
internet communication.
|
||||||
|
|
||||||
|
You can find the newest version and documentation of this library under
|
||||||
|
|
||||||
|
http://www.pfp.de/pplib
|
||||||
|
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
2. Installation
|
||||||
|
|
||||||
|
2.1 UNIX
|
||||||
|
The UNIX version comes with a standard configure-script. In most
|
||||||
|
cases it is sufficient to simply do
|
||||||
|
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
make install (do this as root)
|
||||||
|
|
||||||
|
The configure script tries to find out on what system the library
|
||||||
|
should be compiled and what optional libraries are available of
|
||||||
|
which PPLib can make use of (e.g. graphic libraries or databases).
|
||||||
|
|
||||||
|
If it does not find a library of which you know that it is
|
||||||
|
installed somewhere, you can manually set a search path for it
|
||||||
|
during configure, e.g.:
|
||||||
|
|
||||||
|
./configure --with-mysql=/usr/local/mysql
|
||||||
|
|
||||||
|
If you don't want a specific library compiled in, you can deselect
|
||||||
|
it with "--without-xxx', where xxx stands for the library. Example:
|
||||||
|
|
||||||
|
./configure --without-mysql
|
||||||
|
|
||||||
|
Please see "./configure --help" for a list of all available
|
||||||
|
options.
|
||||||
|
|
||||||
|
2.2 Windows
|
||||||
|
PPLib comes with project files for Microsoft Visual Studio .NET 2003,
|
||||||
|
but you have to do some manual configuration to adapt it to your
|
||||||
|
system.
|
||||||
|
|
||||||
|
For more details and examples about installation, please read the HTML
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
3. Usage
|
||||||
|
|
||||||
|
How to use the functions and classes if PPLib is described in the
|
||||||
|
HTML documentation.
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
4. Documentation
|
||||||
|
|
||||||
|
Documentation is available in HTML and can be found in the subdirectory
|
||||||
|
"documentation/html" of the source distribution and and online on the
|
||||||
|
PPLib webpage:
|
||||||
|
|
||||||
|
http://www.pfp.de/pplib
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
5. Credits
|
||||||
|
|
||||||
|
Some parts of PPLib includes code from other projects or can make use of
|
||||||
|
third party libraries.
|
||||||
|
- MD5-Hash calculation
|
||||||
|
Copyright RSA Data Security, Inc. MD5 Message-Digest Algorithm)
|
||||||
|
- random number generation
|
||||||
|
Copyright (c) 1983, 1993 The Regents of the University of California
|
||||||
|
- CRC32 checksum calculation
|
||||||
|
unknown source
|
||||||
|
- GIF-Reader
|
||||||
|
Copyright 1990, 1991, 1993 by David Koblas
|
||||||
|
- PCRE (http://www.pcre.org/)
|
||||||
|
Copyright (c) 1997-2008 University of Cambridge All rights reserved.
|
||||||
|
- Zlib (http://www.zlib.net/)
|
||||||
|
Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
|
||||||
|
- Bzip2 (http://www.bzip.org/)\n
|
||||||
|
Copyright (C) 1996-2007 Julian R Seward
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
6. Copyright
|
||||||
|
|
||||||
|
PPLib is copyright by Patrick Fedick <patrick@pfp.de> in 2005-2019
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
7. Licence
|
||||||
|
|
||||||
|
|
||||||
|
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 above 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 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.
|
||||||
|
|
||||||
|
|
||||||
|
|
3
src/pplib/TODO.TXT
Normal file
3
src/pplib/TODO.TXT
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Compiler-Warnings:
|
||||||
|
|
||||||
|
|
115
src/pplib/acinclude.m4
Normal file
115
src/pplib/acinclude.m4
Normal file
|
@ -0,0 +1,115 @@
|
||||||
|
dnl Zusaetzliche Macros
|
||||||
|
|
||||||
|
|
||||||
|
#######################################################
|
||||||
|
# AX_FPOS_ISSTRUCT
|
||||||
|
# Prüft, ob fpos_t ein scalar oder eine structure ist
|
||||||
|
#######################################################
|
||||||
|
AC_DEFUN([AX_FPOS_ISSTRUCT],[
|
||||||
|
AC_MSG_CHECKING(if fpos_t is struct or scalar)
|
||||||
|
AC_LANG_PUSH(C++)
|
||||||
|
|
||||||
|
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
|
#include <stdio.h>
|
||||||
|
int main(void){
|
||||||
|
fpos_t f;
|
||||||
|
f.__pos=1;
|
||||||
|
}
|
||||||
|
]]) ],
|
||||||
|
AC_DEFINE(FPOS_T_STRUCT,1,)
|
||||||
|
AC_MSG_RESULT(struct),
|
||||||
|
AC_MSG_RESULT(scalar)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
dnl #AC_DEFINE(FPOS_T_STRUCT,1,),)
|
||||||
|
|
||||||
|
AC_LANG_POP(C++)
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
#######################################################
|
||||||
|
# AX_TM_HAS_GMTOFF
|
||||||
|
# Prüft, ob die structure "tm" das Element "tm_gmtoff"
|
||||||
|
# hat
|
||||||
|
#######################################################
|
||||||
|
AC_DEFUN([AX_TM_HAS_GMTOFF],[
|
||||||
|
AC_MSG_CHECKING(if struct tm hast tm_gmtoff)
|
||||||
|
AC_LANG_PUSH(C++)
|
||||||
|
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
|
#include <time.h>
|
||||||
|
int main(void){
|
||||||
|
struct tm tt;
|
||||||
|
tt.tm_gmtoff=1;
|
||||||
|
}
|
||||||
|
]]) ],
|
||||||
|
AC_DEFINE(STRUCT_TM_HAS_GMTOFF,1,)
|
||||||
|
AC_MSG_RESULT(yes),
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
|
||||||
|
)
|
||||||
|
AC_LANG_POP(C++)
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
AC_DEFUN([AC_FUNC_VSNPRINTF],
|
||||||
|
[AC_CACHE_CHECK(for working vsnprintf,
|
||||||
|
ac_cv_func_vsnprintf,
|
||||||
|
[AC_TRY_RUN(
|
||||||
|
[#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
doit(char * s, ...)
|
||||||
|
{
|
||||||
|
char buffer[32];
|
||||||
|
va_list args;
|
||||||
|
int r;
|
||||||
|
|
||||||
|
buffer[5] = 'X';
|
||||||
|
|
||||||
|
va_start(args, s);
|
||||||
|
r = vsnprintf(buffer, 5, s, args);
|
||||||
|
va_end(args);
|
||||||
|
|
||||||
|
/* -1 is pre-C99, 7 is C99. */
|
||||||
|
|
||||||
|
if (r != -1 && r != 7)
|
||||||
|
exit(1);
|
||||||
|
|
||||||
|
/* We deliberately do not care if the result is NUL-terminated or
|
||||||
|
not, since this is easy to work around like this. */
|
||||||
|
|
||||||
|
buffer[4] = 0;
|
||||||
|
|
||||||
|
/* Simple sanity check. */
|
||||||
|
|
||||||
|
if (strcmp(buffer, "1234"))
|
||||||
|
exit(1);
|
||||||
|
|
||||||
|
if (buffer[5] != 'X')
|
||||||
|
exit(1);
|
||||||
|
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main(void)
|
||||||
|
{
|
||||||
|
doit("1234567");
|
||||||
|
exit(1);
|
||||||
|
}], ac_cv_func_vsnprintf=yes, ac_cv_func_vsnprintf=no, ac_cv_func_vsnprintf=no)])
|
||||||
|
dnl Note that the default is to be pessimistic in the case of cross compilation.
|
||||||
|
dnl If you know that the target has a sensible vsnprintf(), you can get around this
|
||||||
|
dnl by setting ac_func_vsnprintf to yes, as described in the Autoconf manual.
|
||||||
|
if test $ac_cv_func_vsnprintf = yes; then
|
||||||
|
AC_DEFINE(HAVE_WORKING_VSNPRINTF, 1,
|
||||||
|
[Define if you have a version of the `vsnprintf' function
|
||||||
|
that honours the size argument and has a proper return value.])
|
||||||
|
fi
|
||||||
|
])# AC_FUNC_VSNPRINTF
|
||||||
|
|
||||||
|
|
1849
src/pplib/aclocal.m4
vendored
Normal file
1849
src/pplib/aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load diff
180
src/pplib/autoconf/ax_cc_maxopt.m4
Normal file
180
src/pplib/autoconf/ax_cc_maxopt.m4
Normal file
|
@ -0,0 +1,180 @@
|
||||||
|
# ===========================================================================
|
||||||
|
# http://www.gnu.org/software/autoconf-archive/ax_cc_maxopt.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_CC_MAXOPT
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# Try to turn on "good" C optimization flags for various compilers and
|
||||||
|
# architectures, for some definition of "good". (In our case, good for
|
||||||
|
# FFTW and hopefully for other scientific codes. Modify as needed.)
|
||||||
|
#
|
||||||
|
# The user can override the flags by setting the CFLAGS environment
|
||||||
|
# variable. The user can also specify --enable-portable-binary in order to
|
||||||
|
# disable any optimization flags that might result in a binary that only
|
||||||
|
# runs on the host architecture.
|
||||||
|
#
|
||||||
|
# Note also that the flags assume that ANSI C aliasing rules are followed
|
||||||
|
# by the code (e.g. for gcc's -fstrict-aliasing), and that floating-point
|
||||||
|
# computations can be re-ordered as needed.
|
||||||
|
#
|
||||||
|
# Requires macros: AX_CHECK_COMPILE_FLAG, AX_COMPILER_VENDOR,
|
||||||
|
# AX_GCC_ARCHFLAG, AX_GCC_X86_CPUID.
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
|
||||||
|
# Copyright (c) 2008 Matteo Frigo
|
||||||
|
#
|
||||||
|
# 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/>.
|
||||||
|
#
|
||||||
|
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||||
|
# gives unlimited permission to copy, distribute and modify the configure
|
||||||
|
# scripts that are the output of Autoconf when processing the Macro. You
|
||||||
|
# need not follow the terms of the GNU General Public License when using
|
||||||
|
# or distributing such scripts, even though portions of the text of the
|
||||||
|
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||||
|
# all other use of the material that constitutes the Autoconf Macro.
|
||||||
|
#
|
||||||
|
# This special exception to the GPL applies to versions of the Autoconf
|
||||||
|
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||||
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
|
||||||
|
#serial 13
|
||||||
|
|
||||||
|
AC_DEFUN([AX_CC_MAXOPT],
|
||||||
|
[
|
||||||
|
AC_REQUIRE([AC_PROG_CC])
|
||||||
|
AC_REQUIRE([AX_COMPILER_VENDOR])
|
||||||
|
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(portable-binary, [AS_HELP_STRING([--enable-portable-binary], [disable compiler optimizations that would produce unportable binaries])],
|
||||||
|
acx_maxopt_portable=$enableval, acx_maxopt_portable=no)
|
||||||
|
|
||||||
|
# Try to determine "good" native compiler flags if none specified via CFLAGS
|
||||||
|
if test "$ac_test_CFLAGS" != "set"; then
|
||||||
|
CFLAGS=""
|
||||||
|
case $ax_cv_c_compiler_vendor in
|
||||||
|
dec) CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host"
|
||||||
|
if test "x$acx_maxopt_portable" = xno; then
|
||||||
|
CFLAGS="$CFLAGS -arch host"
|
||||||
|
fi;;
|
||||||
|
|
||||||
|
sun) CFLAGS="-native -fast -xO5 -dalign"
|
||||||
|
if test "x$acx_maxopt_portable" = xyes; then
|
||||||
|
CFLAGS="$CFLAGS -xarch=generic"
|
||||||
|
fi;;
|
||||||
|
|
||||||
|
hp) CFLAGS="+Oall +Optrs_ansi +DSnative"
|
||||||
|
if test "x$acx_maxopt_portable" = xyes; then
|
||||||
|
CFLAGS="$CFLAGS +DAportable"
|
||||||
|
fi;;
|
||||||
|
|
||||||
|
ibm) if test "x$acx_maxopt_portable" = xno; then
|
||||||
|
xlc_opt="-qarch=auto -qtune=auto"
|
||||||
|
else
|
||||||
|
xlc_opt="-qtune=auto"
|
||||||
|
fi
|
||||||
|
AX_CHECK_COMPILE_FLAG($xlc_opt,
|
||||||
|
CFLAGS="-O3 -qansialias -w $xlc_opt",
|
||||||
|
[CFLAGS="-O3 -qansialias -w"
|
||||||
|
echo "******************************************************"
|
||||||
|
echo "* You seem to have the IBM C compiler. It is *"
|
||||||
|
echo "* recommended for best performance that you use: *"
|
||||||
|
echo "* *"
|
||||||
|
echo "* CFLAGS=-O3 -qarch=xxx -qtune=xxx -qansialias -w *"
|
||||||
|
echo "* ^^^ ^^^ *"
|
||||||
|
echo "* where xxx is pwr2, pwr3, 604, or whatever kind of *"
|
||||||
|
echo "* CPU you have. (Set the CFLAGS environment var. *"
|
||||||
|
echo "* and re-run configure.) For more info, man cc. *"
|
||||||
|
echo "******************************************************"])
|
||||||
|
;;
|
||||||
|
|
||||||
|
intel) CFLAGS="-O3 -ansi_alias"
|
||||||
|
if test "x$acx_maxopt_portable" = xno; then
|
||||||
|
icc_archflag=unknown
|
||||||
|
icc_flags=""
|
||||||
|
case $host_cpu in
|
||||||
|
i686*|x86_64*)
|
||||||
|
# icc accepts gcc assembly syntax, so these should work:
|
||||||
|
AX_GCC_X86_CPUID(0)
|
||||||
|
AX_GCC_X86_CPUID(1)
|
||||||
|
case $ax_cv_gcc_x86_cpuid_0 in # see AX_GCC_ARCHFLAG
|
||||||
|
*:756e6547:*:*) # Intel
|
||||||
|
case $ax_cv_gcc_x86_cpuid_1 in
|
||||||
|
*6a?:*[[234]]:*:*|*6[[789b]]?:*:*:*) icc_flags="-xK";;
|
||||||
|
*f3[[347]]:*:*:*|*f4[1347]:*:*:*) icc_flags="-xP -xN -xW -xK";;
|
||||||
|
*f??:*:*:*) icc_flags="-xN -xW -xK";;
|
||||||
|
esac ;;
|
||||||
|
esac ;;
|
||||||
|
esac
|
||||||
|
if test "x$icc_flags" != x; then
|
||||||
|
for flag in $icc_flags; do
|
||||||
|
AX_CHECK_COMPILE_FLAG($flag, [icc_archflag=$flag; break])
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
AC_MSG_CHECKING([for icc architecture flag])
|
||||||
|
AC_MSG_RESULT($icc_archflag)
|
||||||
|
if test "x$icc_archflag" != xunknown; then
|
||||||
|
CFLAGS="$CFLAGS $icc_archflag"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
gnu)
|
||||||
|
# default optimization flags for gcc on all systems
|
||||||
|
CFLAGS="-O3 -fomit-frame-pointer"
|
||||||
|
|
||||||
|
# -malign-double for x86 systems
|
||||||
|
AX_CHECK_COMPILE_FLAG(-malign-double, CFLAGS="$CFLAGS -malign-double")
|
||||||
|
|
||||||
|
# -fstrict-aliasing for gcc-2.95+
|
||||||
|
AX_CHECK_COMPILE_FLAG(-fstrict-aliasing,
|
||||||
|
CFLAGS="$CFLAGS -fstrict-aliasing")
|
||||||
|
|
||||||
|
# note that we enable "unsafe" fp optimization with other compilers, too
|
||||||
|
AX_CHECK_COMPILE_FLAG(-ffast-math, CFLAGS="$CFLAGS -ffast-math")
|
||||||
|
|
||||||
|
AX_GCC_ARCHFLAG($acx_maxopt_portable)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test -z "$CFLAGS"; then
|
||||||
|
echo ""
|
||||||
|
echo "********************************************************"
|
||||||
|
echo "* WARNING: Don't know the best CFLAGS for this system *"
|
||||||
|
echo "* Use ./configure CFLAGS=... to specify your own flags *"
|
||||||
|
echo "* (otherwise, a default of CFLAGS=-O3 will be used) *"
|
||||||
|
echo "********************************************************"
|
||||||
|
echo ""
|
||||||
|
CFLAGS="-O3"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AX_CHECK_COMPILE_FLAG($CFLAGS, [], [
|
||||||
|
echo ""
|
||||||
|
echo "********************************************************"
|
||||||
|
echo "* WARNING: The guessed CFLAGS don't seem to work with *"
|
||||||
|
echo "* your compiler. *"
|
||||||
|
echo "* Use ./configure CFLAGS=... to specify your own flags *"
|
||||||
|
echo "********************************************************"
|
||||||
|
echo ""
|
||||||
|
CFLAGS=""
|
||||||
|
])
|
||||||
|
|
||||||
|
fi
|
||||||
|
])
|
78
src/pplib/autoconf/ax_check_compiler_flags.m4
Normal file
78
src/pplib/autoconf/ax_check_compiler_flags.m4
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
# ===========================================================================
|
||||||
|
# http://autoconf-archive.cryp.to/ax_check_compiler_flags.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_CHECK_COMPILER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE])
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# Check whether the given compiler FLAGS work with the current language's
|
||||||
|
# compiler, or whether they give an error. (Warnings, however, are
|
||||||
|
# ignored.)
|
||||||
|
#
|
||||||
|
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||||
|
# success/failure.
|
||||||
|
#
|
||||||
|
# LAST MODIFICATION
|
||||||
|
#
|
||||||
|
# 2008-04-12
|
||||||
|
#
|
||||||
|
# COPYLEFT
|
||||||
|
#
|
||||||
|
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
|
||||||
|
# Copyright (c) 2008 Matteo Frigo
|
||||||
|
#
|
||||||
|
# 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/>.
|
||||||
|
#
|
||||||
|
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||||
|
# gives unlimited permission to copy, distribute and modify the configure
|
||||||
|
# scripts that are the output of Autoconf when processing the Macro. You
|
||||||
|
# need not follow the terms of the GNU General Public License when using
|
||||||
|
# or distributing such scripts, even though portions of the text of the
|
||||||
|
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||||
|
# all other use of the material that constitutes the Autoconf Macro.
|
||||||
|
#
|
||||||
|
# This special exception to the GPL applies to versions of the Autoconf
|
||||||
|
# Macro released by the Autoconf Macro Archive. When you make and
|
||||||
|
# distribute a modified version of the Autoconf Macro, you may extend this
|
||||||
|
# special exception to the GPL to apply to your modified version as well.
|
||||||
|
|
||||||
|
AC_DEFUN([AX_CHECK_COMPILER_FLAGS],
|
||||||
|
[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
|
||||||
|
AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1])
|
||||||
|
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
|
||||||
|
AS_LITERAL_IF([$1],
|
||||||
|
[AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1), [
|
||||||
|
ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
|
||||||
|
_AC_LANG_PREFIX[]FLAGS="$1"
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||||
|
AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
|
||||||
|
AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
|
||||||
|
_AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])],
|
||||||
|
[ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
|
||||||
|
_AC_LANG_PREFIX[]FLAGS="$1"
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
||||||
|
eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
|
||||||
|
eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
|
||||||
|
_AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])
|
||||||
|
eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)
|
||||||
|
AC_MSG_RESULT($ax_check_compiler_flags)
|
||||||
|
if test "x$ax_check_compiler_flags" = xyes; then
|
||||||
|
m4_default([$2], :)
|
||||||
|
else
|
||||||
|
m4_default([$3], :)
|
||||||
|
fi
|
||||||
|
])dnl AX_CHECK_COMPILER_FLAGS
|
130
src/pplib/autoconf/ax_check_openssl.m4
Normal file
130
src/pplib/autoconf/ax_check_openssl.m4
Normal file
|
@ -0,0 +1,130 @@
|
||||||
|
# ===========================================================================
|
||||||
|
# https://www.gnu.org/software/autoconf-archive/ax_check_openssl.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_CHECK_OPENSSL([action-if-found[, action-if-not-found]])
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# Look for OpenSSL in a number of default spots, or in a user-selected
|
||||||
|
# spot (via --with-openssl). Sets
|
||||||
|
#
|
||||||
|
# OPENSSL_INCLUDES to the include directives required
|
||||||
|
# OPENSSL_LIBS to the -l directives required
|
||||||
|
# OPENSSL_LDFLAGS to the -L or -R flags required
|
||||||
|
#
|
||||||
|
# and calls ACTION-IF-FOUND or ACTION-IF-NOT-FOUND appropriately
|
||||||
|
#
|
||||||
|
# This macro sets OPENSSL_INCLUDES such that source files should use the
|
||||||
|
# openssl/ directory in include directives:
|
||||||
|
#
|
||||||
|
# #include <openssl/hmac.h>
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2009,2010 Zmanda Inc. <http://www.zmanda.com/>
|
||||||
|
# Copyright (c) 2009,2010 Dustin J. Mitchell <dustin@zmanda.com>
|
||||||
|
#
|
||||||
|
# Copying and distribution of this file, with or without modification, are
|
||||||
|
# permitted in any medium without royalty provided the copyright notice
|
||||||
|
# and this notice are preserved. This file is offered as-is, without any
|
||||||
|
# warranty.
|
||||||
|
|
||||||
|
#serial 10
|
||||||
|
|
||||||
|
AU_ALIAS([CHECK_SSL], [AX_CHECK_OPENSSL])
|
||||||
|
AC_DEFUN([AX_CHECK_OPENSSL], [
|
||||||
|
found=false
|
||||||
|
AC_ARG_WITH([openssl],
|
||||||
|
[AS_HELP_STRING([--with-openssl=DIR],
|
||||||
|
[root of the OpenSSL directory])],
|
||||||
|
[
|
||||||
|
case "$withval" in
|
||||||
|
"" | y | ye | yes | n | no)
|
||||||
|
AC_MSG_ERROR([Invalid --with-openssl value])
|
||||||
|
;;
|
||||||
|
*) ssldirs="$withval"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
], [
|
||||||
|
# if pkg-config is installed and openssl has installed a .pc file,
|
||||||
|
# then use that information and don't search ssldirs
|
||||||
|
AC_CHECK_TOOL([PKG_CONFIG], [pkg-config])
|
||||||
|
if test x"$PKG_CONFIG" != x""; then
|
||||||
|
OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
|
||||||
|
if test $? = 0; then
|
||||||
|
OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
|
||||||
|
OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
|
||||||
|
found=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# no such luck; use some default ssldirs
|
||||||
|
if ! $found; then
|
||||||
|
ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
|
||||||
|
fi
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
|
||||||
|
# an 'openssl' subdirectory
|
||||||
|
|
||||||
|
if ! $found; then
|
||||||
|
OPENSSL_INCLUDES=
|
||||||
|
for ssldir in $ssldirs; do
|
||||||
|
AC_MSG_CHECKING([for openssl/ssl.h in $ssldir])
|
||||||
|
if test -f "$ssldir/include/openssl/ssl.h"; then
|
||||||
|
OPENSSL_INCLUDES="-I$ssldir/include"
|
||||||
|
OPENSSL_LDFLAGS="-L$ssldir/lib"
|
||||||
|
OPENSSL_LIBS="-lssl -lcrypto"
|
||||||
|
found=true
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
break
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# if the file wasn't found, well, go ahead and try the link anyway -- maybe
|
||||||
|
# it will just work!
|
||||||
|
fi
|
||||||
|
|
||||||
|
# try the preprocessor and linker with our new flags,
|
||||||
|
# being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether compiling and linking against OpenSSL works])
|
||||||
|
echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
|
||||||
|
"OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&AS_MESSAGE_LOG_FD
|
||||||
|
|
||||||
|
save_LIBS="$LIBS"
|
||||||
|
save_LDFLAGS="$LDFLAGS"
|
||||||
|
save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
|
||||||
|
LIBS="$OPENSSL_LIBS $LIBS"
|
||||||
|
CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
|
||||||
|
case "${host_cpu}-${host_os}" in
|
||||||
|
*mingw32*|*msys*)
|
||||||
|
LIBS="$LIBS -lwsock32 -luser32 -lgdi32"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AC_LINK_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM([#include <openssl/ssl.h>], [SSL_new(NULL)])],
|
||||||
|
[
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
$1
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
$2
|
||||||
|
])
|
||||||
|
CPPFLAGS="$save_CPPFLAGS"
|
||||||
|
LDFLAGS="$save_LDFLAGS"
|
||||||
|
LIBS="$save_LIBS"
|
||||||
|
|
||||||
|
AC_SUBST([OPENSSL_INCLUDES])
|
||||||
|
AC_SUBST([OPENSSL_LIBS])
|
||||||
|
AC_SUBST([OPENSSL_LDFLAGS])
|
||||||
|
])
|
142
src/pplib/autoconf/ax_check_zlib.m4
Normal file
142
src/pplib/autoconf/ax_check_zlib.m4
Normal file
|
@ -0,0 +1,142 @@
|
||||||
|
# ===========================================================================
|
||||||
|
# http://www.gnu.org/software/autoconf-archive/ax_check_zlib.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_CHECK_ZLIB([action-if-found], [action-if-not-found])
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# This macro searches for an installed zlib library. If nothing was
|
||||||
|
# specified when calling configure, it searches first in /usr/local and
|
||||||
|
# then in /usr, /opt/local and /sw. If the --with-zlib=DIR is specified,
|
||||||
|
# it will try to find it in DIR/include/zlib.h and DIR/lib/libz.a. If
|
||||||
|
# --without-zlib is specified, the library is not searched at all.
|
||||||
|
#
|
||||||
|
# If either the header file (zlib.h) or the library (libz) is not found,
|
||||||
|
# shell commands 'action-if-not-found' is run. If 'action-if-not-found' is
|
||||||
|
# not specified, the configuration exits on error, asking for a valid zlib
|
||||||
|
# installation directory or --without-zlib.
|
||||||
|
#
|
||||||
|
# If both header file and library are found, shell commands
|
||||||
|
# 'action-if-found' is run. If 'action-if-found' is not specified, the
|
||||||
|
# default action appends '-I${ZLIB_HOME}/include' to CPFLAGS, appends
|
||||||
|
# '-L$ZLIB_HOME}/lib' to LDFLAGS, prepends '-lz' to LIBS, and calls
|
||||||
|
# AC_DEFINE(HAVE_LIBZ). You should use autoheader to include a definition
|
||||||
|
# for this symbol in a config.h file. Sample usage in a C/C++ source is as
|
||||||
|
# follows:
|
||||||
|
#
|
||||||
|
# #ifdef HAVE_LIBZ
|
||||||
|
# #include <zlib.h>
|
||||||
|
# #endif /* HAVE_LIBZ */
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2008 Loic Dachary <loic@senga.org>
|
||||||
|
# Copyright (c) 2010 Bastien Chevreux <bach@chevreux.org>
|
||||||
|
#
|
||||||
|
# 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||||
|
# gives unlimited permission to copy, distribute and modify the configure
|
||||||
|
# scripts that are the output of Autoconf when processing the Macro. You
|
||||||
|
# need not follow the terms of the GNU General Public License when using
|
||||||
|
# or distributing such scripts, even though portions of the text of the
|
||||||
|
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||||
|
# all other use of the material that constitutes the Autoconf Macro.
|
||||||
|
#
|
||||||
|
# This special exception to the GPL applies to versions of the Autoconf
|
||||||
|
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||||
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
|
||||||
|
#serial 14
|
||||||
|
|
||||||
|
AU_ALIAS([CHECK_ZLIB], [AX_CHECK_ZLIB])
|
||||||
|
AC_DEFUN([AX_CHECK_ZLIB],
|
||||||
|
#
|
||||||
|
# Handle user hints
|
||||||
|
#
|
||||||
|
[AC_MSG_CHECKING(if zlib is wanted)
|
||||||
|
zlib_places="/usr/local /usr /opt/local /sw"
|
||||||
|
AC_ARG_WITH([zlib],
|
||||||
|
[ --with-zlib=DIR root directory path of zlib installation @<:@defaults to
|
||||||
|
/usr/local or /usr if not found in /usr/local@:>@
|
||||||
|
--without-zlib to disable zlib usage completely],
|
||||||
|
[if test "$withval" != no ; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
if test -d "$withval"
|
||||||
|
then
|
||||||
|
zlib_places="$withval $zlib_places"
|
||||||
|
else
|
||||||
|
AC_MSG_WARN([Sorry, $withval does not exist, checking usual places])
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
zlib_places=
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi],
|
||||||
|
[AC_MSG_RESULT(yes)])
|
||||||
|
|
||||||
|
#
|
||||||
|
# Locate zlib, if wanted
|
||||||
|
#
|
||||||
|
if test -n "${zlib_places}"
|
||||||
|
then
|
||||||
|
# check the user supplied or any other more or less 'standard' place:
|
||||||
|
# Most UNIX systems : /usr/local and /usr
|
||||||
|
# MacPorts / Fink on OSX : /opt/local respectively /sw
|
||||||
|
for ZLIB_HOME in ${zlib_places} ; do
|
||||||
|
if test -f "${ZLIB_HOME}/include/zlib.h"; then break; fi
|
||||||
|
ZLIB_HOME=""
|
||||||
|
done
|
||||||
|
|
||||||
|
ZLIB_OLD_LDFLAGS=$LDFLAGS
|
||||||
|
ZLIB_OLD_CPPFLAGS=$CPPFLAGS
|
||||||
|
if test -n "${ZLIB_HOME}"; then
|
||||||
|
LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
|
||||||
|
CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
|
||||||
|
fi
|
||||||
|
AC_LANG_SAVE
|
||||||
|
AC_LANG_C
|
||||||
|
AC_CHECK_LIB([z], [inflateEnd], [zlib_cv_libz=yes], [zlib_cv_libz=no])
|
||||||
|
AC_CHECK_HEADER([zlib.h], [zlib_cv_zlib_h=yes], [zlib_cv_zlib_h=no])
|
||||||
|
AC_LANG_RESTORE
|
||||||
|
if test "$zlib_cv_libz" = "yes" && test "$zlib_cv_zlib_h" = "yes"
|
||||||
|
then
|
||||||
|
#
|
||||||
|
# If both library and header were found, action-if-found
|
||||||
|
#
|
||||||
|
m4_ifblank([$1],[
|
||||||
|
CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
|
||||||
|
LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
|
||||||
|
LIBS="-lz $LIBS"
|
||||||
|
AC_DEFINE([HAVE_LIBZ], [1],
|
||||||
|
[Define to 1 if you have `z' library (-lz)])
|
||||||
|
],[
|
||||||
|
# Restore variables
|
||||||
|
LDFLAGS="$ZLIB_OLD_LDFLAGS"
|
||||||
|
CPPFLAGS="$ZLIB_OLD_CPPFLAGS"
|
||||||
|
$1
|
||||||
|
])
|
||||||
|
else
|
||||||
|
#
|
||||||
|
# If either header or library was not found, action-if-not-found
|
||||||
|
#
|
||||||
|
m4_default([$2],[
|
||||||
|
AC_MSG_ERROR([either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib])
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
])
|
558
src/pplib/autoconf/ax_cxx_compile_stdcxx.m4
Normal file
558
src/pplib/autoconf/ax_cxx_compile_stdcxx.m4
Normal file
|
@ -0,0 +1,558 @@
|
||||||
|
# ===========================================================================
|
||||||
|
# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# Check for baseline language coverage in the compiler for the specified
|
||||||
|
# version of the C++ standard. If necessary, add switches to CXXFLAGS to
|
||||||
|
# enable support. VERSION may be '11' (for the C++11 standard) or '14'
|
||||||
|
# (for the C++14 standard).
|
||||||
|
#
|
||||||
|
# The second argument, if specified, indicates whether you insist on an
|
||||||
|
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
|
||||||
|
# -std=c++11). If neither is specified, you get whatever works, with
|
||||||
|
# preference for an extended mode.
|
||||||
|
#
|
||||||
|
# The third argument, if specified 'mandatory' or if left unspecified,
|
||||||
|
# indicates that baseline support for the specified C++ standard is
|
||||||
|
# required and that the macro should error out if no mode with that
|
||||||
|
# support is found. If specified 'optional', then configuration proceeds
|
||||||
|
# regardless, after defining HAVE_CXX${VERSION} if and only if a
|
||||||
|
# supporting mode is found.
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
|
||||||
|
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
|
||||||
|
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
|
||||||
|
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
|
||||||
|
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
|
||||||
|
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
|
||||||
|
#
|
||||||
|
# Copying and distribution of this file, with or without modification, are
|
||||||
|
# permitted in any medium without royalty provided the copyright notice
|
||||||
|
# and this notice are preserved. This file is offered as-is, without any
|
||||||
|
# warranty.
|
||||||
|
|
||||||
|
#serial 1
|
||||||
|
|
||||||
|
dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
|
||||||
|
dnl (serial version number 13).
|
||||||
|
|
||||||
|
AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
|
||||||
|
m4_if([$1], [11], [],
|
||||||
|
[$1], [14], [],
|
||||||
|
[$1], [17], [m4_fatal([support for C++17 not yet implemented in AX_CXX_COMPILE_STDCXX])],
|
||||||
|
[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
|
||||||
|
m4_if([$2], [], [],
|
||||||
|
[$2], [ext], [],
|
||||||
|
[$2], [noext], [],
|
||||||
|
[m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
|
||||||
|
m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
|
||||||
|
[$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
|
||||||
|
[$3], [optional], [ax_cxx_compile_cxx$1_required=false],
|
||||||
|
[m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
|
||||||
|
AC_LANG_PUSH([C++])dnl
|
||||||
|
ac_success=no
|
||||||
|
AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
|
||||||
|
ax_cv_cxx_compile_cxx$1,
|
||||||
|
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||||
|
[ax_cv_cxx_compile_cxx$1=yes],
|
||||||
|
[ax_cv_cxx_compile_cxx$1=no])])
|
||||||
|
if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
|
||||||
|
ac_success=yes
|
||||||
|
fi
|
||||||
|
|
||||||
|
m4_if([$2], [noext], [], [dnl
|
||||||
|
if test x$ac_success = xno; then
|
||||||
|
for switch in -std=gnu++$1 -std=gnu++0x; do
|
||||||
|
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
|
||||||
|
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
|
||||||
|
$cachevar,
|
||||||
|
[ac_save_CXXFLAGS="$CXXFLAGS"
|
||||||
|
CXXFLAGS="$CXXFLAGS $switch"
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||||
|
[eval $cachevar=yes],
|
||||||
|
[eval $cachevar=no])
|
||||||
|
CXXFLAGS="$ac_save_CXXFLAGS"])
|
||||||
|
if eval test x\$$cachevar = xyes; then
|
||||||
|
CXXFLAGS="$CXXFLAGS $switch"
|
||||||
|
ac_success=yes
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi])
|
||||||
|
|
||||||
|
m4_if([$2], [ext], [], [dnl
|
||||||
|
if test x$ac_success = xno; then
|
||||||
|
dnl HP's aCC needs +std=c++11 according to:
|
||||||
|
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
|
||||||
|
dnl Cray's crayCC needs "-h std=c++11"
|
||||||
|
for switch in -std=c++$1 -std=c++0x +std=c++$1 "-h std=c++$1"; do
|
||||||
|
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
|
||||||
|
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
|
||||||
|
$cachevar,
|
||||||
|
[ac_save_CXXFLAGS="$CXXFLAGS"
|
||||||
|
CXXFLAGS="$CXXFLAGS $switch"
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
|
||||||
|
[eval $cachevar=yes],
|
||||||
|
[eval $cachevar=no])
|
||||||
|
CXXFLAGS="$ac_save_CXXFLAGS"])
|
||||||
|
if eval test x\$$cachevar = xyes; then
|
||||||
|
CXXFLAGS="$CXXFLAGS $switch"
|
||||||
|
ac_success=yes
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi])
|
||||||
|
AC_LANG_POP([C++])
|
||||||
|
if test x$ax_cxx_compile_cxx$1_required = xtrue; then
|
||||||
|
if test x$ac_success = xno; then
|
||||||
|
AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if test x$ac_success = xno; then
|
||||||
|
HAVE_CXX$1=0
|
||||||
|
AC_MSG_NOTICE([No compiler with C++$1 support was found])
|
||||||
|
else
|
||||||
|
HAVE_CXX$1=1
|
||||||
|
AC_DEFINE(HAVE_CXX$1,1,
|
||||||
|
[define if the compiler supports basic C++$1 syntax])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST(HAVE_CXX$1)
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl Test body for checking C++11 support
|
||||||
|
|
||||||
|
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
|
||||||
|
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
dnl Test body for checking C++14 support
|
||||||
|
|
||||||
|
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
|
||||||
|
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
|
||||||
|
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
dnl Tests for new features in C++11
|
||||||
|
|
||||||
|
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
|
||||||
|
|
||||||
|
// If the compiler admits that it is not ready for C++11, why torture it?
|
||||||
|
// Hopefully, this will speed up the test.
|
||||||
|
|
||||||
|
#ifndef __cplusplus
|
||||||
|
|
||||||
|
#error "This is not a C++ compiler"
|
||||||
|
|
||||||
|
#elif __cplusplus < 201103L
|
||||||
|
|
||||||
|
#error "This is not a C++11 compiler"
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
namespace cxx11
|
||||||
|
{
|
||||||
|
|
||||||
|
namespace test_static_assert
|
||||||
|
{
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
struct check
|
||||||
|
{
|
||||||
|
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace test_final_override
|
||||||
|
{
|
||||||
|
|
||||||
|
struct Base
|
||||||
|
{
|
||||||
|
virtual void f() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Derived : public Base
|
||||||
|
{
|
||||||
|
virtual void f() override {}
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace test_double_right_angle_brackets
|
||||||
|
{
|
||||||
|
|
||||||
|
template < typename T >
|
||||||
|
struct check {};
|
||||||
|
|
||||||
|
typedef check<void> single_type;
|
||||||
|
typedef check<check<void>> double_type;
|
||||||
|
typedef check<check<check<void>>> triple_type;
|
||||||
|
typedef check<check<check<check<void>>>> quadruple_type;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace test_decltype
|
||||||
|
{
|
||||||
|
|
||||||
|
int
|
||||||
|
f()
|
||||||
|
{
|
||||||
|
int a = 1;
|
||||||
|
decltype(a) b = 2;
|
||||||
|
return a + b;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace test_type_deduction
|
||||||
|
{
|
||||||
|
|
||||||
|
template < typename T1, typename T2 >
|
||||||
|
struct is_same
|
||||||
|
{
|
||||||
|
static const bool value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
template < typename T >
|
||||||
|
struct is_same<T, T>
|
||||||
|
{
|
||||||
|
static const bool value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
template < typename T1, typename T2 >
|
||||||
|
auto
|
||||||
|
add(T1 a1, T2 a2) -> decltype(a1 + a2)
|
||||||
|
{
|
||||||
|
return a1 + a2;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
test(const int c, volatile int v)
|
||||||
|
{
|
||||||
|
static_assert(is_same<int, decltype(0)>::value == true, "");
|
||||||
|
static_assert(is_same<int, decltype(c)>::value == false, "");
|
||||||
|
static_assert(is_same<int, decltype(v)>::value == false, "");
|
||||||
|
auto ac = c;
|
||||||
|
auto av = v;
|
||||||
|
auto sumi = ac + av + 'x';
|
||||||
|
auto sumf = ac + av + 1.0;
|
||||||
|
static_assert(is_same<int, decltype(ac)>::value == true, "");
|
||||||
|
static_assert(is_same<int, decltype(av)>::value == true, "");
|
||||||
|
static_assert(is_same<int, decltype(sumi)>::value == true, "");
|
||||||
|
static_assert(is_same<int, decltype(sumf)>::value == false, "");
|
||||||
|
static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
|
||||||
|
return (sumf > 0.0) ? sumi : add(c, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace test_noexcept
|
||||||
|
{
|
||||||
|
|
||||||
|
int f() { return 0; }
|
||||||
|
int g() noexcept { return 0; }
|
||||||
|
|
||||||
|
static_assert(noexcept(f()) == false, "");
|
||||||
|
static_assert(noexcept(g()) == true, "");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace test_constexpr
|
||||||
|
{
|
||||||
|
|
||||||
|
template < typename CharT >
|
||||||
|
unsigned long constexpr
|
||||||
|
strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
|
||||||
|
{
|
||||||
|
return *s ? strlen_c_r(s + 1, acc + 1) : acc;
|
||||||
|
}
|
||||||
|
|
||||||
|
template < typename CharT >
|
||||||
|
unsigned long constexpr
|
||||||
|
strlen_c(const CharT *const s) noexcept
|
||||||
|
{
|
||||||
|
return strlen_c_r(s, 0UL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static_assert(strlen_c("") == 0UL, "");
|
||||||
|
static_assert(strlen_c("1") == 1UL, "");
|
||||||
|
static_assert(strlen_c("example") == 7UL, "");
|
||||||
|
static_assert(strlen_c("another\0example") == 7UL, "");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace test_rvalue_references
|
||||||
|
{
|
||||||
|
|
||||||
|
template < int N >
|
||||||
|
struct answer
|
||||||
|
{
|
||||||
|
static constexpr int value = N;
|
||||||
|
};
|
||||||
|
|
||||||
|
answer<1> f(int&) { return answer<1>(); }
|
||||||
|
answer<2> f(const int&) { return answer<2>(); }
|
||||||
|
answer<3> f(int&&) { return answer<3>(); }
|
||||||
|
|
||||||
|
void
|
||||||
|
test()
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
const int c = 0;
|
||||||
|
static_assert(decltype(f(i))::value == 1, "");
|
||||||
|
static_assert(decltype(f(c))::value == 2, "");
|
||||||
|
static_assert(decltype(f(0))::value == 3, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace test_uniform_initialization
|
||||||
|
{
|
||||||
|
|
||||||
|
struct test
|
||||||
|
{
|
||||||
|
static const int zero {};
|
||||||
|
static const int one {1};
|
||||||
|
};
|
||||||
|
|
||||||
|
static_assert(test::zero == 0, "");
|
||||||
|
static_assert(test::one == 1, "");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace test_lambdas
|
||||||
|
{
|
||||||
|
|
||||||
|
void
|
||||||
|
test1()
|
||||||
|
{
|
||||||
|
auto lambda1 = [](){};
|
||||||
|
auto lambda2 = lambda1;
|
||||||
|
lambda1();
|
||||||
|
lambda2();
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
test2()
|
||||||
|
{
|
||||||
|
auto a = [](int i, int j){ return i + j; }(1, 2);
|
||||||
|
auto b = []() -> int { return '0'; }();
|
||||||
|
auto c = [=](){ return a + b; }();
|
||||||
|
auto d = [&](){ return c; }();
|
||||||
|
auto e = [a, &b](int x) mutable {
|
||||||
|
const auto identity = [](int y){ return y; };
|
||||||
|
for (auto i = 0; i < a; ++i)
|
||||||
|
a += b--;
|
||||||
|
return x + identity(a + b);
|
||||||
|
}(0);
|
||||||
|
return a + b + c + d + e;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
test3()
|
||||||
|
{
|
||||||
|
const auto nullary = [](){ return 0; };
|
||||||
|
const auto unary = [](int x){ return x; };
|
||||||
|
using nullary_t = decltype(nullary);
|
||||||
|
using unary_t = decltype(unary);
|
||||||
|
const auto higher1st = [](nullary_t f){ return f(); };
|
||||||
|
const auto higher2nd = [unary](nullary_t f1){
|
||||||
|
return [unary, f1](unary_t f2){ return f2(unary(f1())); };
|
||||||
|
};
|
||||||
|
return higher1st(nullary) + higher2nd(nullary)(unary);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace test_variadic_templates
|
||||||
|
{
|
||||||
|
|
||||||
|
template <int...>
|
||||||
|
struct sum;
|
||||||
|
|
||||||
|
template <int N0, int... N1toN>
|
||||||
|
struct sum<N0, N1toN...>
|
||||||
|
{
|
||||||
|
static constexpr auto value = N0 + sum<N1toN...>::value;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct sum<>
|
||||||
|
{
|
||||||
|
static constexpr auto value = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
static_assert(sum<>::value == 0, "");
|
||||||
|
static_assert(sum<1>::value == 1, "");
|
||||||
|
static_assert(sum<23>::value == 23, "");
|
||||||
|
static_assert(sum<1, 2>::value == 3, "");
|
||||||
|
static_assert(sum<5, 5, 11>::value == 21, "");
|
||||||
|
static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
|
||||||
|
// Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
|
||||||
|
// because of this.
|
||||||
|
namespace test_template_alias_sfinae
|
||||||
|
{
|
||||||
|
|
||||||
|
struct foo {};
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
using member = typename T::member_type;
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
void func(...) {}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
void func(member<T>*) {}
|
||||||
|
|
||||||
|
void test();
|
||||||
|
|
||||||
|
void test() { func<foo>(0); }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace cxx11
|
||||||
|
|
||||||
|
#endif // __cplusplus >= 201103L
|
||||||
|
|
||||||
|
]])
|
||||||
|
|
||||||
|
|
||||||
|
dnl Tests for new features in C++14
|
||||||
|
|
||||||
|
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
|
||||||
|
|
||||||
|
// If the compiler admits that it is not ready for C++14, why torture it?
|
||||||
|
// Hopefully, this will speed up the test.
|
||||||
|
|
||||||
|
#ifndef __cplusplus
|
||||||
|
|
||||||
|
#error "This is not a C++ compiler"
|
||||||
|
|
||||||
|
#elif __cplusplus < 201402L
|
||||||
|
|
||||||
|
#error "This is not a C++14 compiler"
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
namespace cxx14
|
||||||
|
{
|
||||||
|
|
||||||
|
namespace test_polymorphic_lambdas
|
||||||
|
{
|
||||||
|
|
||||||
|
int
|
||||||
|
test()
|
||||||
|
{
|
||||||
|
const auto lambda = [](auto&&... args){
|
||||||
|
const auto istiny = [](auto x){
|
||||||
|
return (sizeof(x) == 1UL) ? 1 : 0;
|
||||||
|
};
|
||||||
|
const int aretiny[] = { istiny(args)... };
|
||||||
|
return aretiny[0];
|
||||||
|
};
|
||||||
|
return lambda(1, 1L, 1.0f, '1');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace test_binary_literals
|
||||||
|
{
|
||||||
|
|
||||||
|
constexpr auto ivii = 0b0000000000101010;
|
||||||
|
static_assert(ivii == 42, "wrong value");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace test_generalized_constexpr
|
||||||
|
{
|
||||||
|
|
||||||
|
template < typename CharT >
|
||||||
|
constexpr unsigned long
|
||||||
|
strlen_c(const CharT *const s) noexcept
|
||||||
|
{
|
||||||
|
auto length = 0UL;
|
||||||
|
for (auto p = s; *p; ++p)
|
||||||
|
++length;
|
||||||
|
return length;
|
||||||
|
}
|
||||||
|
|
||||||
|
static_assert(strlen_c("") == 0UL, "");
|
||||||
|
static_assert(strlen_c("x") == 1UL, "");
|
||||||
|
static_assert(strlen_c("test") == 4UL, "");
|
||||||
|
static_assert(strlen_c("another\0test") == 7UL, "");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace test_lambda_init_capture
|
||||||
|
{
|
||||||
|
|
||||||
|
int
|
||||||
|
test()
|
||||||
|
{
|
||||||
|
auto x = 0;
|
||||||
|
const auto lambda1 = [a = x](int b){ return a + b; };
|
||||||
|
const auto lambda2 = [a = lambda1(x)](){ return a; };
|
||||||
|
return lambda2();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace test_digit_seperators
|
||||||
|
{
|
||||||
|
|
||||||
|
constexpr auto ten_million = 100'000'000;
|
||||||
|
static_assert(ten_million == 100000000, "");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace test_return_type_deduction
|
||||||
|
{
|
||||||
|
|
||||||
|
auto f(int& x) { return x; }
|
||||||
|
decltype(auto) g(int& x) { return x; }
|
||||||
|
|
||||||
|
template < typename T1, typename T2 >
|
||||||
|
struct is_same
|
||||||
|
{
|
||||||
|
static constexpr auto value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
template < typename T >
|
||||||
|
struct is_same<T, T>
|
||||||
|
{
|
||||||
|
static constexpr auto value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
int
|
||||||
|
test()
|
||||||
|
{
|
||||||
|
auto x = 0;
|
||||||
|
static_assert(is_same<int, decltype(f(x))>::value, "");
|
||||||
|
static_assert(is_same<int&, decltype(g(x))>::value, "");
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace cxx14
|
||||||
|
|
||||||
|
#endif // __cplusplus >= 201402L
|
||||||
|
|
||||||
|
]])
|
39
src/pplib/autoconf/ax_cxx_compile_stdcxx_11.m4
Normal file
39
src/pplib/autoconf/ax_cxx_compile_stdcxx_11.m4
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
# ============================================================================
|
||||||
|
# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
|
||||||
|
# ============================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional])
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# Check for baseline language coverage in the compiler for the C++11
|
||||||
|
# standard; if necessary, add switches to CXXFLAGS to enable support.
|
||||||
|
#
|
||||||
|
# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
|
||||||
|
# macro with the version set to C++11. The two optional arguments are
|
||||||
|
# forwarded literally as the second and third argument respectively.
|
||||||
|
# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
|
||||||
|
# more information. If you want to use this macro, you also need to
|
||||||
|
# download the ax_cxx_compile_stdcxx.m4 file.
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
|
||||||
|
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
|
||||||
|
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
|
||||||
|
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
|
||||||
|
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
|
||||||
|
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
|
||||||
|
#
|
||||||
|
# Copying and distribution of this file, with or without modification, are
|
||||||
|
# permitted in any medium without royalty provided the copyright notice
|
||||||
|
# and this notice are preserved. This file is offered as-is, without any
|
||||||
|
# warranty.
|
||||||
|
|
||||||
|
#serial 14
|
||||||
|
|
||||||
|
include([ax_cxx_compile_stdcxx.m4])
|
||||||
|
|
||||||
|
AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])])
|
225
src/pplib/autoconf/ax_gcc_archflag.m4
Normal file
225
src/pplib/autoconf/ax_gcc_archflag.m4
Normal file
|
@ -0,0 +1,225 @@
|
||||||
|
# ===========================================================================
|
||||||
|
# http://www.gnu.org/software/autoconf-archive/ax_gcc_archflag.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_GCC_ARCHFLAG([PORTABLE?], [ACTION-SUCCESS], [ACTION-FAILURE])
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# This macro tries to guess the "native" arch corresponding to the target
|
||||||
|
# architecture for use with gcc's -march=arch or -mtune=arch flags. If
|
||||||
|
# found, the cache variable $ax_cv_gcc_archflag is set to this flag and
|
||||||
|
# ACTION-SUCCESS is executed; otherwise $ax_cv_gcc_archflag is set to
|
||||||
|
# "unknown" and ACTION-FAILURE is executed. The default ACTION-SUCCESS is
|
||||||
|
# to add $ax_cv_gcc_archflag to the end of $CFLAGS.
|
||||||
|
#
|
||||||
|
# PORTABLE? should be either [yes] (default) or [no]. In the former case,
|
||||||
|
# the flag is set to -mtune (or equivalent) so that the architecture is
|
||||||
|
# only used for tuning, but the instruction set used is still portable. In
|
||||||
|
# the latter case, the flag is set to -march (or equivalent) so that
|
||||||
|
# architecture-specific instructions are enabled.
|
||||||
|
#
|
||||||
|
# The user can specify --with-gcc-arch=<arch> in order to override the
|
||||||
|
# macro's choice of architecture, or --without-gcc-arch to disable this.
|
||||||
|
#
|
||||||
|
# When cross-compiling, or if $CC is not gcc, then ACTION-FAILURE is
|
||||||
|
# called unless the user specified --with-gcc-arch manually.
|
||||||
|
#
|
||||||
|
# Requires macros: AX_CHECK_COMPILE_FLAG, AX_GCC_X86_CPUID
|
||||||
|
#
|
||||||
|
# (The main emphasis here is on recent CPUs, on the principle that doing
|
||||||
|
# high-performance computing on old hardware is uncommon.)
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
|
||||||
|
# Copyright (c) 2008 Matteo Frigo
|
||||||
|
# Copyright (c) 2012 Tsukasa Oi
|
||||||
|
#
|
||||||
|
# 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/>.
|
||||||
|
#
|
||||||
|
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||||
|
# gives unlimited permission to copy, distribute and modify the configure
|
||||||
|
# scripts that are the output of Autoconf when processing the Macro. You
|
||||||
|
# need not follow the terms of the GNU General Public License when using
|
||||||
|
# or distributing such scripts, even though portions of the text of the
|
||||||
|
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||||
|
# all other use of the material that constitutes the Autoconf Macro.
|
||||||
|
#
|
||||||
|
# This special exception to the GPL applies to versions of the Autoconf
|
||||||
|
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||||
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
|
||||||
|
#serial 13
|
||||||
|
|
||||||
|
AC_DEFUN([AX_GCC_ARCHFLAG],
|
||||||
|
[AC_REQUIRE([AC_PROG_CC])
|
||||||
|
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||||
|
|
||||||
|
AC_ARG_WITH(gcc-arch, [AS_HELP_STRING([--with-gcc-arch=<arch>], [use architecture <arch> for gcc -march/-mtune, instead of guessing])],
|
||||||
|
ax_gcc_arch=$withval, ax_gcc_arch=yes)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for gcc architecture flag])
|
||||||
|
AC_MSG_RESULT([])
|
||||||
|
AC_CACHE_VAL(ax_cv_gcc_archflag,
|
||||||
|
[
|
||||||
|
ax_cv_gcc_archflag="unknown"
|
||||||
|
|
||||||
|
if test "$GCC" = yes; then
|
||||||
|
|
||||||
|
if test "x$ax_gcc_arch" = xyes; then
|
||||||
|
ax_gcc_arch=""
|
||||||
|
if test "$cross_compiling" = no; then
|
||||||
|
case $host_cpu in
|
||||||
|
i[[3456]]86*|x86_64*|amd64*) # use cpuid codes
|
||||||
|
AX_GCC_X86_CPUID(0)
|
||||||
|
AX_GCC_X86_CPUID(1)
|
||||||
|
case $ax_cv_gcc_x86_cpuid_0 in
|
||||||
|
*:756e6547:*:*) # Intel
|
||||||
|
case $ax_cv_gcc_x86_cpuid_1 in
|
||||||
|
*5[[48]]?:*:*:*) ax_gcc_arch="pentium-mmx pentium" ;;
|
||||||
|
*5??:*:*:*) ax_gcc_arch=pentium ;;
|
||||||
|
*1?6[[7d]]?:*:*:*) ax_gcc_arch="penryn core2 pentium-m pentium3 pentiumpro" ;;
|
||||||
|
*1?6[[aef]]?:*:*:*|*2?6[[5cef]]?:*:*:*) ax_gcc_arch="corei7 core2 pentium-m pentium3 pentiumpro" ;;
|
||||||
|
*1?6c?:*:*:*|*[[23]]?66?:*:*:*) ax_gcc_arch="atom core2 pentium-m pentium3 pentiumpro" ;;
|
||||||
|
*2?6[[ad]]?:*:*:*) ax_gcc_arch="corei7-avx corei7 core2 pentium-m pentium3 pentiumpro" ;;
|
||||||
|
*[[1-9a-f]]?6??:*:*:*) ax_gcc_arch="core2 pentiumpro" ;;
|
||||||
|
*6[[3456]]?:*:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
|
||||||
|
*6a?:*[[01]]:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
|
||||||
|
*6a?:*[[234]]:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
|
||||||
|
*6[[9de]]?:*:*:*) ax_gcc_arch="pentium-m pentium3 pentiumpro" ;;
|
||||||
|
*6[[78b]]?:*:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
|
||||||
|
*6f?:*:*:*) ax_gcc_arch="core2 pentium-m pentium3 pentiumpro" ;;
|
||||||
|
*6??:*:*:*) ax_gcc_arch=pentiumpro ;;
|
||||||
|
*f3[[347]]:*:*:*|*f4[1347]:*:*:*|*f6?:*:*:*)
|
||||||
|
case $host_cpu in
|
||||||
|
x86_64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;;
|
||||||
|
*) ax_gcc_arch="prescott pentium4 pentiumpro" ;;
|
||||||
|
esac ;;
|
||||||
|
*f??:*:*:*) ax_gcc_arch="pentium4 pentiumpro";;
|
||||||
|
esac ;;
|
||||||
|
*:68747541:*:*) # AMD
|
||||||
|
case $ax_cv_gcc_x86_cpuid_1 in
|
||||||
|
*5[[67]]?:*:*:*) ax_gcc_arch=k6 ;;
|
||||||
|
*5[[8d]]?:*:*:*) ax_gcc_arch="k6-2 k6" ;;
|
||||||
|
*5[[9]]?:*:*:*) ax_gcc_arch="k6-3 k6" ;;
|
||||||
|
*60?:*:*:*) ax_gcc_arch=k7 ;;
|
||||||
|
*6[[12]]?:*:*:*) ax_gcc_arch="athlon k7" ;;
|
||||||
|
*6[[34]]?:*:*:*) ax_gcc_arch="athlon-tbird k7" ;;
|
||||||
|
*67?:*:*:*) ax_gcc_arch="athlon-4 athlon k7" ;;
|
||||||
|
*6[[68a]]?:*:*:*)
|
||||||
|
AX_GCC_X86_CPUID(0x80000006) # L2 cache size
|
||||||
|
case $ax_cv_gcc_x86_cpuid_0x80000006 in
|
||||||
|
*:*:*[[1-9a-f]]??????:*) # (L2 = ecx >> 16) >= 256
|
||||||
|
ax_gcc_arch="athlon-xp athlon-4 athlon k7" ;;
|
||||||
|
*) ax_gcc_arch="athlon-4 athlon k7" ;;
|
||||||
|
esac ;;
|
||||||
|
*5??f??:*:*:*) ax_gcc_arch="btver1 amdfam10 k8" ;;
|
||||||
|
*6??f??:*:*:*) ax_gcc_arch="bdver1 amdfam10 k8" ;;
|
||||||
|
*[[1-9a-f]]??f??:*:*:*) ax_gcc_arch="amdfam10 k8" ;;
|
||||||
|
*f[[4cef8b]]?:*:*:*) ax_gcc_arch="athlon64 k8" ;;
|
||||||
|
*f5?:*:*:*) ax_gcc_arch="opteron k8" ;;
|
||||||
|
*f7?:*:*:*) ax_gcc_arch="athlon-fx opteron k8" ;;
|
||||||
|
*f??:*:*:*) ax_gcc_arch="k8" ;;
|
||||||
|
esac ;;
|
||||||
|
*:746e6543:*:*) # IDT
|
||||||
|
case $ax_cv_gcc_x86_cpuid_1 in
|
||||||
|
*54?:*:*:*) ax_gcc_arch=winchip-c6 ;;
|
||||||
|
*58?:*:*:*) ax_gcc_arch=winchip2 ;;
|
||||||
|
*6[[78]]?:*:*:*) ax_gcc_arch=c3 ;;
|
||||||
|
*69?:*:*:*) ax_gcc_arch="c3-2 c3" ;;
|
||||||
|
esac ;;
|
||||||
|
esac
|
||||||
|
if test x"$ax_gcc_arch" = x; then # fallback
|
||||||
|
case $host_cpu in
|
||||||
|
i586*) ax_gcc_arch=pentium ;;
|
||||||
|
i686*) ax_gcc_arch=pentiumpro ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
sparc*)
|
||||||
|
AC_PATH_PROG([PRTDIAG], [prtdiag], [prtdiag], [$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/])
|
||||||
|
cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null`
|
||||||
|
cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters`
|
||||||
|
case $cputype in
|
||||||
|
*ultrasparciv*) ax_gcc_arch="ultrasparc4 ultrasparc3 ultrasparc v9" ;;
|
||||||
|
*ultrasparciii*) ax_gcc_arch="ultrasparc3 ultrasparc v9" ;;
|
||||||
|
*ultrasparc*) ax_gcc_arch="ultrasparc v9" ;;
|
||||||
|
*supersparc*|*tms390z5[[05]]*) ax_gcc_arch="supersparc v8" ;;
|
||||||
|
*hypersparc*|*rt62[[056]]*) ax_gcc_arch="hypersparc v8" ;;
|
||||||
|
*cypress*) ax_gcc_arch=cypress ;;
|
||||||
|
esac ;;
|
||||||
|
|
||||||
|
alphaev5) ax_gcc_arch=ev5 ;;
|
||||||
|
alphaev56) ax_gcc_arch=ev56 ;;
|
||||||
|
alphapca56) ax_gcc_arch="pca56 ev56" ;;
|
||||||
|
alphapca57) ax_gcc_arch="pca57 pca56 ev56" ;;
|
||||||
|
alphaev6) ax_gcc_arch=ev6 ;;
|
||||||
|
alphaev67) ax_gcc_arch=ev67 ;;
|
||||||
|
alphaev68) ax_gcc_arch="ev68 ev67" ;;
|
||||||
|
alphaev69) ax_gcc_arch="ev69 ev68 ev67" ;;
|
||||||
|
alphaev7) ax_gcc_arch="ev7 ev69 ev68 ev67" ;;
|
||||||
|
alphaev79) ax_gcc_arch="ev79 ev7 ev69 ev68 ev67" ;;
|
||||||
|
|
||||||
|
powerpc*)
|
||||||
|
cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null`
|
||||||
|
cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'`
|
||||||
|
case $cputype in
|
||||||
|
*750*) ax_gcc_arch="750 G3" ;;
|
||||||
|
*740[[0-9]]*) ax_gcc_arch="$cputype 7400 G4" ;;
|
||||||
|
*74[[4-5]][[0-9]]*) ax_gcc_arch="$cputype 7450 G4" ;;
|
||||||
|
*74[[0-9]][[0-9]]*) ax_gcc_arch="$cputype G4" ;;
|
||||||
|
*970*) ax_gcc_arch="970 G5 power4";;
|
||||||
|
*POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";;
|
||||||
|
*POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";;
|
||||||
|
603ev|8240) ax_gcc_arch="$cputype 603e 603";;
|
||||||
|
*) ax_gcc_arch=$cputype ;;
|
||||||
|
esac
|
||||||
|
ax_gcc_arch="$ax_gcc_arch powerpc"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi # not cross-compiling
|
||||||
|
fi # guess arch
|
||||||
|
|
||||||
|
if test "x$ax_gcc_arch" != x -a "x$ax_gcc_arch" != xno; then
|
||||||
|
for arch in $ax_gcc_arch; do
|
||||||
|
if test "x[]m4_default([$1],yes)" = xyes; then # if we require portable code
|
||||||
|
flags="-mtune=$arch"
|
||||||
|
# -mcpu=$arch and m$arch generate nonportable code on every arch except
|
||||||
|
# x86. And some other arches (e.g. Alpha) don't accept -mtune. Grrr.
|
||||||
|
case $host_cpu in i*86|x86_64*) flags="$flags -mcpu=$arch -m$arch";; esac
|
||||||
|
else
|
||||||
|
flags="-march=$arch -mcpu=$arch -m$arch"
|
||||||
|
fi
|
||||||
|
for flag in $flags; do
|
||||||
|
AX_CHECK_COMPILE_FLAG($flag, [ax_cv_gcc_archflag=$flag; break])
|
||||||
|
done
|
||||||
|
test "x$ax_cv_gcc_archflag" = xunknown || break
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi # $GCC=yes
|
||||||
|
])
|
||||||
|
AC_MSG_CHECKING([for gcc architecture flag])
|
||||||
|
AC_MSG_RESULT($ax_cv_gcc_archflag)
|
||||||
|
if test "x$ax_cv_gcc_archflag" = xunknown; then
|
||||||
|
m4_default([$3],:)
|
||||||
|
else
|
||||||
|
m4_default([$2], [CFLAGS="$CFLAGS $ax_cv_gcc_archflag"])
|
||||||
|
fi
|
||||||
|
])
|
79
src/pplib/autoconf/ax_gcc_x86_cpuid.m4
Normal file
79
src/pplib/autoconf/ax_gcc_x86_cpuid.m4
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
# ===========================================================================
|
||||||
|
# http://www.gnu.org/software/autoconf-archive/ax_gcc_x86_cpuid.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_GCC_X86_CPUID(OP)
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# On Pentium and later x86 processors, with gcc or a compiler that has a
|
||||||
|
# compatible syntax for inline assembly instructions, run a small program
|
||||||
|
# that executes the cpuid instruction with input OP. This can be used to
|
||||||
|
# detect the CPU type.
|
||||||
|
#
|
||||||
|
# On output, the values of the eax, ebx, ecx, and edx registers are stored
|
||||||
|
# as hexadecimal strings as "eax:ebx:ecx:edx" in the cache variable
|
||||||
|
# ax_cv_gcc_x86_cpuid_OP.
|
||||||
|
#
|
||||||
|
# If the cpuid instruction fails (because you are running a
|
||||||
|
# cross-compiler, or because you are not using gcc, or because you are on
|
||||||
|
# a processor that doesn't have this instruction), ax_cv_gcc_x86_cpuid_OP
|
||||||
|
# is set to the string "unknown".
|
||||||
|
#
|
||||||
|
# This macro mainly exists to be used in AX_GCC_ARCHFLAG.
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
|
||||||
|
# Copyright (c) 2008 Matteo Frigo
|
||||||
|
#
|
||||||
|
# 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/>.
|
||||||
|
#
|
||||||
|
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||||
|
# gives unlimited permission to copy, distribute and modify the configure
|
||||||
|
# scripts that are the output of Autoconf when processing the Macro. You
|
||||||
|
# need not follow the terms of the GNU General Public License when using
|
||||||
|
# or distributing such scripts, even though portions of the text of the
|
||||||
|
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||||
|
# all other use of the material that constitutes the Autoconf Macro.
|
||||||
|
#
|
||||||
|
# This special exception to the GPL applies to versions of the Autoconf
|
||||||
|
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||||
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
|
||||||
|
#serial 7
|
||||||
|
|
||||||
|
AC_DEFUN([AX_GCC_X86_CPUID],
|
||||||
|
[AC_REQUIRE([AC_PROG_CC])
|
||||||
|
AC_LANG_PUSH([C])
|
||||||
|
AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1,
|
||||||
|
[AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [
|
||||||
|
int op = $1, eax, ebx, ecx, edx;
|
||||||
|
FILE *f;
|
||||||
|
__asm__("cpuid"
|
||||||
|
: "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
|
||||||
|
: "a" (op));
|
||||||
|
f = fopen("conftest_cpuid", "w"); if (!f) return 1;
|
||||||
|
fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
|
||||||
|
fclose(f);
|
||||||
|
return 0;
|
||||||
|
])],
|
||||||
|
[ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid],
|
||||||
|
[ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid],
|
||||||
|
[ax_cv_gcc_x86_cpuid_$1=unknown])])
|
||||||
|
AC_LANG_POP([C])
|
||||||
|
])
|
515
src/pplib/autoconf/ax_have_qt.m4
Normal file
515
src/pplib/autoconf/ax_have_qt.m4
Normal file
|
@ -0,0 +1,515 @@
|
||||||
|
# ===========================================================================
|
||||||
|
# http://www.gnu.org/software/autoconf-archive/ax_have_qt.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_HAVE_QT [--with-Qt-dir=DIR] [--with-Qt-lib-dir=DIR] [--with-Qt-lib=LIB]
|
||||||
|
# AX_HAVE_QT [--with-Qt-include-dir=DIR] [--with-Qt-bin-dir=DIR] [--with-Qt-lib-dir=DIR] [--with-Qt-lib=LIB]
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# Searches common directories for Qt include files, libraries and Qt
|
||||||
|
# binary utilities. The macro supports several different versions of the
|
||||||
|
# Qt framework being installed on the same machine. Without options, the
|
||||||
|
# macro is designed to look for the latest library, i.e., the highest
|
||||||
|
# definition of QT_VERSION in qglobal.h. By use of one or more options a
|
||||||
|
# different library may be selected. There are two different sets of
|
||||||
|
# options. Both sets contain the option --with-Qt-lib=LIB which can be
|
||||||
|
# used to force the use of a particular version of the library file when
|
||||||
|
# more than one are available. LIB must be in the form as it would appear
|
||||||
|
# behind the "-l" option to the compiler. Examples for LIB would be
|
||||||
|
# "qt-mt" for the multi-threaded version and "qt" for the regular version.
|
||||||
|
# In addition to this, the first set consists of an option
|
||||||
|
# --with-Qt-dir=DIR which can be used when the installation conforms to
|
||||||
|
# Trolltech's standard installation, which means that header files are in
|
||||||
|
# DIR/include, binary utilities are in DIR/bin and the library is in
|
||||||
|
# DIR/lib. The second set of options can be used to indicate individual
|
||||||
|
# locations for the header files, the binary utilities and the library
|
||||||
|
# file, in addition to the specific version of the library file.
|
||||||
|
#
|
||||||
|
# The following shell variable is set to either "yes" or "no":
|
||||||
|
#
|
||||||
|
# have_qt
|
||||||
|
#
|
||||||
|
# Additionally, the following variables are exported:
|
||||||
|
#
|
||||||
|
# QT_CXXFLAGS
|
||||||
|
# QT_LIBS
|
||||||
|
# QT_MOC
|
||||||
|
# QT_UIC
|
||||||
|
# QT_LRELEASE
|
||||||
|
# QT_LUPDATE
|
||||||
|
# QT_DIR
|
||||||
|
#
|
||||||
|
# which respectively contain an "-I" flag pointing to the Qt include
|
||||||
|
# directory (and "-DQT_THREAD_SUPPORT" when LIB is "qt-mt"), link flags
|
||||||
|
# necessary to link with Qt and X, the name of the meta object compiler
|
||||||
|
# and the user interface compiler both with full path, and finaly the
|
||||||
|
# variable QTDIR as Trolltech likes to see it defined (if possible).
|
||||||
|
#
|
||||||
|
# Example lines for Makefile.in:
|
||||||
|
#
|
||||||
|
# CXXFLAGS = @QT_CXXFLAGS@
|
||||||
|
# MOC = @QT_MOC@
|
||||||
|
#
|
||||||
|
# After the variables have been set, a trial compile and link is performed
|
||||||
|
# to check the correct functioning of the meta object compiler. This test
|
||||||
|
# may fail when the different detected elements stem from different
|
||||||
|
# releases of the Qt framework. In that case, an error message is emitted
|
||||||
|
# and configure stops.
|
||||||
|
#
|
||||||
|
# No common variables such as $LIBS or $CFLAGS are polluted.
|
||||||
|
#
|
||||||
|
# Options:
|
||||||
|
#
|
||||||
|
# --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.
|
||||||
|
#
|
||||||
|
# --with-Qt-include-dir=DIR: Qt header files are in DIR.
|
||||||
|
#
|
||||||
|
# --with-Qt-bin-dir=DIR: Qt utilities such as moc and uic are in DIR.
|
||||||
|
#
|
||||||
|
# --with-Qt-lib-dir=DIR: The Qt library is in DIR.
|
||||||
|
#
|
||||||
|
# --with-Qt-lib=LIB: Use -lLIB to link with the Qt library.
|
||||||
|
#
|
||||||
|
# If some option "=no" or, equivalently, a --without-Qt-* version is given
|
||||||
|
# in stead of a --with-Qt-*, "have_qt" is set to "no" and the other
|
||||||
|
# variables are set to the empty string.
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2008 Bastiaan Veelo <Bastiaan@Veelo.net>
|
||||||
|
#
|
||||||
|
# Copying and distribution of this file, with or without modification, are
|
||||||
|
# permitted in any medium without royalty provided the copyright notice
|
||||||
|
# and this notice are preserved. This file is offered as-is, without any
|
||||||
|
# warranty.
|
||||||
|
|
||||||
|
#serial 10
|
||||||
|
|
||||||
|
dnl Calls AX_PATH_QT_DIRECT (contained in this file) as a subroutine.
|
||||||
|
AU_ALIAS([BNV_HAVE_QT], [AX_HAVE_QT])
|
||||||
|
AC_DEFUN([AX_HAVE_QT],
|
||||||
|
[
|
||||||
|
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],
|
||||||
|
AS_HELP_STRING([--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. The library is in DIR/lib, unless
|
||||||
|
--with-Qt-lib-dir is also set.]))
|
||||||
|
AC_ARG_WITH([Qt-include-dir],
|
||||||
|
AS_HELP_STRING([--with-Qt-include-dir=DIR],
|
||||||
|
[Qt header files are in DIR]))
|
||||||
|
AC_ARG_WITH([Qt-bin-dir],
|
||||||
|
AS_HELP_STRING([--with-Qt-bin-dir=DIR],
|
||||||
|
[Qt utilities such as moc and uic are in DIR]))
|
||||||
|
AC_ARG_WITH([Qt-lib-dir],
|
||||||
|
AS_HELP_STRING([--with-Qt-lib-dir=DIR],
|
||||||
|
[The Qt library is in DIR]))
|
||||||
|
AC_ARG_WITH([Qt-lib],
|
||||||
|
AS_HELP_STRING([--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
|
||||||
|
ax_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
|
||||||
|
ax_qt_dir="$with_Qt_dir"
|
||||||
|
ax_qt_include_dir="$with_Qt_dir/include"
|
||||||
|
ax_qt_bin_dir="$with_Qt_dir/bin"
|
||||||
|
ax_qt_lib_dir="$with_Qt_dir/lib"
|
||||||
|
# Only search for the lib if the user did not define one already
|
||||||
|
if test x"$ax_qt_lib" = x; then
|
||||||
|
ax_qt_lib="`ls $ax_qt_lib_dir/libqt* | sed -n 1p |
|
||||||
|
sed s@$ax_qt_lib_dir/lib@@ | [sed s@[.].*@@]`"
|
||||||
|
fi
|
||||||
|
ax_qt_LIBS="-L$ax_qt_lib_dir -l$ax_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(ax_cv_have_qt,
|
||||||
|
[
|
||||||
|
# We are not given a solution and there is no cached value.
|
||||||
|
ax_qt_dir=NO
|
||||||
|
ax_qt_include_dir=NO
|
||||||
|
ax_qt_lib_dir=NO
|
||||||
|
if test x"$ax_qt_lib" = x; then
|
||||||
|
ax_qt_lib=NO
|
||||||
|
fi
|
||||||
|
AX_PATH_QT_DIRECT
|
||||||
|
if test "$ax_qt_dir" = NO ||
|
||||||
|
test "$ax_qt_include_dir" = NO ||
|
||||||
|
test "$ax_qt_lib_dir" = NO ||
|
||||||
|
test "$ax_qt_lib" = NO; then
|
||||||
|
# Problem with finding complete Qt. Cache the known absence of Qt.
|
||||||
|
ax_cv_have_qt="have_qt=no"
|
||||||
|
else
|
||||||
|
# Record where we found Qt for the cache.
|
||||||
|
ax_cv_have_qt="have_qt=yes \
|
||||||
|
ax_qt_dir=$ax_qt_dir \
|
||||||
|
ax_qt_include_dir=$ax_qt_include_dir \
|
||||||
|
ax_qt_bin_dir=$ax_qt_bin_dir \
|
||||||
|
ax_qt_LIBS=\"$ax_qt_LIBS\""
|
||||||
|
fi
|
||||||
|
])dnl
|
||||||
|
eval "$ax_cv_have_qt"
|
||||||
|
fi # all $ax_qt_* are set
|
||||||
|
fi # $have_qt reflects the system status
|
||||||
|
if test x"$have_qt" = xyes; then
|
||||||
|
QT_CXXFLAGS="-I$ax_qt_include_dir"
|
||||||
|
if test x"$ax_qt_lib" = xqt-mt; then
|
||||||
|
QT_CXXFLAGS="$QT_CXXFLAGS -DQT_THREAD_SUPPORT"
|
||||||
|
fi
|
||||||
|
QT_DIR="$ax_qt_dir"
|
||||||
|
QT_LIBS="$ax_qt_LIBS"
|
||||||
|
# If ax_qt_dir is defined, utilities are expected to be in the
|
||||||
|
# bin subdirectory
|
||||||
|
if test x"$ax_qt_dir" != x; then
|
||||||
|
if test -x "$ax_qt_dir/bin/uic"; then
|
||||||
|
QT_UIC="$ax_qt_dir/bin/uic"
|
||||||
|
else
|
||||||
|
# Old versions of Qt don't have uic
|
||||||
|
QT_UIC=
|
||||||
|
fi
|
||||||
|
QT_MOC="$ax_qt_dir/bin/moc"
|
||||||
|
QT_LRELEASE="$ax_qt_dir/bin/lrelease"
|
||||||
|
QT_LUPDATE="$ax_qt_dir/bin/lupdate"
|
||||||
|
else
|
||||||
|
# Or maybe we are told where to look for the utilities
|
||||||
|
if test x"$ax_qt_bin_dir" != x; then
|
||||||
|
if test -x "$ax_qt_bin_dir/uic"; then
|
||||||
|
QT_UIC="$ax_qt_bin_dir/uic"
|
||||||
|
else
|
||||||
|
# Old versions of Qt don't have uic
|
||||||
|
QT_UIC=
|
||||||
|
fi
|
||||||
|
QT_MOC="$ax_qt_bin_dir/moc"
|
||||||
|
QT_LRELEASE="$ax_qt_bin_dir/lrelease"
|
||||||
|
QT_LUPDATE="$ax_qt_bin_dir/lupdate"
|
||||||
|
else
|
||||||
|
# Last possibility is that they are in $PATH
|
||||||
|
QT_UIC="`which uic`"
|
||||||
|
QT_MOC="`which moc`"
|
||||||
|
QT_LRELEASE="`which lrelease`"
|
||||||
|
QT_LUPDATE="`which lupdate`"
|
||||||
|
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
|
||||||
|
QT_LRELEASE=$QT_LRELEASE
|
||||||
|
QT_LUPDATE=$QT_LUPDATE])
|
||||||
|
else
|
||||||
|
# Qt was not found
|
||||||
|
QT_CXXFLAGS=
|
||||||
|
QT_DIR=
|
||||||
|
QT_LIBS=
|
||||||
|
QT_UIC=
|
||||||
|
QT_MOC=
|
||||||
|
QT_LRELEASE=
|
||||||
|
QT_LUPDATE=
|
||||||
|
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)
|
||||||
|
AC_SUBST(QT_LRELEASE)
|
||||||
|
AC_SUBST(QT_LUPDATE)
|
||||||
|
|
||||||
|
#### Being paranoid:
|
||||||
|
if test x"$have_qt" = xyes; then
|
||||||
|
AC_MSG_CHECKING(correct functioning of Qt installation)
|
||||||
|
AC_CACHE_VAL(ax_cv_qt_test_result,
|
||||||
|
[
|
||||||
|
cat > ax_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 > ax_qt_main.$ac_ext << EOF
|
||||||
|
#include "ax_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
|
||||||
|
|
||||||
|
ax_cv_qt_test_result="failure"
|
||||||
|
ax_try_1="$QT_MOC ax_qt_test.h -o moc_ax_qt_test.$ac_ext >/dev/null 2>/dev/null"
|
||||||
|
AC_TRY_EVAL(ax_try_1)
|
||||||
|
if test x"$ac_status" != x0; then
|
||||||
|
echo "$ax_err_1" >&AS_MESSAGE_LOG_FD
|
||||||
|
echo "configure: could not run $QT_MOC on:" >&AS_MESSAGE_LOG_FD
|
||||||
|
cat ax_qt_test.h >&AS_MESSAGE_LOG_FD
|
||||||
|
else
|
||||||
|
ax_try_2="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o moc_ax_qt_test.o moc_ax_qt_test.$ac_ext >/dev/null 2>/dev/null"
|
||||||
|
AC_TRY_EVAL(ax_try_2)
|
||||||
|
if test x"$ac_status" != x0; then
|
||||||
|
echo "$ax_err_2" >&AS_MESSAGE_LOG_FD
|
||||||
|
echo "configure: could not compile:" >&AS_MESSAGE_LOG_FD
|
||||||
|
cat moc_ax_qt_test.$ac_ext >&AS_MESSAGE_LOG_FD
|
||||||
|
else
|
||||||
|
ax_try_3="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o ax_qt_main.o ax_qt_main.$ac_ext >/dev/null 2>/dev/null"
|
||||||
|
AC_TRY_EVAL(ax_try_3)
|
||||||
|
if test x"$ac_status" != x0; then
|
||||||
|
echo "$ax_err_3" >&AS_MESSAGE_LOG_FD
|
||||||
|
echo "configure: could not compile:" >&AS_MESSAGE_LOG_FD
|
||||||
|
cat ax_qt_main.$ac_ext >&AS_MESSAGE_LOG_FD
|
||||||
|
else
|
||||||
|
ax_try_4="$CXX -o ax_qt_main ax_qt_main.o moc_ax_qt_test.o $QT_LIBS $LIBS >/dev/null 2>/dev/null"
|
||||||
|
AC_TRY_EVAL(ax_try_4)
|
||||||
|
if test x"$ac_status" != x0; then
|
||||||
|
echo "$ax_err_4" >&AS_MESSAGE_LOG_FD
|
||||||
|
else
|
||||||
|
ax_cv_qt_test_result="success"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
])dnl AC_CACHE_VAL ax_cv_qt_test_result
|
||||||
|
AC_MSG_RESULT([$ax_cv_qt_test_result])
|
||||||
|
if test x"$ax_cv_qt_test_result" = "xfailure"; then
|
||||||
|
AC_MSG_ERROR([Failed to find matching components of a complete
|
||||||
|
Qt installation. Try using more options,
|
||||||
|
see ./configure --help.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f ax_qt_test.h moc_ax_qt_test.$ac_ext moc_ax_qt_test.o \
|
||||||
|
ax_qt_main.$ac_ext ax_qt_main.o ax_qt_main
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl Internal subroutine of AX_HAVE_QT
|
||||||
|
dnl Set ax_qt_dir ax_qt_include_dir ax_qt_bin_dir ax_qt_lib_dir ax_qt_lib
|
||||||
|
AC_DEFUN([AX_PATH_QT_DIRECT],
|
||||||
|
[
|
||||||
|
## Binary utilities ##
|
||||||
|
if test x"$with_Qt_bin_dir" != x; then
|
||||||
|
ax_qt_bin_dir=$with_Qt_bin_dir
|
||||||
|
fi
|
||||||
|
## Look for header files ##
|
||||||
|
if test x"$with_Qt_include_dir" != x; then
|
||||||
|
ax_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.
|
||||||
|
ax_include_path_list="
|
||||||
|
/usr/include
|
||||||
|
`ls -dr ${QTDIR}/include 2>/dev/null`
|
||||||
|
`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`
|
||||||
|
`ls -dr /Developer/qt*/include 2>/dev/null`
|
||||||
|
"
|
||||||
|
for ax_dir in $ax_include_path_list; do
|
||||||
|
if test -r "$ax_dir/$qt_direct_test_header"; then
|
||||||
|
ax_dirs="$ax_dirs $ax_dir"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# Now look for the newest in this list
|
||||||
|
ax_prev_ver=0
|
||||||
|
for ax_dir in $ax_dirs; do
|
||||||
|
ax_this_ver=`egrep -w '#define QT_VERSION' $ax_dir/$qt_direct_test_header | sed s/'#define QT_VERSION'//`
|
||||||
|
if expr $ax_this_ver '>' $ax_prev_ver > /dev/null; then
|
||||||
|
ax_qt_include_dir=$ax_dir
|
||||||
|
ax_prev_ver=$ax_this_ver
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi dnl Found header files.
|
||||||
|
|
||||||
|
# Are these headers located in a traditional Trolltech installation?
|
||||||
|
# That would be $ax_qt_include_dir stripped from its last element:
|
||||||
|
ax_possible_qt_dir=`dirname $ax_qt_include_dir`
|
||||||
|
if (test -x $ax_possible_qt_dir/bin/moc) &&
|
||||||
|
((ls $ax_possible_qt_dir/lib/libqt* > /dev/null 2>/dev/null) ||
|
||||||
|
(ls $ax_possible_qt_dir/lib64/libqt* > /dev/null 2>/dev/null)); then
|
||||||
|
# Then the rest is a piece of cake
|
||||||
|
ax_qt_dir=$ax_possible_qt_dir
|
||||||
|
ax_qt_bin_dir="$ax_qt_dir/bin"
|
||||||
|
if test x"$with_Qt_lib_dir" != x; then
|
||||||
|
ax_qt_lib_dir="$with_Qt_lib_dir"
|
||||||
|
else
|
||||||
|
if (test -d $ax_qt_dir/lib64); then
|
||||||
|
ax_qt_lib_dir="$ax_qt_dir/lib64"
|
||||||
|
else
|
||||||
|
ax_qt_lib_dir="$ax_qt_dir/lib"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# Only look for lib if the user did not supply it already
|
||||||
|
if test x"$ax_qt_lib" = xNO; then
|
||||||
|
ax_qt_lib="`ls $ax_qt_lib_dir/libqt* | sed -n 1p |
|
||||||
|
sed s@$ax_qt_lib_dir/lib@@ | [sed s@[.].*@@]`"
|
||||||
|
fi
|
||||||
|
ax_qt_LIBS="-L$ax_qt_lib_dir -l$ax_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
|
||||||
|
ax_qt_dir=
|
||||||
|
## Look for Qt library ##
|
||||||
|
if test x"$with_Qt_lib_dir" != x; then
|
||||||
|
ax_qt_lib_dir="$with_Qt_lib_dir"
|
||||||
|
# Only look for lib if the user did not supply it already
|
||||||
|
if test x"$ax_qt_lib" = xNO; then
|
||||||
|
ax_qt_lib="`ls $ax_qt_lib_dir/libqt* | sed -n 1p |
|
||||||
|
sed s@$ax_qt_lib_dir/lib@@ | [sed s@[.].*@@]`"
|
||||||
|
fi
|
||||||
|
ax_qt_LIBS="-L$ax_qt_lib_dir -l$ax_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"$ax_qt_lib" = xNO; then
|
||||||
|
ax_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
|
||||||
|
ax_save_LIBS="$LIBS"
|
||||||
|
LIBS="-l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS"
|
||||||
|
ax_qt_LIBS="$LIBS"
|
||||||
|
ax_save_CXXFLAGS="$CXXFLAGS"
|
||||||
|
CXXFLAGS="-I$ax_qt_include_dir"
|
||||||
|
AC_TRY_LINK([#include <$qt_direct_test_header>],
|
||||||
|
$qt_direct_test_main,
|
||||||
|
[
|
||||||
|
# Success.
|
||||||
|
# We can link with no special library directory.
|
||||||
|
ax_qt_lib_dir=
|
||||||
|
], [
|
||||||
|
# That did not work. Try the multi-threaded version
|
||||||
|
echo "Non-critical error, please neglect the above." >&AS_MESSAGE_LOG_FD
|
||||||
|
ax_qt_lib=qt-mt
|
||||||
|
LIBS="-l$ax_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.
|
||||||
|
ax_qt_lib_dir=
|
||||||
|
], [
|
||||||
|
# That did not work. Try the OpenGL version
|
||||||
|
echo "Non-critical error, please neglect the above." >&AS_MESSAGE_LOG_FD
|
||||||
|
ax_qt_lib=qt-gl
|
||||||
|
LIBS="-l$ax_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.
|
||||||
|
ax_qt_lib_dir=
|
||||||
|
], [
|
||||||
|
# That did not work. Maybe a library version I don't know about?
|
||||||
|
echo "Non-critical error, please neglect the above." >&AS_MESSAGE_LOG_FD
|
||||||
|
# Look for some Qt lib in a standard set of common directories.
|
||||||
|
ax_dir_list="
|
||||||
|
`echo $ax_qt_includes | sed ss/includess`
|
||||||
|
/lib
|
||||||
|
/usr/lib64
|
||||||
|
/usr/lib
|
||||||
|
/usr/local/lib64
|
||||||
|
/usr/local/lib
|
||||||
|
/opt/lib64
|
||||||
|
/opt/lib
|
||||||
|
`ls -dr /usr/lib64/qt* 2>/dev/null`
|
||||||
|
`ls -dr /usr/lib64/qt*/lib64 2>/dev/null`
|
||||||
|
`ls -dr /usr/lib/qt* 2>/dev/null`
|
||||||
|
`ls -dr /usr/local/qt* 2>/dev/null`
|
||||||
|
`ls -dr /opt/qt* 2>/dev/null`
|
||||||
|
"
|
||||||
|
for ax_dir in $ax_dir_list; do
|
||||||
|
if ls $ax_dir/libqt* >/dev/null 2>/dev/null; then
|
||||||
|
# Gamble that it's the first one...
|
||||||
|
ax_qt_lib="`ls $ax_dir/libqt* | sed -n 1p |
|
||||||
|
sed s@$ax_dir/lib@@ | sed s/[[.]].*//`"
|
||||||
|
ax_qt_lib_dir="$ax_dir"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# Try with that one
|
||||||
|
LIBS="-l$ax_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.
|
||||||
|
ax_qt_lib_dir=
|
||||||
|
], [
|
||||||
|
: # Leave ax_qt_lib_dir defined
|
||||||
|
])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
if test x"$ax_qt_lib_dir" != x; then
|
||||||
|
ax_qt_LIBS="-L$ax_qt_lib_dir $LIBS"
|
||||||
|
else
|
||||||
|
ax_qt_LIBS="$LIBS"
|
||||||
|
fi
|
||||||
|
LIBS="$ax_save_LIBS"
|
||||||
|
CXXFLAGS="$ax_save_CXXFLAGS"
|
||||||
|
fi dnl $with_Qt_lib_dir was not given
|
||||||
|
fi dnl Done setting up for non-traditional Trolltech installation
|
||||||
|
])
|
85
src/pplib/autoconf/ax_lib_crypto.m4
Normal file
85
src/pplib/autoconf/ax_lib_crypto.m4
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
# ===========================================================================
|
||||||
|
# https://www.gnu.org/software/autoconf-archive/ax_lib_crypto.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_LIB_CRYPTO([yes|no|auto])
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# Searches for the 'crypto' library with the --with... option.
|
||||||
|
#
|
||||||
|
# If found, define HAVE_CRYPTO and macro CRYPTO_LIBS. Also defines
|
||||||
|
# CRYPTO_WITH_<algo> for the algorithms found available. Possible
|
||||||
|
# algorithms: AES BF CAMELLIA CAST DES IDEA RC2 RC5 MD2 MD4 MD5 SHA RIPEMD
|
||||||
|
# RSA DSA DH
|
||||||
|
#
|
||||||
|
# The argument is used if no --with...-crypto option is set. Value "yes"
|
||||||
|
# requires the configuration by default. Value "no" does not require it by
|
||||||
|
# default. Value "auto" configures the library only if available.
|
||||||
|
#
|
||||||
|
# See also AX_LIB_BEECRYPT and AX_LIB_GCRYPT.
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2009 Fabien Coelho <autoconf.archive@coelho.net>
|
||||||
|
#
|
||||||
|
# Copying and distribution of this file, with or without modification, are
|
||||||
|
# permitted in any medium without royalty provided the copyright notice
|
||||||
|
# and this notice are preserved. This file is offered as-is, without any
|
||||||
|
# warranty.
|
||||||
|
|
||||||
|
#serial 10
|
||||||
|
|
||||||
|
# AX_CHECK_CRYPTO_LIB([algo-name],[function])
|
||||||
|
AC_DEFUN([AX_CHECK_CRYPTO_LIB],[
|
||||||
|
AC_CHECK_LIB([crypto], $2, [
|
||||||
|
AC_DEFINE([CRYPTO_WITH_$1],[1],[Algorithm $1 in openssl crypto library])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
# AX_LIB_CRYPTO([yes|no|auto])
|
||||||
|
AC_DEFUN([AX_LIB_CRYPTO],[
|
||||||
|
AC_MSG_CHECKING([whether openssl crypto is enabled])
|
||||||
|
AC_ARG_WITH([crypto],[ --with-crypto requite crypto library
|
||||||
|
--without-crypto disable crypto library],[
|
||||||
|
AC_MSG_RESULT([$withval])
|
||||||
|
ac_with_crypto=$withval
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([$1])
|
||||||
|
ac_with_crypto=$1
|
||||||
|
])
|
||||||
|
if test "$ac_with_crypto" = "yes" -o "$ac_with_crypto" = "auto" ; then
|
||||||
|
AC_CHECK_HEADERS([openssl/opensslconf.h],[
|
||||||
|
AC_CHECK_LIB([crypto], [CRYPTO_lock],[
|
||||||
|
AC_DEFINE([HAVE_CRYPTO],[1],[Openssl crypto library is available])
|
||||||
|
HAVE_CRYPTO=1
|
||||||
|
AC_SUBST([CRYPTO_LIBS],[-lcrypto])
|
||||||
|
# ciphers
|
||||||
|
AX_CHECK_CRYPTO_LIB([AES],[AES_ecb_encrypt])
|
||||||
|
AX_CHECK_CRYPTO_LIB([BF],[BF_ecb_encrypt])
|
||||||
|
AX_CHECK_CRYPTO_LIB([CAST],[CAST_ecb_encrypt])
|
||||||
|
AX_CHECK_CRYPTO_LIB([CAMELLIA],[Camellia_ecb_encrypt])
|
||||||
|
AX_CHECK_CRYPTO_LIB([DES],[DES_ecb_encrypt])
|
||||||
|
AX_CHECK_CRYPTO_LIB([IDEA],[idea_ecb_encrypt])
|
||||||
|
AX_CHECK_CRYPTO_LIB([RC2],[RC2_ecb_encrypt])
|
||||||
|
AX_CHECK_CRYPTO_LIB([RC5],[RC5_32_ecb_encrypt])
|
||||||
|
# digests
|
||||||
|
AX_CHECK_CRYPTO_LIB([MD2],[MD2])
|
||||||
|
AX_CHECK_CRYPTO_LIB([MD4],[MD4])
|
||||||
|
AX_CHECK_CRYPTO_LIB([MD5],[MD5])
|
||||||
|
AX_CHECK_CRYPTO_LIB([RIPEMD],[RIPEMD160])
|
||||||
|
AX_CHECK_CRYPTO_LIB([SHA],[SHA1])
|
||||||
|
# others
|
||||||
|
AX_CHECK_CRYPTO_LIB([RSA],[RSA_set_method])
|
||||||
|
AX_CHECK_CRYPTO_LIB([DSA],[DSA_set_method])
|
||||||
|
AX_CHECK_CRYPTO_LIB([DH],[DH_set_method])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
# complain only if crypto as *explicitly* required
|
||||||
|
if test "$ac_with_crypto" = "yes" -a "x$HAVE_CRYPTO" = "x" ; then
|
||||||
|
AC_MSG_ERROR([cannot configure required openssl crypto library])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
])
|
108
src/pplib/autoconf/ax_lib_gcrypt.m4
Normal file
108
src/pplib/autoconf/ax_lib_gcrypt.m4
Normal file
|
@ -0,0 +1,108 @@
|
||||||
|
# ===========================================================================
|
||||||
|
# https://www.gnu.org/software/autoconf-archive/ax_lib_gcrypt.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_LIB_GCRYPT([yes|no|auto])
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# Searches for the 'gcrypt' library with the --with... option.
|
||||||
|
#
|
||||||
|
# If found, define HAVE_GCRYPT and macro GCRYPT_LIBS and GCRYPT_CFLAGS.
|
||||||
|
# Also defines GCRYPT_WITH_<algo> for the algorithms found available.
|
||||||
|
# Possible algorithms are: AES ARCFOUR BLOWFISH CAST5 DES IDEA RFC2268
|
||||||
|
# SERPENT TWOFISH CRC HAVAL MD2 MD4 MD5 RMD160 SHA0 SHA1 SHA224 SHA256
|
||||||
|
# SHA384 SHA512 TIGER WHIRLPOOL DSA ELGAMAL RSA
|
||||||
|
#
|
||||||
|
# The argument is used if no --with...-gcrypt option is set. Value "yes"
|
||||||
|
# requires the configuration by default. Value "no" does not require it by
|
||||||
|
# default. Value "auto" configures the library only if available.
|
||||||
|
#
|
||||||
|
# See also AX_LIB_BEECRYPT and AX_LIB_CRYPTO.
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2009 Fabien Coelho <autoconf.archive@coelho.net>
|
||||||
|
#
|
||||||
|
# Copying and distribution of this file, with or without modification, are
|
||||||
|
# permitted in any medium without royalty provided the copyright notice
|
||||||
|
# and this notice are preserved. This file is offered as-is, without any
|
||||||
|
# warranty.
|
||||||
|
|
||||||
|
#serial 12
|
||||||
|
|
||||||
|
# AX_CHECK_GCRYPT_ALGO([algo])
|
||||||
|
# generate convenient defines for each algorithm
|
||||||
|
AC_DEFUN([AX_CHECK_GCRYPT_ALGO],[
|
||||||
|
AC_REQUIRE([AC_PROG_EGREP])
|
||||||
|
AC_MSG_CHECKING([for $1 in gcrypt])
|
||||||
|
if echo $gcrypt_algos | $EGREP -i ":.*( $1 | $1$)" > /dev/null ; then
|
||||||
|
AC_DEFINE([GCRYPT_WITH_$1],[1],[Algorithm $1 in gcrypt library])
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
# AX_LIB_GCRYPT([yes|no|auto])
|
||||||
|
AC_DEFUN([AX_LIB_GCRYPT],[
|
||||||
|
AC_MSG_CHECKING([whether gcrypt is enabled])
|
||||||
|
AC_ARG_WITH([gcrypt],[ --with-gcrypt require gcrypt library
|
||||||
|
--without-gcrypt disable gcrypt library],[
|
||||||
|
AC_MSG_RESULT([$withval])
|
||||||
|
ac_with_gcrypt=$withval
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT($1)
|
||||||
|
ac_with_gcrypt=$1
|
||||||
|
])
|
||||||
|
if test "$ac_with_gcrypt" = "yes" -o "$ac_with_gcrypt" = "auto" ; then
|
||||||
|
AM_PATH_LIBGCRYPT([1.2.0],[
|
||||||
|
AC_DEFINE([HAVE_GCRYPT],[1],[Gcrypt library is available])
|
||||||
|
HAVE_GCRYPT=1
|
||||||
|
# checking for available algorithms...
|
||||||
|
gcrypt_algos=`$LIBGCRYPT_CONFIG --algorithms`
|
||||||
|
# ciphers
|
||||||
|
# this does not work with a "for" loop: nothing generated in config.h:-(
|
||||||
|
AX_CHECK_GCRYPT_ALGO([AES])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([ARCFOUR])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([BLOWFISH])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([CAST5])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([DES])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([IDEA])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([RFC2268])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([SERPENT])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([TWOFISH])
|
||||||
|
# digests
|
||||||
|
AX_CHECK_GCRYPT_ALGO([CRC])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([HAVAL])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([MD2])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([MD4])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([MD5])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([RMD160])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([SHA0])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([SHA1])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([SHA224])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([SHA256])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([SHA384])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([SHA512])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([TIGER])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([WHIRLPOOL])
|
||||||
|
# others
|
||||||
|
AX_CHECK_GCRYPT_ALGO([DSA])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([ELGAMAL])
|
||||||
|
AX_CHECK_GCRYPT_ALGO([RSA])
|
||||||
|
# conclusion
|
||||||
|
GCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
|
||||||
|
GCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
|
||||||
|
AC_SUBST(GCRYPT_CFLAGS)
|
||||||
|
AC_SUBST(GCRYPT_LIBS)
|
||||||
|
],[
|
||||||
|
# complain only if explicitly required
|
||||||
|
if test "$ac_with_gcrypt" = "yes" ; then
|
||||||
|
AC_MSG_ERROR([cannot configure required gcrypt library])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
])
|
147
src/pplib/autoconf/ax_lib_mysql.m4
Normal file
147
src/pplib/autoconf/ax_lib_mysql.m4
Normal file
|
@ -0,0 +1,147 @@
|
||||||
|
# ===========================================================================
|
||||||
|
# http://www.gnu.org/software/autoconf-archive/ax_lib_mysql.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_LIB_MYSQL([MINIMUM-VERSION])
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# This macro provides tests of availability of MySQL client library of
|
||||||
|
# particular version or newer.
|
||||||
|
#
|
||||||
|
# AX_LIB_MYSQL macro takes only one argument which is optional. If there
|
||||||
|
# is no required version passed, then macro does not run version test.
|
||||||
|
#
|
||||||
|
# The --with-mysql option takes one of three possible values:
|
||||||
|
#
|
||||||
|
# no - do not check for MySQL client library
|
||||||
|
#
|
||||||
|
# yes - do check for MySQL library in standard locations (mysql_config
|
||||||
|
# should be in the PATH)
|
||||||
|
#
|
||||||
|
# path - complete path to mysql_config utility, use this option if
|
||||||
|
# mysql_config can't be found in the PATH
|
||||||
|
#
|
||||||
|
# This macro calls:
|
||||||
|
#
|
||||||
|
# AC_SUBST(MYSQL_CFLAGS)
|
||||||
|
# AC_SUBST(MYSQL_LDFLAGS)
|
||||||
|
# AC_SUBST(MYSQL_VERSION)
|
||||||
|
#
|
||||||
|
# And sets:
|
||||||
|
#
|
||||||
|
# HAVE_MYSQL
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2008 Mateusz Loskot <mateusz@loskot.net>
|
||||||
|
#
|
||||||
|
# Copying and distribution of this file, with or without modification, are
|
||||||
|
# permitted in any medium without royalty provided the copyright notice
|
||||||
|
# and this notice are preserved. This file is offered as-is, without any
|
||||||
|
# warranty.
|
||||||
|
|
||||||
|
#serial 12
|
||||||
|
|
||||||
|
AC_DEFUN([AX_LIB_MYSQL],
|
||||||
|
[
|
||||||
|
AC_ARG_WITH([mysql],
|
||||||
|
AS_HELP_STRING([--with-mysql=@<:@ARG@:>@],
|
||||||
|
[use MySQL client library @<:@default=yes@:>@, optionally specify path to mysql_config]
|
||||||
|
),
|
||||||
|
[
|
||||||
|
if test "$withval" = "no"; then
|
||||||
|
want_mysql="no"
|
||||||
|
elif test "$withval" = "yes"; then
|
||||||
|
want_mysql="yes"
|
||||||
|
else
|
||||||
|
want_mysql="yes"
|
||||||
|
MYSQL_CONFIG="$withval"
|
||||||
|
fi
|
||||||
|
],
|
||||||
|
[want_mysql="yes"]
|
||||||
|
)
|
||||||
|
AC_ARG_VAR([MYSQL_CONFIG], [Full path to mysql_config program])
|
||||||
|
|
||||||
|
MYSQL_CFLAGS=""
|
||||||
|
MYSQL_LDFLAGS=""
|
||||||
|
MYSQL_VERSION=""
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Check MySQL libraries
|
||||||
|
dnl
|
||||||
|
|
||||||
|
if test "$want_mysql" = "yes"; then
|
||||||
|
|
||||||
|
if test -z "$MYSQL_CONFIG" ; then
|
||||||
|
AC_PATH_PROGS([MYSQL_CONFIG], [mysql_config mysql_config5], [no])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$MYSQL_CONFIG" != "no"; then
|
||||||
|
MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`"
|
||||||
|
MYSQL_LDFLAGS="`$MYSQL_CONFIG --libs`"
|
||||||
|
|
||||||
|
MYSQL_VERSION=`$MYSQL_CONFIG --version`
|
||||||
|
|
||||||
|
found_mysql="yes"
|
||||||
|
else
|
||||||
|
found_mysql="no"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Check if required version of MySQL is available
|
||||||
|
dnl
|
||||||
|
|
||||||
|
|
||||||
|
mysql_version_req=ifelse([$1], [], [], [$1])
|
||||||
|
|
||||||
|
if test "$found_mysql" = "yes" -a -n "$mysql_version_req"; then
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([if MySQL version is >= $mysql_version_req])
|
||||||
|
|
||||||
|
dnl Decompose required version string of MySQL
|
||||||
|
dnl and calculate its number representation
|
||||||
|
mysql_version_req_major=`expr $mysql_version_req : '\([[0-9]]*\)'`
|
||||||
|
mysql_version_req_minor=`expr $mysql_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
|
||||||
|
mysql_version_req_micro=`expr $mysql_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
|
||||||
|
if test "x$mysql_version_req_micro" = "x"; then
|
||||||
|
mysql_version_req_micro="0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mysql_version_req_number=`expr $mysql_version_req_major \* 1000000 \
|
||||||
|
\+ $mysql_version_req_minor \* 1000 \
|
||||||
|
\+ $mysql_version_req_micro`
|
||||||
|
|
||||||
|
dnl Decompose version string of installed MySQL
|
||||||
|
dnl and calculate its number representation
|
||||||
|
mysql_version_major=`expr $MYSQL_VERSION : '\([[0-9]]*\)'`
|
||||||
|
mysql_version_minor=`expr $MYSQL_VERSION : '[[0-9]]*\.\([[0-9]]*\)'`
|
||||||
|
mysql_version_micro=`expr $MYSQL_VERSION : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
|
||||||
|
if test "x$mysql_version_micro" = "x"; then
|
||||||
|
mysql_version_micro="0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mysql_version_number=`expr $mysql_version_major \* 1000000 \
|
||||||
|
\+ $mysql_version_minor \* 1000 \
|
||||||
|
\+ $mysql_version_micro`
|
||||||
|
|
||||||
|
mysql_version_check=`expr $mysql_version_number \>\= $mysql_version_req_number`
|
||||||
|
if test "$mysql_version_check" = "1"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$found_mysql" = "yes" ; then
|
||||||
|
AC_DEFINE([HAVE_MYSQL], [1],
|
||||||
|
[Define to 1 if MySQL libraries are available])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST([MYSQL_VERSION])
|
||||||
|
AC_SUBST([MYSQL_CFLAGS])
|
||||||
|
AC_SUBST([MYSQL_LDFLAGS])
|
||||||
|
])
|
155
src/pplib/autoconf/ax_lib_postgresql.m4
Normal file
155
src/pplib/autoconf/ax_lib_postgresql.m4
Normal file
|
@ -0,0 +1,155 @@
|
||||||
|
# ===========================================================================
|
||||||
|
# http://www.gnu.org/software/autoconf-archive/ax_lib_postgresql.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_LIB_POSTGRESQL([MINIMUM-VERSION])
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# This macro provides tests of availability of PostgreSQL 'libpq' library
|
||||||
|
# of particular version or newer.
|
||||||
|
#
|
||||||
|
# AX_LIB_POSTGRESQL macro takes only one argument which is optional. If
|
||||||
|
# there is no required version passed, then macro does not run version
|
||||||
|
# test.
|
||||||
|
#
|
||||||
|
# The --with-postgresql option takes one of three possible values:
|
||||||
|
#
|
||||||
|
# no - do not check for PostgreSQL client library
|
||||||
|
#
|
||||||
|
# yes - do check for PostgreSQL library in standard locations (pg_config
|
||||||
|
# should be in the PATH)
|
||||||
|
#
|
||||||
|
# path - complete path to pg_config utility, use this option if pg_config
|
||||||
|
# can't be found in the PATH
|
||||||
|
#
|
||||||
|
# This macro calls:
|
||||||
|
#
|
||||||
|
# AC_SUBST(POSTGRESQL_CFLAGS)
|
||||||
|
# AC_SUBST(POSTGRESQL_LDFLAGS)
|
||||||
|
# AC_SUBST(POSTGRESQL_VERSION)
|
||||||
|
#
|
||||||
|
# And sets:
|
||||||
|
#
|
||||||
|
# HAVE_POSTGRESQL
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2008 Mateusz Loskot <mateusz@loskot.net>
|
||||||
|
#
|
||||||
|
# Copying and distribution of this file, with or without modification, are
|
||||||
|
# permitted in any medium without royalty provided the copyright notice
|
||||||
|
# and this notice are preserved. This file is offered as-is, without any
|
||||||
|
# warranty.
|
||||||
|
|
||||||
|
#serial 9
|
||||||
|
|
||||||
|
AC_DEFUN([AX_LIB_POSTGRESQL],
|
||||||
|
[
|
||||||
|
AC_ARG_WITH([postgresql],
|
||||||
|
AS_HELP_STRING([--with-postgresql=@<:@ARG@:>@],
|
||||||
|
[use PostgreSQL library @<:@default=yes@:>@, optionally specify path to pg_config]
|
||||||
|
),
|
||||||
|
[
|
||||||
|
if test "$withval" = "no"; then
|
||||||
|
want_postgresql="no"
|
||||||
|
elif test "$withval" = "yes"; then
|
||||||
|
want_postgresql="yes"
|
||||||
|
else
|
||||||
|
want_postgresql="yes"
|
||||||
|
PG_CONFIG="$withval"
|
||||||
|
fi
|
||||||
|
],
|
||||||
|
[want_postgresql="yes"]
|
||||||
|
)
|
||||||
|
|
||||||
|
POSTGRESQL_CFLAGS=""
|
||||||
|
POSTGRESQL_LDFLAGS=""
|
||||||
|
POSTGRESQL_VERSION=""
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Check PostgreSQL libraries (libpq)
|
||||||
|
dnl
|
||||||
|
|
||||||
|
if test "$want_postgresql" = "yes"; then
|
||||||
|
|
||||||
|
if test -z "$PG_CONFIG" -o test; then
|
||||||
|
AC_PATH_PROG([PG_CONFIG], [pg_config], [])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test ! -x "$PG_CONFIG"; then
|
||||||
|
AC_MSG_ERROR([$PG_CONFIG does not exist or it is not an exectuable file])
|
||||||
|
PG_CONFIG="no"
|
||||||
|
found_postgresql="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$PG_CONFIG" != "no"; then
|
||||||
|
AC_MSG_CHECKING([for PostgreSQL libraries])
|
||||||
|
|
||||||
|
POSTGRESQL_CFLAGS="-I`$PG_CONFIG --includedir`"
|
||||||
|
POSTGRESQL_LDFLAGS="-L`$PG_CONFIG --libdir` -lpq"
|
||||||
|
|
||||||
|
POSTGRESQL_VERSION=`$PG_CONFIG --version | sed -e 's#PostgreSQL ##'`
|
||||||
|
|
||||||
|
AC_DEFINE([HAVE_POSTGRESQL], [1],
|
||||||
|
[Define to 1 if PostgreSQL libraries are available])
|
||||||
|
|
||||||
|
found_postgresql="yes"
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
else
|
||||||
|
found_postgresql="no"
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Check if required version of PostgreSQL is available
|
||||||
|
dnl
|
||||||
|
|
||||||
|
|
||||||
|
postgresql_version_req=ifelse([$1], [], [], [$1])
|
||||||
|
|
||||||
|
if test "$found_postgresql" = "yes" -a -n "$postgresql_version_req"; then
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([if PostgreSQL version is >= $postgresql_version_req])
|
||||||
|
|
||||||
|
dnl Decompose required version string of PostgreSQL
|
||||||
|
dnl and calculate its number representation
|
||||||
|
postgresql_version_req_major=`expr $postgresql_version_req : '\([[0-9]]*\)'`
|
||||||
|
postgresql_version_req_minor=`expr $postgresql_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
|
||||||
|
postgresql_version_req_micro=`expr $postgresql_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
|
||||||
|
if test "x$postgresql_version_req_micro" = "x"; then
|
||||||
|
postgresql_version_req_micro="0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
postgresql_version_req_number=`expr $postgresql_version_req_major \* 1000000 \
|
||||||
|
\+ $postgresql_version_req_minor \* 1000 \
|
||||||
|
\+ $postgresql_version_req_micro`
|
||||||
|
|
||||||
|
dnl Decompose version string of installed PostgreSQL
|
||||||
|
dnl and calculate its number representation
|
||||||
|
postgresql_version_major=`expr $POSTGRESQL_VERSION : '\([[0-9]]*\)'`
|
||||||
|
postgresql_version_minor=`expr $POSTGRESQL_VERSION : '[[0-9]]*\.\([[0-9]]*\)'`
|
||||||
|
postgresql_version_micro=`expr $POSTGRESQL_VERSION : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
|
||||||
|
if test "x$postgresql_version_micro" = "x"; then
|
||||||
|
postgresql_version_micro="0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
postgresql_version_number=`expr $postgresql_version_major \* 1000000 \
|
||||||
|
\+ $postgresql_version_minor \* 1000 \
|
||||||
|
\+ $postgresql_version_micro`
|
||||||
|
|
||||||
|
postgresql_version_check=`expr $postgresql_version_number \>\= $postgresql_version_req_number`
|
||||||
|
if test "$postgresql_version_check" = "1"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST([POSTGRESQL_VERSION])
|
||||||
|
AC_SUBST([POSTGRESQL_CFLAGS])
|
||||||
|
AC_SUBST([POSTGRESQL_LDFLAGS])
|
||||||
|
])
|
156
src/pplib/autoconf/ax_lib_sqlite3.m4
Normal file
156
src/pplib/autoconf/ax_lib_sqlite3.m4
Normal file
|
@ -0,0 +1,156 @@
|
||||||
|
# ===========================================================================
|
||||||
|
# http://www.gnu.org/software/autoconf-archive/ax_lib_sqlite3.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_LIB_SQLITE3([MINIMUM-VERSION])
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# Test for the SQLite 3 library of a particular version (or newer)
|
||||||
|
#
|
||||||
|
# This macro takes only one optional argument, required version of SQLite
|
||||||
|
# 3 library. If required version is not passed, 3.0.0 is used in the test
|
||||||
|
# of existance of SQLite 3.
|
||||||
|
#
|
||||||
|
# If no intallation prefix to the installed SQLite library is given the
|
||||||
|
# macro searches under /usr, /usr/local, and /opt.
|
||||||
|
#
|
||||||
|
# This macro calls:
|
||||||
|
#
|
||||||
|
# AC_SUBST(SQLITE3_CFLAGS)
|
||||||
|
# AC_SUBST(SQLITE3_LDFLAGS)
|
||||||
|
# AC_SUBST(SQLITE3_VERSION)
|
||||||
|
#
|
||||||
|
# And sets:
|
||||||
|
#
|
||||||
|
# HAVE_SQLITE3
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2008 Mateusz Loskot <mateusz@loskot.net>
|
||||||
|
#
|
||||||
|
# Copying and distribution of this file, with or without modification, are
|
||||||
|
# permitted in any medium without royalty provided the copyright notice
|
||||||
|
# and this notice are preserved. This file is offered as-is, without any
|
||||||
|
# warranty.
|
||||||
|
|
||||||
|
#serial 14
|
||||||
|
|
||||||
|
AC_DEFUN([AX_LIB_SQLITE3],
|
||||||
|
[
|
||||||
|
AC_ARG_WITH([sqlite3],
|
||||||
|
AS_HELP_STRING(
|
||||||
|
[--with-sqlite3=@<:@ARG@:>@],
|
||||||
|
[use SQLite 3 library @<:@default=yes@:>@, optionally specify the prefix for sqlite3 library]
|
||||||
|
),
|
||||||
|
[
|
||||||
|
if test "$withval" = "no"; then
|
||||||
|
WANT_SQLITE3="no"
|
||||||
|
elif test "$withval" = "yes"; then
|
||||||
|
WANT_SQLITE3="yes"
|
||||||
|
ac_sqlite3_path=""
|
||||||
|
else
|
||||||
|
WANT_SQLITE3="yes"
|
||||||
|
ac_sqlite3_path="$withval"
|
||||||
|
fi
|
||||||
|
],
|
||||||
|
[WANT_SQLITE3="yes"]
|
||||||
|
)
|
||||||
|
|
||||||
|
SQLITE3_CFLAGS=""
|
||||||
|
SQLITE3_LDFLAGS=""
|
||||||
|
SQLITE3_VERSION=""
|
||||||
|
|
||||||
|
if test "x$WANT_SQLITE3" = "xyes"; then
|
||||||
|
|
||||||
|
ac_sqlite3_header="sqlite3.h"
|
||||||
|
|
||||||
|
sqlite3_version_req=ifelse([$1], [], [3.0.0], [$1])
|
||||||
|
sqlite3_version_req_shorten=`expr $sqlite3_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
|
||||||
|
sqlite3_version_req_major=`expr $sqlite3_version_req : '\([[0-9]]*\)'`
|
||||||
|
sqlite3_version_req_minor=`expr $sqlite3_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
|
||||||
|
sqlite3_version_req_micro=`expr $sqlite3_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
|
||||||
|
if test "x$sqlite3_version_req_micro" = "x" ; then
|
||||||
|
sqlite3_version_req_micro="0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
sqlite3_version_req_number=`expr $sqlite3_version_req_major \* 1000000 \
|
||||||
|
\+ $sqlite3_version_req_minor \* 1000 \
|
||||||
|
\+ $sqlite3_version_req_micro`
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for SQLite3 library >= $sqlite3_version_req])
|
||||||
|
|
||||||
|
if test "$ac_sqlite3_path" != ""; then
|
||||||
|
ac_sqlite3_ldflags="-L$ac_sqlite3_path/lib"
|
||||||
|
ac_sqlite3_cppflags="-I$ac_sqlite3_path/include"
|
||||||
|
else
|
||||||
|
for ac_sqlite3_path_tmp in /usr /usr/local /opt ; do
|
||||||
|
if test -f "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header" \
|
||||||
|
&& test -r "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header"; then
|
||||||
|
ac_sqlite3_path=$ac_sqlite3_path_tmp
|
||||||
|
ac_sqlite3_cppflags="-I$ac_sqlite3_path_tmp/include"
|
||||||
|
ac_sqlite3_ldflags="-L$ac_sqlite3_path_tmp/lib"
|
||||||
|
break;
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
ac_sqlite3_ldflags="$ac_sqlite3_ldflags -lsqlite3"
|
||||||
|
|
||||||
|
saved_CPPFLAGS="$CPPFLAGS"
|
||||||
|
CPPFLAGS="$CPPFLAGS $ac_sqlite3_cppflags"
|
||||||
|
|
||||||
|
AC_LANG_PUSH(C)
|
||||||
|
AC_COMPILE_IFELSE(
|
||||||
|
[
|
||||||
|
AC_LANG_PROGRAM([[@%:@include <sqlite3.h>]],
|
||||||
|
[[
|
||||||
|
#if (SQLITE_VERSION_NUMBER >= $sqlite3_version_req_number)
|
||||||
|
/* Everything is okay */
|
||||||
|
#else
|
||||||
|
# error SQLite version is too old
|
||||||
|
#endif
|
||||||
|
]]
|
||||||
|
)
|
||||||
|
],
|
||||||
|
[
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
success="yes"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
AC_MSG_RESULT([not found])
|
||||||
|
success="no"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
AC_LANG_POP(C)
|
||||||
|
|
||||||
|
CPPFLAGS="$saved_CPPFLAGS"
|
||||||
|
|
||||||
|
if test "$success" = "yes"; then
|
||||||
|
|
||||||
|
SQLITE3_CFLAGS="$ac_sqlite3_cppflags"
|
||||||
|
SQLITE3_LDFLAGS="$ac_sqlite3_ldflags"
|
||||||
|
|
||||||
|
ac_sqlite3_header_path="$ac_sqlite3_path/include/$ac_sqlite3_header"
|
||||||
|
|
||||||
|
dnl Retrieve SQLite release version
|
||||||
|
if test "x$ac_sqlite3_header_path" != "x"; then
|
||||||
|
ac_sqlite3_version=`cat $ac_sqlite3_header_path \
|
||||||
|
| grep '#define.*SQLITE_VERSION.*\"' | sed -e 's/.* "//' \
|
||||||
|
| sed -e 's/"//'`
|
||||||
|
if test $ac_sqlite3_version != ""; then
|
||||||
|
SQLITE3_VERSION=$ac_sqlite3_version
|
||||||
|
else
|
||||||
|
AC_MSG_WARN([Cannot find SQLITE_VERSION macro in sqlite3.h header to retrieve SQLite version!])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST(SQLITE3_CFLAGS)
|
||||||
|
AC_SUBST(SQLITE3_LDFLAGS)
|
||||||
|
AC_SUBST(SQLITE3_VERSION)
|
||||||
|
AC_DEFINE([HAVE_SQLITE3], [], [Have the SQLITE3 library])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
])
|
101
src/pplib/autoconf/ax_path_lib_pcre.m4
Normal file
101
src/pplib/autoconf/ax_path_lib_pcre.m4
Normal file
|
@ -0,0 +1,101 @@
|
||||||
|
# ===========================================================================
|
||||||
|
# http://www.gnu.org/software/autoconf-archive/ax_path_lib_pcre.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_PATH_LIB_PCRE [(A/NA)]
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# check for pcre lib and set PCRE_LIBS and PCRE_CFLAGS accordingly.
|
||||||
|
#
|
||||||
|
# also provide --with-pcre option that may point to the $prefix of the
|
||||||
|
# pcre installation - the macro will check $pcre/include and $pcre/lib to
|
||||||
|
# contain the necessary files.
|
||||||
|
#
|
||||||
|
# the usual two ACTION-IF-FOUND / ACTION-IF-NOT-FOUND are supported and
|
||||||
|
# they can take advantage of the LIBS/CFLAGS additions.
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||||
|
#
|
||||||
|
# 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/>.
|
||||||
|
#
|
||||||
|
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||||
|
# gives unlimited permission to copy, distribute and modify the configure
|
||||||
|
# scripts that are the output of Autoconf when processing the Macro. You
|
||||||
|
# need not follow the terms of the GNU General Public License when using
|
||||||
|
# or distributing such scripts, even though portions of the text of the
|
||||||
|
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||||
|
# all other use of the material that constitutes the Autoconf Macro.
|
||||||
|
#
|
||||||
|
# This special exception to the GPL applies to versions of the Autoconf
|
||||||
|
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||||
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
|
||||||
|
#serial 7
|
||||||
|
|
||||||
|
AC_DEFUN([AX_PATH_LIB_PCRE],[dnl
|
||||||
|
AC_MSG_CHECKING([lib pcre])
|
||||||
|
AC_ARG_WITH(pcre,
|
||||||
|
[ --with-pcre[[=prefix]] compile xmlpcre part (via libpcre check)],,
|
||||||
|
with_pcre="yes")
|
||||||
|
if test ".$with_pcre" = ".no" ; then
|
||||||
|
AC_MSG_RESULT([disabled])
|
||||||
|
m4_ifval($2,$2)
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([(testing)])
|
||||||
|
OLDLIBS="$LIBS"
|
||||||
|
AC_CHECK_LIB(pcre, pcre_study)
|
||||||
|
if test "$ac_cv_lib_pcre_pcre_study" = "yes" ; then
|
||||||
|
PCRE_LIBS="-lpcre"
|
||||||
|
AC_MSG_CHECKING([lib pcre])
|
||||||
|
AC_MSG_RESULT([$PCRE_LIBS])
|
||||||
|
m4_ifval($1,$1)
|
||||||
|
else
|
||||||
|
OLDLDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS -L$with_pcre/lib"
|
||||||
|
OLDCPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS -I$with_pcre/include"
|
||||||
|
AC_CHECK_LIB(pcre, pcre_compile)
|
||||||
|
CPPFLAGS="$OLDCPPFLAGS"
|
||||||
|
LDFLAGS="$OLDLDFLAGS"
|
||||||
|
if test "$ac_cv_lib_pcre_pcre_compile" = "yes" ; then
|
||||||
|
AC_MSG_RESULT(.setting PCRE_LIBS -L$with_pcre/lib -lpcre)
|
||||||
|
PCRE_LIBS="-L$with_pcre/lib -lpcre"
|
||||||
|
test -d "$with_pcre/include" && PCRE_CFLAGS="-I$with_pcre/include"
|
||||||
|
AC_MSG_CHECKING([lib pcre])
|
||||||
|
AC_MSG_RESULT([$PCRE_LIBS])
|
||||||
|
m4_ifval($1,$1)
|
||||||
|
else
|
||||||
|
AC_PATH_PROG([PKGCONFIG], [pkg-config], [no])
|
||||||
|
AC_MSG_CHECKING([lib pcre found with $PKGCONFIG])
|
||||||
|
if test "$PKGCONFIG" != "no" && `$PKGCONFIG --exists libpcre`
|
||||||
|
then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
PCRE_LIBS=`$PKGCONFIG --libs libpcre`
|
||||||
|
PCRE_CFLAGS=`$PKGCONFIG --cflags libpcre`
|
||||||
|
m4_ifval($1,$1)
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
m4_ifval($2,$2)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
LIBS="$OLDLIBS"
|
||||||
|
fi
|
||||||
|
AC_SUBST([PCRE_LIBS])
|
||||||
|
AC_SUBST([PCRE_CFLAGS])
|
||||||
|
])
|
317
src/pplib/autoconf/ax_pthread.m4
Normal file
317
src/pplib/autoconf/ax_pthread.m4
Normal file
|
@ -0,0 +1,317 @@
|
||||||
|
# ===========================================================================
|
||||||
|
# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# This macro figures out how to build C programs using POSIX threads. It
|
||||||
|
# sets the PTHREAD_LIBS output variable to the threads library and linker
|
||||||
|
# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
|
||||||
|
# flags that are needed. (The user can also force certain compiler
|
||||||
|
# flags/libs to be tested by setting these environment variables.)
|
||||||
|
#
|
||||||
|
# Also sets PTHREAD_CC to any special C compiler that is needed for
|
||||||
|
# multi-threaded programs (defaults to the value of CC otherwise). (This
|
||||||
|
# is necessary on AIX to use the special cc_r compiler alias.)
|
||||||
|
#
|
||||||
|
# NOTE: You are assumed to not only compile your program with these flags,
|
||||||
|
# but also link it with them as well. e.g. you should link with
|
||||||
|
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
|
||||||
|
#
|
||||||
|
# If you are only building threads programs, you may wish to use these
|
||||||
|
# variables in your default LIBS, CFLAGS, and CC:
|
||||||
|
#
|
||||||
|
# LIBS="$PTHREAD_LIBS $LIBS"
|
||||||
|
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||||
|
# CC="$PTHREAD_CC"
|
||||||
|
#
|
||||||
|
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
|
||||||
|
# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
|
||||||
|
# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
|
||||||
|
#
|
||||||
|
# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
|
||||||
|
# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
|
||||||
|
# PTHREAD_CFLAGS.
|
||||||
|
#
|
||||||
|
# ACTION-IF-FOUND is a list of shell commands to run if a threads library
|
||||||
|
# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
|
||||||
|
# is not found. If ACTION-IF-FOUND is not specified, the default action
|
||||||
|
# will define HAVE_PTHREAD.
|
||||||
|
#
|
||||||
|
# Please let the authors know if this macro fails on any platform, or if
|
||||||
|
# you have any other suggestions or comments. This macro was based on work
|
||||||
|
# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
|
||||||
|
# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
|
||||||
|
# Alejandro Forero Cuervo to the autoconf macro repository. We are also
|
||||||
|
# grateful for the helpful feedback of numerous users.
|
||||||
|
#
|
||||||
|
# Updated for Autoconf 2.68 by Daniel Richard G.
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
|
||||||
|
# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
|
||||||
|
#
|
||||||
|
# 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/>.
|
||||||
|
#
|
||||||
|
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||||
|
# gives unlimited permission to copy, distribute and modify the configure
|
||||||
|
# scripts that are the output of Autoconf when processing the Macro. You
|
||||||
|
# need not follow the terms of the GNU General Public License when using
|
||||||
|
# or distributing such scripts, even though portions of the text of the
|
||||||
|
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||||
|
# all other use of the material that constitutes the Autoconf Macro.
|
||||||
|
#
|
||||||
|
# This special exception to the GPL applies to versions of the Autoconf
|
||||||
|
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||||
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
|
||||||
|
#serial 20
|
||||||
|
|
||||||
|
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
|
||||||
|
AC_DEFUN([AX_PTHREAD], [
|
||||||
|
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||||
|
AC_LANG_PUSH([C])
|
||||||
|
ax_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, ax_pthread_ok=yes)
|
||||||
|
AC_MSG_RESULT($ax_pthread_ok)
|
||||||
|
if test x"$ax_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, and "pthread-config"
|
||||||
|
# which is a program returning the flags for the Pth emulation library.
|
||||||
|
|
||||||
|
ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
|
||||||
|
|
||||||
|
# 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)
|
||||||
|
# ... -mt is also the pthreads flag for HP/aCC
|
||||||
|
# pthread: Linux, etcetera
|
||||||
|
# --thread-safe: KAI C++
|
||||||
|
# pthread-config: use pthread-config program (for GNU Pth library)
|
||||||
|
|
||||||
|
case ${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 -pthreads/-mt/
|
||||||
|
# -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:
|
||||||
|
|
||||||
|
ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
|
||||||
|
;;
|
||||||
|
|
||||||
|
darwin*)
|
||||||
|
ax_pthread_flags="-pthread $ax_pthread_flags"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test x"$ax_pthread_ok" = xno; then
|
||||||
|
for flag in $ax_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"
|
||||||
|
;;
|
||||||
|
|
||||||
|
pthread-config)
|
||||||
|
AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no)
|
||||||
|
if test x"$ax_pthread_config" = xno; then continue; fi
|
||||||
|
PTHREAD_CFLAGS="`pthread-config --cflags`"
|
||||||
|
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
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_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
|
||||||
|
static void routine(void *a) { a = 0; }
|
||||||
|
static void *start_routine(void *a) { return a; }],
|
||||||
|
[pthread_t th; pthread_attr_t attr;
|
||||||
|
pthread_create(&th, 0, start_routine, 0);
|
||||||
|
pthread_join(th, 0);
|
||||||
|
pthread_attr_init(&attr);
|
||||||
|
pthread_cleanup_push(routine, 0);
|
||||||
|
pthread_cleanup_pop(0) /* ; */])],
|
||||||
|
[ax_pthread_ok=yes],
|
||||||
|
[])
|
||||||
|
|
||||||
|
LIBS="$save_LIBS"
|
||||||
|
CFLAGS="$save_CFLAGS"
|
||||||
|
|
||||||
|
AC_MSG_RESULT($ax_pthread_ok)
|
||||||
|
if test "x$ax_pthread_ok" = xyes; then
|
||||||
|
break;
|
||||||
|
fi
|
||||||
|
|
||||||
|
PTHREAD_LIBS=""
|
||||||
|
PTHREAD_CFLAGS=""
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Various other checks:
|
||||||
|
if test "x$ax_pthread_ok" = xyes; then
|
||||||
|
save_LIBS="$LIBS"
|
||||||
|
LIBS="$PTHREAD_LIBS $LIBS"
|
||||||
|
save_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||||
|
|
||||||
|
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
|
||||||
|
AC_MSG_CHECKING([for joinable pthread attribute])
|
||||||
|
attr_name=unknown
|
||||||
|
for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
|
||||||
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
|
||||||
|
[int attr = $attr; return attr /* ; */])],
|
||||||
|
[attr_name=$attr; break],
|
||||||
|
[])
|
||||||
|
done
|
||||||
|
AC_MSG_RESULT($attr_name)
|
||||||
|
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
|
||||||
|
AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
|
||||||
|
[Define to necessary symbol if this constant
|
||||||
|
uses a non-standard name on your system.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([if more special flags are required for pthreads])
|
||||||
|
flag=no
|
||||||
|
case ${host_os} in
|
||||||
|
aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
|
||||||
|
osf* | hpux*) flag="-D_REENTRANT";;
|
||||||
|
solaris*)
|
||||||
|
if test "$GCC" = "yes"; then
|
||||||
|
flag="-D_REENTRANT"
|
||||||
|
else
|
||||||
|
flag="-mt -D_REENTRANT"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
AC_MSG_RESULT(${flag})
|
||||||
|
if test "x$flag" != xno; then
|
||||||
|
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
|
||||||
|
ax_cv_PTHREAD_PRIO_INHERIT, [
|
||||||
|
AC_LINK_IFELSE([
|
||||||
|
AC_LANG_PROGRAM([[#include <pthread.h>]], [[int i = PTHREAD_PRIO_INHERIT;]])],
|
||||||
|
[ax_cv_PTHREAD_PRIO_INHERIT=yes],
|
||||||
|
[ax_cv_PTHREAD_PRIO_INHERIT=no])
|
||||||
|
])
|
||||||
|
AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
|
||||||
|
AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.]))
|
||||||
|
|
||||||
|
LIBS="$save_LIBS"
|
||||||
|
CFLAGS="$save_CFLAGS"
|
||||||
|
|
||||||
|
# More AIX lossage: compile with *_r variant
|
||||||
|
if test "x$GCC" != xyes; then
|
||||||
|
case $host_os in
|
||||||
|
aix*)
|
||||||
|
AS_CASE(["x/$CC"],
|
||||||
|
[x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
|
||||||
|
[#handle absolute path differently from PATH based program lookup
|
||||||
|
AS_CASE(["x$CC"],
|
||||||
|
[x/*],
|
||||||
|
[AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
|
||||||
|
[AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
|
||||||
|
|
||||||
|
AC_SUBST(PTHREAD_LIBS)
|
||||||
|
AC_SUBST(PTHREAD_CFLAGS)
|
||||||
|
AC_SUBST(PTHREAD_CC)
|
||||||
|
|
||||||
|
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
|
||||||
|
if test x"$ax_pthread_ok" = xyes; then
|
||||||
|
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
|
||||||
|
:
|
||||||
|
else
|
||||||
|
ax_pthread_ok=no
|
||||||
|
$2
|
||||||
|
fi
|
||||||
|
AC_LANG_POP
|
||||||
|
])dnl AX_PTHREAD
|
64
src/pplib/autoconf/bzip2.m4
Normal file
64
src/pplib/autoconf/bzip2.m4
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
dnl AM_BZIP2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
AC_DEFUN([AM_BZIP2],[dnl
|
||||||
|
AC_MSG_CHECKING([for compatible bzip2 library and headers])
|
||||||
|
AC_ARG_WITH([bzip2],
|
||||||
|
[ --with-bzip2[[=PATH]] Prefix where bzip2 is installed (optional)],
|
||||||
|
[bzip2_prefix="$withval"],
|
||||||
|
[bzip2_prefix="no"])
|
||||||
|
|
||||||
|
am_save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
am_save_LIBS="$LIBS"
|
||||||
|
am_save_LDFLAGS="$LDFLAGS"
|
||||||
|
BZ2_LIBS="-lbz2"
|
||||||
|
BZ2_CFLAGS=""
|
||||||
|
report_have_bzip2="no"
|
||||||
|
if test "$bzip2_prefix" != "yes"
|
||||||
|
then
|
||||||
|
if test "$bzip2_prefix" != "no"
|
||||||
|
then
|
||||||
|
LIBS="-L$bzip2_prefix/lib -lbz2"
|
||||||
|
CPPFLAGS="-I$bzip2_prefix/include"
|
||||||
|
BZ2_LIBS="-L$bzip2_prefix/lib -lbz2"
|
||||||
|
BZ2_CFLAGS="-I$bzip2_prefix/include"
|
||||||
|
else
|
||||||
|
LIBS="$LIBS -lbz2"
|
||||||
|
BZ2_LIBS="-lbz2"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
LIBS="$LIBS -lbz2"
|
||||||
|
BZ2_LIBS="-lbz2"
|
||||||
|
fi
|
||||||
|
AC_LINK_IFELSE( [AC_LANG_SOURCE([[
|
||||||
|
#include <bzlib.h>
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
char* source = "Hello World";
|
||||||
|
char* dest;
|
||||||
|
unsigned int destLen = 1000;
|
||||||
|
unsigned int sourceLen = 1000;
|
||||||
|
int blockSize100k = 5;
|
||||||
|
int verbosity = 0;
|
||||||
|
int workFactor = 5;
|
||||||
|
BZ2_bzBuffToBuffCompress( dest, &destLen, source,
|
||||||
|
sourceLen, blockSize100k,
|
||||||
|
verbosity, workFactor);
|
||||||
|
}
|
||||||
|
]]) ],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_BZIP2, 1, [ Define if you have bzip2. ])
|
||||||
|
AC_SUBST(BZ2_CFLAGS)
|
||||||
|
AC_SUBST(BZ2_LIBS)
|
||||||
|
report_have_bzip2="yes"
|
||||||
|
|
||||||
|
],
|
||||||
|
[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
CPPFLAGS=$am_save_CPPFLAGS
|
||||||
|
LIBS=$am_save_LIBS
|
||||||
|
LDFLAGS=$am_save_LDFLAGS
|
||||||
|
|
||||||
|
|
||||||
|
])
|
64
src/pplib/autoconf/checkfuncs.m4
Normal file
64
src/pplib/autoconf/checkfuncs.m4
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
dnl AC_FIND_FUNC_NO_LIBS(func, libraries, includes, arguments)
|
||||||
|
AC_DEFUN([AC_FIND_FUNC_NO_LIBS], [
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for $1])
|
||||||
|
AC_CACHE_VAL(ac_cv_funclib_$1,
|
||||||
|
[
|
||||||
|
if eval "test \"\$ac_cv_func_$1\" != yes" ; then
|
||||||
|
ac_save_LIBS="$LIBS"
|
||||||
|
for ac_lib in "" $2; do
|
||||||
|
if test -n "$ac_lib"; then
|
||||||
|
ac_lib="-l$ac_lib"
|
||||||
|
LIBS="$ac_lib $ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
AC_TRY_LINK([$3],[$1($4)],eval "if test -n \"$ac_lib\";then ac_cv_funclib_$1=$ac_lib; else ac_cv_funclib_$1=yes; fi";break)
|
||||||
|
done
|
||||||
|
eval "ac_cv_funclib_$1=\${ac_cv_funclib_$1-no}"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
eval "ac_res=\$ac_cv_funclib_$1"
|
||||||
|
|
||||||
|
# autoheader tricks *sigh*
|
||||||
|
: << END
|
||||||
|
@@@funcs="$funcs $1"@@@
|
||||||
|
@@@libs="$libs $2"@@@
|
||||||
|
END
|
||||||
|
|
||||||
|
changequote(, )dnl
|
||||||
|
eval "ac_tr_func=HAVE_`echo $1 | tr '[a-z]' '[A-Z]'`"
|
||||||
|
eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr '[a-z]' '[A-Z]'`"
|
||||||
|
eval "LIB_$1=$ac_res"
|
||||||
|
changequote([, ])dnl
|
||||||
|
|
||||||
|
case "$ac_res" in
|
||||||
|
yes)
|
||||||
|
eval "ac_cv_func_$1=yes"
|
||||||
|
eval "LIB_$1="
|
||||||
|
AC_DEFINE_UNQUOTED($ac_tr_func)
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
;;
|
||||||
|
no)
|
||||||
|
eval "ac_cv_func_$1=no"
|
||||||
|
eval "LIB_$1="
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
eval "ac_cv_func_$1=yes"
|
||||||
|
eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
|
||||||
|
AC_DEFINE_UNQUOTED($ac_tr_func)
|
||||||
|
AC_DEFINE_UNQUOTED($ac_tr_lib)
|
||||||
|
AC_MSG_RESULT([yes, in $ac_res])
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
AC_SUBST(LIB_$1)
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl AC_FIND_FUNC(func, libraries, includes, arguments)
|
||||||
|
AC_DEFUN([AC_FIND_FUNC], [
|
||||||
|
AC_FIND_FUNC_NO_LIBS([$1], [$2], [$3], [$4])
|
||||||
|
if test -n "$LIB_$1"; then
|
||||||
|
LIBS="$LIB_$1 $LIBS"
|
||||||
|
fi
|
||||||
|
])
|
347
src/pplib/autoconf/compile
Executable file
347
src/pplib/autoconf/compile
Executable file
|
@ -0,0 +1,347 @@
|
||||||
|
#! /bin/sh
|
||||||
|
# Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
|
||||||
|
scriptversion=2012-10-14.11; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||||
|
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||||
|
#
|
||||||
|
# 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# 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>.
|
||||||
|
|
||||||
|
nl='
|
||||||
|
'
|
||||||
|
|
||||||
|
# We need space, tab and new line, in precisely that order. Quoting is
|
||||||
|
# there to prevent tools from complaining about whitespace usage.
|
||||||
|
IFS=" "" $nl"
|
||||||
|
|
||||||
|
file_conv=
|
||||||
|
|
||||||
|
# func_file_conv build_file lazy
|
||||||
|
# Convert a $build file to $host form and store it in $file
|
||||||
|
# Currently only supports Windows hosts. If the determined conversion
|
||||||
|
# type is listed in (the comma separated) LAZY, no conversion will
|
||||||
|
# take place.
|
||||||
|
func_file_conv ()
|
||||||
|
{
|
||||||
|
file=$1
|
||||||
|
case $file in
|
||||||
|
/ | /[!/]*) # absolute file, and not a UNC file
|
||||||
|
if test -z "$file_conv"; then
|
||||||
|
# lazily determine how to convert abs files
|
||||||
|
case `uname -s` in
|
||||||
|
MINGW*)
|
||||||
|
file_conv=mingw
|
||||||
|
;;
|
||||||
|
CYGWIN*)
|
||||||
|
file_conv=cygwin
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
file_conv=wine
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
case $file_conv/,$2, in
|
||||||
|
*,$file_conv,*)
|
||||||
|
;;
|
||||||
|
mingw/*)
|
||||||
|
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||||
|
;;
|
||||||
|
cygwin/*)
|
||||||
|
file=`cygpath -m "$file" || echo "$file"`
|
||||||
|
;;
|
||||||
|
wine/*)
|
||||||
|
file=`winepath -w "$file" || echo "$file"`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_dashL linkdir
|
||||||
|
# Make cl look for libraries in LINKDIR
|
||||||
|
func_cl_dashL ()
|
||||||
|
{
|
||||||
|
func_file_conv "$1"
|
||||||
|
if test -z "$lib_path"; then
|
||||||
|
lib_path=$file
|
||||||
|
else
|
||||||
|
lib_path="$lib_path;$file"
|
||||||
|
fi
|
||||||
|
linker_opts="$linker_opts -LIBPATH:$file"
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_dashl library
|
||||||
|
# Do a library search-path lookup for cl
|
||||||
|
func_cl_dashl ()
|
||||||
|
{
|
||||||
|
lib=$1
|
||||||
|
found=no
|
||||||
|
save_IFS=$IFS
|
||||||
|
IFS=';'
|
||||||
|
for dir in $lib_path $LIB
|
||||||
|
do
|
||||||
|
IFS=$save_IFS
|
||||||
|
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/$lib.dll.lib
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if test -f "$dir/$lib.lib"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/$lib.lib
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if test -f "$dir/lib$lib.a"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/lib$lib.a
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS=$save_IFS
|
||||||
|
|
||||||
|
if test "$found" != yes; then
|
||||||
|
lib=$lib.lib
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_wrapper cl arg...
|
||||||
|
# Adjust compile command to suit cl
|
||||||
|
func_cl_wrapper ()
|
||||||
|
{
|
||||||
|
# Assume a capable shell
|
||||||
|
lib_path=
|
||||||
|
shared=:
|
||||||
|
linker_opts=
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$eat"; then
|
||||||
|
eat=
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
-o)
|
||||||
|
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||||
|
eat=1
|
||||||
|
case $2 in
|
||||||
|
*.o | *.[oO][bB][jJ])
|
||||||
|
func_file_conv "$2"
|
||||||
|
set x "$@" -Fo"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
func_file_conv "$2"
|
||||||
|
set x "$@" -Fe"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
-I)
|
||||||
|
eat=1
|
||||||
|
func_file_conv "$2" mingw
|
||||||
|
set x "$@" -I"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-I*)
|
||||||
|
func_file_conv "${1#-I}" mingw
|
||||||
|
set x "$@" -I"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-l)
|
||||||
|
eat=1
|
||||||
|
func_cl_dashl "$2"
|
||||||
|
set x "$@" "$lib"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-l*)
|
||||||
|
func_cl_dashl "${1#-l}"
|
||||||
|
set x "$@" "$lib"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-L)
|
||||||
|
eat=1
|
||||||
|
func_cl_dashL "$2"
|
||||||
|
;;
|
||||||
|
-L*)
|
||||||
|
func_cl_dashL "${1#-L}"
|
||||||
|
;;
|
||||||
|
-static)
|
||||||
|
shared=false
|
||||||
|
;;
|
||||||
|
-Wl,*)
|
||||||
|
arg=${1#-Wl,}
|
||||||
|
save_ifs="$IFS"; IFS=','
|
||||||
|
for flag in $arg; do
|
||||||
|
IFS="$save_ifs"
|
||||||
|
linker_opts="$linker_opts $flag"
|
||||||
|
done
|
||||||
|
IFS="$save_ifs"
|
||||||
|
;;
|
||||||
|
-Xlinker)
|
||||||
|
eat=1
|
||||||
|
linker_opts="$linker_opts $2"
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||||
|
func_file_conv "$1"
|
||||||
|
set x "$@" -Tp"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||||
|
func_file_conv "$1" mingw
|
||||||
|
set x "$@" "$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
if test -n "$linker_opts"; then
|
||||||
|
linker_opts="-link$linker_opts"
|
||||||
|
fi
|
||||||
|
exec "$@" $linker_opts
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
eat=
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
'')
|
||||||
|
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
-h | --h*)
|
||||||
|
cat <<\EOF
|
||||||
|
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||||
|
|
||||||
|
Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||||
|
arguments, and rename the output as expected.
|
||||||
|
|
||||||
|
If you are trying to build a whole package this is not the
|
||||||
|
right script to run: please start by reading the file 'INSTALL'.
|
||||||
|
|
||||||
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
EOF
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-v | --v*)
|
||||||
|
echo "compile $scriptversion"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||||
|
func_cl_wrapper "$@" # Doesn't return...
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
ofile=
|
||||||
|
cfile=
|
||||||
|
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$eat"; then
|
||||||
|
eat=
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
-o)
|
||||||
|
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||||
|
# So we strip '-o arg' only if arg is an object.
|
||||||
|
eat=1
|
||||||
|
case $2 in
|
||||||
|
*.o | *.obj)
|
||||||
|
ofile=$2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" -o "$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*.c)
|
||||||
|
cfile=$1
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -z "$ofile" || test -z "$cfile"; then
|
||||||
|
# If no '-o' option was seen then we might have been invoked from a
|
||||||
|
# pattern rule where we don't need one. That is ok -- this is a
|
||||||
|
# normal compilation that the losing compiler can handle. If no
|
||||||
|
# '.c' file was seen then we are probably linking. That is also
|
||||||
|
# ok.
|
||||||
|
exec "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Name of file we expect compiler to create.
|
||||||
|
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||||
|
|
||||||
|
# Create the lock directory.
|
||||||
|
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||||
|
# that we are using for the .o file. Also, base the name on the expected
|
||||||
|
# object file name, since that is what matters with a parallel build.
|
||||||
|
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||||
|
while true; do
|
||||||
|
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
# FIXME: race condition here if user kills between mkdir and trap.
|
||||||
|
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||||
|
|
||||||
|
# Run the compile.
|
||||||
|
"$@"
|
||||||
|
ret=$?
|
||||||
|
|
||||||
|
if test -f "$cofile"; then
|
||||||
|
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||||
|
elif test -f "${cofile}bj"; then
|
||||||
|
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rmdir "$lockdir"
|
||||||
|
exit $ret
|
||||||
|
|
||||||
|
# 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-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
1547
src/pplib/autoconf/config.guess
vendored
Executable file
1547
src/pplib/autoconf/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load diff
666
src/pplib/autoconf/config.rpath
Normal file
666
src/pplib/autoconf/config.rpath
Normal file
|
@ -0,0 +1,666 @@
|
||||||
|
#! /bin/sh
|
||||||
|
# Output a system dependent set of variables, describing how to set the
|
||||||
|
# run time search path of shared libraries in an executable.
|
||||||
|
#
|
||||||
|
# Copyright 1996-2007 Free Software Foundation, Inc.
|
||||||
|
# Taken from GNU libtool, 2001
|
||||||
|
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
# The first argument passed to this file is the canonical host specification,
|
||||||
|
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||||
|
# or
|
||||||
|
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||||
|
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
|
||||||
|
# should be set by the caller.
|
||||||
|
#
|
||||||
|
# The set of defined variables is at the end of this script.
|
||||||
|
|
||||||
|
# Known limitations:
|
||||||
|
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
|
||||||
|
# than 256 bytes, otherwise the compiler driver will dump core. The only
|
||||||
|
# known workaround is to choose shorter directory names for the build
|
||||||
|
# directory and/or the installation directory.
|
||||||
|
|
||||||
|
# All known linkers require a `.a' archive for static linking (except MSVC,
|
||||||
|
# which needs '.lib').
|
||||||
|
libext=a
|
||||||
|
shrext=.so
|
||||||
|
|
||||||
|
host="$1"
|
||||||
|
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||||
|
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||||
|
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||||
|
|
||||||
|
# Code taken from libtool.m4's _LT_CC_BASENAME.
|
||||||
|
|
||||||
|
for cc_temp in $CC""; do
|
||||||
|
case $cc_temp in
|
||||||
|
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
|
||||||
|
distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
|
||||||
|
\-*) ;;
|
||||||
|
*) break;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
|
||||||
|
|
||||||
|
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
|
||||||
|
|
||||||
|
wl=
|
||||||
|
if test "$GCC" = yes; then
|
||||||
|
wl='-Wl,'
|
||||||
|
else
|
||||||
|
case "$host_os" in
|
||||||
|
aix*)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
darwin*)
|
||||||
|
case $cc_basename in
|
||||||
|
xlc*)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
mingw* | cygwin* | pw32* | os2*)
|
||||||
|
;;
|
||||||
|
hpux9* | hpux10* | hpux11*)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
irix5* | irix6* | nonstopux*)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
newsos6)
|
||||||
|
;;
|
||||||
|
linux* | k*bsd*-gnu)
|
||||||
|
case $cc_basename in
|
||||||
|
icc* | ecc*)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
pgcc | pgf77 | pgf90)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
ccc*)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
como)
|
||||||
|
wl='-lopt='
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
case `$CC -V 2>&1 | sed 5q` in
|
||||||
|
*Sun\ C*)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
osf3* | osf4* | osf5*)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
rdos*)
|
||||||
|
;;
|
||||||
|
solaris*)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
sunos4*)
|
||||||
|
wl='-Qoption ld '
|
||||||
|
;;
|
||||||
|
sysv4 | sysv4.2uw2* | sysv4.3*)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
sysv4*MP*)
|
||||||
|
;;
|
||||||
|
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
unicos*)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
uts4*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
|
||||||
|
|
||||||
|
hardcode_libdir_flag_spec=
|
||||||
|
hardcode_libdir_separator=
|
||||||
|
hardcode_direct=no
|
||||||
|
hardcode_minus_L=no
|
||||||
|
|
||||||
|
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
|
||||||
|
# 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.
|
||||||
|
# Unlike libtool, we use -rpath here, not --rpath, since the documented
|
||||||
|
# option of GNU ld is called -rpath, not --rpath.
|
||||||
|
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||||
|
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
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
amigaos*)
|
||||||
|
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 cannot use
|
||||||
|
# them.
|
||||||
|
ld_shlibs=no
|
||||||
|
;;
|
||||||
|
beos*)
|
||||||
|
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
ld_shlibs=no
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
cygwin* | mingw* | pw32*)
|
||||||
|
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||||
|
# no search path for DLLs.
|
||||||
|
hardcode_libdir_flag_spec='-L$libdir'
|
||||||
|
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
ld_shlibs=no
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
interix[3-9]*)
|
||||||
|
hardcode_direct=no
|
||||||
|
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||||
|
;;
|
||||||
|
gnu* | linux* | k*bsd*-gnu)
|
||||||
|
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
ld_shlibs=no
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
netbsd*)
|
||||||
|
;;
|
||||||
|
solaris*)
|
||||||
|
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
|
||||||
|
ld_shlibs=no
|
||||||
|
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||||
|
:
|
||||||
|
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
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||||
|
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
|
||||||
|
else
|
||||||
|
ld_shlibs=no
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
sunos4*)
|
||||||
|
hardcode_direct=yes
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
ld_shlibs=no
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if test "$ld_shlibs" = no; then
|
||||||
|
hardcode_libdir_flag_spec=
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
case "$host_os" in
|
||||||
|
aix3*)
|
||||||
|
# Note: this linker hardcodes the directories in LIBPATH if there
|
||||||
|
# are no directories specified by -L.
|
||||||
|
hardcode_minus_L=yes
|
||||||
|
if test "$GCC" = yes; 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
|
||||||
|
else
|
||||||
|
aix_use_runtimelinking=no
|
||||||
|
# Test if we are trying to use run time linking or normal
|
||||||
|
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
|
||||||
|
# need to do runtime linking.
|
||||||
|
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
|
||||||
|
for ld_flag in $LDFLAGS; do
|
||||||
|
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
|
||||||
|
aix_use_runtimelinking=yes
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
hardcode_direct=yes
|
||||||
|
hardcode_libdir_separator=':'
|
||||||
|
if test "$GCC" = yes; then
|
||||||
|
case $host_os in aix4.[012]|aix4.[012].*)
|
||||||
|
collect2name=`${CC} -print-prog-name=collect2`
|
||||||
|
if test -f "$collect2name" && \
|
||||||
|
strings "$collect2name" | grep resolve_lib_name >/dev/null
|
||||||
|
then
|
||||||
|
# We have reworked collect2
|
||||||
|
:
|
||||||
|
else
|
||||||
|
# We have old collect2
|
||||||
|
hardcode_direct=unsupported
|
||||||
|
hardcode_minus_L=yes
|
||||||
|
hardcode_libdir_flag_spec='-L$libdir'
|
||||||
|
hardcode_libdir_separator=
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
# Begin _LT_AC_SYS_LIBPATH_AIX.
|
||||||
|
echo 'int main () { return 0; }' > conftest.c
|
||||||
|
${CC} ${LDFLAGS} conftest.c -o conftest
|
||||||
|
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||||
|
}'`
|
||||||
|
if test -z "$aix_libpath"; then
|
||||||
|
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||||
|
}'`
|
||||||
|
fi
|
||||||
|
if test -z "$aix_libpath"; then
|
||||||
|
aix_libpath="/usr/lib:/lib"
|
||||||
|
fi
|
||||||
|
rm -f conftest.c conftest
|
||||||
|
# End _LT_AC_SYS_LIBPATH_AIX.
|
||||||
|
if test "$aix_use_runtimelinking" = yes; then
|
||||||
|
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||||
|
else
|
||||||
|
if test "$host_cpu" = ia64; then
|
||||||
|
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
|
||||||
|
else
|
||||||
|
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
amigaos*)
|
||||||
|
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]*)
|
||||||
|
;;
|
||||||
|
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=' '
|
||||||
|
libext=lib
|
||||||
|
;;
|
||||||
|
darwin* | rhapsody*)
|
||||||
|
hardcode_direct=no
|
||||||
|
if test "$GCC" = yes ; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
case $cc_basename in
|
||||||
|
xlc*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
ld_shlibs=no
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
dgux*)
|
||||||
|
hardcode_libdir_flag_spec='-L$libdir'
|
||||||
|
;;
|
||||||
|
freebsd1*)
|
||||||
|
ld_shlibs=no
|
||||||
|
;;
|
||||||
|
freebsd2.2*)
|
||||||
|
hardcode_libdir_flag_spec='-R$libdir'
|
||||||
|
hardcode_direct=yes
|
||||||
|
;;
|
||||||
|
freebsd2*)
|
||||||
|
hardcode_direct=yes
|
||||||
|
hardcode_minus_L=yes
|
||||||
|
;;
|
||||||
|
freebsd* | dragonfly*)
|
||||||
|
hardcode_libdir_flag_spec='-R$libdir'
|
||||||
|
hardcode_direct=yes
|
||||||
|
;;
|
||||||
|
hpux9*)
|
||||||
|
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
|
||||||
|
;;
|
||||||
|
hpux10*)
|
||||||
|
if test "$with_gnu_ld" = no; then
|
||||||
|
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
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
hpux11*)
|
||||||
|
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_direct=no
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
hardcode_direct=yes
|
||||||
|
# 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*)
|
||||||
|
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||||
|
hardcode_libdir_separator=:
|
||||||
|
;;
|
||||||
|
netbsd*)
|
||||||
|
hardcode_libdir_flag_spec='-R$libdir'
|
||||||
|
hardcode_direct=yes
|
||||||
|
;;
|
||||||
|
newsos6)
|
||||||
|
hardcode_direct=yes
|
||||||
|
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||||
|
hardcode_libdir_separator=:
|
||||||
|
;;
|
||||||
|
openbsd*)
|
||||||
|
if test -f /usr/libexec/ld.so; then
|
||||||
|
hardcode_direct=yes
|
||||||
|
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||||
|
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||||
|
else
|
||||||
|
case "$host_os" in
|
||||||
|
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
|
||||||
|
hardcode_libdir_flag_spec='-R$libdir'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
ld_shlibs=no
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
os2*)
|
||||||
|
hardcode_libdir_flag_spec='-L$libdir'
|
||||||
|
hardcode_minus_L=yes
|
||||||
|
;;
|
||||||
|
osf3*)
|
||||||
|
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||||
|
hardcode_libdir_separator=:
|
||||||
|
;;
|
||||||
|
osf4* | osf5*)
|
||||||
|
if test "$GCC" = yes; then
|
||||||
|
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||||
|
else
|
||||||
|
# Both cc and cxx compiler support -rpath directly
|
||||||
|
hardcode_libdir_flag_spec='-rpath $libdir'
|
||||||
|
fi
|
||||||
|
hardcode_libdir_separator=:
|
||||||
|
;;
|
||||||
|
solaris*)
|
||||||
|
hardcode_libdir_flag_spec='-R$libdir'
|
||||||
|
;;
|
||||||
|
sunos4*)
|
||||||
|
hardcode_libdir_flag_spec='-L$libdir'
|
||||||
|
hardcode_direct=yes
|
||||||
|
hardcode_minus_L=yes
|
||||||
|
;;
|
||||||
|
sysv4)
|
||||||
|
case $host_vendor in
|
||||||
|
sni)
|
||||||
|
hardcode_direct=yes # is this really true???
|
||||||
|
;;
|
||||||
|
siemens)
|
||||||
|
hardcode_direct=no
|
||||||
|
;;
|
||||||
|
motorola)
|
||||||
|
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
sysv4.3*)
|
||||||
|
;;
|
||||||
|
sysv4*MP*)
|
||||||
|
if test -d /usr/nec; then
|
||||||
|
ld_shlibs=yes
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
|
||||||
|
;;
|
||||||
|
sysv5* | sco3.2v5* | sco5v6*)
|
||||||
|
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
|
||||||
|
hardcode_libdir_separator=':'
|
||||||
|
;;
|
||||||
|
uts4*)
|
||||||
|
hardcode_libdir_flag_spec='-L$libdir'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
ld_shlibs=no
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check dynamic linker characteristics
|
||||||
|
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
|
||||||
|
# Unlike libtool.m4, here we don't care about _all_ names of the library, but
|
||||||
|
# only about the one the linker finds when passed -lNAME. This is the last
|
||||||
|
# element of library_names_spec in libtool.m4, or possibly two of them if the
|
||||||
|
# linker has special search rules.
|
||||||
|
library_names_spec= # the last element of library_names_spec in libtool.m4
|
||||||
|
libname_spec='lib$name'
|
||||||
|
case "$host_os" in
|
||||||
|
aix3*)
|
||||||
|
library_names_spec='$libname.a'
|
||||||
|
;;
|
||||||
|
aix4* | aix5*)
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
;;
|
||||||
|
amigaos*)
|
||||||
|
library_names_spec='$libname.a'
|
||||||
|
;;
|
||||||
|
beos*)
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
;;
|
||||||
|
bsdi[45]*)
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
;;
|
||||||
|
cygwin* | mingw* | pw32*)
|
||||||
|
shrext=.dll
|
||||||
|
library_names_spec='$libname.dll.a $libname.lib'
|
||||||
|
;;
|
||||||
|
darwin* | rhapsody*)
|
||||||
|
shrext=.dylib
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
;;
|
||||||
|
dgux*)
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
;;
|
||||||
|
freebsd1*)
|
||||||
|
;;
|
||||||
|
freebsd* | dragonfly*)
|
||||||
|
case "$host_os" in
|
||||||
|
freebsd[123]*)
|
||||||
|
library_names_spec='$libname$shrext$versuffix' ;;
|
||||||
|
*)
|
||||||
|
library_names_spec='$libname$shrext' ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
gnu*)
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
;;
|
||||||
|
hpux9* | hpux10* | hpux11*)
|
||||||
|
case $host_cpu in
|
||||||
|
ia64*)
|
||||||
|
shrext=.so
|
||||||
|
;;
|
||||||
|
hppa*64*)
|
||||||
|
shrext=.sl
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
shrext=.sl
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
;;
|
||||||
|
interix[3-9]*)
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
;;
|
||||||
|
irix5* | irix6* | nonstopux*)
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
case "$host_os" in
|
||||||
|
irix5* | nonstopux*)
|
||||||
|
libsuff= shlibsuff=
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
case $LD in
|
||||||
|
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
|
||||||
|
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
|
||||||
|
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
|
||||||
|
*) libsuff= shlibsuff= ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
linux*oldld* | linux*aout* | linux*coff*)
|
||||||
|
;;
|
||||||
|
linux* | k*bsd*-gnu)
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
;;
|
||||||
|
knetbsd*-gnu)
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
;;
|
||||||
|
netbsd*)
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
;;
|
||||||
|
newsos6)
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
;;
|
||||||
|
nto-qnx*)
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
;;
|
||||||
|
openbsd*)
|
||||||
|
library_names_spec='$libname$shrext$versuffix'
|
||||||
|
;;
|
||||||
|
os2*)
|
||||||
|
libname_spec='$name'
|
||||||
|
shrext=.dll
|
||||||
|
library_names_spec='$libname.a'
|
||||||
|
;;
|
||||||
|
osf3* | osf4* | osf5*)
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
;;
|
||||||
|
rdos*)
|
||||||
|
;;
|
||||||
|
solaris*)
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
;;
|
||||||
|
sunos4*)
|
||||||
|
library_names_spec='$libname$shrext$versuffix'
|
||||||
|
;;
|
||||||
|
sysv4 | sysv4.3*)
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
;;
|
||||||
|
sysv4*MP*)
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
;;
|
||||||
|
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
;;
|
||||||
|
uts4*)
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
|
||||||
|
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||||
|
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
|
||||||
|
escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||||
|
escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||||
|
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||||
|
|
||||||
|
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||||
|
|
||||||
|
# How to pass a linker flag through the compiler.
|
||||||
|
wl="$escaped_wl"
|
||||||
|
|
||||||
|
# Static library suffix (normally "a").
|
||||||
|
libext="$libext"
|
||||||
|
|
||||||
|
# Shared library suffix (normally "so").
|
||||||
|
shlibext="$shlibext"
|
||||||
|
|
||||||
|
# Format of library name prefix.
|
||||||
|
libname_spec="$escaped_libname_spec"
|
||||||
|
|
||||||
|
# Library names that the linker finds when passed -lNAME.
|
||||||
|
library_names_spec="$escaped_library_names_spec"
|
||||||
|
|
||||||
|
# Flag to hardcode \$libdir into a binary during linking.
|
||||||
|
# This must work even if \$libdir does not exist.
|
||||||
|
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
|
||||||
|
|
||||||
|
# Whether we need a single -rpath flag with a separated argument.
|
||||||
|
hardcode_libdir_separator="$hardcode_libdir_separator"
|
||||||
|
|
||||||
|
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
|
||||||
|
# resulting binary.
|
||||||
|
hardcode_direct="$hardcode_direct"
|
||||||
|
|
||||||
|
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
|
||||||
|
# resulting binary.
|
||||||
|
hardcode_minus_L="$hardcode_minus_L"
|
||||||
|
|
||||||
|
EOF
|
1807
src/pplib/autoconf/config.sub
vendored
Executable file
1807
src/pplib/autoconf/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load diff
63
src/pplib/autoconf/freetds.m4
Normal file
63
src/pplib/autoconf/freetds.m4
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
dnl AC_CHECK_FREETDS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
|
||||||
|
AC_DEFUN([AC_CHECK_FREETDS],[
|
||||||
|
AC_MSG_CHECKING(if FreeTDS should be used)
|
||||||
|
|
||||||
|
AC_ARG_WITH([freetds],
|
||||||
|
[ --with-freetds[[=PATH]] Prefix where freetds is installed (optional)],
|
||||||
|
[freetds_prefix="$withval"],
|
||||||
|
[freetds_prefix="auto"])
|
||||||
|
|
||||||
|
if test "$freetds_prefix" != "no"
|
||||||
|
then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
my_save_LIBS="$LIBS"
|
||||||
|
my_save_CFLAGS="$CFLAGS"
|
||||||
|
my_save_LDFLAGS="$LDFLAGS"
|
||||||
|
|
||||||
|
|
||||||
|
if test "$freetds_prefix" = "yes" -o "$freetds_prefix" = "auto"
|
||||||
|
then
|
||||||
|
PKG_CHECK_MODULES([FreeTDS], [freedts], have_freetds="yes", have_freetds="no")
|
||||||
|
else
|
||||||
|
LIBS="-L$freetds_prefix/lib"
|
||||||
|
CFLAGS="-I$freetds_prefix/include"
|
||||||
|
FREETDS_LIBS="-L$freetds_prefix/lib"
|
||||||
|
FREETDS_CFLAGS="-I$freetds_prefix/include"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$have_freetds" != "yes"
|
||||||
|
then
|
||||||
|
dnl echo "FreeTDS ist nicht in autoconf, manuelle suche..."
|
||||||
|
AC_CHECK_LIB(rt,clock_gettime,
|
||||||
|
FREETDS_LIBS="$FREETDS_LIBS -lrt "
|
||||||
|
LIBS="$LIBS -lrt"
|
||||||
|
)
|
||||||
|
AC_CHECK_LIB(ct,ct_connect,
|
||||||
|
have_freetds="yes"
|
||||||
|
FREETDS_LIBS="-lct $FREETDS_LIBS "
|
||||||
|
)
|
||||||
|
AC_CHECK_HEADERS([ctpublic.h],,have_freetds="no")
|
||||||
|
fi
|
||||||
|
LIBS="$my_save_LIBS"
|
||||||
|
CFLAGS="$my_save_CFLAGS"
|
||||||
|
LDFLAGS="$my_save_LDFLAGS"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $have_freetds = "yes"
|
||||||
|
then
|
||||||
|
echo "FREETDS_LIBS=$FREETDS_LIBS"
|
||||||
|
echo "FREETDS_CFLAGS=$FREETDS_CFLAGS"
|
||||||
|
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
else
|
||||||
|
FREETDS_LIBS=""
|
||||||
|
FREETDS_CFLAGS=""
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
])
|
||||||
|
|
190
src/pplib/autoconf/freetype.m4
Normal file
190
src/pplib/autoconf/freetype.m4
Normal file
|
@ -0,0 +1,190 @@
|
||||||
|
# Configure paths for FreeType2
|
||||||
|
# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor
|
||||||
|
#
|
||||||
|
# Copyright 2001, 2003 by
|
||||||
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
|
#
|
||||||
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
|
# and distributed under the terms of the FreeType project license,
|
||||||
|
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||||
|
# indicate that you have read the license and understand and accept it
|
||||||
|
# fully.
|
||||||
|
#
|
||||||
|
# serial 2
|
||||||
|
|
||||||
|
# AC_CHECK_FT2([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
# Test for FreeType 2, and define FT2_CFLAGS and FT2_LIBS.
|
||||||
|
# MINIMUM-VERSION is what libtool reports; the default is `7.0.1' (this is
|
||||||
|
# FreeType 2.0.4).
|
||||||
|
#
|
||||||
|
AC_DEFUN([AC_CHECK_FT2],
|
||||||
|
[# Get the cflags and libraries from the freetype-config script
|
||||||
|
#
|
||||||
|
AC_ARG_WITH([ft-prefix],
|
||||||
|
dnl don't quote AS_HELP_STRING!
|
||||||
|
AS_HELP_STRING([--with-ft-prefix=PREFIX],
|
||||||
|
[Prefix where FreeType is installed (optional)]),
|
||||||
|
[ft_config_prefix="$withval"],
|
||||||
|
[ft_config_prefix=""])
|
||||||
|
|
||||||
|
AC_ARG_WITH([ft-exec-prefix],
|
||||||
|
dnl don't quote AS_HELP_STRING!
|
||||||
|
AS_HELP_STRING([--with-ft-exec-prefix=PREFIX],
|
||||||
|
[Exec prefix where FreeType is installed (optional)]),
|
||||||
|
[ft_config_exec_prefix="$withval"],
|
||||||
|
[ft_config_exec_prefix=""])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([freetypetest],
|
||||||
|
dnl don't quote AS_HELP_STRING!
|
||||||
|
AS_HELP_STRING([--disable-freetypetest],
|
||||||
|
[Do not try to compile and run a test FreeType program]),
|
||||||
|
[],
|
||||||
|
[enable_fttest=yes])
|
||||||
|
|
||||||
|
if test x$ft_config_exec_prefix != x ; then
|
||||||
|
ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix"
|
||||||
|
if test x${FT2_CONFIG+set} != xset ; then
|
||||||
|
FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x$ft_config_prefix != x ; then
|
||||||
|
ft_config_args="$ft_config_args --prefix=$ft_config_prefix"
|
||||||
|
if test x${FT2_CONFIG+set} != xset ; then
|
||||||
|
FT2_CONFIG=$ft_config_prefix/bin/freetype-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_PATH_PROG([FT2_CONFIG], [freetype-config], [no])
|
||||||
|
|
||||||
|
min_ft_version=m4_if([$1], [], [7.0.1], [$1])
|
||||||
|
AC_MSG_CHECKING([for FreeType -- version >= $min_ft_version])
|
||||||
|
no_ft=""
|
||||||
|
if test "$FT2_CONFIG" = "no" ; then
|
||||||
|
no_ft=yes
|
||||||
|
else
|
||||||
|
FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags`
|
||||||
|
FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs`
|
||||||
|
ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||||
|
ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||||
|
ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||||
|
ft_min_major_version=`echo $min_ft_version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||||
|
ft_min_minor_version=`echo $min_ft_version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||||
|
ft_min_micro_version=`echo $min_ft_version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||||
|
if test x$enable_fttest = xyes ; then
|
||||||
|
ft_config_is_lt=""
|
||||||
|
if test $ft_config_major_version -lt $ft_min_major_version ; then
|
||||||
|
ft_config_is_lt=yes
|
||||||
|
else
|
||||||
|
if test $ft_config_major_version -eq $ft_min_major_version ; then
|
||||||
|
if test $ft_config_minor_version -lt $ft_min_minor_version ; then
|
||||||
|
ft_config_is_lt=yes
|
||||||
|
else
|
||||||
|
if test $ft_config_minor_version -eq $ft_min_minor_version ; then
|
||||||
|
if test $ft_config_micro_version -lt $ft_min_micro_version ; then
|
||||||
|
ft_config_is_lt=yes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test x$ft_config_is_lt = xyes ; then
|
||||||
|
no_ft=yes
|
||||||
|
else
|
||||||
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
|
ac_save_LIBS="$LIBS"
|
||||||
|
CFLAGS="$CFLAGS $FT2_CFLAGS"
|
||||||
|
LIBS="$FT2_LIBS $LIBS"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Sanity checks for the results of freetype-config to some extent.
|
||||||
|
#
|
||||||
|
AC_RUN_IFELSE([
|
||||||
|
AC_LANG_SOURCE([[
|
||||||
|
|
||||||
|
#include <ft2build.h>
|
||||||
|
#include FT_FREETYPE_H
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
FT_Library library;
|
||||||
|
FT_Error error;
|
||||||
|
|
||||||
|
error = FT_Init_FreeType(&library);
|
||||||
|
|
||||||
|
if (error)
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FT_Done_FreeType(library);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
]])
|
||||||
|
],
|
||||||
|
[],
|
||||||
|
[no_ft=yes],
|
||||||
|
[echo $ECHO_N "cross compiling; assuming OK... $ECHO_C"])
|
||||||
|
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi # test $ft_config_version -lt $ft_min_version
|
||||||
|
fi # test x$enable_fttest = xyes
|
||||||
|
fi # test "$FT2_CONFIG" = "no"
|
||||||
|
|
||||||
|
if test x$no_ft = x ; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
m4_if([$2], [], [:], [$2])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
if test "$FT2_CONFIG" = "no" ; then
|
||||||
|
AC_MSG_WARN([
|
||||||
|
|
||||||
|
The freetype-config script installed by FreeType 2 could not be found.
|
||||||
|
If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in
|
||||||
|
your path, or set the FT2_CONFIG environment variable to the
|
||||||
|
full path to freetype-config.
|
||||||
|
])
|
||||||
|
else
|
||||||
|
if test x$ft_config_is_lt = xyes ; then
|
||||||
|
AC_MSG_WARN([
|
||||||
|
|
||||||
|
Your installed version of the FreeType 2 library is too old.
|
||||||
|
If you have different versions of FreeType 2, make sure that
|
||||||
|
correct values for --with-ft-prefix or --with-ft-exec-prefix
|
||||||
|
are used, or set the FT2_CONFIG environment variable to the
|
||||||
|
full path to freetype-config.
|
||||||
|
])
|
||||||
|
else
|
||||||
|
AC_MSG_WARN([
|
||||||
|
|
||||||
|
The FreeType test program failed to run. If your system uses
|
||||||
|
shared libraries and they are installed outside the normal
|
||||||
|
system library path, make sure the variable LD_LIBRARY_PATH
|
||||||
|
(or whatever is appropiate for your system) is correctly set.
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
FT2_CFLAGS=""
|
||||||
|
FT2_LIBS=""
|
||||||
|
m4_if([$3], [], [:], [$3])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST([FT2_CFLAGS])
|
||||||
|
AC_SUBST([FT2_LIBS])])
|
||||||
|
|
||||||
|
# end of freetype2.m4
|
||||||
|
|
||||||
|
|
||||||
|
|
49
src/pplib/autoconf/gtest.m4
Normal file
49
src/pplib/autoconf/gtest.m4
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
dnl AC_CHECK_GTEST([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||||
|
|
||||||
|
AC_DEFUN([AC_CHECK_GTEST],[
|
||||||
|
AC_MSG_CHECKING(if googletest should be used for unittesting)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([gtest],[
|
||||||
|
AS_HELP_STRING([--enable-gtest=PATH],
|
||||||
|
[Enable tests using the Google C++ Testing Framework.
|
||||||
|
(Default is enabled.)])],
|
||||||
|
[],
|
||||||
|
[enable_gtest=])
|
||||||
|
|
||||||
|
HAVE_GTEST="no"
|
||||||
|
if test "$enable_gtest" != "no"
|
||||||
|
then
|
||||||
|
|
||||||
|
if test -d "$enable_gtest"
|
||||||
|
then
|
||||||
|
if test -f "$enable_gtest/src/gtest-all.cc"
|
||||||
|
then
|
||||||
|
if test -d "$enable_gtest/include/gtest"
|
||||||
|
then
|
||||||
|
HAVE_GTEST="yes"
|
||||||
|
GTEST_PREFIX="$enable_gtest"
|
||||||
|
AC_SUBST([GTEST_PREFIX])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$HAVE_GTEST" = "yes"
|
||||||
|
then
|
||||||
|
AC_MSG_RESULT(yes: $enable_gtest)
|
||||||
|
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
AC_SUBST([HAVE_GTEST])
|
||||||
|
if test $HAVE_GTEST = "yes"
|
||||||
|
then
|
||||||
|
ifelse([$1], , :, [$1])
|
||||||
|
else
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
fi
|
||||||
|
|
||||||
|
])
|
||||||
|
|
180
src/pplib/autoconf/iconv.m4
Normal file
180
src/pplib/autoconf/iconv.m4
Normal file
|
@ -0,0 +1,180 @@
|
||||||
|
# iconv.m4 serial AM7 (gettext-0.18)
|
||||||
|
dnl Copyright (C) 2000-2002, 2007-2009 Free Software Foundation, Inc.
|
||||||
|
dnl This file is free software; the Free Software Foundation
|
||||||
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
dnl with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
dnl From Bruno Haible.
|
||||||
|
|
||||||
|
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
|
||||||
|
[
|
||||||
|
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
|
||||||
|
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||||
|
AC_REQUIRE([AC_LIB_RPATH])
|
||||||
|
|
||||||
|
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
||||||
|
dnl accordingly.
|
||||||
|
AC_LIB_LINKFLAGS_BODY([iconv])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([AM_ICONV_LINK],
|
||||||
|
[
|
||||||
|
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
||||||
|
dnl those with the standalone portable GNU libiconv installed).
|
||||||
|
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
|
||||||
|
|
||||||
|
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
||||||
|
dnl accordingly.
|
||||||
|
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
|
||||||
|
|
||||||
|
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
|
||||||
|
dnl because if the user has installed libiconv and not disabled its use
|
||||||
|
dnl via --without-libiconv-prefix, he wants to use it. The first
|
||||||
|
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
|
||||||
|
am_save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
|
||||||
|
|
||||||
|
AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
|
||||||
|
am_cv_func_iconv="no, consider installing GNU libiconv"
|
||||||
|
am_cv_lib_iconv=no
|
||||||
|
AC_TRY_LINK([#include <stdlib.h>
|
||||||
|
#include <iconv.h>],
|
||||||
|
[iconv_t cd = iconv_open("","");
|
||||||
|
iconv(cd,NULL,NULL,NULL,NULL);
|
||||||
|
iconv_close(cd);],
|
||||||
|
[am_cv_func_iconv=yes])
|
||||||
|
if test "$am_cv_func_iconv" != yes; then
|
||||||
|
am_save_LIBS="$LIBS"
|
||||||
|
LIBS="$LIBS $LIBICONV"
|
||||||
|
AC_TRY_LINK([#include <stdlib.h>
|
||||||
|
#include <iconv.h>],
|
||||||
|
[iconv_t cd = iconv_open("","");
|
||||||
|
iconv(cd,NULL,NULL,NULL,NULL);
|
||||||
|
iconv_close(cd);],
|
||||||
|
[am_cv_lib_iconv=yes]
|
||||||
|
[am_cv_func_iconv=yes])
|
||||||
|
LIBS="$am_save_LIBS"
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
if test "$am_cv_func_iconv" = yes; then
|
||||||
|
AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
|
||||||
|
dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
|
||||||
|
am_save_LIBS="$LIBS"
|
||||||
|
if test $am_cv_lib_iconv = yes; then
|
||||||
|
LIBS="$LIBS $LIBICONV"
|
||||||
|
fi
|
||||||
|
AC_TRY_RUN([
|
||||||
|
#include <iconv.h>
|
||||||
|
#include <string.h>
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
|
||||||
|
returns. */
|
||||||
|
{
|
||||||
|
iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
|
||||||
|
if (cd_utf8_to_88591 != (iconv_t)(-1))
|
||||||
|
{
|
||||||
|
static const char input[] = "\342\202\254"; /* EURO SIGN */
|
||||||
|
char buf[10];
|
||||||
|
const char *inptr = input;
|
||||||
|
size_t inbytesleft = strlen (input);
|
||||||
|
char *outptr = buf;
|
||||||
|
size_t outbytesleft = sizeof (buf);
|
||||||
|
size_t res = iconv (cd_utf8_to_88591,
|
||||||
|
(char **) &inptr, &inbytesleft,
|
||||||
|
&outptr, &outbytesleft);
|
||||||
|
if (res == 0)
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#if 0 /* This bug could be worked around by the caller. */
|
||||||
|
/* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
|
||||||
|
{
|
||||||
|
iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
|
||||||
|
if (cd_88591_to_utf8 != (iconv_t)(-1))
|
||||||
|
{
|
||||||
|
static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
|
||||||
|
char buf[50];
|
||||||
|
const char *inptr = input;
|
||||||
|
size_t inbytesleft = strlen (input);
|
||||||
|
char *outptr = buf;
|
||||||
|
size_t outbytesleft = sizeof (buf);
|
||||||
|
size_t res = iconv (cd_88591_to_utf8,
|
||||||
|
(char **) &inptr, &inbytesleft,
|
||||||
|
&outptr, &outbytesleft);
|
||||||
|
if ((int)res > 0)
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
/* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
|
||||||
|
provided. */
|
||||||
|
if (/* Try standardized names. */
|
||||||
|
iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
|
||||||
|
/* Try IRIX, OSF/1 names. */
|
||||||
|
&& iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
|
||||||
|
/* Try AIX names. */
|
||||||
|
&& iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
|
||||||
|
/* Try HP-UX names. */
|
||||||
|
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
|
}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
|
||||||
|
[case "$host_os" in
|
||||||
|
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
|
||||||
|
*) am_cv_func_iconv_works="guessing yes" ;;
|
||||||
|
esac])
|
||||||
|
LIBS="$am_save_LIBS"
|
||||||
|
])
|
||||||
|
case "$am_cv_func_iconv_works" in
|
||||||
|
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
|
||||||
|
*) am_func_iconv=yes ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
am_func_iconv=no am_cv_lib_iconv=no
|
||||||
|
fi
|
||||||
|
if test "$am_func_iconv" = yes; then
|
||||||
|
AC_DEFINE([HAVE_ICONV], [1],
|
||||||
|
[Define if you have the iconv() function and it works.])
|
||||||
|
fi
|
||||||
|
if test "$am_cv_lib_iconv" = yes; then
|
||||||
|
AC_MSG_CHECKING([how to link with libiconv])
|
||||||
|
AC_MSG_RESULT([$LIBICONV])
|
||||||
|
else
|
||||||
|
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
|
||||||
|
dnl either.
|
||||||
|
CPPFLAGS="$am_save_CPPFLAGS"
|
||||||
|
LIBICONV=
|
||||||
|
LTLIBICONV=
|
||||||
|
fi
|
||||||
|
AC_SUBST([LIBICONV])
|
||||||
|
AC_SUBST([LTLIBICONV])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([AM_ICONV],
|
||||||
|
[
|
||||||
|
AM_ICONV_LINK
|
||||||
|
if test "$am_cv_func_iconv" = yes; then
|
||||||
|
AC_MSG_CHECKING([for iconv declaration])
|
||||||
|
AC_CACHE_VAL([am_cv_proto_iconv], [
|
||||||
|
AC_TRY_COMPILE([
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <iconv.h>
|
||||||
|
extern
|
||||||
|
#ifdef __cplusplus
|
||||||
|
"C"
|
||||||
|
#endif
|
||||||
|
#if defined(__STDC__) || defined(__cplusplus)
|
||||||
|
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
||||||
|
#else
|
||||||
|
size_t iconv();
|
||||||
|
#endif
|
||||||
|
], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
|
||||||
|
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
|
||||||
|
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
||||||
|
AC_MSG_RESULT([${ac_t:-
|
||||||
|
}$am_cv_proto_iconv])
|
||||||
|
AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
|
||||||
|
[Define as const if the declaration of iconv() needs const.])
|
||||||
|
fi
|
||||||
|
])
|
48
src/pplib/autoconf/imagemagick.m4
Normal file
48
src/pplib/autoconf/imagemagick.m4
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
dnl AX_PATH_LIB_IMLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
AC_DEFUN([AX_PATH_LIB_IMLIB],[dnl
|
||||||
|
AC_MSG_CHECKING([lib ImageMagick])
|
||||||
|
|
||||||
|
AC_ARG_WITH([imlib],
|
||||||
|
[ --with-imlib[[=PATH]] Prefix where ImageMagick is installed (default=autodetected)],
|
||||||
|
[imlib_prefix="$withval"],
|
||||||
|
[imlib_prefix=""])
|
||||||
|
|
||||||
|
|
||||||
|
if test "$imlib_prefix" != "no"
|
||||||
|
then
|
||||||
|
save_path=$PATH
|
||||||
|
if test -n "$imlib_prefix"
|
||||||
|
then
|
||||||
|
if test "$imlib_prefix" != "yes"
|
||||||
|
then
|
||||||
|
PATH=$imlib_prefix:$PATH
|
||||||
|
export PATH
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "Suche nach imlib, imlib_prefix=$imlib_prefix, PATH: $PATH"
|
||||||
|
AC_PATH_PROG(imlibconfig,MagickWand-config)
|
||||||
|
PATH=$save_path
|
||||||
|
echo "imlibconfig=$imlibconfig"
|
||||||
|
if test [ ! -x "$imlibconfig" ] ; then
|
||||||
|
imlibconfig=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test [ -z "$imlibconfig" ]
|
||||||
|
then
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(yes: $imlibconfig)
|
||||||
|
AC_MSG_CHECKING(imlib libraries)
|
||||||
|
IMLIB_LIBS=`${imlibconfig} --libs`
|
||||||
|
AC_MSG_RESULT($IMLIB_LIBS)
|
||||||
|
AC_MSG_CHECKING(imlib includes)
|
||||||
|
IMLIB_CFLAGS=`${imlibconfig} --cflags`
|
||||||
|
AC_MSG_RESULT($IMLIB_CFLAGS)
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(not configured)
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
301
src/pplib/autoconf/imlib.m4
Normal file
301
src/pplib/autoconf/imlib.m4
Normal file
|
@ -0,0 +1,301 @@
|
||||||
|
# Configure paths for IMLIB
|
||||||
|
# Frank Belew 98-8-31
|
||||||
|
# stolen from Manish Singh
|
||||||
|
# Shamelessly stolen from Owen Taylor
|
||||||
|
|
||||||
|
dnl AM_PATH_IMLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
dnl Test for IMLIB, and define IMLIB_CFLAGS and IMLIB_LIBS
|
||||||
|
dnl
|
||||||
|
AC_DEFUN(AM_PATH_IMLIB,
|
||||||
|
[dnl
|
||||||
|
dnl Get the cflags and libraries from the imlib-config script
|
||||||
|
dnl
|
||||||
|
AC_ARG_WITH(imlib-prefix,[ --with-imlib-prefix=PFX Prefix where IMLIB is installed (optional)],
|
||||||
|
imlib_prefix="$withval", imlib_prefix="")
|
||||||
|
AC_ARG_WITH(imlib-exec-prefix,[ --with-imlib-exec-prefix=PFX Exec prefix where IMLIB is installed (optional)],
|
||||||
|
imlib_exec_prefix="$withval", imlib_exec_prefix="")
|
||||||
|
AC_ARG_ENABLE(imlibtest, [ --disable-imlibtest Do not try to compile and run a test IMLIB program],
|
||||||
|
, enable_imlibtest=yes)
|
||||||
|
|
||||||
|
if test x$imlib_exec_prefix != x ; then
|
||||||
|
imlib_args="$imlib_args --exec-prefix=$imlib_exec_prefix"
|
||||||
|
if test x${IMLIB_CONFIG+set} != xset ; then
|
||||||
|
IMLIB_CONFIG=$imlib_exec_prefix/bin/imlib-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test x$imlib_prefix != x ; then
|
||||||
|
imlib_args="$imlib_args --prefix=$imlib_prefix"
|
||||||
|
if test x${IMLIB_CONFIG+set} != xset ; then
|
||||||
|
IMLIB_CONFIG=$imlib_prefix/bin/imlib-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_PATH_PROG(IMLIB_CONFIG, imlib-config, no)
|
||||||
|
min_imlib_version=ifelse([$1], ,1.8.2,$1)
|
||||||
|
AC_MSG_CHECKING(for IMLIB - version >= $min_imlib_version)
|
||||||
|
no_imlib=""
|
||||||
|
if test "$IMLIB_CONFIG" = "no" ; then
|
||||||
|
no_imlib=yes
|
||||||
|
else
|
||||||
|
IMLIB_CFLAGS=`$IMLIB_CONFIG $imlibconf_args --cflags`
|
||||||
|
IMLIB_LIBS=`$IMLIB_CONFIG $imlibconf_args --libs`
|
||||||
|
|
||||||
|
imlib_major_version=`$IMLIB_CONFIG $imlib_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||||
|
imlib_minor_version=`$IMLIB_CONFIG $imlib_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||||
|
imlib_micro_version=`$IMLIB_CONFIG $imlib_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||||
|
if test "x$enable_imlibtest" = "xyes" ; then
|
||||||
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
|
ac_save_LIBS="$LIBS"
|
||||||
|
CFLAGS="$CFLAGS $IMLIB_CFLAGS"
|
||||||
|
LIBS="$LIBS $IMLIB_LIBS"
|
||||||
|
dnl
|
||||||
|
dnl Now check if the installed IMLIB is sufficiently new. (Also sanity
|
||||||
|
dnl checks the results of imlib-config to some extent
|
||||||
|
dnl
|
||||||
|
rm -f conf.imlibtest
|
||||||
|
AC_TRY_RUN([
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <Imlib.h>
|
||||||
|
|
||||||
|
char*
|
||||||
|
my_strdup (char *str)
|
||||||
|
{
|
||||||
|
char *new_str;
|
||||||
|
|
||||||
|
if (str)
|
||||||
|
{
|
||||||
|
new_str = malloc ((strlen (str) + 1) * sizeof(char));
|
||||||
|
strcpy (new_str, str);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
new_str = NULL;
|
||||||
|
|
||||||
|
return new_str;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
int major, minor, micro;
|
||||||
|
char *tmp_version;
|
||||||
|
|
||||||
|
system ("touch conf.imlibtest");
|
||||||
|
|
||||||
|
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||||
|
tmp_version = my_strdup("$min_imlib_version");
|
||||||
|
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||||
|
printf("%s, bad version string\n", "$min_imlib_version");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($imlib_major_version > major) ||
|
||||||
|
(($imlib_major_version == major) && ($imlib_minor_version > minor)) ||
|
||||||
|
(($imlib_major_version == major) && ($imlib_minor_version == minor) &&
|
||||||
|
($imlib_micro_version >= micro)))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("\n*** 'imlib-config --version' returned %d.%d, but the minimum version\n", $imlib_major_version, $imlib_minor_version);
|
||||||
|
printf("*** of IMLIB required is %d.%d. If imlib-config is correct, then it is\n", major, minor);
|
||||||
|
printf("*** best to upgrade to the required version.\n");
|
||||||
|
printf("*** If imlib-config was wrong, set the environment variable IMLIB_CONFIG\n");
|
||||||
|
printf("*** to point to the correct copy of imlib-config, and remove the file\n");
|
||||||
|
printf("*** config.cache before re-running configure\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
],, no_imlib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "x$no_imlib" = x ; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
if test "$IMLIB_CONFIG" = "no" ; then
|
||||||
|
echo "*** The imlib-config script installed by IMLIB could not be found"
|
||||||
|
echo "*** If IMLIB was installed in PREFIX, make sure PREFIX/bin is in"
|
||||||
|
echo "*** your path, or set the IMLIB_CONFIG environment variable to the"
|
||||||
|
echo "*** full path to imlib-config."
|
||||||
|
else
|
||||||
|
if test -f conf.imlibtest ; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "*** Could not run IMLIB test program, checking why..."
|
||||||
|
CFLAGS="$CFLAGS $IMLIB_CFLAGS"
|
||||||
|
LIBS="$LIBS $IMLIB_LIBS"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <Imlib.h>
|
||||||
|
], [ return 0; ],
|
||||||
|
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||||
|
echo "*** that the run-time linker is not finding IMLIB or finding the wrong"
|
||||||
|
echo "*** version of IMLIB. If it is not finding IMLIB, you'll need to set your"
|
||||||
|
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||||
|
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||||
|
echo "*** is required on your system"
|
||||||
|
echo "***"
|
||||||
|
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||||
|
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
|
||||||
|
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||||
|
echo "*** exact error that occured. This usually means IMLIB was incorrectly installed"
|
||||||
|
echo "*** or that you have moved IMLIB since it was installed. In the latter case, you"
|
||||||
|
echo "*** may want to edit the imlib-config script: $IMLIB_CONFIG" ])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
IMLIB_CFLAGS=""
|
||||||
|
IMLIB_LIBS=""
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
AC_SUBST(IMLIB_CFLAGS)
|
||||||
|
AC_SUBST(IMLIB_LIBS)
|
||||||
|
rm -f conf.imlibtest
|
||||||
|
])
|
||||||
|
|
||||||
|
# Check for gdk-imlib
|
||||||
|
AC_DEFUN(AM_PATH_GDK_IMLIB,
|
||||||
|
[dnl
|
||||||
|
dnl Get the cflags and libraries from the imlib-config script
|
||||||
|
dnl
|
||||||
|
AC_ARG_WITH(imlib-prefix,[ --with-imlib-prefix=PFX Prefix where IMLIB is installed (optional)],
|
||||||
|
imlib_prefix="$withval", imlib_prefix="")
|
||||||
|
AC_ARG_WITH(imlib-exec-prefix,[ --with-imlib-exec-prefix=PFX Exec prefix where IMLIB is installed (optional)],
|
||||||
|
imlib_exec_prefix="$withval", imlib_exec_prefix="")
|
||||||
|
AC_ARG_ENABLE(imlibtest, [ --disable-imlibtest Do not try to compile and run a test IMLIB program],
|
||||||
|
, enable_imlibtest=yes)
|
||||||
|
|
||||||
|
if test x$imlib_exec_prefix != x ; then
|
||||||
|
imlib_args="$imlib_args --exec-prefix=$imlib_exec_prefix"
|
||||||
|
if test x${IMLIB_CONFIG+set} != xset ; then
|
||||||
|
IMLIB_CONFIG=$imlib_exec_prefix/bin/imlib-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test x$imlib_prefix != x ; then
|
||||||
|
imlib_args="$imlib_args --prefix=$imlib_prefix"
|
||||||
|
if test x${IMLIB_CONFIG+set} != xset ; then
|
||||||
|
IMLIB_CONFIG=$imlib_prefix/bin/imlib-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_PATH_PROG(IMLIB_CONFIG, imlib-config, no)
|
||||||
|
min_imlib_version=ifelse([$1], ,1.8.2,$1)
|
||||||
|
AC_MSG_CHECKING(for IMLIB - version >= $min_imlib_version)
|
||||||
|
no_imlib=""
|
||||||
|
if test "$IMLIB_CONFIG" = "no" ; then
|
||||||
|
no_imlib=yes
|
||||||
|
else
|
||||||
|
GDK_IMLIB_CFLAGS=`$IMLIB_CONFIG $imlibconf_args --cflags-gdk`
|
||||||
|
GDK_IMLIB_LIBS=`$IMLIB_CONFIG $imlibconf_args --libs-gdk`
|
||||||
|
|
||||||
|
imlib_major_version=`$IMLIB_CONFIG $imlib_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||||
|
imlib_minor_version=`$IMLIB_CONFIG $imlib_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||||
|
if test "x$enable_imlibtest" = "xyes" ; then
|
||||||
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
|
ac_save_LIBS="$LIBS"
|
||||||
|
CFLAGS="$CFLAGS $GDK_IMLIB_CFLAGS"
|
||||||
|
LIBS="$LIBS $GDK_IMLIB_LIBS"
|
||||||
|
dnl
|
||||||
|
dnl Now check if the installed IMLIB is sufficiently new. (Also sanity
|
||||||
|
dnl checks the results of imlib-config to some extent
|
||||||
|
dnl
|
||||||
|
rm -f conf.imlibtest
|
||||||
|
AC_TRY_RUN([
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <gdk_imlib.h>
|
||||||
|
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
int major, minor;
|
||||||
|
char *tmp_version;
|
||||||
|
|
||||||
|
system ("touch conf.gdkimlibtest");
|
||||||
|
|
||||||
|
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||||
|
tmp_version = g_strdup("$min_imlib_version");
|
||||||
|
if (sscanf(tmp_version, "%d.%d", &major, &minor) != 2) {
|
||||||
|
printf("%s, bad version string\n", "$min_imlib_version");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($imlib_major_version > major) ||
|
||||||
|
(($imlib_major_version == major) && ($imlib_minor_version >= minor)))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("\n*** 'imlib-config --version' returned %d.%d, but the minimum version\n", $imlib_major_version, $imlib_minor_version);
|
||||||
|
printf("*** of IMLIB required is %d.%d. If imlib-config is correct, then it is\n", major, minor);
|
||||||
|
printf("*** best to upgrade to the required version.\n");
|
||||||
|
printf("*** If imlib-config was wrong, set the environment variable IMLIB_CONFIG\n");
|
||||||
|
printf("*** to point to the correct copy of imlib-config, and remove the file\n");
|
||||||
|
printf("*** config.cache before re-running configure\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
],, no_imlib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "x$no_imlib" = x ; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
if test "$IMLIB_CONFIG" = "no" ; then
|
||||||
|
echo "*** The imlib-config script installed by IMLIB could not be found"
|
||||||
|
echo "*** If IMLIB was installed in PREFIX, make sure PREFIX/bin is in"
|
||||||
|
echo "*** your path, or set the IMLIB_CONFIG environment variable to the"
|
||||||
|
echo "*** full path to imlib-config."
|
||||||
|
else
|
||||||
|
if test -f conf.gdkimlibtest ; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "*** Could not run IMLIB test program, checking why..."
|
||||||
|
CFLAGS="$CFLAGS $GDK_IMLIB_CFLAGS"
|
||||||
|
LIBS="$LIBS $GDK_IMLIB_LIBS"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <gdk_imlib.h>
|
||||||
|
], [ return 0; ],
|
||||||
|
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||||
|
echo "*** that the run-time linker is not finding IMLIB or finding the wrong"
|
||||||
|
echo "*** version of IMLIB. If it is not finding IMLIB, you'll need to set your"
|
||||||
|
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||||
|
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||||
|
echo "*** is required on your system"
|
||||||
|
echo "***"
|
||||||
|
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||||
|
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
|
||||||
|
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||||
|
echo "*** exact error that occured. This usually means IMLIB was incorrectly installed"
|
||||||
|
echo "*** or that you have moved IMLIB since it was installed. In the latter case, you"
|
||||||
|
echo "*** may want to edit the imlib-config script: $IMLIB_CONFIG" ])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
IMLIB_CFLAGS=""
|
||||||
|
IMLIB_LIBS=""
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
AC_SUBST(GDK_IMLIB_CFLAGS)
|
||||||
|
AC_SUBST(GDK_IMLIB_LIBS)
|
||||||
|
rm -f conf.gdkimlibtest
|
||||||
|
])
|
527
src/pplib/autoconf/install-sh
Executable file
527
src/pplib/autoconf/install-sh
Executable file
|
@ -0,0 +1,527 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# install - install a program, script, or datafile
|
||||||
|
|
||||||
|
scriptversion=2011-11-20.07; # UTC
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
chgrpprog=${CHGRPPROG-chgrp}
|
||||||
|
chmodprog=${CHMODPROG-chmod}
|
||||||
|
chownprog=${CHOWNPROG-chown}
|
||||||
|
cmpprog=${CMPPROG-cmp}
|
||||||
|
cpprog=${CPPROG-cp}
|
||||||
|
mkdirprog=${MKDIRPROG-mkdir}
|
||||||
|
mvprog=${MVPROG-mv}
|
||||||
|
rmprog=${RMPROG-rm}
|
||||||
|
stripprog=${STRIPPROG-strip}
|
||||||
|
|
||||||
|
posix_glob='?'
|
||||||
|
initialize_posix_glob='
|
||||||
|
test "$posix_glob" != "?" || {
|
||||||
|
if (set -f) 2>/dev/null; then
|
||||||
|
posix_glob=
|
||||||
|
else
|
||||||
|
posix_glob=:
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
'
|
||||||
|
|
||||||
|
posix_mkdir=
|
||||||
|
|
||||||
|
# Desired mode of installed file.
|
||||||
|
mode=0755
|
||||||
|
|
||||||
|
chgrpcmd=
|
||||||
|
chmodcmd=$chmodprog
|
||||||
|
chowncmd=
|
||||||
|
mvcmd=$mvprog
|
||||||
|
rmcmd="$rmprog -f"
|
||||||
|
stripcmd=
|
||||||
|
|
||||||
|
src=
|
||||||
|
dst=
|
||||||
|
dir_arg=
|
||||||
|
dst_arg=
|
||||||
|
|
||||||
|
copy_on_change=false
|
||||||
|
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:
|
||||||
|
--help display this help and exit.
|
||||||
|
--version display version info and exit.
|
||||||
|
|
||||||
|
-c (ignored)
|
||||||
|
-C install only if different (preserve the last data modification time)
|
||||||
|
-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.
|
||||||
|
|
||||||
|
Environment variables override the default commands:
|
||||||
|
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||||
|
RMPROG STRIPPROG
|
||||||
|
"
|
||||||
|
|
||||||
|
while test $# -ne 0; do
|
||||||
|
case $1 in
|
||||||
|
-c) ;;
|
||||||
|
|
||||||
|
-C) copy_on_change=true;;
|
||||||
|
|
||||||
|
-d) dir_arg=true;;
|
||||||
|
|
||||||
|
-g) chgrpcmd="$chgrpprog $2"
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
--help) echo "$usage"; exit $?;;
|
||||||
|
|
||||||
|
-m) mode=$2
|
||||||
|
case $mode in
|
||||||
|
*' '* | *' '* | *'
|
||||||
|
'* | *'*'* | *'?'* | *'['*)
|
||||||
|
echo "$0: invalid mode: $mode" >&2
|
||||||
|
exit 1;;
|
||||||
|
esac
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
-o) chowncmd="$chownprog $2"
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
-s) stripcmd=$stripprog;;
|
||||||
|
|
||||||
|
-t) dst_arg=$2
|
||||||
|
# Protect names problematic for 'test' and other utilities.
|
||||||
|
case $dst_arg in
|
||||||
|
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||||
|
esac
|
||||||
|
shift;;
|
||||||
|
|
||||||
|
-T) no_target_directory=true;;
|
||||||
|
|
||||||
|
--version) echo "$0 $scriptversion"; exit $?;;
|
||||||
|
|
||||||
|
--) shift
|
||||||
|
break;;
|
||||||
|
|
||||||
|
-*) echo "$0: invalid option: $1" >&2
|
||||||
|
exit 1;;
|
||||||
|
|
||||||
|
*) break;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; 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 "$dst_arg"; then
|
||||||
|
# $@ is not empty: it contains at least $arg.
|
||||||
|
set fnord "$@" "$dst_arg"
|
||||||
|
shift # fnord
|
||||||
|
fi
|
||||||
|
shift # arg
|
||||||
|
dst_arg=$arg
|
||||||
|
# Protect names problematic for 'test' and other utilities.
|
||||||
|
case $dst_arg in
|
||||||
|
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||||
|
esac
|
||||||
|
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
|
||||||
|
do_exit='(exit $ret); exit $ret'
|
||||||
|
trap "ret=129; $do_exit" 1
|
||||||
|
trap "ret=130; $do_exit" 2
|
||||||
|
trap "ret=141; $do_exit" 13
|
||||||
|
trap "ret=143; $do_exit" 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 problematic for 'test' and other utilities.
|
||||||
|
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 "$dst_arg"; then
|
||||||
|
echo "$0: no destination specified." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
dst=$dst_arg
|
||||||
|
|
||||||
|
# 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: $dst_arg: 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-writable 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
|
||||||
|
|
||||||
|
eval "$initialize_posix_glob"
|
||||||
|
|
||||||
|
oIFS=$IFS
|
||||||
|
IFS=/
|
||||||
|
$posix_glob set -f
|
||||||
|
set fnord $dstdir
|
||||||
|
shift
|
||||||
|
$posix_glob set +f
|
||||||
|
IFS=$oIFS
|
||||||
|
|
||||||
|
prefixes=
|
||||||
|
|
||||||
|
for d
|
||||||
|
do
|
||||||
|
test X"$d" = X && 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"; } &&
|
||||||
|
|
||||||
|
# If -C, don't bother to copy if it wouldn't change the file.
|
||||||
|
if $copy_on_change &&
|
||||||
|
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||||
|
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||||
|
|
||||||
|
eval "$initialize_posix_glob" &&
|
||||||
|
$posix_glob set -f &&
|
||||||
|
set X $old && old=:$2:$4:$5:$6 &&
|
||||||
|
set X $new && new=:$2:$4:$5:$6 &&
|
||||||
|
$posix_glob set +f &&
|
||||||
|
|
||||||
|
test "$old" = "$new" &&
|
||||||
|
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
rm -f "$dsttmp"
|
||||||
|
else
|
||||||
|
# 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.
|
||||||
|
{
|
||||||
|
test ! -f "$dst" ||
|
||||||
|
$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
|
||||||
|
}
|
||||||
|
} &&
|
||||||
|
|
||||||
|
# Now rename the file to the real destination.
|
||||||
|
$doit $mvcmd "$dsttmp" "$dst"
|
||||||
|
}
|
||||||
|
fi || 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-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
42
src/pplib/autoconf/jpeg.m4
Normal file
42
src/pplib/autoconf/jpeg.m4
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
dnl AC_CHECK_LIBPJPEG([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
|
||||||
|
AC_DEFUN([AC_CHECK_LIBJPEG],[
|
||||||
|
AC_MSG_CHECKING(for libjpeg)
|
||||||
|
|
||||||
|
AC_ARG_WITH([jpeg],
|
||||||
|
[ --with-jpeg[[=PATH]] Prefix where libjpeg is installed (optional)],
|
||||||
|
[jpeg_prefix="$withval"],
|
||||||
|
[jpeg_prefix=""])
|
||||||
|
if test "$jpeg_prefix" != "no"
|
||||||
|
then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
am_save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
am_save_CFLAGS="$CFLAGS"
|
||||||
|
am_save_LIBS="$LIBS"
|
||||||
|
am_save_LDFLAGS="$LDFLAGS"
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES([JPEG], [libjpeg >= 6.0.0],
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
,
|
||||||
|
AC_SEARCH_LIBS( [jpeg_finish_decompress],[jpeg],
|
||||||
|
dnl echo "LIBS=$LIBS"
|
||||||
|
dnl echo "LDFLAGS=$LDFLAGS"
|
||||||
|
dnl echo "CFLAGS=$CFLAGS"
|
||||||
|
dnl echo "CPPFLAGS=$CPPFLAGS"
|
||||||
|
|
||||||
|
JPEG_LIBS="$LIBS"
|
||||||
|
JPEG_CFLAGS=""
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
,
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
:)
|
||||||
|
)
|
||||||
|
CPPFLAGS="$am_save_CPPFLAGS"
|
||||||
|
LIBS="$am_save_LIBS"
|
||||||
|
LDFLAGS="$am_save_LDFLAGS"
|
||||||
|
CFLAGS="$am_save_CFLAGS"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
])
|
57
src/pplib/autoconf/lame.m4
Normal file
57
src/pplib/autoconf/lame.m4
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
dnl AC_CHECK_LIBMP3LAME([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
AC_DEFUN([AC_CHECK_LIBMP3LAME],[
|
||||||
|
AC_ARG_WITH([lame],
|
||||||
|
[[ --with-lame[=DIR] enable support for MP3 encoding with lame [in DIR]]],
|
||||||
|
[lame_prefix="$withval"],
|
||||||
|
[lame_prefix="no"])
|
||||||
|
AC_MSG_CHECKING(if lame should be included)
|
||||||
|
if test "$with_lame" != "no"
|
||||||
|
then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
have_LAME="no"
|
||||||
|
am_save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
am_save_LIBS="$LIBS"
|
||||||
|
am_save_LDFLAGS="$LDFLAGS"
|
||||||
|
|
||||||
|
if test -n "$with_lame" -a "$with_lame" != "yes"
|
||||||
|
then
|
||||||
|
intLAME_CFLAGS="-I$with_lame/include"
|
||||||
|
intLAME_LIBS="-L$with_lame/lib -lmp3lame -lm"
|
||||||
|
intLAME_LDFLAGS="-L$with_lame/lib"
|
||||||
|
else
|
||||||
|
intLAME_CFLAGS=""
|
||||||
|
intLAME_LIBS="-lmp3lame -lm"
|
||||||
|
intLAME_LDFLAGS=""
|
||||||
|
fi
|
||||||
|
CPPFLAGS="$CPPFLAGS $intLAME_CFLAGS"
|
||||||
|
LDFLAGS="$LDFLAGS $intLAME_LDFLAGS"
|
||||||
|
AC_CHECK_HEADER(lame/lame.h, [
|
||||||
|
have_LAME="maybe",
|
||||||
|
AC_DEFINE(HAVE_LAME_LAME_H, 1, [Use <lame/lame.h> instead of <lame.h>])
|
||||||
|
], [
|
||||||
|
AC_CHECK_HEADER(lame.h, [
|
||||||
|
have_LAME="maybe"
|
||||||
|
])
|
||||||
|
])
|
||||||
|
if test "$have_LAME" != "no"
|
||||||
|
then
|
||||||
|
LIBS="$LIBS $intLAME_LIBS"
|
||||||
|
AC_CHECK_LIB(mp3lame, lame_encode_flush_nogap,
|
||||||
|
LAME_CFLAGS=$intLAME_CFLAGS
|
||||||
|
LAME_LIBS=$intLAME_LIBS
|
||||||
|
LAME_LDFLAGS=$intLAME_LDFLAGS
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
,
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
:)
|
||||||
|
AC_CHECK_LIB(mp3lame, hip_decode, [
|
||||||
|
AC_DEFINE(HAVE_LAME_HIP_DECODE, 1, [Lame has threadsafe decoder])
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
CPPFLAGS=$am_save_CPPFLAGS
|
||||||
|
LIBS=$am_save_LIBS
|
||||||
|
LDFLAGS=$am_save_LDFLAGD
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
])
|
65
src/pplib/autoconf/ldns.m4
Normal file
65
src/pplib/autoconf/ldns.m4
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
dnl AX_PATH_LIB_LDNS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
AC_DEFUN([AX_PATH_LIB_LDNS],[dnl
|
||||||
|
|
||||||
|
AC_ARG_WITH([libldns],
|
||||||
|
[ --with-libldns[[=PATH]] Prefix where LDNS-Library from netlabs.nl is installed],
|
||||||
|
[ldns_prefix="$withval"],
|
||||||
|
[ldns_prefix="no"])
|
||||||
|
|
||||||
|
if test "$ldns_prefix" = "no"
|
||||||
|
then
|
||||||
|
AC_PATH_PROG(ldnsconfig,ldns-config)
|
||||||
|
elif test "$ldns_prefix" != "yes"
|
||||||
|
then
|
||||||
|
ldnsconfig="$ldns_prefix/bin/ldns-config"
|
||||||
|
else
|
||||||
|
AC_PATH_PROG(ldnsconfig,ldns-config)
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for lib ldns])
|
||||||
|
if test [ -z "$ldnsconfig" ]
|
||||||
|
then
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
min_ldns_version=ifelse([$1], ,1.6.0,[$1])
|
||||||
|
AC_MSG_CHECKING(for ldns version >= $min_ldns_version)
|
||||||
|
if test [ -f ${ldnsconfig} ]
|
||||||
|
then
|
||||||
|
ldns_version=`${ldnsconfig} --version`
|
||||||
|
elif test [ -f $ldns_prefix/bin/ldns-version ]
|
||||||
|
then
|
||||||
|
ldns_version=`$ldns_prefix/bin/ldns-version`
|
||||||
|
fi
|
||||||
|
|
||||||
|
ldns_config_major_version=`echo $ldns_version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||||
|
ldns_config_minor_version=`echo $ldns_version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||||
|
ldns_config_micro_version=`echo $ldns_version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||||
|
ldns_config_version=`expr $ldns_config_major_version \* 10000 + $ldns_config_minor_version \* 100 + $ldns_config_micro_version`
|
||||||
|
|
||||||
|
ldns_req_major_version=`echo $min_ldns_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||||
|
ldns_req_minor_version=`echo $min_ldns_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||||
|
ldns_req_micro_version=`echo $min_ldns_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||||
|
ldns_req_version=`expr $ldns_req_major_version \* 10000 + $ldns_req_minor_version \* 100 + $ldns_req_micro_version`
|
||||||
|
|
||||||
|
if test $ldns_config_version -lt $ldns_req_version
|
||||||
|
then
|
||||||
|
AC_MSG_RESULT([no, have $ldns_version])
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([yes (version $ldns_version) ])
|
||||||
|
LIBLDNS_LIBS=`${ldnsconfig} --libs`
|
||||||
|
LIBLDNS_CFLAGS=`${ldnsconfig} --cflags`
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
764
src/pplib/autoconf/lib-link.m4
Normal file
764
src/pplib/autoconf/lib-link.m4
Normal file
|
@ -0,0 +1,764 @@
|
||||||
|
# lib-link.m4 serial 20 (gettext-0.18)
|
||||||
|
dnl Copyright (C) 2001-2009 Free Software Foundation, Inc.
|
||||||
|
dnl This file is free software; the Free Software Foundation
|
||||||
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
dnl with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
dnl From Bruno Haible.
|
||||||
|
|
||||||
|
AC_PREREQ([2.54])
|
||||||
|
|
||||||
|
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
|
||||||
|
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||||
|
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
|
||||||
|
dnl augments the CPPFLAGS variable.
|
||||||
|
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
|
||||||
|
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
||||||
|
AC_DEFUN([AC_LIB_LINKFLAGS],
|
||||||
|
[
|
||||||
|
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||||
|
AC_REQUIRE([AC_LIB_RPATH])
|
||||||
|
pushdef([Name],[translit([$1],[./-], [___])])
|
||||||
|
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||||
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||||
|
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
|
||||||
|
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||||
|
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
|
||||||
|
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
|
||||||
|
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
|
||||||
|
ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
|
||||||
|
])
|
||||||
|
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
|
||||||
|
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
|
||||||
|
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
|
||||||
|
LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
|
||||||
|
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||||
|
AC_SUBST([LIB]NAME)
|
||||||
|
AC_SUBST([LTLIB]NAME)
|
||||||
|
AC_SUBST([LIB]NAME[_PREFIX])
|
||||||
|
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
|
||||||
|
dnl results of this search when this library appears as a dependency.
|
||||||
|
HAVE_LIB[]NAME=yes
|
||||||
|
popdef([NAME])
|
||||||
|
popdef([Name])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
|
||||||
|
dnl searches for libname and the libraries corresponding to explicit and
|
||||||
|
dnl implicit dependencies, together with the specified include files and
|
||||||
|
dnl the ability to compile and link the specified testcode. The missing-message
|
||||||
|
dnl defaults to 'no' and may contain additional hints for the user.
|
||||||
|
dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
|
||||||
|
dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
|
||||||
|
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
|
||||||
|
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
|
||||||
|
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
|
||||||
|
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
||||||
|
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
||||||
|
[
|
||||||
|
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||||
|
AC_REQUIRE([AC_LIB_RPATH])
|
||||||
|
pushdef([Name],[translit([$1],[./-], [___])])
|
||||||
|
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||||
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||||
|
|
||||||
|
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
|
||||||
|
dnl accordingly.
|
||||||
|
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||||
|
|
||||||
|
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
|
||||||
|
dnl because if the user has installed lib[]Name and not disabled its use
|
||||||
|
dnl via --without-lib[]Name-prefix, he wants to use it.
|
||||||
|
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||||
|
|
||||||
|
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
|
||||||
|
ac_save_LIBS="$LIBS"
|
||||||
|
LIBS="$LIBS $LIB[]NAME"
|
||||||
|
AC_TRY_LINK([$3], [$4],
|
||||||
|
[ac_cv_lib[]Name=yes],
|
||||||
|
[ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
])
|
||||||
|
if test "$ac_cv_lib[]Name" = yes; then
|
||||||
|
HAVE_LIB[]NAME=yes
|
||||||
|
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
|
||||||
|
AC_MSG_CHECKING([how to link with lib[]$1])
|
||||||
|
AC_MSG_RESULT([$LIB[]NAME])
|
||||||
|
else
|
||||||
|
HAVE_LIB[]NAME=no
|
||||||
|
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
|
||||||
|
dnl $INC[]NAME either.
|
||||||
|
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||||
|
LIB[]NAME=
|
||||||
|
LTLIB[]NAME=
|
||||||
|
LIB[]NAME[]_PREFIX=
|
||||||
|
fi
|
||||||
|
AC_SUBST([HAVE_LIB]NAME)
|
||||||
|
AC_SUBST([LIB]NAME)
|
||||||
|
AC_SUBST([LTLIB]NAME)
|
||||||
|
AC_SUBST([LIB]NAME[_PREFIX])
|
||||||
|
popdef([NAME])
|
||||||
|
popdef([Name])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl Determine the platform dependent parameters needed to use rpath:
|
||||||
|
dnl acl_libext,
|
||||||
|
dnl acl_shlibext,
|
||||||
|
dnl acl_hardcode_libdir_flag_spec,
|
||||||
|
dnl acl_hardcode_libdir_separator,
|
||||||
|
dnl acl_hardcode_direct,
|
||||||
|
dnl acl_hardcode_minus_L.
|
||||||
|
AC_DEFUN([AC_LIB_RPATH],
|
||||||
|
[
|
||||||
|
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
|
||||||
|
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
|
||||||
|
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
|
||||||
|
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
|
||||||
|
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
|
||||||
|
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
|
||||||
|
AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
|
||||||
|
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
|
||||||
|
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
|
||||||
|
. ./conftest.sh
|
||||||
|
rm -f ./conftest.sh
|
||||||
|
acl_cv_rpath=done
|
||||||
|
])
|
||||||
|
wl="$acl_cv_wl"
|
||||||
|
acl_libext="$acl_cv_libext"
|
||||||
|
acl_shlibext="$acl_cv_shlibext"
|
||||||
|
acl_libname_spec="$acl_cv_libname_spec"
|
||||||
|
acl_library_names_spec="$acl_cv_library_names_spec"
|
||||||
|
acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
|
||||||
|
acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
|
||||||
|
acl_hardcode_direct="$acl_cv_hardcode_direct"
|
||||||
|
acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
|
||||||
|
dnl Determine whether the user wants rpath handling at all.
|
||||||
|
AC_ARG_ENABLE([rpath],
|
||||||
|
[ --disable-rpath do not hardcode runtime library paths],
|
||||||
|
:, enable_rpath=yes)
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl AC_LIB_FROMPACKAGE(name, package)
|
||||||
|
dnl declares that libname comes from the given package. The configure file
|
||||||
|
dnl will then not have a --with-libname-prefix option but a
|
||||||
|
dnl --with-package-prefix option. Several libraries can come from the same
|
||||||
|
dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
|
||||||
|
dnl macro call that searches for libname.
|
||||||
|
AC_DEFUN([AC_LIB_FROMPACKAGE],
|
||||||
|
[
|
||||||
|
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||||
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||||
|
define([acl_frompackage_]NAME, [$2])
|
||||||
|
popdef([NAME])
|
||||||
|
pushdef([PACK],[$2])
|
||||||
|
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
|
||||||
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||||
|
define([acl_libsinpackage_]PACKUP,
|
||||||
|
m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
|
||||||
|
popdef([PACKUP])
|
||||||
|
popdef([PACK])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
|
||||||
|
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||||
|
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
|
||||||
|
dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
|
||||||
|
dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
||||||
|
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
||||||
|
[
|
||||||
|
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
||||||
|
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||||
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||||
|
pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
|
||||||
|
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
|
||||||
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||||
|
pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
|
||||||
|
dnl Autoconf >= 2.61 supports dots in --with options.
|
||||||
|
pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
|
||||||
|
dnl By default, look in $includedir and $libdir.
|
||||||
|
use_additional=yes
|
||||||
|
AC_LIB_WITH_FINAL_PREFIX([
|
||||||
|
eval additional_includedir=\"$includedir\"
|
||||||
|
eval additional_libdir=\"$libdir\"
|
||||||
|
])
|
||||||
|
AC_ARG_WITH(P_A_C_K[-prefix],
|
||||||
|
[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
|
||||||
|
--without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
|
||||||
|
[
|
||||||
|
if test "X$withval" = "Xno"; then
|
||||||
|
use_additional=no
|
||||||
|
else
|
||||||
|
if test "X$withval" = "X"; then
|
||||||
|
AC_LIB_WITH_FINAL_PREFIX([
|
||||||
|
eval additional_includedir=\"$includedir\"
|
||||||
|
eval additional_libdir=\"$libdir\"
|
||||||
|
])
|
||||||
|
else
|
||||||
|
additional_includedir="$withval/include"
|
||||||
|
additional_libdir="$withval/$acl_libdirstem"
|
||||||
|
if test "$acl_libdirstem2" != "$acl_libdirstem" \
|
||||||
|
&& ! test -d "$withval/$acl_libdirstem"; then
|
||||||
|
additional_libdir="$withval/$acl_libdirstem2"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
dnl Search the library and its dependencies in $additional_libdir and
|
||||||
|
dnl $LDFLAGS. Using breadth-first-seach.
|
||||||
|
LIB[]NAME=
|
||||||
|
LTLIB[]NAME=
|
||||||
|
INC[]NAME=
|
||||||
|
LIB[]NAME[]_PREFIX=
|
||||||
|
dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
|
||||||
|
dnl computed. So it has to be reset here.
|
||||||
|
HAVE_LIB[]NAME=
|
||||||
|
rpathdirs=
|
||||||
|
ltrpathdirs=
|
||||||
|
names_already_handled=
|
||||||
|
names_next_round='$1 $2'
|
||||||
|
while test -n "$names_next_round"; do
|
||||||
|
names_this_round="$names_next_round"
|
||||||
|
names_next_round=
|
||||||
|
for name in $names_this_round; do
|
||||||
|
already_handled=
|
||||||
|
for n in $names_already_handled; do
|
||||||
|
if test "$n" = "$name"; then
|
||||||
|
already_handled=yes
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test -z "$already_handled"; then
|
||||||
|
names_already_handled="$names_already_handled $name"
|
||||||
|
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
|
||||||
|
dnl or AC_LIB_HAVE_LINKFLAGS call.
|
||||||
|
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
|
||||||
|
eval value=\"\$HAVE_LIB$uppername\"
|
||||||
|
if test -n "$value"; then
|
||||||
|
if test "$value" = yes; then
|
||||||
|
eval value=\"\$LIB$uppername\"
|
||||||
|
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
|
||||||
|
eval value=\"\$LTLIB$uppername\"
|
||||||
|
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
|
||||||
|
else
|
||||||
|
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
|
||||||
|
dnl that this library doesn't exist. So just drop it.
|
||||||
|
:
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
|
||||||
|
dnl and the already constructed $LIBNAME/$LTLIBNAME.
|
||||||
|
found_dir=
|
||||||
|
found_la=
|
||||||
|
found_so=
|
||||||
|
found_a=
|
||||||
|
eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
|
||||||
|
if test -n "$acl_shlibext"; then
|
||||||
|
shrext=".$acl_shlibext" # typically: shrext=.so
|
||||||
|
else
|
||||||
|
shrext=
|
||||||
|
fi
|
||||||
|
if test $use_additional = yes; then
|
||||||
|
dir="$additional_libdir"
|
||||||
|
dnl The same code as in the loop below:
|
||||||
|
dnl First look for a shared library.
|
||||||
|
if test -n "$acl_shlibext"; then
|
||||||
|
if test -f "$dir/$libname$shrext"; then
|
||||||
|
found_dir="$dir"
|
||||||
|
found_so="$dir/$libname$shrext"
|
||||||
|
else
|
||||||
|
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
|
||||||
|
ver=`(cd "$dir" && \
|
||||||
|
for f in "$libname$shrext".*; do echo "$f"; done \
|
||||||
|
| sed -e "s,^$libname$shrext\\\\.,," \
|
||||||
|
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
|
||||||
|
| sed 1q ) 2>/dev/null`
|
||||||
|
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
|
||||||
|
found_dir="$dir"
|
||||||
|
found_so="$dir/$libname$shrext.$ver"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
eval library_names=\"$acl_library_names_spec\"
|
||||||
|
for f in $library_names; do
|
||||||
|
if test -f "$dir/$f"; then
|
||||||
|
found_dir="$dir"
|
||||||
|
found_so="$dir/$f"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
dnl Then look for a static library.
|
||||||
|
if test "X$found_dir" = "X"; then
|
||||||
|
if test -f "$dir/$libname.$acl_libext"; then
|
||||||
|
found_dir="$dir"
|
||||||
|
found_a="$dir/$libname.$acl_libext"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "X$found_dir" != "X"; then
|
||||||
|
if test -f "$dir/$libname.la"; then
|
||||||
|
found_la="$dir/$libname.la"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "X$found_dir" = "X"; then
|
||||||
|
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||||
|
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||||
|
case "$x" in
|
||||||
|
-L*)
|
||||||
|
dir=`echo "X$x" | sed -e 's/^X-L//'`
|
||||||
|
dnl First look for a shared library.
|
||||||
|
if test -n "$acl_shlibext"; then
|
||||||
|
if test -f "$dir/$libname$shrext"; then
|
||||||
|
found_dir="$dir"
|
||||||
|
found_so="$dir/$libname$shrext"
|
||||||
|
else
|
||||||
|
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
|
||||||
|
ver=`(cd "$dir" && \
|
||||||
|
for f in "$libname$shrext".*; do echo "$f"; done \
|
||||||
|
| sed -e "s,^$libname$shrext\\\\.,," \
|
||||||
|
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
|
||||||
|
| sed 1q ) 2>/dev/null`
|
||||||
|
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
|
||||||
|
found_dir="$dir"
|
||||||
|
found_so="$dir/$libname$shrext.$ver"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
eval library_names=\"$acl_library_names_spec\"
|
||||||
|
for f in $library_names; do
|
||||||
|
if test -f "$dir/$f"; then
|
||||||
|
found_dir="$dir"
|
||||||
|
found_so="$dir/$f"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
dnl Then look for a static library.
|
||||||
|
if test "X$found_dir" = "X"; then
|
||||||
|
if test -f "$dir/$libname.$acl_libext"; then
|
||||||
|
found_dir="$dir"
|
||||||
|
found_a="$dir/$libname.$acl_libext"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "X$found_dir" != "X"; then
|
||||||
|
if test -f "$dir/$libname.la"; then
|
||||||
|
found_la="$dir/$libname.la"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if test "X$found_dir" != "X"; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if test "X$found_dir" != "X"; then
|
||||||
|
dnl Found the library.
|
||||||
|
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
|
||||||
|
if test "X$found_so" != "X"; then
|
||||||
|
dnl Linking with a shared library. We attempt to hardcode its
|
||||||
|
dnl directory into the executable's runpath, unless it's the
|
||||||
|
dnl standard /usr/lib.
|
||||||
|
if test "$enable_rpath" = no \
|
||||||
|
|| test "X$found_dir" = "X/usr/$acl_libdirstem" \
|
||||||
|
|| test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
|
||||||
|
dnl No hardcoding is needed.
|
||||||
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||||
|
else
|
||||||
|
dnl Use an explicit option to hardcode DIR into the resulting
|
||||||
|
dnl binary.
|
||||||
|
dnl Potentially add DIR to ltrpathdirs.
|
||||||
|
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||||
|
haveit=
|
||||||
|
for x in $ltrpathdirs; do
|
||||||
|
if test "X$x" = "X$found_dir"; then
|
||||||
|
haveit=yes
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test -z "$haveit"; then
|
||||||
|
ltrpathdirs="$ltrpathdirs $found_dir"
|
||||||
|
fi
|
||||||
|
dnl The hardcoding into $LIBNAME is system dependent.
|
||||||
|
if test "$acl_hardcode_direct" = yes; then
|
||||||
|
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
|
||||||
|
dnl resulting binary.
|
||||||
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||||
|
else
|
||||||
|
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
|
||||||
|
dnl Use an explicit option to hardcode DIR into the resulting
|
||||||
|
dnl binary.
|
||||||
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||||
|
dnl Potentially add DIR to rpathdirs.
|
||||||
|
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||||
|
haveit=
|
||||||
|
for x in $rpathdirs; do
|
||||||
|
if test "X$x" = "X$found_dir"; then
|
||||||
|
haveit=yes
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test -z "$haveit"; then
|
||||||
|
rpathdirs="$rpathdirs $found_dir"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
dnl Rely on "-L$found_dir".
|
||||||
|
dnl But don't add it if it's already contained in the LDFLAGS
|
||||||
|
dnl or the already constructed $LIBNAME
|
||||||
|
haveit=
|
||||||
|
for x in $LDFLAGS $LIB[]NAME; do
|
||||||
|
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||||
|
if test "X$x" = "X-L$found_dir"; then
|
||||||
|
haveit=yes
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test -z "$haveit"; then
|
||||||
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
|
||||||
|
fi
|
||||||
|
if test "$acl_hardcode_minus_L" != no; then
|
||||||
|
dnl FIXME: Not sure whether we should use
|
||||||
|
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||||
|
dnl here.
|
||||||
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||||
|
else
|
||||||
|
dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
|
||||||
|
dnl here, because this doesn't fit in flags passed to the
|
||||||
|
dnl compiler. So give up. No hardcoding. This affects only
|
||||||
|
dnl very old systems.
|
||||||
|
dnl FIXME: Not sure whether we should use
|
||||||
|
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||||
|
dnl here.
|
||||||
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if test "X$found_a" != "X"; then
|
||||||
|
dnl Linking with a static library.
|
||||||
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
|
||||||
|
else
|
||||||
|
dnl We shouldn't come here, but anyway it's good to have a
|
||||||
|
dnl fallback.
|
||||||
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
dnl Assume the include files are nearby.
|
||||||
|
additional_includedir=
|
||||||
|
case "$found_dir" in
|
||||||
|
*/$acl_libdirstem | */$acl_libdirstem/)
|
||||||
|
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
|
||||||
|
if test "$name" = '$1'; then
|
||||||
|
LIB[]NAME[]_PREFIX="$basedir"
|
||||||
|
fi
|
||||||
|
additional_includedir="$basedir/include"
|
||||||
|
;;
|
||||||
|
*/$acl_libdirstem2 | */$acl_libdirstem2/)
|
||||||
|
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
|
||||||
|
if test "$name" = '$1'; then
|
||||||
|
LIB[]NAME[]_PREFIX="$basedir"
|
||||||
|
fi
|
||||||
|
additional_includedir="$basedir/include"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if test "X$additional_includedir" != "X"; then
|
||||||
|
dnl Potentially add $additional_includedir to $INCNAME.
|
||||||
|
dnl But don't add it
|
||||||
|
dnl 1. if it's the standard /usr/include,
|
||||||
|
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
|
||||||
|
dnl 3. if it's already present in $CPPFLAGS or the already
|
||||||
|
dnl constructed $INCNAME,
|
||||||
|
dnl 4. if it doesn't exist as a directory.
|
||||||
|
if test "X$additional_includedir" != "X/usr/include"; then
|
||||||
|
haveit=
|
||||||
|
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||||
|
if test -n "$GCC"; then
|
||||||
|
case $host_os in
|
||||||
|
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test -z "$haveit"; then
|
||||||
|
for x in $CPPFLAGS $INC[]NAME; do
|
||||||
|
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||||
|
if test "X$x" = "X-I$additional_includedir"; then
|
||||||
|
haveit=yes
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test -z "$haveit"; then
|
||||||
|
if test -d "$additional_includedir"; then
|
||||||
|
dnl Really add $additional_includedir to $INCNAME.
|
||||||
|
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
dnl Look for dependencies.
|
||||||
|
if test -n "$found_la"; then
|
||||||
|
dnl Read the .la file. It defines the variables
|
||||||
|
dnl dlname, library_names, old_library, dependency_libs, current,
|
||||||
|
dnl age, revision, installed, dlopen, dlpreopen, libdir.
|
||||||
|
save_libdir="$libdir"
|
||||||
|
case "$found_la" in
|
||||||
|
*/* | *\\*) . "$found_la" ;;
|
||||||
|
*) . "./$found_la" ;;
|
||||||
|
esac
|
||||||
|
libdir="$save_libdir"
|
||||||
|
dnl We use only dependency_libs.
|
||||||
|
for dep in $dependency_libs; do
|
||||||
|
case "$dep" in
|
||||||
|
-L*)
|
||||||
|
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
|
||||||
|
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
|
||||||
|
dnl But don't add it
|
||||||
|
dnl 1. if it's the standard /usr/lib,
|
||||||
|
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
|
||||||
|
dnl 3. if it's already present in $LDFLAGS or the already
|
||||||
|
dnl constructed $LIBNAME,
|
||||||
|
dnl 4. if it doesn't exist as a directory.
|
||||||
|
if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
|
||||||
|
&& test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
|
||||||
|
haveit=
|
||||||
|
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
|
||||||
|
|| test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
|
||||||
|
if test -n "$GCC"; then
|
||||||
|
case $host_os in
|
||||||
|
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test -z "$haveit"; then
|
||||||
|
haveit=
|
||||||
|
for x in $LDFLAGS $LIB[]NAME; do
|
||||||
|
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||||
|
if test "X$x" = "X-L$additional_libdir"; then
|
||||||
|
haveit=yes
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test -z "$haveit"; then
|
||||||
|
if test -d "$additional_libdir"; then
|
||||||
|
dnl Really add $additional_libdir to $LIBNAME.
|
||||||
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
haveit=
|
||||||
|
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||||
|
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||||
|
if test "X$x" = "X-L$additional_libdir"; then
|
||||||
|
haveit=yes
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test -z "$haveit"; then
|
||||||
|
if test -d "$additional_libdir"; then
|
||||||
|
dnl Really add $additional_libdir to $LTLIBNAME.
|
||||||
|
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
-R*)
|
||||||
|
dir=`echo "X$dep" | sed -e 's/^X-R//'`
|
||||||
|
if test "$enable_rpath" != no; then
|
||||||
|
dnl Potentially add DIR to rpathdirs.
|
||||||
|
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||||
|
haveit=
|
||||||
|
for x in $rpathdirs; do
|
||||||
|
if test "X$x" = "X$dir"; then
|
||||||
|
haveit=yes
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test -z "$haveit"; then
|
||||||
|
rpathdirs="$rpathdirs $dir"
|
||||||
|
fi
|
||||||
|
dnl Potentially add DIR to ltrpathdirs.
|
||||||
|
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||||
|
haveit=
|
||||||
|
for x in $ltrpathdirs; do
|
||||||
|
if test "X$x" = "X$dir"; then
|
||||||
|
haveit=yes
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test -z "$haveit"; then
|
||||||
|
ltrpathdirs="$ltrpathdirs $dir"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
-l*)
|
||||||
|
dnl Handle this in the next round.
|
||||||
|
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
|
||||||
|
;;
|
||||||
|
*.la)
|
||||||
|
dnl Handle this in the next round. Throw away the .la's
|
||||||
|
dnl directory; it is already contained in a preceding -L
|
||||||
|
dnl option.
|
||||||
|
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
dnl Most likely an immediate library name.
|
||||||
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
|
||||||
|
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
dnl Didn't find the library; assume it is in the system directories
|
||||||
|
dnl known to the linker and runtime loader. (All the system
|
||||||
|
dnl directories known to the linker should also be known to the
|
||||||
|
dnl runtime loader, otherwise the system is severely misconfigured.)
|
||||||
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||||
|
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
if test "X$rpathdirs" != "X"; then
|
||||||
|
if test -n "$acl_hardcode_libdir_separator"; then
|
||||||
|
dnl Weird platform: only the last -rpath option counts, the user must
|
||||||
|
dnl pass all path elements in one option. We can arrange that for a
|
||||||
|
dnl single library, but not when more than one $LIBNAMEs are used.
|
||||||
|
alldirs=
|
||||||
|
for found_dir in $rpathdirs; do
|
||||||
|
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
|
||||||
|
done
|
||||||
|
dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
|
||||||
|
acl_save_libdir="$libdir"
|
||||||
|
libdir="$alldirs"
|
||||||
|
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||||
|
libdir="$acl_save_libdir"
|
||||||
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||||
|
else
|
||||||
|
dnl The -rpath options are cumulative.
|
||||||
|
for found_dir in $rpathdirs; do
|
||||||
|
acl_save_libdir="$libdir"
|
||||||
|
libdir="$found_dir"
|
||||||
|
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||||
|
libdir="$acl_save_libdir"
|
||||||
|
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "X$ltrpathdirs" != "X"; then
|
||||||
|
dnl When using libtool, the option that works for both libraries and
|
||||||
|
dnl executables is -R. The -R options are cumulative.
|
||||||
|
for found_dir in $ltrpathdirs; do
|
||||||
|
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
popdef([P_A_C_K])
|
||||||
|
popdef([PACKLIBS])
|
||||||
|
popdef([PACKUP])
|
||||||
|
popdef([PACK])
|
||||||
|
popdef([NAME])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
|
||||||
|
dnl unless already present in VAR.
|
||||||
|
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
|
||||||
|
dnl contains two or three consecutive elements that belong together.
|
||||||
|
AC_DEFUN([AC_LIB_APPENDTOVAR],
|
||||||
|
[
|
||||||
|
for element in [$2]; do
|
||||||
|
haveit=
|
||||||
|
for x in $[$1]; do
|
||||||
|
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||||
|
if test "X$x" = "X$element"; then
|
||||||
|
haveit=yes
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test -z "$haveit"; then
|
||||||
|
[$1]="${[$1]}${[$1]:+ }$element"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl For those cases where a variable contains several -L and -l options
|
||||||
|
dnl referring to unknown libraries and directories, this macro determines the
|
||||||
|
dnl necessary additional linker options for the runtime path.
|
||||||
|
dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
|
||||||
|
dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
|
||||||
|
dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
|
||||||
|
dnl otherwise linking without libtool is assumed.
|
||||||
|
AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
|
||||||
|
[
|
||||||
|
AC_REQUIRE([AC_LIB_RPATH])
|
||||||
|
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
||||||
|
$1=
|
||||||
|
if test "$enable_rpath" != no; then
|
||||||
|
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
|
||||||
|
dnl Use an explicit option to hardcode directories into the resulting
|
||||||
|
dnl binary.
|
||||||
|
rpathdirs=
|
||||||
|
next=
|
||||||
|
for opt in $2; do
|
||||||
|
if test -n "$next"; then
|
||||||
|
dir="$next"
|
||||||
|
dnl No need to hardcode the standard /usr/lib.
|
||||||
|
if test "X$dir" != "X/usr/$acl_libdirstem" \
|
||||||
|
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
|
||||||
|
rpathdirs="$rpathdirs $dir"
|
||||||
|
fi
|
||||||
|
next=
|
||||||
|
else
|
||||||
|
case $opt in
|
||||||
|
-L) next=yes ;;
|
||||||
|
-L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
|
||||||
|
dnl No need to hardcode the standard /usr/lib.
|
||||||
|
if test "X$dir" != "X/usr/$acl_libdirstem" \
|
||||||
|
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
|
||||||
|
rpathdirs="$rpathdirs $dir"
|
||||||
|
fi
|
||||||
|
next= ;;
|
||||||
|
*) next= ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test "X$rpathdirs" != "X"; then
|
||||||
|
if test -n ""$3""; then
|
||||||
|
dnl libtool is used for linking. Use -R options.
|
||||||
|
for dir in $rpathdirs; do
|
||||||
|
$1="${$1}${$1:+ }-R$dir"
|
||||||
|
done
|
||||||
|
else
|
||||||
|
dnl The linker is used for linking directly.
|
||||||
|
if test -n "$acl_hardcode_libdir_separator"; then
|
||||||
|
dnl Weird platform: only the last -rpath option counts, the user
|
||||||
|
dnl must pass all path elements in one option.
|
||||||
|
alldirs=
|
||||||
|
for dir in $rpathdirs; do
|
||||||
|
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
|
||||||
|
done
|
||||||
|
acl_save_libdir="$libdir"
|
||||||
|
libdir="$alldirs"
|
||||||
|
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||||
|
libdir="$acl_save_libdir"
|
||||||
|
$1="$flag"
|
||||||
|
else
|
||||||
|
dnl The -rpath options are cumulative.
|
||||||
|
for dir in $rpathdirs; do
|
||||||
|
acl_save_libdir="$libdir"
|
||||||
|
libdir="$dir"
|
||||||
|
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||||
|
libdir="$acl_save_libdir"
|
||||||
|
$1="${$1}${$1:+ }$flag"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AC_SUBST([$1])
|
||||||
|
])
|
197
src/pplib/autoconf/libbind.m4
Normal file
197
src/pplib/autoconf/libbind.m4
Normal file
|
@ -0,0 +1,197 @@
|
||||||
|
dnl AM_CHECK_LIBBIND()
|
||||||
|
AC_DEFUN([AM_CHECK_LIBBIND],[
|
||||||
|
AC_ARG_WITH([libbind],
|
||||||
|
[ --with-libbind[[=PATH]] Prefix where libbind is installed (optional)],
|
||||||
|
[libbind_prefix="$withval"],
|
||||||
|
[libbind_prefix=""])
|
||||||
|
|
||||||
|
if test "x$libbind_prefix" != "xno"
|
||||||
|
then
|
||||||
|
|
||||||
|
dnl res_query
|
||||||
|
AC_SEARCH_LIBS(res_query,[resolv bind],have_res_query=yes,
|
||||||
|
[dnl Have to include resolv.h as res_query is sometimes defined as a macro
|
||||||
|
AC_MSG_CHECKING([for res_query in -lresolv (with resolv.h if present)])
|
||||||
|
saved_libs="$LIBS"
|
||||||
|
LIBS="-lresolv $LIBS"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#ifdef HAVE_RESOLV_H
|
||||||
|
#include <resolv.h>
|
||||||
|
#endif],
|
||||||
|
[res_query(0,0,0,0,0)],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
have_res_query=yes],
|
||||||
|
[AC_MSG_RESULT(no)
|
||||||
|
LIBS="$saved_libs"])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
if test "$have_res_query" = "yes"
|
||||||
|
then
|
||||||
|
AC_DEFINE(HAVE_RES_QUERY,1, [Define if you have res_query function])
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
dnl res_search
|
||||||
|
AC_SEARCH_LIBS(res_search,[resolv bind],have_res_search=yes,
|
||||||
|
[dnl Have to include resolv.h as res_query is sometimes defined as a macro
|
||||||
|
AC_MSG_CHECKING([for res_search in -lresolv (with resolv.h if present)])
|
||||||
|
saved_libs="$LIBS"
|
||||||
|
LIBS="-lresolv $LIBS"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#ifdef HAVE_RESOLV_H
|
||||||
|
#include <resolv.h>
|
||||||
|
#endif],
|
||||||
|
[res_search(0,0,0,0,0)],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
have_res_search=yes],
|
||||||
|
[AC_MSG_RESULT(no)
|
||||||
|
LIBS="$saved_libs"])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
if test "$have_res_search" = "yes"
|
||||||
|
then
|
||||||
|
AC_DEFINE(HAVE_RES_SEARCH,1, [Define if you have res_search function])
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl res_querydomain
|
||||||
|
AC_SEARCH_LIBS(res_querydomain,[resolv bind],have_res_querydomain=yes,
|
||||||
|
[dnl Have to include resolv.h as res_query is sometimes defined as a macro
|
||||||
|
AC_MSG_CHECKING([for res_querydomain in -lresolv (with resolv.h if present)])
|
||||||
|
saved_libs="$LIBS"
|
||||||
|
LIBS="-lresolv $LIBS"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#ifdef HAVE_RESOLV_H
|
||||||
|
#include <resolv.h>
|
||||||
|
#endif],
|
||||||
|
[res_querydomain(0,0,0,0,0,0)],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
have_res_querydomain=yes],
|
||||||
|
[AC_MSG_RESULT(no)
|
||||||
|
LIBS="$saved_libs"])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
if test "$have_res_querydomain" = "yes"
|
||||||
|
then
|
||||||
|
AC_DEFINE(HAVE_RES_QUERYDOMAIN,1, [Define if you have res_querydomain function])
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl res_mkquery
|
||||||
|
AC_SEARCH_LIBS(res_mkquery,[resolv bind],have_res_mkquery=yes,
|
||||||
|
[dnl Have to include resolv.h as res_query is sometimes defined as a macro
|
||||||
|
AC_MSG_CHECKING([for res_mkquery in -lresolv (with resolv.h if present)])
|
||||||
|
saved_libs="$LIBS"
|
||||||
|
LIBS="-lresolv $LIBS"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#ifdef HAVE_RESOLV_H
|
||||||
|
#include <resolv.h>
|
||||||
|
#endif],
|
||||||
|
[res_mkquery(0,0,0,0,0,0,0,0,0)],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
have_res_mkquery=yes],
|
||||||
|
[AC_MSG_RESULT(no)
|
||||||
|
LIBS="$saved_libs"])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
if test "$have_res_mkquery" = "yes"
|
||||||
|
then
|
||||||
|
AC_DEFINE(HAVE_RES_MKQUERY,1, [Define if you have res_mkquery function])
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl res_send
|
||||||
|
AC_SEARCH_LIBS(res_send,[resolv bind],have_res_send=yes,
|
||||||
|
[dnl Have to include resolv.h as res_query is sometimes defined as a macro
|
||||||
|
AC_MSG_CHECKING([for res_send in -lresolv (with resolv.h if present)])
|
||||||
|
saved_libs="$LIBS"
|
||||||
|
LIBS="-lresolv $LIBS"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#ifdef HAVE_RESOLV_H
|
||||||
|
#include <resolv.h>
|
||||||
|
#endif],
|
||||||
|
[res_send(0,0,0,0)],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
have_res_send=yes],
|
||||||
|
[AC_MSG_RESULT(no)
|
||||||
|
LIBS="$saved_libs"])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
if test "$have_res_send" = "yes"
|
||||||
|
then
|
||||||
|
AC_DEFINE(HAVE_RES_SEND,1, [Define if you have res_send function])
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl dn_comp
|
||||||
|
AC_SEARCH_LIBS(dn_comp,[resolv bind],have_dn_comp=yes,
|
||||||
|
[dnl Have to include resolv.h as res_query is sometimes defined as a macro
|
||||||
|
AC_MSG_CHECKING([for dn_comp in -lresolv (with resolv.h if present)])
|
||||||
|
saved_libs="$LIBS"
|
||||||
|
LIBS="-lresolv $LIBS"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#ifdef HAVE_RESOLV_H
|
||||||
|
#include <resolv.h>
|
||||||
|
#endif],
|
||||||
|
[dn_comp(0,0,0,0,0)],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
have_dn_comp=yes],
|
||||||
|
[AC_MSG_RESULT(no)
|
||||||
|
LIBS="$saved_libs"])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
if test "$have_dn_comp" = "yes"
|
||||||
|
then
|
||||||
|
AC_DEFINE(HAVE_DN_COMP,1, [Define if you have dn_comp function])
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl dn_expand
|
||||||
|
AC_SEARCH_LIBS(dn_expand,[resolv bind],have_dn_expand=yes,
|
||||||
|
[dnl Have to include resolv.h as dn_expand is sometimes defined as a macro
|
||||||
|
AC_MSG_CHECKING([for dn_expand in -lresolv (with resolv.h if present)])
|
||||||
|
saved_libs="$LIBS"
|
||||||
|
LIBS="-lresolv $LIBS"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#ifdef HAVE_RESOLV_H
|
||||||
|
#include <resolv.h>
|
||||||
|
#endif],
|
||||||
|
[dn_expand(0,0,0,0,0)],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
have_dn_expand=yes],
|
||||||
|
[AC_MSG_RESULT(no)
|
||||||
|
LIBS="$saved_libs"])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
if test "$have_dn_expand" = "yes"
|
||||||
|
then
|
||||||
|
AC_DEFINE(HAVE_DN_EXPAND,1, [Define if you have dn_expand function])
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl ns_initparse
|
||||||
|
AC_SEARCH_LIBS(ns_initparse,[resolv bind],have_ns_initparse=yes,
|
||||||
|
[dnl Have to include resolv.h as ns_initparse is sometimes defined as a macro
|
||||||
|
AC_MSG_CHECKING([for ns_initparse in -lresolv (with resolv.h if present)])
|
||||||
|
saved_libs="$LIBS"
|
||||||
|
LIBS="-lresolv $LIBS"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#ifdef HAVE_RESOLV_H
|
||||||
|
#include <resolv.h>
|
||||||
|
#endif],
|
||||||
|
[ns_initparse(0,0,0,0,0)],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
have_ns_initparse=yes],
|
||||||
|
[AC_MSG_RESULT(no)
|
||||||
|
LIBS="$saved_libs"])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
if test "$have_ns_initparse" = "yes"
|
||||||
|
then
|
||||||
|
AC_DEFINE(HAVE_NS_INITPARSE,1, [Define if you have ns_initparse function])
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
])
|
82
src/pplib/autoconf/libcdio.m4
Normal file
82
src/pplib/autoconf/libcdio.m4
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
dnl AX_CHECK_LIBCDIO([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||||
|
dnl
|
||||||
|
dnl Autor: Patrick Fedick <patrick@pfp.de>
|
||||||
|
dnl
|
||||||
|
dnl If library is found, it sets the following defines:
|
||||||
|
dnl HAVE_LIBCDIO
|
||||||
|
dnl LIBCDIO_CFLAGS
|
||||||
|
dnl LIBCDIO_LDFLAGS
|
||||||
|
|
||||||
|
AC_DEFUN([AX_CHECK_LIBCDIO],[
|
||||||
|
AC_MSG_CHECKING(if we should use libcdio)
|
||||||
|
|
||||||
|
AC_ARG_WITH([libcdio],
|
||||||
|
[ --with-libcdio[[=PATH]] support accesing audio cds (optional)],
|
||||||
|
[libcdio_prefix="$withval"],
|
||||||
|
[libcdio_prefix="auto"])
|
||||||
|
|
||||||
|
have_libcdio="no"
|
||||||
|
|
||||||
|
if test "$libcdio_prefix" != "no"
|
||||||
|
then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
|
||||||
|
am_save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
am_save_LIBS="$LIBS"
|
||||||
|
am_save_LDFLAGS="$LDFLAGS"
|
||||||
|
|
||||||
|
if test -n "$libcdio_prefix" -a "$libcdio_prefix" != "yes" -a "$libcdio_prefix" != "auto"
|
||||||
|
then
|
||||||
|
LIBCDIO_CFLAGS="-I$with_libcdio/include"
|
||||||
|
LIBCDIO_LDFLAGS="-L$with_libcdio/lib -lcdio "
|
||||||
|
else
|
||||||
|
AC_PATH_PROG([PKGCONFIG], [pkg-config], [no])
|
||||||
|
if test "$PKGCONFIG" != "no" && `$PKGCONFIG --exists libcdio`
|
||||||
|
then
|
||||||
|
LIBCDIO_CFLAGS=`$PKGCONFIG --cflags libcdio `
|
||||||
|
LIBCDIO_LDFLAGS=`$PKGCONFIG --libs libcdio `
|
||||||
|
else
|
||||||
|
PKG_CHECK_MODULES([libcdio], [libcdio],
|
||||||
|
LIBCDIO_CFLAGS=$libcdio_CFLAGS
|
||||||
|
LIBCDIO_LDFLAGS=$libcdio_LIBS
|
||||||
|
,
|
||||||
|
LIBCDIO_LDFLAGS="-lcdio "
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
CFLAGS="$CFLAGS $LIBCDIO_CFLAGS"
|
||||||
|
LDFLAGS="$LDFLAGS $LIBCDIO_LDFLAGS"
|
||||||
|
AC_MSG_CHECKING(if we can link against libcdio)
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <cdio/cdio.h>
|
||||||
|
],[
|
||||||
|
CdIo_t *p_cdio = cdio_open (NULL, DRIVER_DEVICE);
|
||||||
|
],
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
have_libcdio="yes"
|
||||||
|
,
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
CPPFLAGS=$am_save_CPPFLAGS
|
||||||
|
LIBS=$am_save_LIBS
|
||||||
|
LDFLAGS=$am_save_LDFLAGS
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
if test $have_libcdio = "yes"
|
||||||
|
then
|
||||||
|
AC_DEFINE(HAVE_LIBCDIO, 1, [Define if you have the libcdio library])
|
||||||
|
ifelse([$1], , :, [$1])
|
||||||
|
else
|
||||||
|
LIBCDIO_CFLAGS=""
|
||||||
|
LIBCDIO_LDFLAGS=""
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
fi
|
||||||
|
AC_SUBST(LIBCDIO_CFLAGS)
|
||||||
|
AC_SUBST(LIBCDIO_LDFLAGS)
|
||||||
|
|
||||||
|
])
|
272
src/pplib/autoconf/libcurl.m4
Normal file
272
src/pplib/autoconf/libcurl.m4
Normal file
|
@ -0,0 +1,272 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 2006, David Shaw <dshaw@jabberwocky.com>
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
# LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION],
|
||||||
|
# [ACTION-IF-YES], [ACTION-IF-NO])
|
||||||
|
# ----------------------------------------------------------
|
||||||
|
# David Shaw <dshaw@jabberwocky.com> May-09-2006
|
||||||
|
#
|
||||||
|
# Checks for libcurl. DEFAULT-ACTION is the string yes or no to
|
||||||
|
# specify whether to default to --with-libcurl or --without-libcurl.
|
||||||
|
# If not supplied, DEFAULT-ACTION is yes. MINIMUM-VERSION is the
|
||||||
|
# minimum version of libcurl to accept. Pass the version as a regular
|
||||||
|
# version number like 7.10.1. If not supplied, any version is
|
||||||
|
# accepted. ACTION-IF-YES is a list of shell commands to run if
|
||||||
|
# libcurl was successfully found and passed the various tests.
|
||||||
|
# ACTION-IF-NO is a list of shell commands that are run otherwise.
|
||||||
|
# Note that using --without-libcurl does run ACTION-IF-NO.
|
||||||
|
#
|
||||||
|
# This macro #defines HAVE_LIBCURL if a working libcurl setup is
|
||||||
|
# found, and sets @LIBCURL@ and @LIBCURL_CPPFLAGS@ to the necessary
|
||||||
|
# values. Other useful defines are LIBCURL_FEATURE_xxx where xxx are
|
||||||
|
# the various features supported by libcurl, and LIBCURL_PROTOCOL_yyy
|
||||||
|
# where yyy are the various protocols supported by libcurl. Both xxx
|
||||||
|
# and yyy are capitalized. See the list of AH_TEMPLATEs at the top of
|
||||||
|
# the macro for the complete list of possible defines. Shell
|
||||||
|
# variables $libcurl_feature_xxx and $libcurl_protocol_yyy are also
|
||||||
|
# defined to 'yes' for those features and protocols that were found.
|
||||||
|
# Note that xxx and yyy keep the same capitalization as in the
|
||||||
|
# curl-config list (e.g. it's "HTTP" and not "http").
|
||||||
|
#
|
||||||
|
# Users may override the detected values by doing something like:
|
||||||
|
# LIBCURL="-lcurl" LIBCURL_CPPFLAGS="-I/usr/myinclude" ./configure
|
||||||
|
#
|
||||||
|
# For the sake of sanity, this macro assumes that any libcurl that is
|
||||||
|
# found is after version 7.7.2, the first version that included the
|
||||||
|
# curl-config script. Note that it is very important for people
|
||||||
|
# packaging binary versions of libcurl to include this script!
|
||||||
|
# Without curl-config, we can only guess what protocols are available,
|
||||||
|
# or use curl_version_info to figure it out at runtime.
|
||||||
|
|
||||||
|
AC_DEFUN([LIBCURL_CHECK_CONFIG],
|
||||||
|
[
|
||||||
|
AH_TEMPLATE([LIBCURL_FEATURE_SSL],[Defined if libcurl supports SSL])
|
||||||
|
AH_TEMPLATE([LIBCURL_FEATURE_KRB4],[Defined if libcurl supports KRB4])
|
||||||
|
AH_TEMPLATE([LIBCURL_FEATURE_IPV6],[Defined if libcurl supports IPv6])
|
||||||
|
AH_TEMPLATE([LIBCURL_FEATURE_LIBZ],[Defined if libcurl supports libz])
|
||||||
|
AH_TEMPLATE([LIBCURL_FEATURE_ASYNCHDNS],[Defined if libcurl supports AsynchDNS])
|
||||||
|
AH_TEMPLATE([LIBCURL_FEATURE_IDN],[Defined if libcurl supports IDN])
|
||||||
|
AH_TEMPLATE([LIBCURL_FEATURE_SSPI],[Defined if libcurl supports SSPI])
|
||||||
|
AH_TEMPLATE([LIBCURL_FEATURE_NTLM],[Defined if libcurl supports NTLM])
|
||||||
|
|
||||||
|
AH_TEMPLATE([LIBCURL_PROTOCOL_HTTP],[Defined if libcurl supports HTTP])
|
||||||
|
AH_TEMPLATE([LIBCURL_PROTOCOL_HTTPS],[Defined if libcurl supports HTTPS])
|
||||||
|
AH_TEMPLATE([LIBCURL_PROTOCOL_FTP],[Defined if libcurl supports FTP])
|
||||||
|
AH_TEMPLATE([LIBCURL_PROTOCOL_FTPS],[Defined if libcurl supports FTPS])
|
||||||
|
AH_TEMPLATE([LIBCURL_PROTOCOL_FILE],[Defined if libcurl supports FILE])
|
||||||
|
AH_TEMPLATE([LIBCURL_PROTOCOL_TELNET],[Defined if libcurl supports TELNET])
|
||||||
|
AH_TEMPLATE([LIBCURL_PROTOCOL_LDAP],[Defined if libcurl supports LDAP])
|
||||||
|
AH_TEMPLATE([LIBCURL_PROTOCOL_DICT],[Defined if libcurl supports DICT])
|
||||||
|
AH_TEMPLATE([LIBCURL_PROTOCOL_TFTP],[Defined if libcurl supports TFTP])
|
||||||
|
AH_TEMPLATE([LIBCURL_PROTOCOL_RTSP],[Defined if libcurl supports RTSP])
|
||||||
|
AH_TEMPLATE([LIBCURL_PROTOCOL_POP3],[Defined if libcurl supports POP3])
|
||||||
|
AH_TEMPLATE([LIBCURL_PROTOCOL_IMAP],[Defined if libcurl supports IMAP])
|
||||||
|
AH_TEMPLATE([LIBCURL_PROTOCOL_SMTP],[Defined if libcurl supports SMTP])
|
||||||
|
|
||||||
|
AC_ARG_WITH(libcurl,
|
||||||
|
AC_HELP_STRING([--with-libcurl=PREFIX],[look for the curl library in PREFIX/lib and headers in PREFIX/include]),
|
||||||
|
[_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[yes],[$1])])
|
||||||
|
|
||||||
|
if test "$_libcurl_with" != "no" ; then
|
||||||
|
|
||||||
|
AC_PROG_AWK
|
||||||
|
|
||||||
|
_libcurl_version_parse="eval $AWK '{split(\$NF,A,\".\"); X=256*256*A[[1]]+256*A[[2]]+A[[3]]; print X;}'"
|
||||||
|
|
||||||
|
_libcurl_try_link=yes
|
||||||
|
|
||||||
|
if test -d "$_libcurl_with" ; then
|
||||||
|
LIBCURL_CPPFLAGS="-I$withval/include"
|
||||||
|
_libcurl_ldflags="-L$withval/lib"
|
||||||
|
AC_PATH_PROG([_libcurl_config],[curl-config],[],
|
||||||
|
["$withval/bin"])
|
||||||
|
else
|
||||||
|
AC_PATH_PROG([_libcurl_config],[curl-config],[],[$PATH])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x$_libcurl_config != "x" ; then
|
||||||
|
AC_CACHE_CHECK([for the version of libcurl],
|
||||||
|
[libcurl_cv_lib_curl_version],
|
||||||
|
[libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK '{print $[]2}'`])
|
||||||
|
|
||||||
|
_libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse`
|
||||||
|
_libcurl_wanted=`echo ifelse([$2],,[0],[$2]) | $_libcurl_version_parse`
|
||||||
|
|
||||||
|
if test $_libcurl_wanted -gt 0 ; then
|
||||||
|
AC_CACHE_CHECK([for libcurl >= version $2],
|
||||||
|
[libcurl_cv_lib_version_ok],
|
||||||
|
[
|
||||||
|
if test $_libcurl_version -ge $_libcurl_wanted ; then
|
||||||
|
libcurl_cv_lib_version_ok=yes
|
||||||
|
else
|
||||||
|
libcurl_cv_lib_version_ok=no
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $_libcurl_wanted -eq 0 || test x$libcurl_cv_lib_version_ok = xyes ; then
|
||||||
|
if test x"$LIBCURL_CPPFLAGS" = "x" ; then
|
||||||
|
LIBCURL_CPPFLAGS=`$_libcurl_config --cflags`
|
||||||
|
fi
|
||||||
|
if test x"$LIBCURL" = "x" ; then
|
||||||
|
LIBCURL=`$_libcurl_config --libs`
|
||||||
|
|
||||||
|
# This is so silly, but Apple actually has a bug in their
|
||||||
|
# curl-config script. Fixed in Tiger, but there are still
|
||||||
|
# lots of Panther installs around.
|
||||||
|
case "${host}" in
|
||||||
|
powerpc-apple-darwin7*)
|
||||||
|
LIBCURL=`echo $LIBCURL | sed -e 's|-arch i386||g'`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# All curl-config scripts support --feature
|
||||||
|
_libcurl_features=`$_libcurl_config --feature`
|
||||||
|
|
||||||
|
# Is it modern enough to have --protocols? (7.12.4)
|
||||||
|
if test $_libcurl_version -ge 461828 ; then
|
||||||
|
_libcurl_protocols=`$_libcurl_config --protocols`
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
_libcurl_try_link=no
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset _libcurl_wanted
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $_libcurl_try_link = yes ; then
|
||||||
|
|
||||||
|
# we didn't find curl-config, so let's see if the user-supplied
|
||||||
|
# link line (or failing that, "-lcurl") is enough.
|
||||||
|
LIBCURL=${LIBCURL-"$_libcurl_ldflags -lcurl"}
|
||||||
|
|
||||||
|
AC_CACHE_CHECK([whether libcurl is usable],
|
||||||
|
[libcurl_cv_lib_curl_usable],
|
||||||
|
[
|
||||||
|
_libcurl_save_cppflags=$CPPFLAGS
|
||||||
|
CPPFLAGS="$LIBCURL_CPPFLAGS $CPPFLAGS"
|
||||||
|
_libcurl_save_libs=$LIBS
|
||||||
|
LIBS="$LIBCURL $LIBS"
|
||||||
|
|
||||||
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <curl/curl.h>]],[[
|
||||||
|
/* Try and use a few common options to force a failure if we are
|
||||||
|
missing symbols or can't link. */
|
||||||
|
int x;
|
||||||
|
curl_easy_setopt(NULL,CURLOPT_URL,NULL);
|
||||||
|
x=CURL_ERROR_SIZE;
|
||||||
|
x=CURLOPT_WRITEFUNCTION;
|
||||||
|
x=CURLOPT_WRITEDATA;
|
||||||
|
x=CURLOPT_ERRORBUFFER;
|
||||||
|
x=CURLOPT_STDERR;
|
||||||
|
x=CURLOPT_VERBOSE;
|
||||||
|
if (x) ;
|
||||||
|
]])],libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
|
||||||
|
|
||||||
|
CPPFLAGS=$_libcurl_save_cppflags
|
||||||
|
LIBS=$_libcurl_save_libs
|
||||||
|
unset _libcurl_save_cppflags
|
||||||
|
unset _libcurl_save_libs
|
||||||
|
])
|
||||||
|
|
||||||
|
if test $libcurl_cv_lib_curl_usable = yes ; then
|
||||||
|
|
||||||
|
# Does curl_free() exist in this version of libcurl?
|
||||||
|
# If not, fake it with free()
|
||||||
|
|
||||||
|
_libcurl_save_cppflags=$CPPFLAGS
|
||||||
|
CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
|
||||||
|
_libcurl_save_libs=$LIBS
|
||||||
|
LIBS="$LIBS $LIBCURL"
|
||||||
|
|
||||||
|
AC_CHECK_FUNC(curl_free,,
|
||||||
|
AC_DEFINE(curl_free,free,
|
||||||
|
[Define curl_free() as free() if our version of curl lacks curl_free.]))
|
||||||
|
|
||||||
|
CPPFLAGS=$_libcurl_save_cppflags
|
||||||
|
LIBS=$_libcurl_save_libs
|
||||||
|
unset _libcurl_save_cppflags
|
||||||
|
unset _libcurl_save_libs
|
||||||
|
|
||||||
|
AC_DEFINE(HAVE_LIBCURL,1,
|
||||||
|
[Define to 1 if you have a functional curl library.])
|
||||||
|
AC_SUBST(LIBCURL_CPPFLAGS)
|
||||||
|
AC_SUBST(LIBCURL)
|
||||||
|
|
||||||
|
for _libcurl_feature in $_libcurl_features ; do
|
||||||
|
AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_feature_$_libcurl_feature),[1])
|
||||||
|
eval AS_TR_SH(libcurl_feature_$_libcurl_feature)=yes
|
||||||
|
done
|
||||||
|
|
||||||
|
if test "x$_libcurl_protocols" = "x" ; then
|
||||||
|
|
||||||
|
# We don't have --protocols, so just assume that all
|
||||||
|
# protocols are available
|
||||||
|
_libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP"
|
||||||
|
|
||||||
|
if test x$libcurl_feature_SSL = xyes ; then
|
||||||
|
_libcurl_protocols="$_libcurl_protocols HTTPS"
|
||||||
|
|
||||||
|
# FTPS wasn't standards-compliant until version
|
||||||
|
# 7.11.0 (0x070b00 == 461568)
|
||||||
|
if test $_libcurl_version -ge 461568; then
|
||||||
|
_libcurl_protocols="$_libcurl_protocols FTPS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# RTSP, IMAP, POP3 and SMTP were added in
|
||||||
|
# 7.20.0 (0x071400 == 463872)
|
||||||
|
if test $_libcurl_version -ge 463872; then
|
||||||
|
_libcurl_protocols="$_libcurl_protocols RTSP IMAP POP3 SMTP"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
for _libcurl_protocol in $_libcurl_protocols ; do
|
||||||
|
AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_protocol_$_libcurl_protocol),[1])
|
||||||
|
eval AS_TR_SH(libcurl_protocol_$_libcurl_protocol)=yes
|
||||||
|
done
|
||||||
|
else
|
||||||
|
unset LIBCURL
|
||||||
|
unset LIBCURL_CPPFLAGS
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset _libcurl_try_link
|
||||||
|
unset _libcurl_version_parse
|
||||||
|
unset _libcurl_config
|
||||||
|
unset _libcurl_feature
|
||||||
|
unset _libcurl_features
|
||||||
|
unset _libcurl_protocol
|
||||||
|
unset _libcurl_protocols
|
||||||
|
unset _libcurl_version
|
||||||
|
unset _libcurl_ldflags
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x$_libcurl_with = xno || test x$libcurl_cv_lib_curl_usable != xyes ; then
|
||||||
|
# This is the IF-NO path
|
||||||
|
ifelse([$4],,:,[$4])
|
||||||
|
else
|
||||||
|
# This is the IF-YES path
|
||||||
|
ifelse([$3],,:,[$3])
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset _libcurl_with
|
||||||
|
])dnl
|
68
src/pplib/autoconf/libidn.m4
Normal file
68
src/pplib/autoconf/libidn.m4
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
dnl AM_LIBIDN([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
AC_DEFUN([AM_LIBIDN],[
|
||||||
|
AC_ARG_WITH([libidn],
|
||||||
|
[ --with-libidn[[=PATH]] Prefix where libidn is installed (optional)],
|
||||||
|
[libidn_prefix="$withval"],
|
||||||
|
[libidn_prefix="no"])
|
||||||
|
|
||||||
|
am_save_CFLAGS="$CFLAGS"
|
||||||
|
am_save_LIBS="$LIBS"
|
||||||
|
am_save_LDFLAGS="$LDFLAGS"
|
||||||
|
LIBIDN_LIBS="-lidn"
|
||||||
|
LIBIDN_CFLAGS=""
|
||||||
|
have_libidn="no"
|
||||||
|
if test "$libidn_prefix" != "yes"
|
||||||
|
then
|
||||||
|
if test "$libidn_prefix" != "no"
|
||||||
|
then
|
||||||
|
LIBS="-L$libidn_prefix/lib -lidn $LIBS"
|
||||||
|
CFLAGS="$CFLAGS -I$libidn_prefix/include"
|
||||||
|
LIBIDN_LIBS="-L$libidn_prefix/lib -lidn"
|
||||||
|
LIBIDN_CFLAGS="-I$libidn_prefix/include"
|
||||||
|
else
|
||||||
|
LIBS="-lidn $LIBS"
|
||||||
|
LIBIDN_LIBS="-lidn"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
LIBS="-lidn $LIBS"
|
||||||
|
LIBIDN_LIBS="-lidn"
|
||||||
|
fi
|
||||||
|
AC_CHECK_HEADER([idna.h], [
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for idn library and linking])
|
||||||
|
AC_LINK_IFELSE([AC_LANG_SOURCE(
|
||||||
|
[[
|
||||||
|
#include <idna.h>
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
char *idn=NULL;
|
||||||
|
char *a=NULL;
|
||||||
|
if (IDNA_SUCCESS==idna_to_ascii_8z(idn, &a,0) && a!=NULL) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
]])],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
have_libidn="yes"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
])
|
||||||
|
CFLAGS=$am_save_CFLAGS
|
||||||
|
LIBS=$am_save_LIBS
|
||||||
|
LDFLAGS=$am_save_LDFLAGS
|
||||||
|
|
||||||
|
if test "$have_libidn" = "yes"
|
||||||
|
then
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
else
|
||||||
|
LIBIDN_LIBS=""
|
||||||
|
LIBIDN_CFLAGS=""
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
])
|
91
src/pplib/autoconf/libidn2.m4
Normal file
91
src/pplib/autoconf/libidn2.m4
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
dnl AM_LIBIDN([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
AC_DEFUN([AM_LIBIDN2],[
|
||||||
|
AC_ARG_WITH([libidn2],
|
||||||
|
[ --with-libidn2[[=PATH]] Prefix where libidn2 is installed (optional)],
|
||||||
|
[libidn2_prefix="$withval"],
|
||||||
|
[libidn2_prefix="no"])
|
||||||
|
|
||||||
|
am_save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
am_save_CFLAGS="$CFLAGS"
|
||||||
|
am_save_LIBS="$LIBS"
|
||||||
|
am_save_LDFLAGS="$LDFLAGS"
|
||||||
|
LIBIDN2_LIBS=""
|
||||||
|
LIBIDN2_CFLAGS=""
|
||||||
|
have_libidn="no"
|
||||||
|
if test "$libidn2_prefix" != "yes"
|
||||||
|
then
|
||||||
|
if test "$libidn2_prefix" != "no"
|
||||||
|
then
|
||||||
|
LIBS="-L$libidn2_prefix/lib -lidn2 $LIBS"
|
||||||
|
CPPFLAGS="$CPPFLAGS -I$libidn2_prefix/include"
|
||||||
|
CFLAGS="$CFLAGS -I$libidn2_prefix/include"
|
||||||
|
LIBIDN2_LIBS="-L$libidn2_prefix/lib -lidn2"
|
||||||
|
LIBIDN2_CFLAGS="-I$libidn2_prefix/include"
|
||||||
|
else
|
||||||
|
LIBS="-lidn2 $LIBS"
|
||||||
|
LIBIDN2_LIBS="-lidn2"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
LIBS="-lidn2 $LIBS"
|
||||||
|
LIBIDN2_LIBS="-lidn2"
|
||||||
|
fi
|
||||||
|
AC_CHECK_HEADER([idn2.h], [
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for idn2 library and linking])
|
||||||
|
AC_LINK_IFELSE([AC_LANG_SOURCE(
|
||||||
|
[[
|
||||||
|
#include <idn2.h>
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
char *idn=NULL;
|
||||||
|
char *a=NULL;
|
||||||
|
if (IDNA_SUCCESS==idn2_to_ascii_8z(idn, &a,0) && a!=NULL) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
]])],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
have_libidn2="yes"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
AC_MSG_CHECKING([for existing IDN2_NO_TR46-flag in idn2 library])
|
||||||
|
AC_LINK_IFELSE([AC_LANG_SOURCE(
|
||||||
|
[[
|
||||||
|
#include <idn2.h>
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
char *idn=NULL;
|
||||||
|
char *a=NULL;
|
||||||
|
if (IDNA_SUCCESS==idn2_to_ascii_8z(idn, &a,IDN2_NO_TR46) && a!=NULL) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
]])],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
have_libidn2_IDN2_NO_TR46="yes"
|
||||||
|
AC_DEFINE(HAVE_LIBIDN2_IDN2_NO_TR46, 1, [ Define if libidn2 has IDN2_NO_TR46 flag. ])
|
||||||
|
],
|
||||||
|
[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
])
|
||||||
|
CFLAGS=$am_save_CFLAGS
|
||||||
|
CPPFLAGS=$am_save_CPPFLAGS
|
||||||
|
LIBS=$am_save_LIBS
|
||||||
|
LDFLAGS=$am_save_LDFLAGS
|
||||||
|
|
||||||
|
if test "$have_libidn2" = "yes"
|
||||||
|
then
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
else
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
])
|
42
src/pplib/autoconf/libjpeg-turbo.m4
Normal file
42
src/pplib/autoconf/libjpeg-turbo.m4
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
dnl AC_CHECK_LIBJPEGTURBO([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
|
||||||
|
AC_DEFUN([AC_CHECK_LIBJPEGTURBO],[
|
||||||
|
AC_MSG_CHECKING(for libjpegturbo)
|
||||||
|
|
||||||
|
AC_ARG_WITH([libjpegturbo],
|
||||||
|
[ --with-libjpegturbo[[=PATH]] Prefix where libjpeg-turbo is installed (optional)],
|
||||||
|
[libjpegturbo_prefix="$withval"],
|
||||||
|
[libjpegturbo_prefix=""])
|
||||||
|
if test "$libjpegturbo_prefix" != "no"
|
||||||
|
then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
am_save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
am_save_CFLAGS="$CFLAGS"
|
||||||
|
am_save_LIBS="$LIBS"
|
||||||
|
am_save_LDFLAGS="$LDFLAGS"
|
||||||
|
LIBS=""
|
||||||
|
PKG_CHECK_MODULES([TURBOJPEG], [libturbojpeg >= $1],
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
,
|
||||||
|
AC_SEARCH_LIBS( [tjInitDecompress],[turbojpeg],
|
||||||
|
dnl echo "LIBS=$LIBS"
|
||||||
|
dnl echo "LDFLAGS=$LDFLAGS"
|
||||||
|
dnl echo "CFLAGS=$CFLAGS"
|
||||||
|
dnl echo "CPPFLAGS=$CPPFLAGS"
|
||||||
|
|
||||||
|
TURBOJPEG_LIBS="$LIBS"
|
||||||
|
TURBOJPEG_CFLAGS=""
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
,
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
:)
|
||||||
|
)
|
||||||
|
CPPFLAGS="$am_save_CPPFLAGS"
|
||||||
|
LIBS="$am_save_LIBS"
|
||||||
|
LDFLAGS="$am_save_LDFLAGS"
|
||||||
|
CFLAGS="$am_save_CFLAGS"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
])
|
251
src/pplib/autoconf/libmcrypt.m4
Normal file
251
src/pplib/autoconf/libmcrypt.m4
Normal file
|
@ -0,0 +1,251 @@
|
||||||
|
dnl Autoconf macros for libmcrypt
|
||||||
|
dnl $id$
|
||||||
|
|
||||||
|
# This script detects libmcrypt version and defines
|
||||||
|
# LIBMCRYPT_CFLAGS, LIBMCRYPT_LIBS
|
||||||
|
# and LIBMCRYPT24 or LIBMCRYPT22 depending on libmcrypt version
|
||||||
|
# found.
|
||||||
|
|
||||||
|
# Modified for LIBMCRYPT -- nmav
|
||||||
|
# Configure paths for LIBGCRYPT
|
||||||
|
# Shamelessly stolen from the one of XDELTA by Owen Taylor
|
||||||
|
# Werner Koch 99-12-09
|
||||||
|
|
||||||
|
dnl AM_PATH_LIBMCRYPT([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
|
||||||
|
dnl Test for libmcrypt, and define LIBMCRYPT_CFLAGS and LIBMCRYPT_LIBS
|
||||||
|
dnl
|
||||||
|
AC_DEFUN([AM_PATH_LIBMCRYPT],
|
||||||
|
[dnl
|
||||||
|
dnl Get the cflags and libraries from the libmcrypt-config script
|
||||||
|
dnl
|
||||||
|
AC_ARG_WITH(libmcrypt-prefix,
|
||||||
|
[ --with-libmcrypt-prefix=PFX Prefix where libmcrypt is installed (optional)],
|
||||||
|
libmcrypt_config_prefix="$withval", libmcrypt_config_prefix="")
|
||||||
|
|
||||||
|
if test x$libmcrypt_config_prefix != x ; then
|
||||||
|
libmcrypt_config_args="$libmcrypt_config_args --prefix=$libmcrypt_config_prefix"
|
||||||
|
if test x${LIBMCRYPT_CONFIG+set} != xset ; then
|
||||||
|
LIBMCRYPT_CONFIG=$libmcrypt_config_prefix/bin/libmcrypt-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_PATH_PROG(LIBMCRYPT_CONFIG, libmcrypt-config, no)
|
||||||
|
min_libmcrypt_version=ifelse([$1], ,2.4.0,$1)
|
||||||
|
AC_MSG_CHECKING(for libmcrypt - version >= $min_libmcrypt_version)
|
||||||
|
no_libmcrypt=""
|
||||||
|
if test "$LIBMCRYPT_CONFIG" = "no" ; then
|
||||||
|
dnl libmcrypt-config was not found (pre 2.4.11 versions)
|
||||||
|
dnl Try to detect libmcrypt version
|
||||||
|
AC_TRY_RUN([
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <mcrypt.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
#if MCRYPT_API_VERSION <= 19991015
|
||||||
|
/* version 2.2 */
|
||||||
|
return 0;
|
||||||
|
#else
|
||||||
|
/* version 2.4 */
|
||||||
|
return 1;
|
||||||
|
#endif /* 19991015 */
|
||||||
|
}
|
||||||
|
], libmcrypt_config_version="2.2.0"
|
||||||
|
if test x$libmcrypt_config_prefix != x ; then
|
||||||
|
TTLIBS="-L${libmcrypt_config_prefix}/libs"
|
||||||
|
TTINCLUDE="-I${libmcrypt_config_prefix}/include"
|
||||||
|
fi
|
||||||
|
LIBMCRYPT_CFLAGS="${TTINCLUDE}"
|
||||||
|
LIBMCRYPT_LIBS="${TTLIBS} -lmcrypt"
|
||||||
|
AC_DEFINE(LIBMCRYPT22, 1, [have libmcrypt 2.2])
|
||||||
|
|
||||||
|
, libmcrypt_config_version="2.4.0"
|
||||||
|
if test x$libmcrypt_config_prefix != x ; then
|
||||||
|
TTLIBS="-L${libmcrypt_config_prefix}/libs"
|
||||||
|
TTINCLUDE="-I${libmcrypt_config_prefix}/include"
|
||||||
|
fi
|
||||||
|
LIBMCRYPT_CFLAGS="${TTINCLUDE}"
|
||||||
|
LIBMCRYPT_LIBS="${TTLIBS} -lmcrypt -lltdl ${LIBADD_DL}"
|
||||||
|
AC_DEFINE(LIBMCRYPT24, 1, [have libmcrypt 2.4]))
|
||||||
|
else
|
||||||
|
dnl libmcrypt-config was found
|
||||||
|
LIBMCRYPT_CFLAGS=`$LIBMCRYPT_CONFIG $libmcrypt_config_args --cflags`
|
||||||
|
LIBMCRYPT_LIBS=`$LIBMCRYPT_CONFIG $libmcrypt_config_args --libs`
|
||||||
|
libmcrypt_config_version=`$LIBMCRYPT_CONFIG $libmcrypt_config_args --version`
|
||||||
|
AC_DEFINE(LIBMCRYPT24, 1, [have libmcrypt 2.4])
|
||||||
|
fi
|
||||||
|
|
||||||
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
|
ac_save_LIBS="$LIBS"
|
||||||
|
CFLAGS="$CFLAGS $LIBMCRYPT_CFLAGS"
|
||||||
|
LIBS="$LIBS $LIBMCRYPT_LIBS"
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Now check if the installed libmcrypt is sufficiently new. Also sanity
|
||||||
|
dnl checks the results of libmcrypt-config to some extent
|
||||||
|
dnl
|
||||||
|
rm -f conf.libmcrypttest
|
||||||
|
AC_TRY_RUN([
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <mcrypt.h>
|
||||||
|
|
||||||
|
#define TWO "2.2"
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
#if MCRYPT_API_VERSION <= 20010201
|
||||||
|
|
||||||
|
#if MCRYPT_API_VERSION <= 19991015
|
||||||
|
/* version 2.2 */
|
||||||
|
int x = mcrypt_get_key_size(MCRYPT_TWOFISH_128);
|
||||||
|
system ("touch conf.libmcrypttest");
|
||||||
|
|
||||||
|
if( strncmp( TWO, "$min_libmcrypt_version", strlen(TWO))) {
|
||||||
|
printf("\n*** Requested libmcrypt %s, but LIBMCRYPT (%s)\n",
|
||||||
|
"$min_libmcrypt_version", TWO );
|
||||||
|
printf("*** was found!\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
#else
|
||||||
|
/* version 2.4 before 11 */
|
||||||
|
MCRYPT td = mcrypt_module_open("twofish", NULL, "cbc", NULL);
|
||||||
|
system ("touch conf.libmcrypttest");
|
||||||
|
mcrypt_module_close(td);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
#endif /* 19991015 */
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
system ("touch conf.libmcrypttest");
|
||||||
|
|
||||||
|
if( strcmp( mcrypt_check_version(NULL), "$libmcrypt_config_version" ) )
|
||||||
|
{
|
||||||
|
printf("\n*** 'libmcrypt-config --version' returned %s, but LIBMCRYPT (%s)\n",
|
||||||
|
"$libmcrypt_config_version", mcrypt_check_version(NULL) );
|
||||||
|
printf("*** was found! If libmcrypt-config was correct, then it is best\n");
|
||||||
|
printf("*** to remove the old version of LIBMCRYPT. You may also be able to fix the error\n");
|
||||||
|
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
||||||
|
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
||||||
|
printf("*** required on your system.\n");
|
||||||
|
printf("*** If libmcrypt-config was wrong, set the environment variable LIBMCRYPT_CONFIG\n");
|
||||||
|
printf("*** to point to the correct copy of libmcrypt-config, and remove the file config.cache\n");
|
||||||
|
printf("*** before re-running configure\n");
|
||||||
|
}
|
||||||
|
else if ( strcmp(mcrypt_check_version(NULL), LIBMCRYPT_VERSION ) )
|
||||||
|
{
|
||||||
|
printf("\n*** LIBMCRYPT header file (version %s) does not match\n", LIBMCRYPT_VERSION);
|
||||||
|
printf("*** library (version %s)\n", mcrypt_check_version(NULL) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( mcrypt_check_version( "$min_libmcrypt_version" ) )
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("no\n*** An old version of LIBMCRYPT (%s) was found.\n",
|
||||||
|
mcrypt_check_version(NULL) );
|
||||||
|
printf("*** You need a version of LIBMCRYPT newer than %s. The latest version of\n",
|
||||||
|
"$min_libmcrypt_version" );
|
||||||
|
printf("*** LIBMCRYPT is always available from ftp://mcrypt.hellug.gr/pub/mcrypt.\n");
|
||||||
|
printf("*** \n");
|
||||||
|
printf("*** If you have already installed a sufficiently new version, this error\n");
|
||||||
|
printf("*** probably means that the wrong copy of the libmcrypt-config shell script is\n");
|
||||||
|
printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
||||||
|
printf("*** of LIBMCRYPT, but you can also set the LIBMCRYPT_CONFIG environment to point to the\n");
|
||||||
|
printf("*** correct copy of libmcrypt-config. (In this case, you will have to\n");
|
||||||
|
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
||||||
|
printf("*** so that the correct libraries are found at run-time))\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
#endif /* 20010201 */
|
||||||
|
|
||||||
|
}
|
||||||
|
],, no_libmcrypt=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
|
||||||
|
if test "$libmcrypt_config_prefix" = "no" ; then
|
||||||
|
no_libmcrypt="yes"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$no_libmcrypt" = x ; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
else
|
||||||
|
if test -f conf.libmcrypttest ; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -f conf.libmcrypttest ; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "*** Could not run libmcrypt test program, checking why..."
|
||||||
|
CFLAGS="$CFLAGS $LIBMCRYPT_CFLAGS"
|
||||||
|
LIBS="$LIBS $LIBMCRYPT_LIBS"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <mcrypt.h>
|
||||||
|
], [
|
||||||
|
#if MCRYPT_API_VERSION <= 20010201
|
||||||
|
|
||||||
|
#if MCRYPT_API_VERSION <= 19991015
|
||||||
|
/* version 2.2 */
|
||||||
|
int x = mcrypt_get_key_size(MCRYPT_TWOFISH_128);
|
||||||
|
return 0;
|
||||||
|
#else
|
||||||
|
/* version 2.4 before 11 */
|
||||||
|
MCRYPT td = mcrypt_module_open("twofish", NULL, "cbc", NULL);
|
||||||
|
mcrypt_module_close(td);
|
||||||
|
return 0;
|
||||||
|
#endif /* 19991015 */
|
||||||
|
#else
|
||||||
|
|
||||||
|
return !!mcrypt_check_version(NULL);
|
||||||
|
|
||||||
|
#endif /* 20010201 */
|
||||||
|
|
||||||
|
],
|
||||||
|
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||||
|
echo "*** that the run-time linker is not finding LIBMCRYPT or finding the wrong"
|
||||||
|
echo "*** version of LIBMCRYPT. If it is not finding LIBMCRYPT, you'll need to set your"
|
||||||
|
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||||
|
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||||
|
echo "*** is required on your system"
|
||||||
|
echo "***"
|
||||||
|
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||||
|
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
|
||||||
|
echo "***" ],
|
||||||
|
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||||
|
echo "*** exact error that occured. This usually means LIBMCRYPT was incorrectly installed"
|
||||||
|
echo "*** or that you have moved LIBMCRYPT since it was installed. In the latter case, you"
|
||||||
|
echo "*** may want to edit the libmcrypt-config script: $LIBMCRYPT_CONFIG" ])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LIBMCRYPT_CFLAGS=""
|
||||||
|
LIBMCRYPT_LIBS=""
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
rm -f conf.libmcrypttest
|
||||||
|
AC_SUBST(LIBMCRYPT_CFLAGS)
|
||||||
|
AC_SUBST(LIBMCRYPT_LIBS)
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl *-*wedit:notab*-* Please keep this as the last line.
|
53
src/pplib/autoconf/libmicrohttpd.m4
Normal file
53
src/pplib/autoconf/libmicrohttpd.m4
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
dnl AM_LIBMICROHTTPD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
AC_DEFUN([AM_LIBMICROHTTPD],[dnl
|
||||||
|
AC_MSG_CHECKING([for libmicrohttpd library and headers])
|
||||||
|
AC_ARG_WITH([libmicrohttpd],
|
||||||
|
[ --with-libmicrohttpd[[=PATH]] Prefix where libmicrohttpd is installed (optional)],
|
||||||
|
[libmicrohttpd_prefix="$withval"],
|
||||||
|
[libmicrohttpd_prefix="no"])
|
||||||
|
|
||||||
|
|
||||||
|
if test "$libmicrohttpd_prefix" != "no"
|
||||||
|
then
|
||||||
|
am_save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
am_save_LIBS="$LIBS"
|
||||||
|
am_save_LDFLAGS="$LDFLAGS"
|
||||||
|
LIBS="$LIBS -lmicrohttpd"
|
||||||
|
LIBMICROHTTPD_LIBS="-lmicrohttpd"
|
||||||
|
LIBMICROHTTPD_CFLAGS=""
|
||||||
|
|
||||||
|
if test "$libmicrohttpd_prefix" != "yes"
|
||||||
|
then
|
||||||
|
LIBS="-L$libmicrohttpd_prefix/lib -lmicrohttpd"
|
||||||
|
CPPFLAGS="-I$libmicrohttpd_prefix/include"
|
||||||
|
LIBMICROHTTPD_LIBS="-L$libmicrohttpd_prefix/lib -lmicrohttpd"
|
||||||
|
LIBMICROHTTPD_CFLAGS="-I$libmicrohttpd_prefix/include"
|
||||||
|
fi
|
||||||
|
AC_LINK_IFELSE( [AC_LANG_SOURCE([[
|
||||||
|
#include <microhttpd.h>
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
struct MHD_Daemon* daemon;
|
||||||
|
MHD_stop_daemon(daemon);
|
||||||
|
}
|
||||||
|
]]) ],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
|
||||||
|
],
|
||||||
|
[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
CPPFLAGS=$am_save_CPPFLAGS
|
||||||
|
LIBS=$am_save_LIBS
|
||||||
|
LDFLAGS=$am_save_LDFLAGS
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
])
|
59
src/pplib/autoconf/libtiff.m4
Normal file
59
src/pplib/autoconf/libtiff.m4
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
dnl AC_CHECK_LIBTIFF([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
AC_DEFUN([AC_CHECK_LIBTIFF],[
|
||||||
|
AC_MSG_CHECKING(for libtiff)
|
||||||
|
|
||||||
|
AC_ARG_WITH([libtiff],
|
||||||
|
[ --with-libtiff[[=PATH]] Prefix where libtiff is installed (optional)],
|
||||||
|
[libtiff_prefix="$withval"],
|
||||||
|
[libtiff_prefix="no"])
|
||||||
|
|
||||||
|
if test "$libtiff_prefix" != "no"
|
||||||
|
then
|
||||||
|
if test "$libtiff_prefix" != "yes"
|
||||||
|
then
|
||||||
|
intLIBTIFF_LIBS="-L $libtiff_prefix/lib -ltiff"
|
||||||
|
intLIBTIFF_CFLAGS="-I $libtiff_prefix/include"
|
||||||
|
else
|
||||||
|
intLIBTIFF_LIBS="-ltiff"
|
||||||
|
intLIBTIFF_CFLAGS=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
am_save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
am_save_LIBS="$LIBS"
|
||||||
|
am_save_LDFLAGS="$LDFLAGS"
|
||||||
|
am_save_CFLAGS="$CFLAGS"
|
||||||
|
|
||||||
|
AC_CHECK_LIB(lzma,lzma_code,
|
||||||
|
intLIBTIFF_LIBS="$intLIBTIFF_LIBS -llzma"
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
,
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
)
|
||||||
|
|
||||||
|
LIBS="$LIBS $intLIBTIFF_LIBS $JPEG_LIBS -lz"
|
||||||
|
CFLAGS="$CFLAGS $intLIBTIFF_CFLAGS $JPEG_CFLAGS"
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS([tiffio.h],
|
||||||
|
AC_CHECK_LIB(tiff,TIFFClientOpen,
|
||||||
|
TIFF_LIBS=$intLIBTIFF_LIBS
|
||||||
|
TIFF_CFLAGS=$intLIBTIFF_CFLAGS
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
,
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
:)
|
||||||
|
,
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
)
|
||||||
|
CPPFLAGS="$am_save_CPPFLAGS"
|
||||||
|
LIBS="$am_save_LIBS"
|
||||||
|
LDFLAGS="$am_save_LDFLAGS"
|
||||||
|
CFLAGS="$am_save_CFLAGS"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
215
src/pplib/autoconf/missing
Executable file
215
src/pplib/autoconf/missing
Executable file
|
@ -0,0 +1,215 @@
|
||||||
|
#! /bin/sh
|
||||||
|
# Common wrapper for a few potentially missing GNU programs.
|
||||||
|
|
||||||
|
scriptversion=2012-06-26.16; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||||
|
# Originally written 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
|
||||||
|
--is-lightweight)
|
||||||
|
# Used by our autoconf macros to check whether the available missing
|
||||||
|
# script is modern enough.
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
|
||||||
|
--run)
|
||||||
|
# Back-compat with the calling convention used by older automake.
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
|
||||||
|
-h|--h|--he|--hel|--help)
|
||||||
|
echo "\
|
||||||
|
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||||
|
|
||||||
|
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||||
|
to PROGRAM being missing or too old.
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help display this help and exit
|
||||||
|
-v, --version output version information and exit
|
||||||
|
|
||||||
|
Supported PROGRAM values:
|
||||||
|
aclocal autoconf autoheader autom4te automake makeinfo
|
||||||
|
bison yacc flex lex help2man
|
||||||
|
|
||||||
|
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||||
|
'g' are ignored when checking the name.
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
# Run the given program, remember its exit status.
|
||||||
|
"$@"; st=$?
|
||||||
|
|
||||||
|
# If it succeeded, we are done.
|
||||||
|
test $st -eq 0 && exit 0
|
||||||
|
|
||||||
|
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||||
|
# passed; such an option is passed most likely to detect whether the
|
||||||
|
# program is present and works.
|
||||||
|
case $2 in --version|--help) exit $st;; esac
|
||||||
|
|
||||||
|
# Exit code 63 means version mismatch. This often happens when the user
|
||||||
|
# tries to use an ancient version of a tool on a file that requires a
|
||||||
|
# minimum version.
|
||||||
|
if test $st -eq 63; then
|
||||||
|
msg="probably too old"
|
||||||
|
elif test $st -eq 127; then
|
||||||
|
# Program was missing.
|
||||||
|
msg="missing on your system"
|
||||||
|
else
|
||||||
|
# Program was found and executed, but failed. Give up.
|
||||||
|
exit $st
|
||||||
|
fi
|
||||||
|
|
||||||
|
perl_URL=http://www.perl.org/
|
||||||
|
flex_URL=http://flex.sourceforge.net/
|
||||||
|
gnu_software_URL=http://www.gnu.org/software
|
||||||
|
|
||||||
|
program_details ()
|
||||||
|
{
|
||||||
|
case $1 in
|
||||||
|
aclocal|automake)
|
||||||
|
echo "The '$1' program is part of the GNU Automake package:"
|
||||||
|
echo "<$gnu_software_URL/automake>"
|
||||||
|
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||||
|
echo "<$gnu_software_URL/autoconf>"
|
||||||
|
echo "<$gnu_software_URL/m4/>"
|
||||||
|
echo "<$perl_URL>"
|
||||||
|
;;
|
||||||
|
autoconf|autom4te|autoheader)
|
||||||
|
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||||
|
echo "<$gnu_software_URL/autoconf/>"
|
||||||
|
echo "It also requires GNU m4 and Perl in order to run:"
|
||||||
|
echo "<$gnu_software_URL/m4/>"
|
||||||
|
echo "<$perl_URL>"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
give_advice ()
|
||||||
|
{
|
||||||
|
# Normalize program name to check for.
|
||||||
|
normalized_program=`echo "$1" | sed '
|
||||||
|
s/^gnu-//; t
|
||||||
|
s/^gnu//; t
|
||||||
|
s/^g//; t'`
|
||||||
|
|
||||||
|
printf '%s\n' "'$1' is $msg."
|
||||||
|
|
||||||
|
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||||
|
case $normalized_program in
|
||||||
|
autoconf*)
|
||||||
|
echo "You should only need it if you modified 'configure.ac',"
|
||||||
|
echo "or m4 files included by it."
|
||||||
|
program_details 'autoconf'
|
||||||
|
;;
|
||||||
|
autoheader*)
|
||||||
|
echo "You should only need it if you modified 'acconfig.h' or"
|
||||||
|
echo "$configure_deps."
|
||||||
|
program_details 'autoheader'
|
||||||
|
;;
|
||||||
|
automake*)
|
||||||
|
echo "You should only need it if you modified 'Makefile.am' or"
|
||||||
|
echo "$configure_deps."
|
||||||
|
program_details 'automake'
|
||||||
|
;;
|
||||||
|
aclocal*)
|
||||||
|
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||||
|
echo "$configure_deps."
|
||||||
|
program_details 'aclocal'
|
||||||
|
;;
|
||||||
|
autom4te*)
|
||||||
|
echo "You might have modified some maintainer files that require"
|
||||||
|
echo "the 'automa4te' program to be rebuilt."
|
||||||
|
program_details 'autom4te'
|
||||||
|
;;
|
||||||
|
bison*|yacc*)
|
||||||
|
echo "You should only need it if you modified a '.y' file."
|
||||||
|
echo "You may want to install the GNU Bison package:"
|
||||||
|
echo "<$gnu_software_URL/bison/>"
|
||||||
|
;;
|
||||||
|
lex*|flex*)
|
||||||
|
echo "You should only need it if you modified a '.l' file."
|
||||||
|
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||||
|
echo "<$flex_URL>"
|
||||||
|
;;
|
||||||
|
help2man*)
|
||||||
|
echo "You should only need it if you modified a dependency" \
|
||||||
|
"of a man page."
|
||||||
|
echo "You may want to install the GNU Help2man package:"
|
||||||
|
echo "<$gnu_software_URL/help2man/>"
|
||||||
|
;;
|
||||||
|
makeinfo*)
|
||||||
|
echo "You should only need it if you modified a '.texi' file, or"
|
||||||
|
echo "any other file indirectly affecting the aspect of the manual."
|
||||||
|
echo "You might want to install the Texinfo package:"
|
||||||
|
echo "<$gnu_software_URL/texinfo/>"
|
||||||
|
echo "The spurious makeinfo call might also be the consequence of"
|
||||||
|
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||||
|
echo "want to install GNU make:"
|
||||||
|
echo "<$gnu_software_URL/make/>"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "You might have modified some files without having the proper"
|
||||||
|
echo "tools for further handling them. Check the 'README' file, it"
|
||||||
|
echo "often tells you about the needed prerequisites for installing"
|
||||||
|
echo "this package. You may also peek at any GNU archive site, in"
|
||||||
|
echo "case some other package contains this missing '$1' program."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||||
|
-e '2,$s/^/ /' >&2
|
||||||
|
|
||||||
|
# Propagate the correct exit status (expected to be 127 for a program
|
||||||
|
# not found, 63 for a program that failed due to version mismatch).
|
||||||
|
exit $st
|
||||||
|
|
||||||
|
# Local variables:
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
49
src/pplib/autoconf/mpg123.m4
Normal file
49
src/pplib/autoconf/mpg123.m4
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
dnl AC_CHECK_LIBJPEG([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
AC_DEFUN([AC_CHECK_LIBMPG123],[
|
||||||
|
|
||||||
|
AC_ARG_WITH([mpg123],
|
||||||
|
[ --with-mpg123[[=PATH]] Prefix where libmpg123 is installed (optional)],
|
||||||
|
[mpg123_prefix="$withval"],
|
||||||
|
[mpg123_prefix="no"])
|
||||||
|
|
||||||
|
if test "$mpg123_prefix" != "no"
|
||||||
|
then
|
||||||
|
if test "$mpg123_prefix" != "yes"
|
||||||
|
then
|
||||||
|
intMPG123_LIBS="-L $mpg123_prefix/lib -lmpg123"
|
||||||
|
intMPG123_CFLAGS="-I $mpg123_prefix/include"
|
||||||
|
else
|
||||||
|
intMPG123_LIBS="-lmpg123"
|
||||||
|
intMPG123_CFLAGS=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
am_save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
am_save_LIBS="$LIBS"
|
||||||
|
am_save_LDFLAGS="$LDFLAGS"
|
||||||
|
am_save_CFLAGS="$CFLAGS"
|
||||||
|
|
||||||
|
LIBS="$LIBS $intMPG123_LIBS"
|
||||||
|
CFLAGS="$CFLAGS $intMPG123_CFLAGS"
|
||||||
|
AC_CHECK_HEADERS([mpg123.h],
|
||||||
|
|
||||||
|
AC_CHECK_LIB(mpg123,mpg123_init,
|
||||||
|
MPG123_LIBS=$intMPG123_LIBS
|
||||||
|
MPG123_CFLAGS=$intMPG123_CFLAGS
|
||||||
|
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
,
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
:)
|
||||||
|
,
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
)
|
||||||
|
CPPFLAGS="$am_save_CPPFLAGS"
|
||||||
|
LIBS="$am_save_LIBS"
|
||||||
|
LDFLAGS="$am_save_LDFLAGS"
|
||||||
|
CFLAGS="$am_save_CFLAGS"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
61
src/pplib/autoconf/nasm.m4
Normal file
61
src/pplib/autoconf/nasm.m4
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
dnl AC_CHECK_NASM([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
|
||||||
|
AC_DEFUN([AC_CHECK_NASM],[
|
||||||
|
|
||||||
|
AC_ARG_WITH([nasm],
|
||||||
|
[ --with-nasm[[=PATH]] Prefix where nasm is installed (optional)],
|
||||||
|
[nasm_prefix="$withval"],
|
||||||
|
[nasm_prefix="yes"])
|
||||||
|
|
||||||
|
if test "$nasm_prefix" != "no"
|
||||||
|
then
|
||||||
|
save_path=$PATH
|
||||||
|
if test -n "$nasm_prefix"
|
||||||
|
then
|
||||||
|
if test "$nasm_prefix" != "yes"
|
||||||
|
then
|
||||||
|
PATH=$nasm_prefix
|
||||||
|
export PATH
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AC_PATH_PROG(nasm,nasm)
|
||||||
|
PATH=$save_path
|
||||||
|
|
||||||
|
echo "nasm=$nasm"
|
||||||
|
if test -n "$nasm" -a -x "$nasm"
|
||||||
|
then
|
||||||
|
NASM=${nasm}
|
||||||
|
AC_SUBST(NASM)
|
||||||
|
NASMDEBUGFLAGS="-g"
|
||||||
|
case `uname -m`-`uname -s` in
|
||||||
|
win32*)
|
||||||
|
NASMFLAGS="-f win32"
|
||||||
|
;;
|
||||||
|
win64*|x86_64-MSYS*)
|
||||||
|
NASMFLAGS="-f win64"
|
||||||
|
;;
|
||||||
|
x86_64*|amd64*)
|
||||||
|
NASMFLAGS="-f elf64"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
NASMFLAGS="-f elf32"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case `uname -s` in
|
||||||
|
MINGW32*)
|
||||||
|
NASMFLAGS="-f win32"
|
||||||
|
NASMDEBUGFLAGS="-g"
|
||||||
|
;;
|
||||||
|
MINGW64*)
|
||||||
|
NASMFLAGS="-f win64"
|
||||||
|
NASMDEBUGFLAGS="-g"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AC_SUBST(NASMFLAGS)
|
||||||
|
AC_SUBST(NASMDEBUGFLAGS)
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
116
src/pplib/autoconf/ogg.m4
Normal file
116
src/pplib/autoconf/ogg.m4
Normal file
|
@ -0,0 +1,116 @@
|
||||||
|
# Configure paths for libogg
|
||||||
|
# Jack Moffitt <jack@icecast.org> 10-21-2000
|
||||||
|
# Shamelessly stolen from Owen Taylor and Manish Singh
|
||||||
|
|
||||||
|
dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||||
|
dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
|
||||||
|
dnl
|
||||||
|
AC_DEFUN([XIPH_PATH_OGG],
|
||||||
|
[dnl
|
||||||
|
dnl Get the cflags and libraries
|
||||||
|
dnl
|
||||||
|
AC_ARG_WITH(ogg,AC_HELP_STRING([--with-ogg=PFX],[Prefix where libogg is installed (optional)]), ogg_prefix="$withval", ogg_prefix="")
|
||||||
|
AC_ARG_WITH(ogg-libraries,AC_HELP_STRING([--with-ogg-libraries=DIR],[Directory where libogg library is installed (optional)]), ogg_libraries="$withval", ogg_libraries="")
|
||||||
|
AC_ARG_WITH(ogg-includes,AC_HELP_STRING([--with-ogg-includes=DIR],[Directory where libogg header files are installed (optional)]), ogg_includes="$withval", ogg_includes="")
|
||||||
|
AC_ARG_ENABLE(oggtest,AC_HELP_STRING([--disable-oggtest],[Do not try to compile and run a test Ogg program]),, enable_oggtest=yes)
|
||||||
|
|
||||||
|
if test "x$ogg_libraries" != "x" ; then
|
||||||
|
OGG_LIBS="-L$ogg_libraries"
|
||||||
|
elif test "x$ogg_prefix" = "xno" || test "x$ogg_prefix" = "xyes" ; then
|
||||||
|
OGG_LIBS=""
|
||||||
|
elif test "x$ogg_prefix" != "x" ; then
|
||||||
|
OGG_LIBS="-L$ogg_prefix/lib"
|
||||||
|
elif test "x$prefix" != "xNONE" ; then
|
||||||
|
OGG_LIBS="-L$prefix/lib"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$ogg_prefix" != "xno" ; then
|
||||||
|
OGG_LIBS="$OGG_LIBS -logg"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$ogg_includes" != "x" ; then
|
||||||
|
OGG_CFLAGS="-I$ogg_includes"
|
||||||
|
elif test "x$ogg_prefix" = "xno" || test "x$ogg_prefix" = "xyes" ; then
|
||||||
|
OGG_CFLAGS=""
|
||||||
|
elif test "x$ogg_prefix" != "x" ; then
|
||||||
|
OGG_CFLAGS="-I$ogg_prefix/include"
|
||||||
|
elif test "x$prefix" != "xNONE"; then
|
||||||
|
OGG_CFLAGS="-I$prefix/include"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for Ogg)
|
||||||
|
if test "x$ogg_prefix" = "xno" ; then
|
||||||
|
no_ogg="disabled"
|
||||||
|
enable_oggtest="no"
|
||||||
|
else
|
||||||
|
no_ogg=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if test "x$enable_oggtest" = "xyes" ; then
|
||||||
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
|
ac_save_LIBS="$LIBS"
|
||||||
|
CFLAGS="$CFLAGS $OGG_CFLAGS"
|
||||||
|
LIBS="$LIBS $OGG_LIBS"
|
||||||
|
dnl
|
||||||
|
dnl Now check if the installed Ogg is sufficiently new.
|
||||||
|
dnl
|
||||||
|
rm -f conf.oggtest
|
||||||
|
AC_TRY_RUN([
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <ogg/ogg.h>
|
||||||
|
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
system("touch conf.oggtest");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$no_ogg" = "xdisabled" ; then
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
elif test "x$no_ogg" = "x" ; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
ifelse([$1], , :, [$1])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
if test -f conf.oggtest ; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "*** Could not run Ogg test program, checking why..."
|
||||||
|
CFLAGS="$CFLAGS $OGG_CFLAGS"
|
||||||
|
LIBS="$LIBS $OGG_LIBS"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <ogg/ogg.h>
|
||||||
|
], [ return 0; ],
|
||||||
|
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||||
|
echo "*** that the run-time linker is not finding Ogg or finding the wrong"
|
||||||
|
echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
|
||||||
|
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||||
|
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||||
|
echo "*** is required on your system"
|
||||||
|
echo "***"
|
||||||
|
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||||
|
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
|
||||||
|
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||||
|
echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
|
||||||
|
echo "*** or that you have moved Ogg since it was installed." ])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
OGG_CFLAGS=""
|
||||||
|
OGG_LIBS=""
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
fi
|
||||||
|
AC_SUBST(OGG_CFLAGS)
|
||||||
|
AC_SUBST(OGG_LIBS)
|
||||||
|
rm -f conf.oggtest
|
||||||
|
])
|
81
src/pplib/autoconf/png.m4
Normal file
81
src/pplib/autoconf/png.m4
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
dnl AC_CHECK_LIBPNG([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
|
||||||
|
AC_DEFUN([AC_CHECK_LIBPNG],[
|
||||||
|
AC_MSG_CHECKING(if we should use libpng)
|
||||||
|
|
||||||
|
AC_ARG_WITH([libpng],
|
||||||
|
[ --with-libpng[[=PATH]] Prefix where libpng is installed (optional)],
|
||||||
|
[libpng_prefix="$withval"],
|
||||||
|
[libpng_prefix="auto"])
|
||||||
|
|
||||||
|
if test "$libpng_prefix" != "no"
|
||||||
|
then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
am_save_CFLAGS="$CFLAGS"
|
||||||
|
am_save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
am_save_LIBS="$LIBS"
|
||||||
|
am_save_LDFLAGS="$LDFLAGS"
|
||||||
|
if test "$libpng_prefix" = "yes" -o "$libpng_prefix" = "auto"
|
||||||
|
then
|
||||||
|
AC_PATH_PROG(libpngconfig,libpng-config)
|
||||||
|
PKG_CHECK_MODULES([PNG], [libpng],
|
||||||
|
have_libpng="yes"
|
||||||
|
LIBS="$PNG_LIBS"
|
||||||
|
CFLAGS="$PNG_CFLAGS"
|
||||||
|
CPPFLAGS="$PNG_CFLAGS"
|
||||||
|
,
|
||||||
|
have_libpng="no"
|
||||||
|
PNG_LIBS="-lpng -lz -lm"
|
||||||
|
|
||||||
|
|
||||||
|
if test [ -x "$libpngconfig" ]
|
||||||
|
then
|
||||||
|
have_libpng="yes"
|
||||||
|
PNG_LIBS=`$libpngconfig --ldflags`
|
||||||
|
PNG_LIBS="$PNG_LIBS -lz -lm"
|
||||||
|
PNG_CFLAGS=`$libpngconfig --cflags`
|
||||||
|
LIBS="$PNG_LIBS"
|
||||||
|
CFLAGS="$PNG_CFLAGS"
|
||||||
|
CPPFLAGS="$PNG_CFLAGS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
)
|
||||||
|
else
|
||||||
|
LIBS="-L$libpng_prefix/lib"
|
||||||
|
CFLAGS="-I$libpng_prefix/include"
|
||||||
|
CPPFLAGS="-I$libpng_prefix/include"
|
||||||
|
LDFLAGS="-L$libpng_prefix/lib"
|
||||||
|
PNG_LIBS="-L$libpng_prefix/lib -lpng -lz -lm"
|
||||||
|
PNG_CFLAGS="-I$libpng_prefix/include"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_CHECK_LIB(png,png_sig_cmp,
|
||||||
|
have_libpng="yes"
|
||||||
|
,
|
||||||
|
,
|
||||||
|
-lz -lm
|
||||||
|
)
|
||||||
|
AC_CHECK_HEADERS([png.h],,have_libpng="no")
|
||||||
|
|
||||||
|
LIBS="$am_save_LIBS"
|
||||||
|
LDFLAGS="$am_save_LDFLAGS"
|
||||||
|
CFLAGS="$am_save_CFLAGS"
|
||||||
|
CPPFLAGS="$am_save_CPPFLAGS"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
if test $have_libpng = "yes"
|
||||||
|
then
|
||||||
|
dnl echo "PNG_LIBS=$PNG_LIBS"
|
||||||
|
dnl echo "PNG_CFLAGS=$PNG_CFLAGS"
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
else
|
||||||
|
PNG_LIBS=""
|
||||||
|
PNG_CFLAGS=""
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
238
src/pplib/autoconf/sdl2.m4
Normal file
238
src/pplib/autoconf/sdl2.m4
Normal file
|
@ -0,0 +1,238 @@
|
||||||
|
# Configure paths for SDL
|
||||||
|
# Sam Lantinga 9/21/99
|
||||||
|
# stolen from Manish Singh
|
||||||
|
# stolen back from Frank Belew
|
||||||
|
# stolen from Manish Singh
|
||||||
|
# Shamelessly stolen from Owen Taylor
|
||||||
|
#
|
||||||
|
# Changelog:
|
||||||
|
# * also look for SDL2.framework under Mac OS X
|
||||||
|
|
||||||
|
# serial 1
|
||||||
|
|
||||||
|
dnl AM_PATH_SDL2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
dnl Test for SDL, and define SDL2_CFLAGS and SDL2_LIBS
|
||||||
|
dnl
|
||||||
|
AC_DEFUN([AM_PATH_SDL2],
|
||||||
|
[dnl
|
||||||
|
dnl Get the cflags and libraries from the sdl2-config script
|
||||||
|
dnl
|
||||||
|
AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
|
||||||
|
sdl_prefix="$withval", sdl_prefix="")
|
||||||
|
AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
|
||||||
|
sdl_exec_prefix="$withval", sdl_exec_prefix="")
|
||||||
|
AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
|
||||||
|
, enable_sdltest=yes)
|
||||||
|
AC_ARG_ENABLE(sdlframework, [ --disable-sdlframework Do not search for SDL2.framework],
|
||||||
|
, search_sdl_framework=yes)
|
||||||
|
|
||||||
|
AC_ARG_VAR(SDL2_FRAMEWORK, [Path to SDL2.framework])
|
||||||
|
|
||||||
|
min_sdl_version=ifelse([$1], ,2.0.0,$1)
|
||||||
|
|
||||||
|
if test "x$sdl_prefix$sdl_exec_prefix" = x ; then
|
||||||
|
PKG_CHECK_MODULES([SDL2], [sdl2 >= $min_sdl_version],
|
||||||
|
[sdl_pc=yes],
|
||||||
|
[sdl_pc=no])
|
||||||
|
else
|
||||||
|
sdl_pc=no
|
||||||
|
if test x$sdl_exec_prefix != x ; then
|
||||||
|
sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix"
|
||||||
|
if test x${SDL2_CONFIG+set} != xset ; then
|
||||||
|
SDL2_CONFIG=$sdl_exec_prefix/bin/sdl2-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test x$sdl_prefix != x ; then
|
||||||
|
sdl_config_args="$sdl_config_args --prefix=$sdl_prefix"
|
||||||
|
if test x${SDL2_CONFIG+set} != xset ; then
|
||||||
|
SDL2_CONFIG=$sdl_prefix/bin/sdl2-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$sdl_pc" = xyes ; then
|
||||||
|
no_sdl=""
|
||||||
|
SDL2_CONFIG="pkg-config sdl2"
|
||||||
|
else
|
||||||
|
as_save_PATH="$PATH"
|
||||||
|
if test "x$prefix" != xNONE && test "$cross_compiling" != yes; then
|
||||||
|
PATH="$prefix/bin:$prefix/usr/bin:$PATH"
|
||||||
|
fi
|
||||||
|
AC_PATH_PROG(SDL2_CONFIG, sdl2-config, no, [$PATH])
|
||||||
|
PATH="$as_save_PATH"
|
||||||
|
no_sdl=""
|
||||||
|
|
||||||
|
if test "$SDL2_CONFIG" = "no" -a "x$search_sdl_framework" = "xyes"; then
|
||||||
|
AC_MSG_CHECKING(for SDL2.framework)
|
||||||
|
if test "x$SDL2_FRAMEWORK" != x; then
|
||||||
|
sdl_framework=$SDL2_FRAMEWORK
|
||||||
|
else
|
||||||
|
for d in / ~/ /System/; do
|
||||||
|
if test -d "$dLibrary/Frameworks/SDL2.framework"; then
|
||||||
|
sdl_framework="$dLibrary/Frameworks/SDL2.framework"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -d $sdl_framework; then
|
||||||
|
AC_MSG_RESULT($sdl_framework)
|
||||||
|
sdl_framework_dir=`dirname $sdl_framework`
|
||||||
|
SDL2_CFLAGS="-F$sdl_framework_dir -Wl,-framework,SDL2 -I$sdl_framework/include"
|
||||||
|
SDL2_LIBS="-F$sdl_framework_dir -Wl,-framework,SDL2"
|
||||||
|
else
|
||||||
|
no_sdl=yes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$SDL2_CONFIG" != "no"; then
|
||||||
|
if test "x$sdl_pc" = "xno"; then
|
||||||
|
AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
|
||||||
|
SDL2_CFLAGS=`$SDL2_CONFIG $sdl_config_args --cflags`
|
||||||
|
SDL2_LIBS=`$SDL2_CONFIG $sdl_config_args --libs`
|
||||||
|
fi
|
||||||
|
|
||||||
|
sdl_major_version=`$SDL2_CONFIG $sdl_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||||
|
sdl_minor_version=`$SDL2_CONFIG $sdl_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||||
|
sdl_micro_version=`$SDL2_CONFIG $sdl_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||||
|
if test "x$enable_sdltest" = "xyes" ; then
|
||||||
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
|
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||||
|
ac_save_LIBS="$LIBS"
|
||||||
|
CFLAGS="$CFLAGS $SDL2_CFLAGS"
|
||||||
|
CXXFLAGS="$CXXFLAGS $SDL2_CFLAGS"
|
||||||
|
LIBS="$LIBS $SDL2_LIBS"
|
||||||
|
dnl
|
||||||
|
dnl Now check if the installed SDL is sufficiently new. (Also sanity
|
||||||
|
dnl checks the results of sdl2-config to some extent
|
||||||
|
dnl
|
||||||
|
rm -f conf.sdltest
|
||||||
|
AC_TRY_RUN([
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include "SDL.h"
|
||||||
|
|
||||||
|
char*
|
||||||
|
my_strdup (char *str)
|
||||||
|
{
|
||||||
|
char *new_str;
|
||||||
|
|
||||||
|
if (str)
|
||||||
|
{
|
||||||
|
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
|
||||||
|
strcpy (new_str, str);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
new_str = NULL;
|
||||||
|
|
||||||
|
return new_str;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main (int argc, char *argv[])
|
||||||
|
{
|
||||||
|
int major, minor, micro;
|
||||||
|
char *tmp_version;
|
||||||
|
|
||||||
|
/* This hangs on some systems (?)
|
||||||
|
system ("touch conf.sdltest");
|
||||||
|
*/
|
||||||
|
{ FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
|
||||||
|
|
||||||
|
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||||
|
tmp_version = my_strdup("$min_sdl_version");
|
||||||
|
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||||
|
printf("%s, bad version string\n", "$min_sdl_version");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($sdl_major_version > major) ||
|
||||||
|
(($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
|
||||||
|
(($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("\n*** 'sdl2-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
|
||||||
|
printf("*** of SDL required is %d.%d.%d. If sdl2-config is correct, then it is\n", major, minor, micro);
|
||||||
|
printf("*** best to upgrade to the required version.\n");
|
||||||
|
printf("*** If sdl2-config was wrong, set the environment variable SDL2_CONFIG\n");
|
||||||
|
printf("*** to point to the correct copy of sdl2-config, and remove the file\n");
|
||||||
|
printf("*** config.cache before re-running configure\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
|
||||||
|
fi
|
||||||
|
if test "x$sdl_pc" = "xno"; then
|
||||||
|
if test "x$no_sdl" = "xyes"; then
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "$SDL2_CONFIG" = "no"; then
|
||||||
|
no_sdl="yes"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$no_sdl" = x ; then
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
else
|
||||||
|
if test "$SDL2_CONFIG" = "no" ; then
|
||||||
|
echo "*** The sdl2-config script installed by SDL could not be found"
|
||||||
|
echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
|
||||||
|
echo "*** your path, or set the SDL2_CONFIG environment variable to the"
|
||||||
|
echo "*** full path to sdl2-config."
|
||||||
|
else
|
||||||
|
if test -f conf.sdltest ; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "*** Could not run SDL test program, checking why..."
|
||||||
|
CFLAGS="$CFLAGS $SDL2_CFLAGS"
|
||||||
|
CXXFLAGS="$CXXFLAGS $SDL2_CFLAGS"
|
||||||
|
LIBS="$LIBS $SDL2_LIBS"
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "SDL.h"
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{ return 0; }
|
||||||
|
#undef main
|
||||||
|
#define main K_and_R_C_main
|
||||||
|
], [ return 0; ],
|
||||||
|
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||||
|
echo "*** that the run-time linker is not finding SDL or finding the wrong"
|
||||||
|
echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
|
||||||
|
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||||
|
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||||
|
echo "*** is required on your system"
|
||||||
|
echo "***"
|
||||||
|
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||||
|
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
|
||||||
|
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||||
|
echo "*** exact error that occured. This usually means SDL was incorrectly installed"
|
||||||
|
echo "*** or that you have moved SDL since it was installed. In the latter case, you"
|
||||||
|
echo "*** may want to edit the sdl2-config script: $SDL2_CONFIG" ])
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
SDL2_CFLAGS=""
|
||||||
|
SDL2_LIBS=""
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
AC_SUBST(SDL2_CFLAGS)
|
||||||
|
AC_SUBST(SDL2_LIBS)
|
||||||
|
rm -f conf.sdltest
|
||||||
|
])
|
79
src/pplib/autoconf/shout.m4
Normal file
79
src/pplib/autoconf/shout.m4
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
dnl XIPH_PATH_SHOUT
|
||||||
|
dnl Jack Moffitt <jack@icecast.org> 08-06-2001
|
||||||
|
dnl Rewritten for libshout 2
|
||||||
|
dnl Brendan Cully <brendan@xiph.org> 20030612
|
||||||
|
dnl
|
||||||
|
dnl $Id$
|
||||||
|
|
||||||
|
# XIPH_PATH_SHOUT([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||||
|
# Test for libshout, and define SHOUT_CPPFLAGS SHOUT_CFLAGS SHOUT_LIBS, and
|
||||||
|
# SHOUT_THREADSAFE
|
||||||
|
AC_DEFUN([XIPH_PATH_SHOUT],
|
||||||
|
[dnl
|
||||||
|
xt_have_shout="no"
|
||||||
|
SHOUT_THREADSAFE="no"
|
||||||
|
SHOUT_CPPFLAGS=""
|
||||||
|
SHOUT_CFLAGS=""
|
||||||
|
SHOUT_LIBS=""
|
||||||
|
|
||||||
|
# NB: PKG_CHECK_MODULES exits if pkg-config is unavailable on the target
|
||||||
|
# system, so we can't use it.
|
||||||
|
|
||||||
|
# seed pkg-config with the default libshout location
|
||||||
|
PKG_CONFIG_PATH=${PKG_CONFIG_PATH:-/usr/local/lib/pkgconfig}
|
||||||
|
export PKG_CONFIG_PATH
|
||||||
|
|
||||||
|
# Step 1: Use pkg-config if available
|
||||||
|
AC_PATH_PROG([PKGCONFIG], [pkg-config], [no])
|
||||||
|
if test "$PKGCONFIG" != "no" && `$PKGCONFIG --exists shout`
|
||||||
|
then
|
||||||
|
SHOUT_CFLAGS=`$PKGCONFIG --variable=cflags_only shout`
|
||||||
|
SHOUT_CPPFLAGS=`$PKGCONFIG --variable=cppflags shout`
|
||||||
|
SHOUT_LIBS=`$PKGCONFIG --libs shout`
|
||||||
|
xt_have_shout="maybe"
|
||||||
|
else
|
||||||
|
if test "$PKGCONFIG" != "no"
|
||||||
|
then
|
||||||
|
AC_MSG_NOTICE([$PKGCONFIG couldn't find libshout. Try adjusting PKG_CONFIG_PATH.])
|
||||||
|
fi
|
||||||
|
# pkg-config unavailable, try shout-config
|
||||||
|
AC_PATH_PROG([SHOUTCONFIG], [shout-config], [no])
|
||||||
|
if test "$SHOUTCONFIG" != "no" && test `$SHOUTCONFIG --package` = "libshout"
|
||||||
|
then
|
||||||
|
SHOUT_CPPFLAGS=`$SHOUTCONFIG --cppflags`
|
||||||
|
SHOUT_CFLAGS=`$SHOUTCONFIG --cflags-only`
|
||||||
|
SHOUT_LIBS=`$SHOUTCONFIG --libs`
|
||||||
|
xt_have_shout="maybe"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Now try actually using libshout
|
||||||
|
if test "$xt_have_shout" != "no"
|
||||||
|
then
|
||||||
|
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
|
ac_save_LIBS="$LIBS"
|
||||||
|
CPPFLAGS="$CPPFLAGS $SHOUT_CPPFLAGS"
|
||||||
|
CFLAGS="$CFLAGS $SHOUT_CFLAGS"
|
||||||
|
LIBS="$SHOUT_LIBS $LIBS"
|
||||||
|
AC_CHECK_HEADERS([shout/shout.h], [
|
||||||
|
AC_CHECK_FUNC([shout_new], [
|
||||||
|
ifelse([$1], , :, [$1])
|
||||||
|
xt_have_shout="yes"
|
||||||
|
])
|
||||||
|
AC_EGREP_CPP([yes], [#include <shout/shout.h>
|
||||||
|
#if SHOUT_THREADSAFE
|
||||||
|
yes
|
||||||
|
#endif
|
||||||
|
], [SHOUT_THREADSAFE="yes"])
|
||||||
|
])
|
||||||
|
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||||
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$xt_have_shout" != "yes"
|
||||||
|
then
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
fi
|
||||||
|
])dnl XIPH_PATH_SHOUT
|
533
src/pplib/build_binary.sh
Executable file
533
src/pplib/build_binary.sh
Executable file
|
@ -0,0 +1,533 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
# This file is part of "Patrick's Programming Library", Version 7 (PPL7).
|
||||||
|
# Web: http://www.pfp.de/ppl/
|
||||||
|
#
|
||||||
|
# $Author$
|
||||||
|
# $Revision$
|
||||||
|
# $Date$
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Copyright (c) 2013, Patrick Fedick <patrick@pfp.de>
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# 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 above 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 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.
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
MYPWD=`pwd`
|
||||||
|
WORK=$MYPWD/tmp
|
||||||
|
ROOT=$MYPWD/tmp/build
|
||||||
|
VERSION="7.0.0"
|
||||||
|
NAME="PPLib"
|
||||||
|
HOMEPAGE="http://www.pfp.de/ppl"
|
||||||
|
MAINTAINER="Patrick Fedick <patrick@pfp.de>"
|
||||||
|
DESCRIPTION="C++ programming library"
|
||||||
|
COMMENT="C++ programming library"
|
||||||
|
DISTFILES=$MYPWD/distfiles
|
||||||
|
MAKE=make
|
||||||
|
|
||||||
|
if [ -f /etc/lsb-release ] ; then
|
||||||
|
. /etc/lsb-release
|
||||||
|
elif [ -f /etc/system-release ] ; then
|
||||||
|
DISTRIB_ID=`cat /etc/system-release | awk '{print $1}'`
|
||||||
|
DISTRIB_RELEASE=`cat /etc/system-release | awk '{print $3}'`
|
||||||
|
else
|
||||||
|
DISTRIB_ID=`uname -s`
|
||||||
|
DISTRIB_RELEASE=`uname -r`
|
||||||
|
|
||||||
|
case "$DISTRIB_ID:$DISTRIB_RELEASE" in
|
||||||
|
MINGW32*:1.0.11*)
|
||||||
|
DISTRIB_ID="MINGW32";
|
||||||
|
DISTRIB_RELEASE="1.0.11";
|
||||||
|
TESTGUI=TestGUI.exe
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Wir haben nun unter anderem:
|
||||||
|
# DISTRIB_ID=Ubuntu
|
||||||
|
# DISTRIB_RELEASE=9.10
|
||||||
|
|
||||||
|
echo "Baue $NAME $VERSION für: $DISTRIB_ID, $DISTRIB_RELEASE..."
|
||||||
|
echo ""
|
||||||
|
rm -rf tmp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
build_sources() {
|
||||||
|
mkdir -p tmp/build
|
||||||
|
if [ ! -d tmp/build ] ; then
|
||||||
|
echo "Could not create temporary directory tmp/build"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd tmp/build
|
||||||
|
#rm -rf *
|
||||||
|
mkdir -p include lib bin src
|
||||||
|
cd src
|
||||||
|
mkdir -p ppl6 libdenictest testgui
|
||||||
|
|
||||||
|
echo "Kopiere PPL6 in temporäres Build-Verzeichnis"
|
||||||
|
cd $PPL6SOURCE
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
echo "PPL6 not found in $PPL6SOURCE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
find *.m4 conf.sh configure Doxyfile *.TXT *.in *.ico VERSION autoconf config docs include resource src tools tests | cpio -pdmv $ROOT/src/ppl6
|
||||||
|
|
||||||
|
echo "Kopiere libdenictest in temporäres Build-Verzeichnis"
|
||||||
|
cd $LIBDENICTESTSOURCE
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
echo "libdenictest not found in $LIBDENICTESTSOURCEt"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
find autoconf docs include src *.m4 configure *.in Doxyfile HISTORY mingw.sh | cpio -pdmv $ROOT/src/libdenictest
|
||||||
|
|
||||||
|
|
||||||
|
echo "Kopiere testgui in temporäres Build-Verzeichnis"
|
||||||
|
cd $TESTGUISOURCE
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
echo "testgui not found in $TESTGUISOURCE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
find setup.iss forms help include resources src HISTORY *.rc *.qrc | cpio -pdmv $ROOT/src/testgui
|
||||||
|
cat TestGUI.pro | sed -e "s/--libs/--archive/" > $ROOT/src/testgui/TestGUI.pro
|
||||||
|
|
||||||
|
cd $ROOT
|
||||||
|
mkdir -p DENIC-ITStt-TestGUI-$VERSION-src-complete/build
|
||||||
|
cd DENIC-ITStt-TestGUI-$VERSION-src-complete/build
|
||||||
|
mkdir -p include lib bin src
|
||||||
|
cd $ROOT
|
||||||
|
|
||||||
|
cp $TESTGUISOURCE/build_binary.sh DENIC-ITStt-TestGUI-$VERSION-src-complete
|
||||||
|
|
||||||
|
mv src DENIC-ITStt-TestGUI-$VERSION-src-complete/build
|
||||||
|
tar -czf $MYPWD/distfiles/DENIC-ITStt-TestGUI-$VERSION-src-complete.tar.gz --exclude .svn DENIC-ITStt-TestGUI-$VERSION-src-complete
|
||||||
|
mv DENIC-ITStt-TestGUI-$VERSION-src-complete/build/src ./
|
||||||
|
rm -rf DENIC-ITStt-TestGUI-$VERSION-src-complete
|
||||||
|
cp $MYPWD/distfiles/DENIC-ITStt-TestGUI-$VERSION-src-complete.tar.gz $TARGETDIR
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
build_binary() {
|
||||||
|
|
||||||
|
case "$DISTRIB_ID:$DISTRIB_RELEASE" in
|
||||||
|
MINGW32*:1.0.11*)
|
||||||
|
MAKE=gmake
|
||||||
|
QMAKE=qmake
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
cd $ROOT/src/ppl6
|
||||||
|
|
||||||
|
if [ ! -f Makefile ]
|
||||||
|
then
|
||||||
|
echo "Konfiguriere PPL6 fuer $DISTRIB_ID:$DISTRIB_RELEASE..."
|
||||||
|
|
||||||
|
case "$DISTRIB_ID:$DISTRIB_RELEASE" in
|
||||||
|
FreeBSD:*)
|
||||||
|
export CPPFLAGS=-I/usr/local/include
|
||||||
|
export LDLAGS=-L/usr/local/lib
|
||||||
|
./configure --prefix=$ROOT \
|
||||||
|
--with-pcre=/usr/local --with-libiconv-prefix=/usr/local --with-nasm \
|
||||||
|
--with-libmcrypt-prefix=/usr/local --with-libiconv-prefix=/usr/local \
|
||||||
|
--without-pgsql --without-png --without-lame --without-ft-prefix \
|
||||||
|
--without-libmad --without-lame --without-x --without-mysql --without-sybase \
|
||||||
|
--without-libcurl --with-sdl-prefix=$ROOT
|
||||||
|
;;
|
||||||
|
Ubuntu:*)
|
||||||
|
./configure --prefix=$ROOT \
|
||||||
|
--with-pcre=/usr --with-libiconv-prefix --with-nasm \
|
||||||
|
--with-libmcrypt-prefix=/usr \
|
||||||
|
--without-pgsql --without-png --without-lame --without-ft-prefix \
|
||||||
|
--without-libmad --without-lame --without-x --without-mysql --without-sybase \
|
||||||
|
--without-libcurl --with-sdl-prefix=$ROOT
|
||||||
|
;;
|
||||||
|
Fedora:*)
|
||||||
|
./configure --prefix=$ROOT \
|
||||||
|
--with-pcre=/usr --with-libiconv-prefix --with-nasm \
|
||||||
|
--with-libmcrypt-prefix=/usr \
|
||||||
|
--without-pgsql --without-png --without-lame --without-ft-prefix \
|
||||||
|
--without-libmad --without-lame --without-x --without-mysql --without-sybase \
|
||||||
|
--without-libcurl --with-sdl-prefix=$ROOT
|
||||||
|
;;
|
||||||
|
MINGW32*:1.0.11*)
|
||||||
|
export CPPFLAGS="-DCURL_STATICLIB -I/usr/local/include -I/sdk/WindowsSDK/include"
|
||||||
|
export LDLAGS="-DCURL_STATICLIB -L/usr/local/lib -L/sdk/WindowsSDK/lib"
|
||||||
|
export CFLAGS="-DCURL_STATICLIB"
|
||||||
|
./configure --prefix=$ROOT \
|
||||||
|
--with-pcre=/usr/local --with-bzip2=/usr/local --with-zlib=/usr/local \
|
||||||
|
--with-nasm --with-libiconv-prefix=/usr/local \
|
||||||
|
--without-pgsql --without-png --without-lame --without-ft-prefix \
|
||||||
|
--without-libmad --without-lame --without-x --without-mysql --without-sybase \
|
||||||
|
--without-libcurl --with-sdl-prefix=$ROOT \
|
||||||
|
--with-libmcrypt-prefix=/usr/local \
|
||||||
|
--with-openssl=/mingw --with-libcurl
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
./configure --prefix=$ROOT \
|
||||||
|
--with-pcre=/usr --with-libiconv-prefix --with-nasm \
|
||||||
|
--with-libmcrypt-prefix=/usr \
|
||||||
|
--without-pgsql --without-png --without-lame --without-ft-prefix \
|
||||||
|
--without-libmad --without-lame --without-x --without-mysql --without-sybase \
|
||||||
|
--without-libcurl --with-sdl-prefix=$ROOT
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
PATH=$ROOT/bin:$PATH
|
||||||
|
|
||||||
|
$MAKE release
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
$MAKE install
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echo -n "ppl6-config liegt in "
|
||||||
|
which ppl6-config
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cd $ROOT/src/libdenictest
|
||||||
|
|
||||||
|
if [ ! -f Makefile ]
|
||||||
|
then
|
||||||
|
echo "Konfiguriere libdenictest..."
|
||||||
|
case "$DISTRIB_ID:$DISTRIB_RELEASE" in
|
||||||
|
MINGW32*:1.0.11*)
|
||||||
|
./configure --prefix=$ROOT --with-xml-prefix=/usr/local --with-libppl6=$ROOT --with-dchk=/usr/local --with-libidn=/usr/local
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
./configure --prefix=$ROOT --with-libppl6=$ROOT
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
$MAKE release
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
$MAKE install
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "denictest-config liegt in "
|
||||||
|
which denictest-config
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cd $ROOT/src/testgui
|
||||||
|
|
||||||
|
echo "INCLUDEPATH += $ROOT/include" >> TestGUI.pro
|
||||||
|
echo "INCLUDEPATH += c:/MinGW/msys/1.0/$ROOT/include" >> TestGUI.pro
|
||||||
|
echo "LIBPATH += $ROOT/lib" >> TestGUI.pro
|
||||||
|
echo "LIBPATH += C:/MinGW/msys/1.0/$ROOT/lib" >> TestGUI.pro
|
||||||
|
$QMAKE
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
make release
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cp release/$TESTGUI $ROOT/bin
|
||||||
|
strip $ROOT/bin/$TESTGUI
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ubuntu_write_control() {
|
||||||
|
(
|
||||||
|
echo "Source: $NAME"
|
||||||
|
echo "Section: misc"
|
||||||
|
echo "Priority: optional"
|
||||||
|
echo "Maintainer: $MAINTAINER"
|
||||||
|
echo "Package: $NAME"
|
||||||
|
echo "Version: $VERSION"
|
||||||
|
echo "Homepage: $HOMEPAGE"
|
||||||
|
echo "Architecture: $PLATFORM"
|
||||||
|
echo "Depends: $DEPENDS"
|
||||||
|
echo "Installed-Size: 5500"
|
||||||
|
echo "Description: $DESCRIPTION"
|
||||||
|
echo " $COMMENT"
|
||||||
|
) > debian/control
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# UBUNTU-Paket bauen
|
||||||
|
#################################################################################
|
||||||
|
build_ubuntu() {
|
||||||
|
echo "Baue Ubuntu-Paket für $DISTRIB_CODENAME"
|
||||||
|
DISTNAME="$NAME-$VERSION";
|
||||||
|
cd $WORK
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
echo "Konnte nicht nach $WORK wechseln"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
rm -rf debian
|
||||||
|
mkdir -p debian
|
||||||
|
cd debian
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
echo "Konnte nicht nach $WORK/debian wechseln"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
mkdir -p DEBIAN usr/bin usr/share/applications usr/share/pixmaps
|
||||||
|
cp $ROOT/bin/TestGUI usr/bin
|
||||||
|
cp $ROOT/src/testgui/resources/icon64.png usr/share/pixmaps/DENICTestGUI.png
|
||||||
|
|
||||||
|
cd $WORK
|
||||||
|
DEPENDS=""
|
||||||
|
ubuntu_write_control
|
||||||
|
(
|
||||||
|
echo "[Desktop Entry]"
|
||||||
|
echo "Encoding=UTF-8"
|
||||||
|
echo "Name=$NAME"
|
||||||
|
echo "Comment=$COMMENT"
|
||||||
|
echo "Exec=TestGUI"
|
||||||
|
echo "Terminal=false"
|
||||||
|
echo "Type=Application"
|
||||||
|
echo "Categories=Office;"
|
||||||
|
echo "Icon=/usr/share/pixmaps/DENICTestGUI.png"
|
||||||
|
) > debian/usr/share/applications/$NAME.desktop
|
||||||
|
(
|
||||||
|
echo "testgui ($VERSION) unstable; urgency=low"
|
||||||
|
echo ""
|
||||||
|
echo " * No upstream changes."
|
||||||
|
echo ""
|
||||||
|
echo -n "-- $USERNAME "
|
||||||
|
date
|
||||||
|
echo ""
|
||||||
|
echo "Local variables:"
|
||||||
|
echo "mode: debian-changelog"
|
||||||
|
echo "End:"
|
||||||
|
) > debian/changelog
|
||||||
|
|
||||||
|
dpkg-shlibdeps debian/usr/bin/TestGUI
|
||||||
|
|
||||||
|
DEPENDS=`grep "shlibs:Depends" debian/substvars | sed -e "s/shlibs:Depends=//"`
|
||||||
|
ubuntu_write_control
|
||||||
|
|
||||||
|
cp debian/control debian/DEBIAN
|
||||||
|
rm debian/control
|
||||||
|
rm debian/changelog
|
||||||
|
rm debian/substvars
|
||||||
|
|
||||||
|
mkdir -p $DISTFILES
|
||||||
|
dpkg -b debian $DISTFILES/$DISTNAME-Ubuntu-$DISTRIB_RELEASE-$PLATFORM.deb
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
echo "ERROR: Fehler beim Erstellen des Pakets"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
cp $DISTFILES/$DISTNAME-Ubuntu-$DISTRIB_RELEASE-$PLATFORM.deb $TARGETDIR
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
build_specfile() {
|
||||||
|
cd $WORK
|
||||||
|
(
|
||||||
|
echo "Name: $NAME"
|
||||||
|
echo "Version: $VERSION"
|
||||||
|
echo "Release: 1%{?dist}"
|
||||||
|
echo "Summary: $COMMENT"
|
||||||
|
echo ""
|
||||||
|
echo "Group: Applications/Office"
|
||||||
|
echo "License: GPL"
|
||||||
|
echo "URL: $HOMEPAGE"
|
||||||
|
#echo "Source: $MYPWD/distfiles/DENIC-ITStt-TestGUI-$VERSION-src-complete.tar.gz"
|
||||||
|
echo "Source: DENIC-ITStt-TestGUI-%{version}-src-complete.tar.gz"
|
||||||
|
echo "BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)"
|
||||||
|
echo ""
|
||||||
|
echo "BuildRequires: gcc, gcc-c++, libgcc, bzip2-devel, zlib-devel, libstdc++-devel, openssl-devel, qt-devel, libidn-devel, libmcrypt-devel, glibc-devel, libxml2-devel, pcre-devel"
|
||||||
|
echo "#Requires:"
|
||||||
|
echo ""
|
||||||
|
echo "%description"
|
||||||
|
echo "$COMMENT"
|
||||||
|
echo ""
|
||||||
|
echo "%prep"
|
||||||
|
echo "%setup -q -n %{name}-%{version}-src-complete"
|
||||||
|
echo ""
|
||||||
|
echo "%build"
|
||||||
|
echo "./build_binary.sh"
|
||||||
|
echo ""
|
||||||
|
echo "%install"
|
||||||
|
echo "rm -rf \$RPM_BUILD_ROOT"
|
||||||
|
echo "mkdir -p \$RPM_BUILD_ROOT/usr/bin"
|
||||||
|
echo "mkdir -p \$RPM_BUILD_ROOT/usr/share/icons"
|
||||||
|
echo "mkdir -p \$RPM_BUILD_ROOT/usr/share/applications"
|
||||||
|
echo "cp build/bin/TestGUI \$RPM_BUILD_ROOT/usr/bin"
|
||||||
|
echo "cp build/src/testgui/resources/icon64.png \$RPM_BUILD_ROOT/usr/share/icons/DENICTestGUI.png"
|
||||||
|
echo ""
|
||||||
|
echo "# Desktop menu entry"
|
||||||
|
echo "cat > %{name}.desktop << EOF"
|
||||||
|
echo "[Desktop Entry]"
|
||||||
|
echo "Name=$NAME"
|
||||||
|
echo "Comment=$COMMENT"
|
||||||
|
echo "Exec=$TESTGUI"
|
||||||
|
echo "Icon=DENICTestGUI.png"
|
||||||
|
echo "Terminal=0"
|
||||||
|
echo "Type=Application"
|
||||||
|
echo "EOF"
|
||||||
|
echo ""
|
||||||
|
echo "desktop-file-install --vendor DENIC \\"
|
||||||
|
echo " --dir \$RPM_BUILD_ROOT/usr/share/applications \\"
|
||||||
|
echo " --add-category Application \\"
|
||||||
|
echo " --add-category Office \\"
|
||||||
|
echo "%{name}.desktop"
|
||||||
|
echo ""
|
||||||
|
echo "%clean"
|
||||||
|
echo "rm -rf \$RPM_BUILD_ROOT"
|
||||||
|
echo ""
|
||||||
|
echo "%files"
|
||||||
|
echo "%defattr(-,root,root,-)"
|
||||||
|
echo "/usr/bin/*"
|
||||||
|
echo "/usr/share/icons/*"
|
||||||
|
echo "/usr/share/applications/*"
|
||||||
|
echo "%doc"
|
||||||
|
echo ""
|
||||||
|
echo "%changelog"
|
||||||
|
echo ""
|
||||||
|
) > testgui.spec
|
||||||
|
}
|
||||||
|
|
||||||
|
build_srpm() {
|
||||||
|
if [ ! -d ~.rpmmacros ] ; then
|
||||||
|
echo "Bereite RPM-Buildsystem vor..."
|
||||||
|
mkdir -p ~/rpmbuild/{BUILD,RPMS,S{OURCE,PEC,RPM}S}
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
echo "Konnte RPM-Verzeichnisse nicht anlegen: ~/rpmbuild/{BUILD,RPMS,S{OURCE,PEC,RPM}S}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "%_topdir $HOME/rpmbuild" > ~/.rpmmacros
|
||||||
|
fi
|
||||||
|
TOPDIR=`cat ~/.rpmmacros | grep "%_topdir" | grep -v grep | awk {'print $2'}`
|
||||||
|
if [ -z "$TOPDIR" ] ; then
|
||||||
|
echo "%_topdir ist nicht in ~/.rpmmacros vorhanden"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
if [ ! -d "$TOPDIR" ] ; then
|
||||||
|
echo "%_topdir ist nicht vorhanden: $TOPDIR"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ ! -d "$TOPDIR/SOURCES" ] ; then
|
||||||
|
echo "%_topdir/SOURCES ist nicht vorhanden: $TOPDIR/SOURCES"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cp $MYPWD/distfiles/DENIC-ITStt-TestGUI-$VERSION-src-complete.tar.gz $TOPDIR/SOURCES
|
||||||
|
cd $WORK
|
||||||
|
rpmbuild -bs testgui.spec
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
echo "Build fehlgeschlagen"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cp $TOPDIR/SRPMS/DENIC-ITStt-TestGUI-$VERSION-1.src.rpm $DISTFILES
|
||||||
|
cp $TOPDIR/SRPMS/DENIC-ITStt-TestGUI-$VERSION-1.src.rpm $TARGETDIR
|
||||||
|
}
|
||||||
|
|
||||||
|
build_mingw32()
|
||||||
|
{
|
||||||
|
echo "*******************************************************"
|
||||||
|
echo "Erstelle Windows-Setup Programm"
|
||||||
|
cd $ROOT/src/testgui
|
||||||
|
cat setup.iss | sed -e "s/OutputBaseFilename=.*/OutputBaseFilename=$NAME-$VERSION-Win32Setup/" \
|
||||||
|
| sed -e "s/AppVerName=.*/AppVerName=ITStt-TestGUI $VERSION/" \
|
||||||
|
| sed -e "s/AppVersion=.*/AppVersion=$VERSION/" \
|
||||||
|
| sed -e "s/VersionInfoVersion=.*/VersionInfoVersion=$VERSION/" \
|
||||||
|
| sed -e "s/test2.opsblau.de/www.denic-itstt.de/" \
|
||||||
|
> setup2.iss
|
||||||
|
|
||||||
|
"$INNOSETUP" setup2.iss
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
echo "Inno-Setup fehlgeschlagen"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cd $ROOT/src/testgui
|
||||||
|
cp distfiles/$NAME-$VERSION-Win32Setup.exe ../../../
|
||||||
|
cp distfiles/$NAME-$VERSION-Win32Setup.exe $TARGETDIR
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
##############################################################################################
|
||||||
|
|
||||||
|
ARCH=`uname -m`;
|
||||||
|
PLATFORM="i386";
|
||||||
|
|
||||||
|
if [ "$ARCH" = "x86_64" ] ; then
|
||||||
|
PLATFORM="amd64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
##############################################################################################
|
||||||
|
# Sourcen zusammenfassen, sofern wir im Sourceverzeichnis der GUI sind
|
||||||
|
if [ -f TestGUI.pro ] ; then
|
||||||
|
echo "Erstelle Source-Distribution für GUI..."
|
||||||
|
build_sources
|
||||||
|
echo "Fertig"
|
||||||
|
echo "========================================================================================"
|
||||||
|
else
|
||||||
|
# Sind wir nicht, wir müssen ein paar Pfade anpassen
|
||||||
|
WORK=$MYPWD
|
||||||
|
ROOT=$MYPWD/build
|
||||||
|
fi
|
||||||
|
|
||||||
|
##############################################################################################
|
||||||
|
# Libs und Binary bauen
|
||||||
|
if [ "$1" != "nobin" ] ; then
|
||||||
|
build_binary
|
||||||
|
fi
|
||||||
|
|
||||||
|
##############################################################################################
|
||||||
|
# Pakete bauen
|
||||||
|
if [ "$DISTRIB_ID" = "Ubuntu" ] ; then
|
||||||
|
if [ "$1" != "nobin" ] ; then
|
||||||
|
build_ubuntu
|
||||||
|
fi
|
||||||
|
build_specfile
|
||||||
|
build_srpm
|
||||||
|
elif [ "$DISTRIB_ID" = "MINGW32" ] ; then
|
||||||
|
build_mingw32
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
##############################################################################################
|
||||||
|
# Aufräumen
|
||||||
|
# rm -rf $WORK
|
||||||
|
|
159
src/pplib/conf.sh
Executable file
159
src/pplib/conf.sh
Executable file
|
@ -0,0 +1,159 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
# This file is part of "Patrick's Programming Library", Version 7 (PPL7).
|
||||||
|
# Web: http://www.pfp.de/ppl/
|
||||||
|
#
|
||||||
|
# $Author$
|
||||||
|
# $Revision$
|
||||||
|
# $Date$
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Copyright (c) 2013, Patrick Fedick <patrick@pfp.de>
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# 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 above 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 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.
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
SYS=`uname -s`
|
||||||
|
REL=`uname -r`
|
||||||
|
KERNEL=`uname -v`
|
||||||
|
|
||||||
|
PREFIX=$1
|
||||||
|
PREFIX=${PREFIX:=$HOME}
|
||||||
|
echo "PREFIX=$PREFIX, $SYS:$REL:$KERNEL"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
case "$SYS:$REL:$KERNEL" in
|
||||||
|
FreeBSD:11.*)
|
||||||
|
CLANGVERSION=
|
||||||
|
export CC=clang$CLANGVERSION
|
||||||
|
export CXX=clang++$CLANGVERSION
|
||||||
|
export CPPFLAGS=-I/usr/local/include
|
||||||
|
export LDLAGS=-L/usr/local/lib
|
||||||
|
export GCOV_CFLAGS="-fprofile-arcs -ftest-coverage"
|
||||||
|
export GCOV_LDFLAGS="-lgcov"
|
||||||
|
./configure --prefix=$PREFIX \
|
||||||
|
--with-lame=/usr/local --with-mpg123=/usr/local \
|
||||||
|
--with-pcre=/usr/local --with-x --with-mysql \
|
||||||
|
--with-openssl=/usr \
|
||||||
|
--with-libiconv-prefix=/usr/local --with-nasm \
|
||||||
|
--with-libjpegturbo=/usr/local --with-libpng --with-libtiff=/usr/local \
|
||||||
|
--with-postgresql \
|
||||||
|
--with-libidn=/usr/local \
|
||||||
|
--with-ogg=/usr/local \
|
||||||
|
--with-libmicrohttpd=/usr/local \
|
||||||
|
--enable-gtest=/usr/local/gtest-1.7.0
|
||||||
|
|
||||||
|
;;
|
||||||
|
MINGW32*:1.0.16*)
|
||||||
|
export CPPFLAGS="-DCURL_STATICLIB -I/usr/local/include -I/sdk/WindowsSDK/include"
|
||||||
|
export LDLAGS="-DCURL_STATICLIB -L/usr/local/lib -L/sdk/WindowsSDK/lib"
|
||||||
|
export CFLAGS="-DCURL_STATICLIB"
|
||||||
|
echo "Building for MinGW 1.0.16 - 32 Bit"
|
||||||
|
|
||||||
|
# preprocessor definitions will be in effect:
|
||||||
|
# * #define _WIN64 1 (also WIN64, __WIN64, and __WIN64__)
|
||||||
|
# * #define __MINGW64__ 1
|
||||||
|
# * #define __x86_64 1 (also __x86_64__)
|
||||||
|
# * #define __amd64 1 (also __amd64__)
|
||||||
|
#Be sure to use "-m32" or "-m64" at both the compile stage and the link stage.
|
||||||
|
|
||||||
|
./configure --prefix=$PREFIX \
|
||||||
|
--build=i686-w64-mingw32 \
|
||||||
|
--with-pcre=/mingw --with-bzip2=/mingw --with-zlib=/mingw \
|
||||||
|
--with-nasm --with-libiconv-prefix=/mingw \
|
||||||
|
--with-lame=/mingw --with-mpg123=/mingw \
|
||||||
|
--with-jpeg=/mingw --with-png=/mingw \
|
||||||
|
--with-libmcrypt-prefix=/mingw --with-gcrypt=auto \
|
||||||
|
--with-openssl=/mingw --with-libcurl \
|
||||||
|
--with-ogg=/mingw
|
||||||
|
;;
|
||||||
|
MINGW32*)
|
||||||
|
export CPPFLAGS="-DCURL_STATICLIB -I/usr/local/include -I/sdk/WindowsSDK/include"
|
||||||
|
export LDLAGS="-DCURL_STATICLIB -L/usr/local/lib -L/sdk/WindowsSDK/lib"
|
||||||
|
export CFLAGS="-DCURL_STATICLIB"
|
||||||
|
./configure --prefix=$PREFIX \
|
||||||
|
--with-pcre=/usr/local --with-bzip2=/usr/local --with-zlib=/usr/local \
|
||||||
|
--with-nasm --with-libiconv-prefix=/usr/local \
|
||||||
|
--with-lame=/usr/local --with-mpg123=/usr/local \
|
||||||
|
--with-jpeg=/usr/local --with-libpng=/usr/local \
|
||||||
|
--with-libmcrypt-prefix=/usr/local --with-gcrypt=auto \
|
||||||
|
--with-openssl=/usr/local --with-libcurl \
|
||||||
|
--with-ogg=/usr/local
|
||||||
|
;;
|
||||||
|
MINGW64*)
|
||||||
|
export CPPFLAGS="-DCURL_STATICLIB -I/usr/local/include -I/sdk/WindowsSDK/include"
|
||||||
|
export LDLAGS="-DCURL_STATICLIB -L/usr/local/lib -L/sdk/WindowsSDK/lib"
|
||||||
|
export CFLAGS="-DCURL_STATICLIB"
|
||||||
|
./configure --prefix=$PREFIX \
|
||||||
|
--without-postgresql --without-mysql \
|
||||||
|
--enable-gtest=/usr/src/gtest-1.7.0 \
|
||||||
|
;;
|
||||||
|
MSYS_NT-10*)
|
||||||
|
if [ -d /jenkins/local/bin ] ; then
|
||||||
|
PREFIX=/jenkins/local
|
||||||
|
fi
|
||||||
|
echo "configuring for MSYS2 MINGW64, PREFIX=$PREFIX"
|
||||||
|
MINGW=/mingw64
|
||||||
|
#export CPPFLAGS="-DCURL_STATICLIB -DPCRE_STATIC -I$PREFIX/include -I/usr/local/include -I/sdk/WindowsSDK/include"
|
||||||
|
#export LDLAGS="-DCURL_STATICLIB -L$PREFIX/lib -L/usr/local/lib -L/sdk/WindowsSDK/lib"
|
||||||
|
#export CFLAGS="-DCURL_STATICLIB -DPCRE_STATIC"
|
||||||
|
#export SQLITE_CFLAGS="-I$PREFIX/include -I/usr/local/include"
|
||||||
|
#export SQLITE_LIBS="-L$PREFIX/include -L/usr/local/lib -lsqlite3"
|
||||||
|
./configure --prefix=$PREFIX \
|
||||||
|
--with-pcre=$MINGW --with-bzip2=$MINGW --with-zlib=$MINGW \
|
||||||
|
--with-nasm --with-libiconv-prefix=$MINGW \
|
||||||
|
--with-lame --with-mpg123 --with-ogg \
|
||||||
|
--with-ft-prefix=$MINGW \
|
||||||
|
--with-libtiff=$MINGW \
|
||||||
|
--with-libjpegturbo=$MINGW --with-libpng=$MINGW \
|
||||||
|
--with-libmcrypt-prefix=$PREFIX \
|
||||||
|
--with-openssl=$MINGW \
|
||||||
|
--with-libldns=$MINGW --with-libidn=$MINGW \
|
||||||
|
--without-postgresql --without-mysql \
|
||||||
|
--enable-gtest=/usr/local/gtest-1.7.0 \
|
||||||
|
|
||||||
|
;;
|
||||||
|
Linux:*generic*)
|
||||||
|
|
||||||
|
# export CFLAGS="-no-pie "
|
||||||
|
echo "configuring for generic Linux"
|
||||||
|
./configure --prefix=$PREFIX \
|
||||||
|
--with-lame --with-pcre=/usr --with-x --with-openssl=/usr \
|
||||||
|
--with-mysql --with-libiconv-prefix --with-nasm \
|
||||||
|
--with-gcrypt=auto --with-ogg=/usr \
|
||||||
|
--with-postgresql \
|
||||||
|
--with-libmicrohttpd=/usr/local \
|
||||||
|
--with-jpeg --with-libpng=$PREFIX --with-libtiff \
|
||||||
|
--with-libtiff=/usr --with-mpg123 \
|
||||||
|
--with-libidn --with-libidn2 --with-libldns=/usr \
|
||||||
|
--enable-gtest=/usr/local/googletest-release-1.7.0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown host"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
19232
src/pplib/configure
vendored
Executable file
19232
src/pplib/configure
vendored
Executable file
File diff suppressed because it is too large
Load diff
868
src/pplib/configure.ac
Normal file
868
src/pplib/configure.ac
Normal file
|
@ -0,0 +1,868 @@
|
||||||
|
###############################################################################
|
||||||
|
# This file is part of "Patrick's Programming Library", Version 7 (PPL7).
|
||||||
|
# Web: http://www.pfp.de/ppl/
|
||||||
|
#
|
||||||
|
# $Author$
|
||||||
|
# $Revision$
|
||||||
|
# $Date$
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# Copyright (c) 2013, Patrick Fedick <patrick@pfp.de>
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# 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 above 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 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.
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
AC_PREREQ(2.69)
|
||||||
|
AC_INIT([ppl], [7.0.0], [patrick@pfp.de], [ppl-7.0.0.tar.bz2])
|
||||||
|
AC_CONFIG_AUX_DIR(autoconf)
|
||||||
|
|
||||||
|
AC_CONFIG_SRCDIR([include/ppl7.h])
|
||||||
|
AC_CONFIG_SRCDIR([include/config.h.in])
|
||||||
|
#AC_CONFIG_SRCDIR([src/core/pplcore.cpp])
|
||||||
|
#AC_CONFIG_SRCDIR([src/core/functions.cpp])
|
||||||
|
#AC_CONFIG_SRCDIR([src/math/math.cpp])
|
||||||
|
|
||||||
|
AC_CONFIG_FILES([Makefile])
|
||||||
|
AC_CONFIG_FILES([tests/Makefile])
|
||||||
|
AC_CONFIG_FILES([ppl7-config])
|
||||||
|
AC_CONFIG_HEADERS([include/config.h])
|
||||||
|
AC_CONFIG_HEADERS([include/ppl7-config.h])
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Includes
|
||||||
|
###############################################################################
|
||||||
|
sinclude(autoconf/ax_cxx_compile_stdcxx.m4)
|
||||||
|
sinclude(autoconf/ax_check_openssl.m4)
|
||||||
|
sinclude(autoconf/libcurl.m4)
|
||||||
|
sinclude(autoconf/ax_lib_mysql.m4)
|
||||||
|
sinclude(autoconf/ax_lib_postgresql.m4)
|
||||||
|
sinclude(autoconf/ax_lib_sqlite3.m4)
|
||||||
|
sinclude(autoconf/freetype.m4)
|
||||||
|
sinclude(autoconf/ax_path_lib_pcre.m4)
|
||||||
|
sinclude(autoconf/png.m4)
|
||||||
|
sinclude(autoconf/jpeg.m4)
|
||||||
|
sinclude(autoconf/libjpeg-turbo.m4)
|
||||||
|
sinclude(autoconf/ax_pthread.m4)
|
||||||
|
sinclude(autoconf/sdl2.m4)
|
||||||
|
sinclude(autoconf/freetds.m4)
|
||||||
|
sinclude(autoconf/nasm.m4)
|
||||||
|
sinclude(autoconf/lib-link.m4)
|
||||||
|
sinclude(autoconf/iconv.m4)
|
||||||
|
sinclude(autoconf/bzip2.m4)
|
||||||
|
sinclude(autoconf/ax_check_zlib.m4)
|
||||||
|
sinclude(autoconf/libmcrypt.m4)
|
||||||
|
sinclude(autoconf/ax_lib_crypto.m4)
|
||||||
|
sinclude(autoconf/checkfuncs.m4)
|
||||||
|
sinclude(autoconf/ax_gcc_x86_cpuid.m4)
|
||||||
|
sinclude(autoconf/ax_check_compiler_flags.m4)
|
||||||
|
sinclude(autoconf/ax_gcc_archflag.m4)
|
||||||
|
sinclude(autoconf/ldns.m4)
|
||||||
|
sinclude(autoconf/mpg123.m4)
|
||||||
|
sinclude(autoconf/lame.m4)
|
||||||
|
sinclude(autoconf/ogg.m4)
|
||||||
|
sinclude(autoconf/shout.m4)
|
||||||
|
sinclude(autoconf/imagemagick.m4)
|
||||||
|
sinclude(autoconf/libtiff.m4)
|
||||||
|
sinclude(autoconf/libmicrohttpd.m4)
|
||||||
|
sinclude(autoconf/libidn.m4)
|
||||||
|
sinclude(autoconf/libidn2.m4)
|
||||||
|
sinclude(autoconf/libbind.m4)
|
||||||
|
sinclude(autoconf/gtest.m4)
|
||||||
|
sinclude(autoconf/libcdio.m4)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
report_have_pthreads="no"
|
||||||
|
report_have_jpeg="no"
|
||||||
|
report_have_libmicrohttpd="no"
|
||||||
|
report_have_libmcrypt="no"
|
||||||
|
report_have_libcrypto="no"
|
||||||
|
report_have_libidn="no"
|
||||||
|
report_have_libidn2="no"
|
||||||
|
report_have_libtiff="no"
|
||||||
|
report_have_curl="no"
|
||||||
|
report_have_mpg123="no"
|
||||||
|
report_have_lame="no"
|
||||||
|
report_have_libogg="no"
|
||||||
|
report_have_libshout="no"
|
||||||
|
report_have_libmad="no"
|
||||||
|
report_have_iconv="no"
|
||||||
|
report_have_bzip2="no"
|
||||||
|
report_have_zlib="no"
|
||||||
|
report_have_pcre="no"
|
||||||
|
report_have_openssl="no"
|
||||||
|
report_have_freetype2="no"
|
||||||
|
report_have_sdl2="no"
|
||||||
|
report_have_png="no"
|
||||||
|
report_have_libimlib="no"
|
||||||
|
report_have_mysql="no"
|
||||||
|
report_have_postgres="no"
|
||||||
|
report_have_sqlite3="no"
|
||||||
|
report_have_ldns="no"
|
||||||
|
report_have_nasm="no"
|
||||||
|
|
||||||
|
|
||||||
|
AC_CANONICAL_TARGET
|
||||||
|
|
||||||
|
AM_INIT_AUTOMAKE
|
||||||
|
|
||||||
|
OLD_CFLAGS=$CFLAGS
|
||||||
|
# Checks for programs.
|
||||||
|
AC_PROG_CC
|
||||||
|
CFLAGS=$OLD_CFLAGS
|
||||||
|
AC_PROG_CXX
|
||||||
|
dnl AX_CXX_COMPILE_STDCXX(11)
|
||||||
|
|
||||||
|
dnl AC_LANG(C++)
|
||||||
|
|
||||||
|
dnl AX_GCC_ARCHFLAG
|
||||||
|
#AX_CC_MAXOPT
|
||||||
|
|
||||||
|
AX_CHECK_COMPILE_FLAG([-no-pie],
|
||||||
|
LDFLAGS="-no-pie $LDFLAGS"
|
||||||
|
NOPIE="-no-pie",
|
||||||
|
NOPIE=""
|
||||||
|
)
|
||||||
|
AC_SUBST(NOPIE)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
case "$host_os" in
|
||||||
|
freebsd* )
|
||||||
|
CFLAGS="-I/usr/local/include $CFLAGS"
|
||||||
|
LDFLAGS="-L/usr/local/lib $LDFLAGS"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$host_os" in
|
||||||
|
*mingw32*|msys )
|
||||||
|
report_have_pthreads="yes, Windows Threads"
|
||||||
|
;;
|
||||||
|
*mingw64* )
|
||||||
|
report_have_pthreads="yes, Windows Threads"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
AX_PTHREAD([report_have_pthreads="yes, pthreads"]
|
||||||
|
AC_DEFINE(HAVE_PTHREADS,1, [Define to 1 if we have pthreads])
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AC_PROG_SED
|
||||||
|
|
||||||
|
AC_C_BIGENDIAN(
|
||||||
|
report_byteorder="BIG ENDIAN"
|
||||||
|
AC_DEFINE(__BIG_ENDIAN__),
|
||||||
|
report_byteorder="LITTLE ENDIAN"
|
||||||
|
AC_DEFINE(__LITTLE_ENDIAN__))
|
||||||
|
|
||||||
|
AC_CHECK_SIZEOF(char)
|
||||||
|
AC_CHECK_SIZEOF(short)
|
||||||
|
AC_CHECK_SIZEOF(int)
|
||||||
|
AC_CHECK_SIZEOF(long)
|
||||||
|
AC_CHECK_SIZEOF(long long)
|
||||||
|
AC_CHECK_SIZEOF(wchar_t)
|
||||||
|
AC_CHECK_SIZEOF(size_t)
|
||||||
|
AC_CHECK_SIZEOF(float)
|
||||||
|
AC_CHECK_SIZEOF(double)
|
||||||
|
AC_CHECK_SIZEOF(void*)
|
||||||
|
|
||||||
|
if test $ac_cv_sizeof_char -eq 1; then
|
||||||
|
AC_DEFINE(ppluint8,unsigned char)
|
||||||
|
AC_DEFINE(pplint8,signed char)
|
||||||
|
fi
|
||||||
|
if test $ac_cv_sizeof_short -eq 2; then
|
||||||
|
AC_DEFINE(ppluint16,unsigned short)
|
||||||
|
AC_DEFINE(pplint16,signed short)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $ac_cv_sizeof_int -eq 4; then
|
||||||
|
AC_DEFINE(ppluint32,unsigned int)
|
||||||
|
AC_DEFINE(pplint32,signed int)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $ac_cv_sizeof_long_long -eq 8; then
|
||||||
|
AC_DEFINE(ppluint64,unsigned long long)
|
||||||
|
AC_DEFINE(pplint64,signed long long)
|
||||||
|
else
|
||||||
|
if test $ac_cv_sizeof_long -eq 8; then
|
||||||
|
AC_DEFINE(ppluint64,unsigned long)
|
||||||
|
AC_DEFINE(pplint64,signed long)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $ac_cv_sizeof_wchar_t -eq 4; then
|
||||||
|
if test "$report_byteorder" = "LITTLE ENDIAN"; then
|
||||||
|
AC_DEFINE(ICONV_UNICODE,"UTF-32LE")
|
||||||
|
else
|
||||||
|
AC_DEFINE(ICONV_UNICODE,"UTF-32BE")
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if test "$report_byteorder" = "LITTLE ENDIAN"; then
|
||||||
|
AC_DEFINE(ICONV_UNICODE,"UTF-16LE")
|
||||||
|
else
|
||||||
|
AC_DEFINE(ICONV_UNICODE,"UTF-16BE")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if test $ac_cv_sizeof_voidp -eq 4; then
|
||||||
|
AC_DEFINE(ppliptr,ppluint32)
|
||||||
|
elif test $ac_cv_sizeof_voidp -eq 8; then
|
||||||
|
AC_DEFINE(ppliptr,ppluint64)
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR(size of void* is not supported)
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_CHECK_SIZEOF(fpos_t)
|
||||||
|
|
||||||
|
|
||||||
|
AC_SYS_LARGEFILE
|
||||||
|
AC_FUNC_FSEEKO
|
||||||
|
|
||||||
|
# AX_HAVE_QT scheint unter FreeBSD nicht kompatibel zu sein. Der produzierte Code
|
||||||
|
# läuft zwar unter FreeBSD, aber nicht unter Linux oder MinGW
|
||||||
|
dnl AX_HAVE_QT
|
||||||
|
|
||||||
|
PKG_PROG_PKG_CONFIG()
|
||||||
|
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# Check for various typedefs and provide substitutes if
|
||||||
|
# they don't exist.
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
|
||||||
|
AC_HEADER_STDBOOL
|
||||||
|
AC_HEADER_TIME
|
||||||
|
AC_TYPE_MODE_T
|
||||||
|
AC_TYPE_PID_T
|
||||||
|
AC_TYPE_SIZE_T
|
||||||
|
AC_TYPE_UID_T
|
||||||
|
AC_TYPE_OFF_T
|
||||||
|
dnl AC_SIZEOF_TYPE(off_t)
|
||||||
|
|
||||||
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_C_CONST
|
||||||
|
AC_STRUCT_TM
|
||||||
|
# FPOS_T ist ein Struct?
|
||||||
|
AX_FPOS_ISSTRUCT()
|
||||||
|
|
||||||
|
AX_TM_HAS_GMTOFF()
|
||||||
|
|
||||||
|
AC_PATH_XTRA
|
||||||
|
|
||||||
|
|
||||||
|
AC_ARG_VAR(GCOV_CFLAGS, [additional compiler flags to compile the code coverage version of the library] )
|
||||||
|
AC_ARG_VAR(GCOV_LDLAGS, [additional linker flags to compile the code coverage version of the library] )
|
||||||
|
AC_SUBST(GCOV_CFLAGS)
|
||||||
|
AC_SUBST(GCOV_LDFLAGS)
|
||||||
|
PPLIBTESTVERSION=release
|
||||||
|
report_codecoverage_enabled="no"
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([coverage], [ --enable-coverage Enable build of code coverage version and tests],
|
||||||
|
AS_IF([test "x$enable_coverage" != "xno"], [
|
||||||
|
PPLIBTESTVERSION=coverage
|
||||||
|
AC_SUBST(PPLIBTESTVERSION)
|
||||||
|
report_codecoverage_enabled="yes"
|
||||||
|
],[
|
||||||
|
PPLIBTESTVERSION=debug
|
||||||
|
AC_SUBST(PPLIBTESTVERSION)
|
||||||
|
]),
|
||||||
|
[
|
||||||
|
PPLIBTESTVERSION=debug
|
||||||
|
AC_SUBST(PPLIBTESTVERSION)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
report_have_gtest="no"
|
||||||
|
AC_CHECK_GTEST(
|
||||||
|
report_have_gtest="yes"
|
||||||
|
,
|
||||||
|
report_have_gtest="no"
|
||||||
|
report_codecoverage_enabled="no"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS([stdlib.h])
|
||||||
|
AC_CHECK_HEADERS([unistd.h])
|
||||||
|
AC_CHECK_HEADERS([stdarg.h])
|
||||||
|
AC_CHECK_HEADERS([stddef.h])
|
||||||
|
AC_CHECK_HEADERS([stdio.h])
|
||||||
|
AC_CHECK_HEADERS([math.h])
|
||||||
|
AC_CHECK_HEADERS([fcntl.h])
|
||||||
|
AC_CHECK_HEADERS([sys/file.h])
|
||||||
|
AC_CHECK_HEADERS([time.h])
|
||||||
|
AC_CHECK_HEADERS([sys/time.h])
|
||||||
|
AC_CHECK_HEADERS([sys/types.h])
|
||||||
|
AC_CHECK_HEADERS([sys/socket.h])
|
||||||
|
AC_CHECK_HEADERS([sys/poll.h])
|
||||||
|
AC_CHECK_HEADERS([netinet/in.h])
|
||||||
|
AC_CHECK_HEADERS([arpa/nameser.h])
|
||||||
|
AC_CHECK_HEADERS([resolv.h],,,[
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <arpa/nameser.h>
|
||||||
|
])
|
||||||
|
AC_CHECK_HEADERS([netdb.h])
|
||||||
|
AC_CHECK_HEADERS([arpa/inet.h])
|
||||||
|
AC_CHECK_HEADERS([strings.h])
|
||||||
|
AC_CHECK_HEADERS([errno.h])
|
||||||
|
AC_CHECK_HEADERS([signal.h])
|
||||||
|
AC_CHECK_HEADERS([dirent.h])
|
||||||
|
AC_CHECK_HEADERS([fnmatch.h])
|
||||||
|
AC_CHECK_HEADERS([sys/stat.h])
|
||||||
|
AC_CHECK_HEADERS([limits.h])
|
||||||
|
AC_CHECK_HEADERS([ctype.h])
|
||||||
|
AC_CHECK_HEADERS([wctype.h])
|
||||||
|
AC_CHECK_HEADERS([locale.h])
|
||||||
|
AC_CHECK_HEADERS([wchar.h])
|
||||||
|
AC_CHECK_HEADERS([widec.h])
|
||||||
|
AC_CHECK_HEADERS([syslog.h])
|
||||||
|
AC_CHECK_HEADERS([sys/mman.h])
|
||||||
|
AC_CHECK_HEADERS([valgrind/helgrind.h])
|
||||||
|
|
||||||
|
AC_FUNC_MKTIME
|
||||||
|
AC_CHECK_TYPE(size_t, unsigned)
|
||||||
|
AC_CHECK_TYPE(wchar_t, unsigned)
|
||||||
|
|
||||||
|
# Checks for library functions.
|
||||||
|
AC_FUNC_FSEEKO
|
||||||
|
AC_FUNC_MALLOC
|
||||||
|
AC_FUNC_MKTIME
|
||||||
|
AC_FUNC_REALLOC
|
||||||
|
AC_FUNC_STAT
|
||||||
|
AC_FUNC_STRFTIME
|
||||||
|
AC_FUNC_VPRINTF
|
||||||
|
AC_CHECK_FUNCS([strtolower strtoupper])
|
||||||
|
AC_CHECK_FUNCS([bzero bcopy gethostbyname gettimeofday inet_ntoa memmove memset mkdir socket __mingw_vasprintf vasprintf asprintf])
|
||||||
|
AC_CHECK_FUNCS([gethostname sethostname getdomainname setdomainname uname])
|
||||||
|
AC_CHECK_FUNCS([strcasecmp strlen strnlen strdup strerror strncasecmp strndup strstr strcasestr strcmp strncmp])
|
||||||
|
AC_CHECK_FUNCS([strncpy strlcpy strncat strlcat])
|
||||||
|
AC_CHECK_FUNCS([strtok strtok_r])
|
||||||
|
AC_CHECK_FUNCS([htol atoll atoi atol atof strtoll strtoull])
|
||||||
|
AC_CHECK_FUNCS([flock fcntl truncate ftruncate sync fsync unlink remove])
|
||||||
|
AC_CHECK_FUNCS([fgets fputs fgetws fputws fputc fgetc fputwc fgetwc mmap munmap sysconf pagesize])
|
||||||
|
AC_CHECK_FUNCS([usleep nanosleep localtime localtime_r gmtime gmtime_r])
|
||||||
|
AC_CHECK_FUNCS([signal syslog openlog closelog])
|
||||||
|
AC_CHECK_FUNCS([strtok_r])
|
||||||
|
AC_CHECK_FUNCS([getpid getppid getuid geteuid])
|
||||||
|
AC_CHECK_FUNCS([mkstemp])
|
||||||
|
AC_CHECK_FUNCS([wcscmp wcsncmp wcscasecmp wcsncasecmp wcstol wcstoll wcslen wcsstr wcstoul wcstoull wcstod wcstof])
|
||||||
|
AC_CHECK_FUNCS([wcstombs mbstowcs wcsrtombs wcsnrtombs mbsrtowcs mbsnrtowcs])
|
||||||
|
AC_CHECK_FUNCS([wprintf fwprintf swprintf vwprintf vfwprintf vswprintf])
|
||||||
|
AC_CHECK_FUNCS([vsnprintf])
|
||||||
|
AC_CHECK_FUNCS([wstol wstoll watoi watoll wstod watof])
|
||||||
|
AC_CHECK_FUNCS([poll select pselect])
|
||||||
|
AC_CHECK_FUNCS([opendir closedir readdir readdir_r stat])
|
||||||
|
AC_CHECK_FUNCS([clock_gettime])
|
||||||
|
AC_CHECK_FUNCS([inet_ntop inet_pton inet_aton inet_ntoa inet_ntoa_r inet_addr inet_network inet_makeaddr])
|
||||||
|
|
||||||
|
AC_CACHE_CHECK([for sa_len in struct sockaddr], ac_cv_struct_sa_len,
|
||||||
|
[AC_TRY_COMPILE([#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
|
||||||
|
ac_cv_struct_sa_len=yes, ac_cv_struct_sa_len=no)])
|
||||||
|
if test $ac_cv_struct_sa_len = yes; then
|
||||||
|
AC_DEFINE(HAVE_SOCKADDR_SA_LEN)
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Resolver
|
||||||
|
AM_CHECK_LIBBIND()
|
||||||
|
report_have_libbind="no"
|
||||||
|
if test "$have_res_query" = "yes"
|
||||||
|
then
|
||||||
|
AC_DEFINE(HAVE_LIBBIND,1,[ Define if you have libbind resolver functions ])
|
||||||
|
report_have_libbind="yes"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
||||||
|
CFLAGS="$CFLAGS -I/usr/local/include"
|
||||||
|
|
||||||
|
|
||||||
|
##################################################################################### JPEG
|
||||||
|
jpeg_note=""
|
||||||
|
AC_CHECK_LIBJPEG([6.0],
|
||||||
|
AC_DEFINE(HAVE_JPEG, 1, [ Define if you have libjpeg. ])
|
||||||
|
report_have_jpeg="yes"
|
||||||
|
:)
|
||||||
|
|
||||||
|
|
||||||
|
##################################################################################### JPEG-TURBO
|
||||||
|
AC_CHECK_LIBJPEGTURBO([1.3.0],
|
||||||
|
AC_DEFINE(HAVE_LIBJPEGTURBO, 1, [ Define if you have libjpeg-turbo. ])
|
||||||
|
AC_DEFINE(HAVE_JPEG,1)
|
||||||
|
report_have_jpeg="yes"
|
||||||
|
jpeg_note="(using libjpeg-turbo)"
|
||||||
|
JPEG_LIBS="$JPEG_LIBS $TURBOJPEG_LIBS"
|
||||||
|
JPEG_CFLAGS="$JPEG_CFLAGS $TURBOJPEG_CFLAGS"
|
||||||
|
|
||||||
|
:)
|
||||||
|
AC_SUBST(JPEG_CFLAGS)
|
||||||
|
AC_SUBST(JPEG_LIBS)
|
||||||
|
|
||||||
|
|
||||||
|
##################################################################################### PNG
|
||||||
|
AC_CHECK_LIBPNG([1.2],
|
||||||
|
AC_DEFINE(HAVE_PNG, 1, [ Define if you have libpng. ])
|
||||||
|
report_have_png="yes"
|
||||||
|
:)
|
||||||
|
|
||||||
|
|
||||||
|
AM_LIBMICROHTTPD(,
|
||||||
|
AC_DEFINE(HAVE_LIBMICROHTTPD, 1, [ Define if you have libmicrohttpd. ])
|
||||||
|
report_have_libmicrohttpd="yes"
|
||||||
|
AC_SUBST(LIBMICROHTTPD_CFLAGS)
|
||||||
|
AC_SUBST(LIBMICROHTTPD_LIBS)
|
||||||
|
|
||||||
|
,
|
||||||
|
:)
|
||||||
|
|
||||||
|
AM_PATH_LIBMCRYPT([2.5.7],
|
||||||
|
AC_DEFINE(HAVE_LIBMCRYPT, 1, [ Define if you have libmcrypt. ])
|
||||||
|
report_have_libmcrypt="yes",
|
||||||
|
:)
|
||||||
|
|
||||||
|
LIBIDN_CFLAGS=
|
||||||
|
LIBIDN_LIBS=
|
||||||
|
AM_LIBIDN([0.5.4],
|
||||||
|
report_have_libidn="yes"
|
||||||
|
AC_DEFINE(HAVE_LIBIDN, 1, [ Define if you have libidn. ])
|
||||||
|
,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
AM_LIBIDN2([2.0.0],
|
||||||
|
report_have_libidn2="yes"
|
||||||
|
AC_DEFINE(HAVE_LIBIDN2, 1, [ Define if you have libidn2. ])
|
||||||
|
LIBIDN_CFLAGS="$LIBIDN2_CFLAGS"
|
||||||
|
LIBIDN_LIBS="$LIBIDN2_LIBS"
|
||||||
|
,
|
||||||
|
report_have_libidn2="no"
|
||||||
|
)
|
||||||
|
AC_SUBST(LIBIDN_CFLAGS)
|
||||||
|
AC_SUBST(LIBIDN_LIBS)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
AC_CHECK_LIBTIFF([1.2],
|
||||||
|
AC_DEFINE(HAVE_TIFF, 1, [ Define if you have libtiff. ])
|
||||||
|
report_have_libtiff="yes"
|
||||||
|
AC_SUBST(TIFF_CFLAGS)
|
||||||
|
AC_SUBST(TIFF_LIBS)
|
||||||
|
:)
|
||||||
|
|
||||||
|
|
||||||
|
report_have_curl="no"
|
||||||
|
LIBCURL_CHECK_CONFIG([yes],[7.30.0],
|
||||||
|
#LIBS="$LIBS $LIBCURL"
|
||||||
|
#CFLAGS="$CFLAGS $LIBCURL_CPPFLAGS "
|
||||||
|
AC_SUBST(LIBCURL)
|
||||||
|
AC_SUBST(LIBCURL_CPPFLAGS)
|
||||||
|
report_have_curl="yes",:)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
AC_CHECK_LIBMPG123([1.0.0],
|
||||||
|
AC_DEFINE(HAVE_MPG123, 1, [ Define if you have mpg123 library. ])
|
||||||
|
report_have_mpg123="yes"
|
||||||
|
AC_SUBST(MPG123_CFLAGS)
|
||||||
|
AC_SUBST(MPG123_LIBS)
|
||||||
|
,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
AC_CHECK_LIBMP3LAME([3.98.0],
|
||||||
|
AC_DEFINE(HAVE_LAME, 1, [ Define if you have lame. ])
|
||||||
|
report_have_lame="yes"
|
||||||
|
AC_SUBST(LAME_CFLAGS)
|
||||||
|
AC_SUBST(LAME_LIBS)
|
||||||
|
, :)
|
||||||
|
|
||||||
|
XIPH_PATH_OGG(
|
||||||
|
AC_DEFINE(HAVE_LIBOGG, 1, [ Define if you have libogg. ])
|
||||||
|
report_have_libogg="yes"
|
||||||
|
AC_SUBST(OGG_CFLAGS)
|
||||||
|
AC_SUBST(OGG_LIBS)
|
||||||
|
, :)
|
||||||
|
|
||||||
|
XIPH_PATH_SHOUT(
|
||||||
|
AC_DEFINE(HAVE_LIBSHOUT, 1, [ Define if you have libshout. ])
|
||||||
|
report_have_libshout="yes"
|
||||||
|
AC_SUBST(SHOUT_CFLAGS)
|
||||||
|
AC_SUBST(SHOUT_LIBS)
|
||||||
|
, :)
|
||||||
|
|
||||||
|
report_have_libcdio="no"
|
||||||
|
AX_CHECK_LIBCDIO(
|
||||||
|
report_have_libcdio="yes",
|
||||||
|
:)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
AM_ICONV
|
||||||
|
if test "$am_cv_func_iconv_works" = "yes"
|
||||||
|
then
|
||||||
|
report_have_iconv="yes"
|
||||||
|
ICONV_CFLAGS=$INCICONV
|
||||||
|
ICONV_LIBS=$LIBICONV
|
||||||
|
AC_SUBST(ICONV_CFLAGS)
|
||||||
|
AC_SUBST(ICONV_LIBS)
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Bzip2 Vorhanden?
|
||||||
|
AM_BZIP2
|
||||||
|
AX_CHECK_ZLIB(report_have_zlib="yes"
|
||||||
|
AC_DEFINE([HAVE_LIBZ], [1], [Define to 1 if you have `z' library (-lz)])
|
||||||
|
ZLIB_CFLAGS="-I${ZLIB_HOME}/include"
|
||||||
|
ZLIB_LIBS="-L${ZLIB_HOME}/lib -lz"
|
||||||
|
AC_SUBST(ZLIB_CFLAGS)
|
||||||
|
AC_SUBST(ZLIB_LIBS)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
dnl do we need to specify -lm explicitly?
|
||||||
|
AC_CHECK_FUNC(sin,,[AC_CHECK_LIB(m,sin)])
|
||||||
|
|
||||||
|
# PCRE vorhanden?
|
||||||
|
AX_PATH_LIB_PCRE(
|
||||||
|
AC_DEFINE(HAVE_PCRE, 1, [ Define if you have pcre. ])
|
||||||
|
report_have_pcre="yes"
|
||||||
|
,
|
||||||
|
)
|
||||||
|
|
||||||
|
AX_CHECK_OPENSSL(
|
||||||
|
AC_DEFINE(HAVE_OPENSSL, 1, [ Define if you have openssl. ])
|
||||||
|
report_have_openssl="yes"
|
||||||
|
|
||||||
|
am_save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
am_save_CFLAGS="$CFLAGS"
|
||||||
|
am_save_LIBS="$LIBS"
|
||||||
|
am_save_LDFLAGS="$LDFLAGS"
|
||||||
|
|
||||||
|
LIBS="$LIBS $OPENSSL_LIBS"
|
||||||
|
CFLAGS="$CFLAGS $OPENSSL_INCLUDES"
|
||||||
|
|
||||||
|
AC_CHECK_FUNCS([TLS_method TLS_server_method TLS_client_method])
|
||||||
|
AC_CHECK_FUNCS([SSLv23_method SSLv23_server_method SSLv23_client_method])
|
||||||
|
|
||||||
|
CPPFLAGS="$am_save_CPPFLAGS"
|
||||||
|
CFLAGS="$am_save_CFLAGS"
|
||||||
|
LIBS="$am_save_LIBS"
|
||||||
|
LDFLAGS="$am_save_LDFLAGS"
|
||||||
|
|
||||||
|
, :)
|
||||||
|
|
||||||
|
|
||||||
|
AC_CHECK_FT2(9.0.0,
|
||||||
|
AC_DEFINE(HAVE_FREETYPE2, 1, [ Define if you have freetype2. ])
|
||||||
|
report_have_freetype2="yes"
|
||||||
|
, :)
|
||||||
|
|
||||||
|
dnl Check for SDL
|
||||||
|
report_have_sdl2="no"
|
||||||
|
AM_PATH_SDL2([2.0.0],
|
||||||
|
AC_DEFINE(HAVE_SDL2, 1, [ Define if you have libsdl2. ])
|
||||||
|
report_have_sdl2="yes"
|
||||||
|
AC_SUBST(SDL2_CFLAGS)
|
||||||
|
AC_SUBST(SDL2_LIBS)
|
||||||
|
,:)
|
||||||
|
|
||||||
|
|
||||||
|
AX_PATH_LIB_IMLIB([1.9.0],
|
||||||
|
AC_DEFINE(HAVE_IMAGEMAGICK, 1, [ Define if you have imlib. ])
|
||||||
|
report_have_libimlib="yes"
|
||||||
|
AC_SUBST(IMLIB_CFLAGS)
|
||||||
|
AC_SUBST(IMLIB_LIBS)
|
||||||
|
, :)
|
||||||
|
|
||||||
|
|
||||||
|
AX_LIB_MYSQL([5.1.0])
|
||||||
|
if test "$mysql_version_check" = "1" ; then
|
||||||
|
report_have_mysql="yes"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AX_LIB_POSTGRESQL([9.0])
|
||||||
|
if test "$found_postgresql" = "yes"; then
|
||||||
|
report_have_postgres="yes"
|
||||||
|
if test $postgresql_version_number -ge 9002000 ; then
|
||||||
|
AC_DEFINE([POSTGRESQL_HAVE_PQsetSingleRowMode], [1],
|
||||||
|
[Define to 1 if PostgreSQL has function PQsetSingleRowMode])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AX_LIB_SQLITE3
|
||||||
|
if test "$success" = "yes"; then
|
||||||
|
report_have_sqlite3="yes"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
report_have_freetds="no"
|
||||||
|
dnl AC_CHECK_FREETDS([],
|
||||||
|
dnl AC_DEFINE(HAVE_FREETDS, 1, [ Define if you have FreeTDS library. ])
|
||||||
|
dnl report_have_freetds="yes"
|
||||||
|
dnl AC_SUBST(FREETDS_CFLAGS)
|
||||||
|
dnl AC_SUBST(FREETDS_LIBS),
|
||||||
|
dnl :)
|
||||||
|
|
||||||
|
|
||||||
|
AC_SUBST(MYSQL_CFLAGS)
|
||||||
|
AC_SUBST(MYSQL_LDFLAGS)
|
||||||
|
AC_SUBST(MYSQL_VERSION)
|
||||||
|
|
||||||
|
AC_SUBST(SQLITE3_CFLAGS)
|
||||||
|
AC_SUBST(SQLITE3_LDFLAGS)
|
||||||
|
AC_SUBST(SQLITE3_VERSION)
|
||||||
|
|
||||||
|
AC_SUBST(POSTGRESQL_CFLAGS)
|
||||||
|
AC_SUBST(POSTGRESQL_LDFLAGS)
|
||||||
|
AC_SUBST(POSTGRESQL_VERSION)
|
||||||
|
|
||||||
|
AC_SUBST(FREETDS_CFLAGS)
|
||||||
|
AC_SUBST(FREETDS_LIBS)
|
||||||
|
|
||||||
|
|
||||||
|
AX_PATH_LIB_LDNS([1.6.3],
|
||||||
|
AC_DEFINE(HAVE_LIBLDNS, 1, [ Define if you have ldns library from netlabs.nl. ])
|
||||||
|
report_have_ldns="yes"
|
||||||
|
AC_SUBST(LIBLDNS_CFLAGS)
|
||||||
|
AC_SUBST(LIBLDNS_LIBS)
|
||||||
|
,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
dnl Check for nasm
|
||||||
|
AC_MSG_NOTICE(checking if we can use assembly)
|
||||||
|
use_asm="none"
|
||||||
|
report_have_nasm="no"
|
||||||
|
case $target in
|
||||||
|
i?86*|x86*|amd64*)
|
||||||
|
AC_CHECK_NASM(2.0.0,
|
||||||
|
report_have_nasm="yes"
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case $target in
|
||||||
|
x86_64*|amd64*)
|
||||||
|
AC_DEFINE(HAVE_AMD64,1,)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test $report_have_nasm = "yes"
|
||||||
|
then
|
||||||
|
use_asm="nasm"
|
||||||
|
AC_DEFINE(HAVE_NASM,1,)
|
||||||
|
AC_DEFINE(HAVE_X86_ASSEMBLER,1,)
|
||||||
|
HAVE_X86_ASSEMBLER="ASM_RELEASE = \$(ASM_OBJ_RELEASE)
|
||||||
|
ASM_DEBUG = \$(ASM_OBJ_DEBUG)
|
||||||
|
ASM_COVERAGE = \$(ASM_OBJ_COVERAGE)"
|
||||||
|
AC_SUBST(HAVE_X86_ASSEMBLER)
|
||||||
|
ASM=${NASM}
|
||||||
|
ASMFLAGS=${NASMFLAGS}
|
||||||
|
ASMDEBUGFLAGS=${NASMDEBUGFLAGS}
|
||||||
|
AC_SUBST(ASM)
|
||||||
|
AC_SUBST(ASMFLAGS)
|
||||||
|
AC_SUBST(ASMDEBUGFLAGS)
|
||||||
|
fi
|
||||||
|
|
||||||
|
SRCDIR=`pwd`
|
||||||
|
AC_SUBST(SRCDIR)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# If we support __thread, that can speed up tcmalloc a bit.
|
||||||
|
# Note, however, that our code tickles a bug in gcc < 4.1.2
|
||||||
|
# involving TLS and -fPIC (which our libraries will use) on x86:
|
||||||
|
# http://gcc.gnu.org/ml/gcc-bugs/2006-09/msg02275.html
|
||||||
|
AC_MSG_CHECKING([for __thread])
|
||||||
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 1) || (__GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ < 2))
|
||||||
|
#error gcc has this bug: http://gcc.gnu.org/ml/gcc-bugs/2006-09/msg02275.html
|
||||||
|
#endif], [static __thread int p = 0])],
|
||||||
|
[AC_DEFINE(HAVE_TLS, 1,
|
||||||
|
Define to 1 if compiler supports __thread)
|
||||||
|
AC_MSG_RESULT([yes])],
|
||||||
|
[AC_MSG_RESULT([no])])
|
||||||
|
|
||||||
|
# We also need to check if the kernel supports __thread, which requires uname()
|
||||||
|
AC_CHECK_DECLS(uname,,, [#include <sys/utsname.h>])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
WINDOWS_WINSOCK_LIBS=""
|
||||||
|
case "$host_os" in
|
||||||
|
*mingw32* )
|
||||||
|
MINGW32=yes
|
||||||
|
AC_DEFINE(MINGW32, 1, [Define if you compile on Windows MINGW32])
|
||||||
|
#LIBS="$LIBS -lws2_32"
|
||||||
|
WINDOWS_WINSOCK_LIBS="-lws2_32"
|
||||||
|
;;
|
||||||
|
*mingw64*|msys )
|
||||||
|
MINGW32=yes
|
||||||
|
MINGW64=yes
|
||||||
|
AC_DEFINE(MINGW32, 1, [Define if you compile on Windows MINGW32])
|
||||||
|
AC_DEFINE(MINGW64, 1, [Define if you compile on Windows MINGW64])
|
||||||
|
WINDOWS_WINSOCK_LIBS="-lws2_32"
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
MINGW32=no
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AC_SUBST(WINDOWS_WINSOCK_LIBS)
|
||||||
|
|
||||||
|
case "${host_cpu}-${host_os}" in
|
||||||
|
*solaris*)
|
||||||
|
CFLAGS=`echo $CFLAGS | $SED 's/-I\/usr\/local\/include //g' | $SED 's/-I\/usr\/include //g' `
|
||||||
|
;;
|
||||||
|
esac;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
AC_SUBST(report_have_zlib)
|
||||||
|
AC_SUBST(report_have_bzip2)
|
||||||
|
AC_SUBST(report_have_png)
|
||||||
|
AC_SUBST(report_have_jpeg)
|
||||||
|
AC_SUBST(report_have_freetype2)
|
||||||
|
AC_SUBST(report_have_sdl2)
|
||||||
|
AC_SUBST(report_have_lame)
|
||||||
|
AC_SUBST(report_have_libmad)
|
||||||
|
AC_SUBST(report_have_curl)
|
||||||
|
AC_SUBST(report_have_openssl)
|
||||||
|
AC_SUBST(report_have_pcre)
|
||||||
|
AC_SUBST(report_have_iconv)
|
||||||
|
AC_SUBST(report_have_libmcrypt)
|
||||||
|
AC_SUBST(report_have_mysql)
|
||||||
|
AC_SUBST(report_have_postgres)
|
||||||
|
AC_SUBST(report_have_freetds)
|
||||||
|
AC_SUBST(report_have_sqlite3)
|
||||||
|
AC_SUBST(report_have_nasm)
|
||||||
|
AC_SUBST(report_have_pthreads)
|
||||||
|
AC_SUBST(report_have_ldns)
|
||||||
|
AC_SUBST(report_have_libogg)
|
||||||
|
AC_SUBST(report_have_libshout)
|
||||||
|
AC_SUBST(report_have_libimlib)
|
||||||
|
AC_SUBST(report_have_libtiff)
|
||||||
|
AC_SUBST(report_have_libmicrohttpd)
|
||||||
|
AC_SUBST(report_have_libidn)
|
||||||
|
AC_SUBST(report_have_libidn2)
|
||||||
|
AC_SUBST(report_have_libbind)
|
||||||
|
AC_SUBST(report_have_mpg123)
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Output
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
AC_OUTPUT
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Report
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
dnl report configuration
|
||||||
|
AC_MSG_RESULT([
|
||||||
|
******************************************************************************
|
||||||
|
** Configuration summary for $PACKAGE_NAME Version $PACKAGE_VERSION
|
||||||
|
** Target: $target_os CPU: $target_cpu
|
||||||
|
**
|
||||||
|
** Byteorder: $report_byteorder
|
||||||
|
** Size of char $ac_cv_sizeof_char Size of float $ac_cv_sizeof_float
|
||||||
|
** Size of short $ac_cv_sizeof_short Size of double $ac_cv_sizeof_double
|
||||||
|
** Size of int $ac_cv_sizeof_int Size of void* $ac_cv_sizeof_voidp
|
||||||
|
** Size of long $ac_cv_sizeof_long Size of wchar_t $ac_cv_sizeof_wchar_t
|
||||||
|
** Size of long long $ac_cv_sizeof_long_long
|
||||||
|
** Size of size_t $ac_cv_sizeof_size_t
|
||||||
|
******************************************************************************
|
||||||
|
** Assembler:
|
||||||
|
** Nasm (x86 assembler): $report_have_nasm
|
||||||
|
**
|
||||||
|
** Threads: $report_have_pthreads
|
||||||
|
**
|
||||||
|
** Compression:
|
||||||
|
** ZLIB library: $report_have_zlib
|
||||||
|
** BZIP2 library: $report_have_bzip2
|
||||||
|
**
|
||||||
|
** Graphic:
|
||||||
|
** BMP: yes (buildin)
|
||||||
|
** GIF: yes (buildin)
|
||||||
|
** TGA: yes (buildin)
|
||||||
|
** PPM: yes (buildin)
|
||||||
|
** PNG: $report_have_png
|
||||||
|
** JPEG: $report_have_jpeg $jpeg_note
|
||||||
|
** TIFF: $report_have_libtiff
|
||||||
|
** Freetype 2.x library: $report_have_freetype2
|
||||||
|
** ImageMagick: $report_have_libimlib
|
||||||
|
**
|
||||||
|
** Multimedia:
|
||||||
|
** SDL2 library: $report_have_sdl2
|
||||||
|
** Lame library: $report_have_lame
|
||||||
|
** mpg123 library: $report_have_mpg123
|
||||||
|
** ogg library: $report_have_libogg
|
||||||
|
** shout library: $report_have_libshout
|
||||||
|
** cdio library: $report_have_libcdio
|
||||||
|
**
|
||||||
|
** Cryptography:
|
||||||
|
** OpenSSL: $report_have_openssl
|
||||||
|
** MCrypt library: $report_have_libmcrypt
|
||||||
|
**
|
||||||
|
** Internet:
|
||||||
|
** Bind resolver lib: $report_have_libbind
|
||||||
|
** Curl library: $report_have_curl
|
||||||
|
** Libmicrohttpd: $report_have_libmicrohttpd
|
||||||
|
** ldns library: $report_have_ldns
|
||||||
|
** IDN1 library: $report_have_libidn
|
||||||
|
** IDN2 library: $report_have_libidn2
|
||||||
|
**
|
||||||
|
** Databases:
|
||||||
|
** SQLite3: $report_have_sqlite3
|
||||||
|
** MySQL: $report_have_mysql
|
||||||
|
** Postgres: $report_have_postgres
|
||||||
|
**
|
||||||
|
** Other:
|
||||||
|
** PCRE: $report_have_pcre
|
||||||
|
** ICONV: $report_have_iconv
|
||||||
|
**
|
||||||
|
** Testing:
|
||||||
|
** Unittests: $report_have_gtest
|
||||||
|
** Codecoverage: $report_codecoverage_enabled
|
||||||
|
******************************************************************************
|
||||||
|
])
|
||||||
|
|
BIN
src/pplib/docs/CDrawable.png
Normal file
BIN
src/pplib/docs/CDrawable.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.1 KiB |
8
src/pplib/docs/CWStringSetFunctions.dox
Normal file
8
src/pplib/docs/CWStringSetFunctions.dox
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
/*!\file
|
||||||
|
* \return Bei Erfolg liefert die Funktion true (1) zurück, sonst false (0).
|
||||||
|
*
|
||||||
|
* \see
|
||||||
|
* - ppl7::CWString::Set(const char *text, int size=-1);
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
BIN
src/pplib/docs/CWikiParser_diagram.png
Normal file
BIN
src/pplib/docs/CWikiParser_diagram.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
src/pplib/docs/Class_Point.png
Normal file
BIN
src/pplib/docs/Class_Point.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
182
src/pplib/docs/DoxygenLayout.xml
Normal file
182
src/pplib/docs/DoxygenLayout.xml
Normal file
|
@ -0,0 +1,182 @@
|
||||||
|
<doxygenlayout version="1.0">
|
||||||
|
<!-- Navigation index tabs for HTML output -->
|
||||||
|
<navindex>
|
||||||
|
<tab type="mainpage" visible="yes" title="Einleitung"/>
|
||||||
|
<tab type="modules" visible="yes" title=""/>
|
||||||
|
<tab type="namespaces" visible="yes" title="">
|
||||||
|
<tab type="namespaces" visible="yes" title=""/>
|
||||||
|
<tab type="namespacemembers" visible="yes" title=""/>
|
||||||
|
</tab>
|
||||||
|
<tab type="classes" visible="yes" title="">
|
||||||
|
<tab type="classes" visible="yes" title=""/>
|
||||||
|
<tab type="classindex" visible="no" title=""/>
|
||||||
|
<tab type="hierarchy" visible="yes" title=""/>
|
||||||
|
<tab type="classmembers" visible="yes" title=""/>
|
||||||
|
</tab>
|
||||||
|
<tab type="files" visible="no" title="">
|
||||||
|
<tab type="files" visible="yes" title=""/>
|
||||||
|
<tab type="globals" visible="yes" title=""/>
|
||||||
|
</tab>
|
||||||
|
<tab type="dirs" visible="no" title=""/>
|
||||||
|
<tab type="examples" visible="yes" title=""/>
|
||||||
|
<tab type="pages" visible="yes" title=""/>
|
||||||
|
</navindex>
|
||||||
|
|
||||||
|
<!-- Layout definition for a class page -->
|
||||||
|
<class>
|
||||||
|
<briefdescription visible="yes"/>
|
||||||
|
<includes visible="$SHOW_INCLUDE_FILES"/>
|
||||||
|
<inheritancegraph visible="$CLASS_GRAPH"/>
|
||||||
|
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
|
||||||
|
<allmemberslink visible="yes"/>
|
||||||
|
<memberdecl>
|
||||||
|
<membergroups visible="yes"/>
|
||||||
|
<nestedclasses visible="yes" title=""/>
|
||||||
|
<publictypes title=""/>
|
||||||
|
<publicslots title=""/>
|
||||||
|
<signals title=""/>
|
||||||
|
<publicmethods title=""/>
|
||||||
|
<publicstaticmethods title=""/>
|
||||||
|
<publicattributes title=""/>
|
||||||
|
<publicstaticattributes title=""/>
|
||||||
|
<protectedtypes title=""/>
|
||||||
|
<protectedslots title=""/>
|
||||||
|
<protectedmethods title=""/>
|
||||||
|
<protectedstaticmethods title=""/>
|
||||||
|
<protectedattributes title=""/>
|
||||||
|
<protectedstaticattributes title=""/>
|
||||||
|
<packagetypes title=""/>
|
||||||
|
<packagemethods title=""/>
|
||||||
|
<packagestaticmethods title=""/>
|
||||||
|
<packageattributes title=""/>
|
||||||
|
<packagestaticattributes title=""/>
|
||||||
|
<properties title=""/>
|
||||||
|
<events title=""/>
|
||||||
|
<privatetypes title=""/>
|
||||||
|
<privateslots title=""/>
|
||||||
|
<privatemethods title=""/>
|
||||||
|
<privatestaticmethods title=""/>
|
||||||
|
<privateattributes title=""/>
|
||||||
|
<privatestaticattributes title=""/>
|
||||||
|
<friends title=""/>
|
||||||
|
<related title="" subtitle=""/>
|
||||||
|
</memberdecl>
|
||||||
|
<detaileddescription title=""/>
|
||||||
|
<memberdef>
|
||||||
|
<typedefs title=""/>
|
||||||
|
<enums title=""/>
|
||||||
|
<constructors title=""/>
|
||||||
|
<functions title=""/>
|
||||||
|
<related title=""/>
|
||||||
|
<variables title=""/>
|
||||||
|
<properties title=""/>
|
||||||
|
<events title=""/>
|
||||||
|
</memberdef>
|
||||||
|
<usedfiles visible="$SHOW_USED_FILES"/>
|
||||||
|
<authorsection visible="yes"/>
|
||||||
|
</class>
|
||||||
|
|
||||||
|
<!-- Layout definition for a namespace page -->
|
||||||
|
<namespace>
|
||||||
|
<briefdescription visible="yes"/>
|
||||||
|
<detaileddescription title=""/>
|
||||||
|
<memberdecl>
|
||||||
|
<nestednamespaces visible="yes" title=""/>
|
||||||
|
<classes visible="yes" title=""/>
|
||||||
|
<membergroups visible="yes"/>
|
||||||
|
<typedefs title=""/>
|
||||||
|
<enums title=""/>
|
||||||
|
<functions title=""/>
|
||||||
|
<variables title=""/>
|
||||||
|
</memberdecl>
|
||||||
|
<memberdef>
|
||||||
|
<typedefs title=""/>
|
||||||
|
<enums title=""/>
|
||||||
|
<functions title=""/>
|
||||||
|
<variables title=""/>
|
||||||
|
</memberdef>
|
||||||
|
<authorsection visible="yes"/>
|
||||||
|
</namespace>
|
||||||
|
|
||||||
|
<!-- Layout definition for a file page -->
|
||||||
|
<file>
|
||||||
|
<briefdescription visible="yes"/>
|
||||||
|
<includes visible="$SHOW_INCLUDE_FILES"/>
|
||||||
|
<includegraph visible="$INCLUDE_GRAPH"/>
|
||||||
|
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
|
||||||
|
<sourcelink visible="yes"/>
|
||||||
|
<memberdecl>
|
||||||
|
<classes visible="yes" title=""/>
|
||||||
|
<namespaces visible="yes" title=""/>
|
||||||
|
<defines title=""/>
|
||||||
|
<typedefs title=""/>
|
||||||
|
<enums title=""/>
|
||||||
|
<functions title=""/>
|
||||||
|
<variables title=""/>
|
||||||
|
</memberdecl>
|
||||||
|
<detaileddescription title=""/>
|
||||||
|
<memberdef>
|
||||||
|
<defines title=""/>
|
||||||
|
<typedefs title=""/>
|
||||||
|
<enums title=""/>
|
||||||
|
<functions title=""/>
|
||||||
|
<variables title=""/>
|
||||||
|
</memberdef>
|
||||||
|
<authorsection/>
|
||||||
|
</file>
|
||||||
|
|
||||||
|
<!-- Layout definition for a group page -->
|
||||||
|
<group>
|
||||||
|
<briefdescription visible="yes"/>
|
||||||
|
<groupgraph visible="$GROUP_GRAPHS"/>
|
||||||
|
<detaileddescription title=""/>
|
||||||
|
<memberdecl>
|
||||||
|
<classes visible="yes" title=""/>
|
||||||
|
<namespaces visible="yes" title=""/>
|
||||||
|
<dirs visible="yes" title=""/>
|
||||||
|
<nestedgroups visible="yes" title=""/>
|
||||||
|
<files visible="yes" title=""/>
|
||||||
|
<defines title=""/>
|
||||||
|
<typedefs title=""/>
|
||||||
|
<enums title=""/>
|
||||||
|
<enumvalues title=""/>
|
||||||
|
<functions title=""/>
|
||||||
|
<variables title=""/>
|
||||||
|
<signals title=""/>
|
||||||
|
<publicslots title=""/>
|
||||||
|
<protectedslots title=""/>
|
||||||
|
<privateslots title=""/>
|
||||||
|
<events title=""/>
|
||||||
|
<properties title=""/>
|
||||||
|
<friends title=""/>
|
||||||
|
</memberdecl>
|
||||||
|
<memberdef>
|
||||||
|
<pagedocs/>
|
||||||
|
<defines title=""/>
|
||||||
|
<typedefs title=""/>
|
||||||
|
<enums title=""/>
|
||||||
|
<enumvalues title=""/>
|
||||||
|
<functions title=""/>
|
||||||
|
<variables title=""/>
|
||||||
|
<signals title=""/>
|
||||||
|
<publicslots title=""/>
|
||||||
|
<protectedslots title=""/>
|
||||||
|
<privateslots title=""/>
|
||||||
|
<events title=""/>
|
||||||
|
<properties title=""/>
|
||||||
|
<friends title=""/>
|
||||||
|
</memberdef>
|
||||||
|
<authorsection visible="yes"/>
|
||||||
|
</group>
|
||||||
|
|
||||||
|
<!-- Layout definition for a directory page -->
|
||||||
|
<directory>
|
||||||
|
<briefdescription visible="yes"/>
|
||||||
|
<directorygraph visible="yes"/>
|
||||||
|
<memberdecl>
|
||||||
|
<dirs visible="yes"/>
|
||||||
|
<files visible="yes"/>
|
||||||
|
</memberdecl>
|
||||||
|
<detaileddescription title=""/>
|
||||||
|
</directory>
|
||||||
|
</doxygenlayout>
|
255
src/pplib/docs/credits.dox
Normal file
255
src/pplib/docs/credits.dox
Normal file
|
@ -0,0 +1,255 @@
|
||||||
|
/*!\page pplPageCredits Credits
|
||||||
|
|
||||||
|
Die PPL-Library verwendet fremden Code, der zum Teil in der Library intergiert ist,
|
||||||
|
zum Teil wird dagegen gelinkt. Sämtlicher integrierter Code sowie alle zwingend
|
||||||
|
erforderlichen Libraries stehen unter einer BSD oder BSD ähnlichen Lizenz.
|
||||||
|
|
||||||
|
- \ref pplPageCredits_Integrated
|
||||||
|
- \ref pplPageCredits_Linked
|
||||||
|
- \ref pplPageCredits_Linked_Required
|
||||||
|
- \ref pplPageCredits_Linked_Optional
|
||||||
|
|
||||||
|
\section pplPageCredits_Integrated Integrierter Code
|
||||||
|
- <b>MD5-Hashberechnung</b>\n
|
||||||
|
Copyright RSA Data Security, Inc. MD5 Message-Digest Algorithm)
|
||||||
|
\code
|
||||||
|
MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
|
||||||
|
|
||||||
|
Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
|
||||||
|
rights reserved.
|
||||||
|
|
||||||
|
License to copy and use this software is granted provided that it
|
||||||
|
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
|
||||||
|
Algorithm" in all material mentioning or referencing this software
|
||||||
|
or this function.
|
||||||
|
|
||||||
|
License is also granted to make and use derivative works provided
|
||||||
|
that such works are identified as "derived from the RSA Data
|
||||||
|
Security, Inc. MD5 Message-Digest Algorithm" in all material
|
||||||
|
mentioning or referencing the derived work.
|
||||||
|
|
||||||
|
RSA Data Security, Inc. makes no representations concerning either
|
||||||
|
the merchantability of this software or the suitability of this
|
||||||
|
software for any particular purpose. It is provided "as is"
|
||||||
|
without express or implied warranty of any kind.
|
||||||
|
|
||||||
|
These notices must be retained in any copies of any part of this
|
||||||
|
documentation and/or software.
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
- <b>Zufallszahlengenerator</b>\n
|
||||||
|
Copyright (c) 1983, 1993 The Regents of the University of California
|
||||||
|
\code
|
||||||
|
Copyright (c) 1983, 1993
|
||||||
|
The Regents of the University of California. All rights reserved.
|
||||||
|
|
||||||
|
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 above 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.
|
||||||
|
4. Neither the name of the University 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 REGENTS 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 REGENTS 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.
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
- <b>CRC32-Berechnung</b>\n
|
||||||
|
Quelle unbekannt
|
||||||
|
- <b>GIF-Reader</b>\n
|
||||||
|
Copyright 1990, 1991, 1993 by David Koblas
|
||||||
|
\code
|
||||||
|
+-------------------------------------------------------------------+
|
||||||
|
| Copyright 1990, 1991, 1993, David Koblas. (koblas@netcom.com) |
|
||||||
|
| Permission to use, copy, modify, and distribute this software |
|
||||||
|
| and its documentation for any purpose and without fee is hereby |
|
||||||
|
| granted, provided that the above copyright notice appear in all |
|
||||||
|
| copies and that both that copyright notice and this permission |
|
||||||
|
| notice appear in supporting documentation. This software is |
|
||||||
|
| provided "as is" without express or implied warranty. |
|
||||||
|
+-------------------------------------------------------------------+
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\section pplPageCredits_Linked Verlinkte Libraries
|
||||||
|
\subsection pplPageCredits_Linked_Required Zwingend erforderliche Libraries
|
||||||
|
Die nachfolgenden Libraries sind zwingend erforderlich, um die PPL-Library kompilieren zu können.
|
||||||
|
Das configure-Script prüft diese und bricht ab, wenn sie nicht vorhanden sind.
|
||||||
|
|
||||||
|
- <b>PCRE</b> (http://www.pcre.org/)\n
|
||||||
|
Copyright (c) 1997-2008 University of Cambridge All rights reserved.
|
||||||
|
\code
|
||||||
|
PCRE LICENCE
|
||||||
|
------------
|
||||||
|
|
||||||
|
PCRE is a library of functions to support regular expressions whose syntax
|
||||||
|
and semantics are as close as possible to those of the Perl 5 language.
|
||||||
|
|
||||||
|
Release 7 of PCRE is distributed under the terms of the "BSD" licence, as
|
||||||
|
specified below. The documentation for PCRE, supplied in the "doc"
|
||||||
|
directory, is distributed under the same terms as the software itself.
|
||||||
|
|
||||||
|
The basic library functions are written in C and are freestanding. Also
|
||||||
|
included in the distribution is a set of C++ wrapper functions.
|
||||||
|
|
||||||
|
|
||||||
|
THE BASIC LIBRARY FUNCTIONS
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
Written by: Philip Hazel
|
||||||
|
Email local part: ph10
|
||||||
|
Email domain: cam.ac.uk
|
||||||
|
|
||||||
|
University of Cambridge Computing Service,
|
||||||
|
Cambridge, England.
|
||||||
|
|
||||||
|
Copyright (c) 1997-2008 University of Cambridge
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
|
||||||
|
THE C++ WRAPPER FUNCTIONS
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Contributed by: Google Inc.
|
||||||
|
|
||||||
|
Copyright (c) 2007-2008, Google Inc.
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
|
||||||
|
THE "BSD" LICENCE
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
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 the University of Cambridge nor the name of Google
|
||||||
|
Inc. nor the names of their 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.
|
||||||
|
|
||||||
|
End
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
- <b>Zlib</b> (http://www.zlib.net/)\n
|
||||||
|
Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
|
||||||
|
\code
|
||||||
|
zlib.h -- interface of the 'zlib' general purpose compression library
|
||||||
|
version 1.2.3, July 18th, 2005
|
||||||
|
|
||||||
|
Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied
|
||||||
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
arising from the use of this software.
|
||||||
|
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it
|
||||||
|
freely, subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not
|
||||||
|
claim that you wrote the original software. If you use this software
|
||||||
|
in a product, an acknowledgment in the product documentation would be
|
||||||
|
appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
|
Jean-loup Gailly jloup@gzip.org
|
||||||
|
Mark Adler madler@alumni.caltech.edu
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
- <b>Bzip2</b> (http://www.bzip.org/)\n
|
||||||
|
Copyright (C) 1996-2007 Julian R Seward
|
||||||
|
\code
|
||||||
|
This program, "bzip2", the associated library "libbzip2", and all
|
||||||
|
documentation, are copyright (C) 1996-2007 Julian R Seward. All
|
||||||
|
rights reserved.
|
||||||
|
|
||||||
|
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 above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. The origin of this software must not be misrepresented; you must
|
||||||
|
not claim that you wrote the original software. If you use this
|
||||||
|
software in a product, an acknowledgment in the product
|
||||||
|
documentation would be appreciated but is not required.
|
||||||
|
|
||||||
|
3. Altered source versions must be plainly marked as such, and must
|
||||||
|
not be misrepresented as being the original software.
|
||||||
|
|
||||||
|
4. The name of the author may not be used to endorse or promote
|
||||||
|
products derived from this software without specific prior written
|
||||||
|
permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||||
|
|
||||||
|
Julian Seward, jseward@bzip.org
|
||||||
|
bzip2/libbzip2 version 1.0.5 of 10 December 2007
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\subsection pplPageCredits_Linked_Optional Optionale Libraries
|
||||||
|
Die Nachfolgenden Libraries können optional mit der PPL-Library verwendet werden.
|
||||||
|
Bei Verwendung dieser Libraries müssen die gegebenenfalls abweichenden Lizenzbestimmungen
|
||||||
|
berücksichtigt werden.
|
||||||
|
|
||||||
|
- MySQL (http://www.mysql.org/)
|
||||||
|
- FreeTDS (http://www.freetds.org/)
|
||||||
|
- Sybase (http://www.sybase.com/)
|
||||||
|
- PNG (http://www.libpng.org/pub/png/)
|
||||||
|
- JPEG (http://www.ijg.org/)
|
||||||
|
- SDL (http://www.libsdl.org/)
|
||||||
|
- FreeType2 (http://www.freetype.org/)
|
||||||
|
- Iconv (http://www.gnu.org/software/libiconv/)
|
||||||
|
- MCrypt (http://mcrypt.sourceforge.net/)
|
||||||
|
- Lame (http://lame.sourceforge.net/)
|
||||||
|
- LibMad (http://mad.sourceforge.net/)
|
||||||
|
- Curl (http://curl.haxx.se/)
|
||||||
|
- OpenSSL (http://www.openssl.org/)
|
||||||
|
- LDNS (http://www.nlnetlabs.nl/projects/ldns/)
|
||||||
|
|
||||||
|
*/
|
35
src/pplib/docs/datenbanken.dox
Normal file
35
src/pplib/docs/datenbanken.dox
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
/*!\defgroup PPLGroupDatabases Datenbanken
|
||||||
|
\brief Datenbank-Klassen
|
||||||
|
|
||||||
|
\desc
|
||||||
|
Die nachfolgenden Klassen und Funktionen können verwendet werden, um auf verschiedene Datenbanken
|
||||||
|
zuzugreifen. Die Funktionen und Klassen befinden sich im Namespace \ref ppl7::db.
|
||||||
|
|
||||||
|
\par Verwendung:
|
||||||
|
Um Queries auf einer Datenbank auszuführen, muss zunächst eine Verbindung hergestellt werden. Im einfachsten
|
||||||
|
Fall wird dazu eine Instanz der gewünschten Datenbank erstellt (z.B. ppl7::db::MySQL) und deren
|
||||||
|
Connect-Funktion aufgerufen, oder die Funktion ppl7::db::Connect aufgerufen, die als Ergebnis einen
|
||||||
|
Pointer auf ein ppl7::db::Database-Objekt zurückliefert.
|
||||||
|
\par
|
||||||
|
Anschließend können mit der ppl7::db::Exec oder ppl7::db::Query-Funktion des Objekts SQL-Queries ausgeführt werden, wobei
|
||||||
|
Exec nur ein "Erfolgreich" zurückliefert, aber keine Daten, und Query ein ppl7::db::ResultSet-Objekt zurückliefert,
|
||||||
|
aus dem das Ergebnis des Queries ausgelesen werden kann.
|
||||||
|
\par
|
||||||
|
Falls man sehr viele Datenbank-Verbindungen parallel benötigt, können zur Verwaltung auch
|
||||||
|
Datenbank-Pools verwendet werden. Hiervon gibt es 2 Stück: <ol>
|
||||||
|
<li>ppl7::db::Pool zur Verwaltung von beliebig vielen Verbindungen zu einer einzelnen Datenbank</li>
|
||||||
|
<li>ppl7::db::PoolEx zur Verwaltung von beliebig vielen Verbindungen zu verschiedenen Datenbanken</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*!\namespace ppl7::db
|
||||||
|
\ingroup PPLGroupDatabases
|
||||||
|
\brief Namensraum der Datenbank-Funktionen und Klassen
|
||||||
|
|
||||||
|
\desc
|
||||||
|
In diesem Namensraum befinden sich Funktionen und Klassen zur Verwendung von Datenbanken.
|
||||||
|
Weitere Informationen sind \ref PPLGroupDatabases "hier zu finden".
|
||||||
|
|
||||||
|
*/
|
40
src/pplib/docs/datentypen.dox
Normal file
40
src/pplib/docs/datentypen.dox
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
/*! \defgroup PPLGroupDataTypes Datentypen
|
||||||
|
* \section DatenTypIntegers Integers
|
||||||
|
PPL7 verwendet in vielen Fällen spezielle Datentypen, um sicherzustellen, dass
|
||||||
|
diese auf allen Platformen gleich groß sind. Diese sind:
|
||||||
|
<table>
|
||||||
|
<tr><th>Datentyp</th><th>Beschreibung</th></tr>
|
||||||
|
<tr><td>ppluint8</td><td>Vorzeichenloser 8-Bit Wert</td></tr>
|
||||||
|
<tr><td>ppluint16</td><td>Vorzeichenloser 16-Bit Wert</td></tr>
|
||||||
|
<tr><td>ppluint32</td><td>Vorzeichenloser 32-Bit Wert</td></tr>
|
||||||
|
<tr><td>ppluint64</td><td>Vorzeichenloser 64-Bit Wert</td></tr>
|
||||||
|
<tr><td>ppluint8</td><td>8-Bit Wert mit Vorzeichen</td></tr>
|
||||||
|
<tr><td>ppluint16</td><td>16-Bit Wert mit Vorzeichen</td></tr>
|
||||||
|
<tr><td>ppluint32</td><td>32-Bit Wert mit Vorzeichen</td></tr>
|
||||||
|
<tr><td>ppluint64</td><td>64-Bit Wert mit Vorzeichen</td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
\section DatenTypOther Andere Datenstrukturen
|
||||||
|
\li \link ppl7::Variant Variant:\endlink Basisklasse für die nachfolgenden Datenstrukturen \n
|
||||||
|
|
||||||
|
|
||||||
|
\li \link ppl7::String String-Klasse \endlink \n
|
||||||
|
Die String-Klasse ppl7::String wird zum Verwalten von beliebig großen Strings verwendet
|
||||||
|
|
||||||
|
\li \link ppl7::Array Einfache Arrays mit Strings\endlink \n
|
||||||
|
Die Klasse ppl7::Array wird für einfache zweidimensionale Array verwendet, wobei der
|
||||||
|
Schlüssel eine laufende Nummer ist und der Wert ein String.
|
||||||
|
|
||||||
|
\li \link ppl7::AssocArray Komplexe Assoziative Arrays \endlink \n
|
||||||
|
Die Klasse ppl7::AssocArray wird für komplexe mehrdimensionale Arrays verwendet, wobei
|
||||||
|
der Schlüssel ein String oder eine Nummer sein kann. Der Wert kann alle hier aufgeführten Datentypen
|
||||||
|
beinhalten.
|
||||||
|
|
||||||
|
\li \link ppl7::ByteArray Ein Datentyp zum Speichern von binären Daten \endlink \n
|
||||||
|
Die Klasse ppl7::ByteArray wird zum Speichern von Binären Daten verwendet.
|
||||||
|
|
||||||
|
\li \link ppl7::ByteArrayPtr Ein Datentyp zum Speichern von Pointern \endlink \n
|
||||||
|
Die Klasse ppl7::ByteArrayPtr wird zum Speichern von Pointern auf beliebige Speicherbereiche
|
||||||
|
verwendet. Sie dient als Basisklasse für ppl7::ByteArray.
|
||||||
|
*/
|
||||||
|
|
32
src/pplib/docs/examples/CThread_ThreadMain.cpp
Normal file
32
src/pplib/docs/examples/CThread_ThreadMain.cpp
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
#include <ppl7.h>
|
||||||
|
|
||||||
|
class MyClass : public ppl7::Thread
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void threadMain();
|
||||||
|
};
|
||||||
|
|
||||||
|
void MyClass::threadMain()
|
||||||
|
{
|
||||||
|
printf ("Client-Thread wurde gestartet.\n");
|
||||||
|
while (1) {
|
||||||
|
if(threadShouldStop()) break; // Soll der Thread gestoppt werden?
|
||||||
|
ppl7::MSleep(100); // 100 Millisekunden warten
|
||||||
|
}
|
||||||
|
printf ("Client-Thread wurde beendet.\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
MyClass Job;
|
||||||
|
printf ("Der Haupthread startet einen Client-Thread...\n");
|
||||||
|
Job.threadStart();
|
||||||
|
printf ("Der Haupthread wartet nun 5 Sekunden...\n");
|
||||||
|
ppl7::SSleep(5);
|
||||||
|
printf ("Der Haupthread signalisiert dem Client-Thread, dass er sich beenden soll...\n");
|
||||||
|
Job.threadSignalStop();
|
||||||
|
printf ("Der Haupthread wartet, bis der Client-Thread beendet ist...\n");
|
||||||
|
Job.threadStop();
|
||||||
|
printf ("Der Client-Thread wurde erfolgreich gestoppt.\n");
|
||||||
|
return 0;
|
||||||
|
}
|
69
src/pplib/docs/examples/IcecastExample.cpp
Normal file
69
src/pplib/docs/examples/IcecastExample.cpp
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
#include <ppl7.h>
|
||||||
|
#include <ppl7-audio.h>
|
||||||
|
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
ppl7::Icecast ice; // Icecast-Objekt anlegen
|
||||||
|
ppl7::File file;
|
||||||
|
|
||||||
|
// Version der libshout ausgeben
|
||||||
|
printf ("libshout-Version: %s\n",(const char*)ice.version());
|
||||||
|
|
||||||
|
// Zu streamende MP3-Datei öffnen
|
||||||
|
if (!file.Open("/musik/powerplay/Ausgaben/Powerplay 152.mp3")) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Buffer für Audio-Daten reservieren
|
||||||
|
char *buffer=(char*)malloc(8192);
|
||||||
|
if (!buffer) {
|
||||||
|
printf("Kein Speicher!\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Exceptions abfangen
|
||||||
|
try {
|
||||||
|
// Stream-Format auf MP3 setzen
|
||||||
|
ice.setFormatMP3();
|
||||||
|
|
||||||
|
// Verbindungsparameter definieren
|
||||||
|
ice.setConnection("icecast.pfp.de",8000,"icesource");
|
||||||
|
|
||||||
|
// Mount-Punkt festlegen
|
||||||
|
ice.setMount("/live");
|
||||||
|
|
||||||
|
// Stream-Informationen setzen
|
||||||
|
ice.setGenre("Trance House Techno Electro");
|
||||||
|
ice.setName("Patrick F.'s Powerplay");
|
||||||
|
ice.setUrl("http://powerplay.pfp.de/");
|
||||||
|
ice.setDescription("Trance, House, Techno, Electro, mixed by Patrick Fedick");
|
||||||
|
|
||||||
|
// Verbindung zum Server aufbauen
|
||||||
|
ice.connect();
|
||||||
|
|
||||||
|
// Name des aktuellen Titels als Metainformation senden
|
||||||
|
ice.setTitle("Powerplay Ausgabe 152");
|
||||||
|
|
||||||
|
printf ("Beginne Stream\n");
|
||||||
|
size_t bytes;
|
||||||
|
// Quelldatei Schrittweise einlesen
|
||||||
|
while ((bytes=file.Fread(buffer,1,8192))) {
|
||||||
|
// Mit Server synchronisieren
|
||||||
|
ice.sync();
|
||||||
|
// Daten senden
|
||||||
|
ice.send(buffer,bytes);
|
||||||
|
}
|
||||||
|
printf ("Stream beendet\n");
|
||||||
|
|
||||||
|
} catch (ppl6::Exception& e) {
|
||||||
|
// Ursache der Exception ausgeben
|
||||||
|
printf ("Exception aufgetreten: %s\n",e.what());
|
||||||
|
free(buffer);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
free(buffer);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
384
src/pplib/docs/examples/db_examples.cpp
Normal file
384
src/pplib/docs/examples/db_examples.cpp
Normal file
|
@ -0,0 +1,384 @@
|
||||||
|
|
||||||
|
int DB_Example1() {
|
||||||
|
ppl6::CAssocArray param;
|
||||||
|
param.Set("type","mysql");
|
||||||
|
param.Set("host","db.pfp.de");
|
||||||
|
param.Set("port","3306");
|
||||||
|
param.Set("user","patrick");
|
||||||
|
param.Set("password","xxxxxxx");
|
||||||
|
param.Set("dbname","test");
|
||||||
|
|
||||||
|
ppl6::db::Database *db=ppl6::db::Connect(param);
|
||||||
|
if (!db) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
} // EOF
|
||||||
|
|
||||||
|
int DB_Example2() {
|
||||||
|
ppl6::db::MySQL db;
|
||||||
|
db.SetParam("host","db.pfp.de");
|
||||||
|
db.SetParam("port","3306");
|
||||||
|
db.SetParam("user","patrick");
|
||||||
|
db.SetParam("password","xxxxxxx");
|
||||||
|
db.SetParam("dbname","test");
|
||||||
|
|
||||||
|
if (!db.Connect()) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
} // EOF
|
||||||
|
|
||||||
|
|
||||||
|
int DB_Example3() {
|
||||||
|
ppl6::CAssocArray param;
|
||||||
|
param.Set("host","db.pfp.de");
|
||||||
|
param.Set("port","3306");
|
||||||
|
param.Set("user","patrick");
|
||||||
|
param.Set("password","xxxxxxx");
|
||||||
|
param.Set("dbname","test");
|
||||||
|
ppl6::db::MySQL db;
|
||||||
|
if (!db.Connect(param)) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
} // EOF
|
||||||
|
|
||||||
|
int DB_Example4() {
|
||||||
|
ppl6::CAssocArray param;
|
||||||
|
param.Set("host","db.pfp.de");
|
||||||
|
param.Set("port","3306");
|
||||||
|
param.Set("user","patrick");
|
||||||
|
param.Set("password","xxxxxxx");
|
||||||
|
param.Set("dbname","test");
|
||||||
|
ppl6::db::MySQL db;
|
||||||
|
if (!db.ConnectCreate(param)) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
} // EOF
|
||||||
|
|
||||||
|
int DB_MySQL_Example1() {
|
||||||
|
// Verbindungsparameter festlegen
|
||||||
|
ppl6::CAssocArray param;
|
||||||
|
param.Set("host","db.pfp.de");
|
||||||
|
param.Set("port","3306");
|
||||||
|
param.Set("user","patrick");
|
||||||
|
param.Set("password","xxxxxxx");
|
||||||
|
param.Set("dbname","test");
|
||||||
|
|
||||||
|
// Datenbank-Klasse anlegen
|
||||||
|
ppl6::db::MySQL db;
|
||||||
|
|
||||||
|
// Verbindung aufbauen
|
||||||
|
if (!db.Connect(param)) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Query abschicken
|
||||||
|
ppl6::db::Result *res=db.Query("select * from user oder by nachname, vorname");
|
||||||
|
if (!res) { // Fehler abfangen
|
||||||
|
ppl6::PrintError();
|
||||||
|
} else {
|
||||||
|
printf ("Es wurden %i Datensätze gefunden\n",res->Rows());
|
||||||
|
// Result wieder freigeben
|
||||||
|
delete res;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Die Verbindung wird durch den Destruktor der Klasse automatisch
|
||||||
|
// ordnungsgemäß getrennt
|
||||||
|
} // EOF
|
||||||
|
|
||||||
|
int DB_Sybase_Example1() {
|
||||||
|
// Verbindungsparameter festlegen
|
||||||
|
ppl6::CAssocArray param;
|
||||||
|
param.Set("host","db.pfp.de");
|
||||||
|
param.Set("port","4711");
|
||||||
|
param.Set("user","patrick");
|
||||||
|
param.Set("password","xxxxxxx");
|
||||||
|
param.Set("dbname","test");
|
||||||
|
|
||||||
|
// Datenbank-Klasse anlegen
|
||||||
|
ppl6::db::Sybase db;
|
||||||
|
|
||||||
|
// Verbindung aufbauen
|
||||||
|
if (!db.Connect(param)) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Query abschicken
|
||||||
|
ppl6::db::Result *res=db.Query("select * from user oder by nachname, vorname");
|
||||||
|
if (!res) { // Fehler abfangen
|
||||||
|
ppl6::PrintError();
|
||||||
|
} else {
|
||||||
|
printf ("Es wurden %i Datensätze gefunden\n",res->Rows());
|
||||||
|
// Result wieder freigeben
|
||||||
|
delete res;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Die Verbindung wird durch den Destruktor der Klasse automatisch
|
||||||
|
// ordnungsgemäß getrennt
|
||||||
|
} // EOF
|
||||||
|
|
||||||
|
int DB_Sybase_Example2() {
|
||||||
|
// Verbindungsparameter festlegen
|
||||||
|
ppl6::CAssocArray param;
|
||||||
|
param.Set("host","db.pfp.de");
|
||||||
|
param.Set("port","4711");
|
||||||
|
param.Set("user","patrick");
|
||||||
|
param.Set("password","xxxxxxx");
|
||||||
|
param.Set("dbname","test");
|
||||||
|
|
||||||
|
// Datenbank-Klasse anlegen
|
||||||
|
ppl6::db::Sybase db;
|
||||||
|
|
||||||
|
// Verbindung aufbauen
|
||||||
|
if (!db.Connect(param)) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Query abschicken
|
||||||
|
ppl6::db::Result *res=db.Query("select * from user oder by nachname, vorname");
|
||||||
|
if (!res) { // Fehler abfangen
|
||||||
|
ppl6::PrintError();
|
||||||
|
} else {
|
||||||
|
pplint64 rows=0;
|
||||||
|
ppl6::CAssocArray row;
|
||||||
|
// Durch das Ergebnis durchiterieren
|
||||||
|
while (res->FetchArray(row)) {
|
||||||
|
// Felder der aktuellen Ergebnis-Zeile befinden sich nun im Array "row" und
|
||||||
|
// können verarbeitet werden
|
||||||
|
printf ("%s %s\n",row["nachname"],row["vorname"]);
|
||||||
|
rows++;
|
||||||
|
}
|
||||||
|
delete res;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Die Verbindung wird durch den Destruktor der Klasse automatisch
|
||||||
|
// ordnungsgemäß getrennt
|
||||||
|
} // EOF
|
||||||
|
|
||||||
|
int DB_Postgres_Example1() {
|
||||||
|
// Verbindungsparameter festlegen
|
||||||
|
ppl6::CAssocArray param;
|
||||||
|
param.Set("host","db.pfp.de");
|
||||||
|
param.Set("port","5432");
|
||||||
|
param.Set("user","patrick");
|
||||||
|
param.Set("password","xxxxxxx");
|
||||||
|
param.Set("dbname","test");
|
||||||
|
|
||||||
|
// Datenbank-Klasse anlegen
|
||||||
|
ppl6::db::Postgres db;
|
||||||
|
|
||||||
|
// Verbindung aufbauen
|
||||||
|
if (!db.Connect(param)) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Query abschicken
|
||||||
|
ppl6::db::Result *res=db.Query("select * from user oder by nachname, vorname");
|
||||||
|
if (!res) { // Fehler abfangen
|
||||||
|
ppl6::PrintError();
|
||||||
|
} else {
|
||||||
|
printf ("Es wurden %i Datensätze gefunden\n",res->Rows());
|
||||||
|
// Result wieder freigeben
|
||||||
|
delete res;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Die Verbindung wird durch den Destruktor der Klasse automatisch
|
||||||
|
// ordnungsgemäß getrennt
|
||||||
|
} // EOF
|
||||||
|
|
||||||
|
|
||||||
|
int DB_Result_Example1() {
|
||||||
|
// Zunächst erstellen wir eine Verbindung zu einer MySQL-Datenbank
|
||||||
|
ppl6::CAssocArray param;
|
||||||
|
param.Set("host","db.pfp.de");
|
||||||
|
param.Set("port","3306");
|
||||||
|
param.Set("user","patrick");
|
||||||
|
param.Set("password","xxxxxxx");
|
||||||
|
param.Set("dbname","test");
|
||||||
|
ppl6::db::MySQL db;
|
||||||
|
// Verbindung zur Datenbank aufbauen
|
||||||
|
if (!db.Connect(param)) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
// Select abschicken
|
||||||
|
ppl6::db::Result *res=db.Query("select * from user order by name");
|
||||||
|
if (!res) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
printf ("Es wurden %lli Datensätze gefunden:\n",res->Rows());
|
||||||
|
ppl6::CAssocArray row;
|
||||||
|
// Wir verwenden Result::FetchArray, um durch das Ergebnis zu traversieren
|
||||||
|
while ((res->FetchArray(row))) {
|
||||||
|
printf ("Name: %s, Email: %s\n",row["name"],row["email"]);
|
||||||
|
}
|
||||||
|
delete res; // Ergebnis löschen, Speicher freigeben
|
||||||
|
db.Disconnect();
|
||||||
|
} // EOF
|
||||||
|
|
||||||
|
|
||||||
|
int DB_Save_Example1(ppl6::db::Database *db) {
|
||||||
|
// Die Funktion geht davon aus, dass "db" eine gültige Datenbank-Verbindung
|
||||||
|
// enthält.
|
||||||
|
ppl6::CAssocArray Data;
|
||||||
|
Data.Set("vorname","Patrick");
|
||||||
|
Data.Set("nachname","Fedick");
|
||||||
|
Data.Set("email","xxx@xxxx.xx");
|
||||||
|
return db->Save("update","user",Data,"where userid=1");
|
||||||
|
} // EOF
|
||||||
|
|
||||||
|
int DB_Pool_Example1() {
|
||||||
|
// Connect-Parameter festlegen
|
||||||
|
ppl6::CAssocArray param;
|
||||||
|
param.Set("type","sybase");
|
||||||
|
param.Set("host","database.example.com");
|
||||||
|
param.Set("port","1234");
|
||||||
|
param.Set("user","demo");
|
||||||
|
param.Set("password","demo");
|
||||||
|
param.Set("dbname","test");
|
||||||
|
|
||||||
|
// Pool erzeugen
|
||||||
|
ppl6::db::Pool Pool;
|
||||||
|
|
||||||
|
// Pool mit den Connect-Parametern initialisieren
|
||||||
|
if (!Pool.SetConnectParams(param)) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verbindung aus dem Pool holen
|
||||||
|
ppl6::db::Database *db=Pool.Get();
|
||||||
|
if (!db) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verbindung verwenden
|
||||||
|
...
|
||||||
|
|
||||||
|
// Verbindung an den Pool zurückgeben
|
||||||
|
if (!Pool.Release(db)) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} // EOF
|
||||||
|
|
||||||
|
int DB_PoolEx_Example1() {
|
||||||
|
// Pool erzeugen
|
||||||
|
ppl6::db::PoolEx Pool;
|
||||||
|
|
||||||
|
// Connect-Parameter für die erste Datenbank festlegen
|
||||||
|
ppl6::CAssocArray param1;
|
||||||
|
param.Set("type","sybase");
|
||||||
|
param.Set("host","database.example.com");
|
||||||
|
param.Set("port","1234");
|
||||||
|
param.Set("user","demo");
|
||||||
|
param.Set("password","demo");
|
||||||
|
param.Set("dbname","test");
|
||||||
|
|
||||||
|
// Pool mit den Connect-Parametern anlegen
|
||||||
|
// Die Datenbank bekommt die ID 1 und den Namen "Hauptdatenbank"
|
||||||
|
if (!Pool.CreatePool(1,"Hauptdatenbank",param)) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Connect-Parameter für die zweite Datenbank festlegen
|
||||||
|
ppl6::CAssocArray param1;
|
||||||
|
param.Set("type","mysql");
|
||||||
|
param.Set("host","mysql.example.com");
|
||||||
|
param.Set("port","4711");
|
||||||
|
param.Set("user","demo");
|
||||||
|
param.Set("password","demo");
|
||||||
|
param.Set("dbname","test");
|
||||||
|
|
||||||
|
// Pool mit den Connect-Parametern anlegen.
|
||||||
|
// Die Datenbank bekommt die ID 2 und den Namen "MySQL_1"
|
||||||
|
if (!Pool.CreatePool(2,"DB2",param)) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Verbindung zur ersten Datenbank anhand des Namens holen
|
||||||
|
ppl6::db::Database *db=Pool.Get("Hauptdatenbank");
|
||||||
|
if (!db) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verbindung verwenden
|
||||||
|
...
|
||||||
|
|
||||||
|
// Verbindung an den Pool zurückgeben
|
||||||
|
if (!Pool.Release(db)) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verbindung zur zweiten Datenbank anhand der ID holen
|
||||||
|
ppl6::db::Database *db=Pool.Get(2);
|
||||||
|
if (!db) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verbindung verwenden
|
||||||
|
...
|
||||||
|
|
||||||
|
// Verbindung an den Pool zurückgeben
|
||||||
|
if (!Pool.Release(db)) {
|
||||||
|
ppl6::PrintError();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} // EOF
|
||||||
|
|
||||||
|
|
||||||
|
ppl6::db::Result *DB_GenericResult_Example1(const CString &Query) {
|
||||||
|
int num_fields; // Nimmt die Anzahl Felder im Result auf
|
||||||
|
// Datenbank-spezifische Code, der das Query ausführt
|
||||||
|
// ...
|
||||||
|
// Result-Objekt erstellen
|
||||||
|
ppl6::db::GenericResult *res=new GenericResult;
|
||||||
|
if (!res) { // Out of Memory anfangen
|
||||||
|
SetError(2);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
// Anzahl Felder im Result übergeben
|
||||||
|
res->SetNumFields(num_fields);
|
||||||
|
for (int i=0;i<num_fields;i++) {
|
||||||
|
const char *field_name = xxxxx; // Name des Feldes
|
||||||
|
Result::Type field_type = xxxxx; // Datentyp
|
||||||
|
// Namen und Feldtypen übergeben
|
||||||
|
res->SetFieldName(i, field_name, field_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ergebniszeilen übergeben
|
||||||
|
for (pplint64 r=0;r<num_rows;r++) {
|
||||||
|
// Neue Zeile
|
||||||
|
res->NewRow();
|
||||||
|
// Felder durchgehen
|
||||||
|
for (int i=0;i<num_fields;i++) {
|
||||||
|
void *value = xxxx; // Pointer auf den Inhalt des Feldes
|
||||||
|
int len_value = xxxx; // Anzahl Bytes des Feldes
|
||||||
|
res->StoreField(i,value,len_value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Betroffene Zeilen übergeben
|
||||||
|
res->SetAffectedRows(num_rows);
|
||||||
|
// Index aufbauen
|
||||||
|
res->BuildIndex();
|
||||||
|
// fertig
|
||||||
|
return (ppl6::db::Result *)res;
|
||||||
|
} // EOF
|
||||||
|
|
||||||
|
|
||||||
|
|
76
src/pplib/docs/examples/nasm.rules
Normal file
76
src/pplib/docs/examples/nasm.rules
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<VisualStudioToolFile
|
||||||
|
Name="Nasm"
|
||||||
|
Version="8.00"
|
||||||
|
>
|
||||||
|
<Rules>
|
||||||
|
<CustomBuildRule
|
||||||
|
Name="NASM"
|
||||||
|
DisplayName="Nasm Assembler"
|
||||||
|
CommandLine="nasm -f win32 [AllOptions] [AdditionalOptions] [Inputs]"
|
||||||
|
Outputs="[$ObjectFileName]"
|
||||||
|
FileExtensions="*.asm"
|
||||||
|
ExecutionDescription="Assembling $(InputFileName)"
|
||||||
|
ShowOnlyRuleProperties="false"
|
||||||
|
>
|
||||||
|
<Properties>
|
||||||
|
<StringProperty
|
||||||
|
Name="Defines"
|
||||||
|
DisplayName="Definitions"
|
||||||
|
Category="Pre-Defined Symbols"
|
||||||
|
Description="Specify pre-defined symbols ('symbol' or 'symbol = value') "
|
||||||
|
Switch="-D [value]"
|
||||||
|
Delimited="true"
|
||||||
|
Inheritable="true"
|
||||||
|
/>
|
||||||
|
<StringProperty
|
||||||
|
Name="IncludePaths"
|
||||||
|
DisplayName="Include Paths"
|
||||||
|
Category="Configuration"
|
||||||
|
Description="Set the paths for any additional include files"
|
||||||
|
Switch="-I "[value]""
|
||||||
|
Delimited="true"
|
||||||
|
Inheritable="true"
|
||||||
|
/>
|
||||||
|
<StringProperty
|
||||||
|
Name="UnDefines"
|
||||||
|
DisplayName="Remove Definitions"
|
||||||
|
Category="Pre-Defined Symbols"
|
||||||
|
Description="Remove pre-defined symbols "
|
||||||
|
Switch="-U [value]"
|
||||||
|
Delimited="true"
|
||||||
|
Inheritable="true"
|
||||||
|
/>
|
||||||
|
<StringProperty
|
||||||
|
Name="ObjectFileName"
|
||||||
|
DisplayName="Object File Name"
|
||||||
|
Category="Output"
|
||||||
|
Description="Select the output file name"
|
||||||
|
Switch="-o "[value]""
|
||||||
|
DefaultValue=""$(IntDir)\$(InputName).obj""
|
||||||
|
/>
|
||||||
|
<StringProperty
|
||||||
|
Name="ListFileName"
|
||||||
|
DisplayName="List File Name"
|
||||||
|
Category="Output"
|
||||||
|
Description="Select an output listing by setting its file name"
|
||||||
|
Switch="-l "[value]""
|
||||||
|
/>
|
||||||
|
<StringProperty
|
||||||
|
Name="PreIncludeFile"
|
||||||
|
DisplayName="Pre Include File"
|
||||||
|
Category="Configuration"
|
||||||
|
Description="Select a pre-included file by setting its name"
|
||||||
|
Switch="-P "[value]""
|
||||||
|
/>
|
||||||
|
<BooleanProperty
|
||||||
|
Name="Debug"
|
||||||
|
DisplayName="Debug Information"
|
||||||
|
Category="Output"
|
||||||
|
Description="Generate debugging information"
|
||||||
|
Switch="-g "
|
||||||
|
/>
|
||||||
|
</Properties>
|
||||||
|
</CustomBuildRule>
|
||||||
|
</Rules>
|
||||||
|
</VisualStudioToolFile>
|
95
src/pplib/docs/examples/ppl7.m4
Normal file
95
src/pplib/docs/examples/ppl7.m4
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
dnl AX_PATH_LIB_PPL7([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
AC_DEFUN([AX_PATH_LIB_PPL7],[dnl
|
||||||
|
|
||||||
|
AC_ARG_WITH([libppl7],
|
||||||
|
[ --with-libppl7[[=PATH]] Prefix where PPL7-Library is installed],
|
||||||
|
[ppl7_prefix="$withval"],
|
||||||
|
[ppl7_prefix="no"])
|
||||||
|
|
||||||
|
#if test "$ppl7_prefix" != "no"
|
||||||
|
#then
|
||||||
|
if test "$ppl7_prefix" = "no"
|
||||||
|
then
|
||||||
|
AC_PATH_PROG(ppl7config,ppl7-config)
|
||||||
|
elif test "$ppl7_prefix" != "yes"
|
||||||
|
then
|
||||||
|
ppl7config="$ppl7_prefix/bin/ppl7-config"
|
||||||
|
else
|
||||||
|
AC_PATH_PROG(ppl7config,ppl7-config)
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for lib ppl7])
|
||||||
|
if test [ -z "$ppl7config" ]
|
||||||
|
then
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
AC_MSG_ERROR([ppl7 library (libppl7) and/or headers not found])
|
||||||
|
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
min_ppl_version=ifelse([$1], ,6.0.0,[$1])
|
||||||
|
AC_MSG_CHECKING(for ppl7 version >= $min_ppl_version)
|
||||||
|
|
||||||
|
ppl_version=`${ppl7config} --version`
|
||||||
|
ppl_config_major_version=`echo $ppl_version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||||
|
ppl_config_minor_version=`echo $ppl_version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||||
|
ppl_config_micro_version=`echo $ppl_version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||||
|
ppl_config_version=`expr $ppl_config_major_version \* 10000 + $ppl_config_minor_version \* 100 + $ppl_config_micro_version`
|
||||||
|
|
||||||
|
ppl_req_major_version=`echo $min_ppl_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||||
|
ppl_req_minor_version=`echo $min_ppl_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||||
|
ppl_req_micro_version=`echo $min_ppl_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||||
|
ppl_req_version=`expr $ppl_req_major_version \* 10000 + $ppl_req_minor_version \* 100 + $ppl_req_micro_version`
|
||||||
|
|
||||||
|
if test $ppl_config_version -lt $ppl_req_version
|
||||||
|
then
|
||||||
|
AC_MSG_RESULT([no, have $ppl_version])
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([yes (version $ppl_version) ])
|
||||||
|
#AC_MSG_CHECKING(ppl7 debug libraries)
|
||||||
|
LIBPPL7_DEBUG_LIBS=`${ppl7config} --libs debug`
|
||||||
|
#AC_MSG_RESULT($LIBPPL7_DEBUG_LIBS)
|
||||||
|
#AC_MSG_CHECKING(ppl7 release libraries)
|
||||||
|
LIBPPL7_RELEASE_LIBS=`${ppl7config} --libs release`
|
||||||
|
LIBPPL7_RELEASE_ARCHIVE=`${ppl7config} --archive release`
|
||||||
|
LIBPPL7_DEBUG_ARCHIVE=`${ppl7config} --archive debug`
|
||||||
|
#AC_MSG_RESULT($LIBPPL7_RELEASE_LIBS)
|
||||||
|
#AC_MSG_CHECKING(ppl7 includes)
|
||||||
|
LIBPPL7_CFLAGS=`${ppl7config} --cflags`
|
||||||
|
LIBPPL7=`${ppl7config} --ppllib release`
|
||||||
|
LIBPPL7_DEBUG=`${ppl7config} --ppllib debug`
|
||||||
|
|
||||||
|
#AC_MSG_RESULT($LIBPPL7_CFLAGS)
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
#else
|
||||||
|
# AC_MSG_RESULT(not configured)
|
||||||
|
# AC_MSG_ERROR([ppl7 library is required])
|
||||||
|
#fi
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
dnl AX_PPL7_FEATURE([FEATURE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
AC_DEFUN([AX_PPL7_FEATURE],[dnl
|
||||||
|
AC_MSG_CHECKING([for ppl7-feature: $1])
|
||||||
|
if test -z "${ppl_features}"
|
||||||
|
then
|
||||||
|
ppl_features=`${ppl7config} --features`
|
||||||
|
fi
|
||||||
|
echo ${ppl_features}| tr " " "\n" | grep -i "^$1" > /dev/null 2>&1
|
||||||
|
if test $? -eq 0
|
||||||
|
then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
12
src/pplib/docs/formate.dox
Normal file
12
src/pplib/docs/formate.dox
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
/*!\page Dateiformate
|
||||||
|
|
||||||
|
- \subpage PFPFileVersion1
|
||||||
|
- \subpage PFPFileVersion2
|
||||||
|
- \subpage PFPFileVersion3
|
||||||
|
- \subpage PFPFont5Format
|
||||||
|
- \subpage PFPFont6Format
|
||||||
|
- \subpage PPLResVersion6
|
||||||
|
- \subpage PPLSocketMessage
|
||||||
|
- \subpage PFPSpriteTexture1
|
||||||
|
|
||||||
|
*/
|
72
src/pplib/docs/formate/PFPVersion1.dox
Normal file
72
src/pplib/docs/formate/PFPVersion1.dox
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
/*!
|
||||||
|
\page PFPFileVersion1 Format PFP-Files Version 1
|
||||||
|
|
||||||
|
Ein PFP-File in der Version 1 beginnt immer mit einem 30-Byte großen Header, gefolgt
|
||||||
|
von individuellen Nutzdaten
|
||||||
|
|
||||||
|
Alle Größenangaben mit 2 oder mehr Byte sind im Little Endian-Format!
|
||||||
|
|
||||||
|
\par Header
|
||||||
|
|
||||||
|
Der Header einer Version 1 Datei sieht so aus:
|
||||||
|
\code
|
||||||
|
|
||||||
|
Byte 0: String "PFS-File" 8 Bytes
|
||||||
|
Byte 8: Hauptversion (1) 1 Byte
|
||||||
|
Byte 9: Unterversion (0) 1 Byte
|
||||||
|
Byte 10: File-ID ("DRV") 3 Bytes
|
||||||
|
Byte 13: Zeiger auf Name und Autor 2 Bytes
|
||||||
|
Byte 15: Erstelldatum 4 Bytes
|
||||||
|
Byte 19: Erstellzeit 3 Bytes
|
||||||
|
Byte 22: Datum letzte Änderung 4 Bytes
|
||||||
|
Byte 26: Zeit letzte Änderung 3 Bytes
|
||||||
|
Byte 29: Komprimierungsverfahren (0) 1 Byte
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
Beschreibung:
|
||||||
|
<ul>
|
||||||
|
<li><b>File-ID</b>\n
|
||||||
|
Diese 3 Bytes enthalten einen eindeutigen String, der Aufschluß über den Inhalt der
|
||||||
|
Datei gibt. Dies kann z.B. "FNT", "PIC", "DRV", usw. sein.</li>
|
||||||
|
<li><b>Haupt- und Unterversion</b>\n
|
||||||
|
Diese beiden Bytes enthalten die Version für die jewwilige File-ID.</li>
|
||||||
|
<li><b>Zeiger auf Name</b>\n
|
||||||
|
Enthält die Datei einen Namensstring, wird hier ein 2-Byte-Pointer darauf
|
||||||
|
gespeichert. Der Namensstring muß daher innerhalb der ersten 64 KByte der Datei
|
||||||
|
stehen. In der Regel steht der Name direkt im Anschluss an den Header. Der
|
||||||
|
String muss mit einem 0-Byte terminiert sein.</li>
|
||||||
|
<li><b>Zeiger auf Autor</b>\n
|
||||||
|
Wie beim Namensstring. Der Autor steht in der Regel direkt nach Header und Name,
|
||||||
|
und muß ebenfalls mit einem 0-Byte terminiert sein.</li>
|
||||||
|
<li><b>Erstelldatum</b>\n
|
||||||
|
Ein 4-Byte-Wert der das Datum der Erstellung der Datei im Format "yyyymmdd" enthält.
|
||||||
|
Eine Datei, die am 1. November 2007 erstellt wurde, enthält also den Wert 20071101.</li>
|
||||||
|
<li><b>Erstellzeit</b>\n
|
||||||
|
Dieser 3-Byte-Wert enthält die Uhrzeit der Erstellung, gerechnet in Sekunden seit
|
||||||
|
Mitternacht. In Kombination mit dem Erstelldatum erhält man so einen Sekundengenauen
|
||||||
|
Zeitpunkt der Erstellung. Der Wert errechnet sich folgendermassen:
|
||||||
|
\code
|
||||||
|
Sekunden + Minuten * 60 + Stunden * 3600
|
||||||
|
\endcode
|
||||||
|
</li>
|
||||||
|
<li><b>Datum letzte Änderung</b>\n
|
||||||
|
Ein 4-Byte-Wert der das Datum der letzten Änderung im Format "yyyymmdd" enthält.</li>
|
||||||
|
<li><b>Zeit letzte Änderung</b>\n
|
||||||
|
Dieser 3-Byte-Wert enthält die Uhrzeit der letzten Änderung, gerechnet in Sekunden seit
|
||||||
|
Mitternacht.</li>
|
||||||
|
<li><b>Komprimierung</b>\n
|
||||||
|
Dieser Wert ist leider nicht genau definiert. Einizig der Wert "0" bedeutet "unkomprimiert".
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
\par Name und Autor
|
||||||
|
Im Anschluss an den Header folgen nun optional Name und Autor der Datei, sofern die
|
||||||
|
Zeiger in Byte 16 und 18 dafür gesetzt wurden. Beide Angaben müssen mit einem
|
||||||
|
0-Byte terminiert werden.
|
||||||
|
|
||||||
|
\par Nutzdaten
|
||||||
|
Danach folgen die Nutzdaten. Deren Aufbau ist durch das PFP-Format Version 1 nicht
|
||||||
|
vorgegeben.
|
||||||
|
|
||||||
|
*/
|
86
src/pplib/docs/formate/PFPVersion2.dox
Normal file
86
src/pplib/docs/formate/PFPVersion2.dox
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
/*!
|
||||||
|
\page PFPFileVersion2 Format PFP-Files Version 2
|
||||||
|
|
||||||
|
Ein PFP-File in der Version 2 beginnt immer mit einem Header, gefolgt
|
||||||
|
von individuellen Nutzdaten
|
||||||
|
|
||||||
|
Alle Größenangaben mit 2 oder mehr Byte sind im Little Endian-Format!
|
||||||
|
|
||||||
|
\par Header
|
||||||
|
|
||||||
|
Der Header einer Version 2 Datei sieht so aus:
|
||||||
|
\code
|
||||||
|
Byte 0: String "PFP-File" 8 Bytes
|
||||||
|
Byte 8: PFP-File-Version (2) 1 Byte
|
||||||
|
Byte 9: Länge des PFP-Header (40) 1 Byte
|
||||||
|
Byte 10: File-ID ("xxxx") 4 Bytes
|
||||||
|
Byte 14: Unterversion (x) 1 Byte
|
||||||
|
Byte 15: Hauptversion (x) 1 Byte
|
||||||
|
Byte 16: Zeiger auf Name 2 Byte
|
||||||
|
Byte 18: Zeiger auf Autor 2 Byte
|
||||||
|
Byte 20: Erstelldatum 4 Byte
|
||||||
|
Byte 24: Erstellzeit in Sekunden 4 Byte
|
||||||
|
Byte 28: Datum letzte Änderung 4 Byte
|
||||||
|
Byte 32: Zeit letzte Änderung in Sekunden 4 Byte
|
||||||
|
Byte 36: Komprimierung 2 Byte
|
||||||
|
Byte 38: unbenutzt 2 Byte
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
Beschreibung:
|
||||||
|
<ul>
|
||||||
|
<li><b>Länge des PFP-Header</b>\n
|
||||||
|
Der Header ist in der Regel 38 (ältere Formate) oder 40 (neuere Formate) Byte lang</li>
|
||||||
|
<li><b>File-ID</b>\n
|
||||||
|
Diese 4 Byte enthalten einen eindeutigen String, der Aufschluß über den Inhalt der
|
||||||
|
Datei gibt. Dies kann z.B. "FONT", "PICT", "LANG", usw. sein.</li>
|
||||||
|
<li><b>Haupt- und Unterversuin</b>\n
|
||||||
|
Diese beiden Bytes enthalten die Version für die jewwilige File-ID.</li>
|
||||||
|
<li><b>Zeiger auf Name</b>\n
|
||||||
|
Enthält die Datei einen Namensstring, wird hier ein 2-Byte-Pointer darauf
|
||||||
|
gespeichert. Der Namensstring muß daher innerhalb der ersten 64 KByte der Datei
|
||||||
|
stehen. In der Regel steht der Name direkt im Anschluss an den Header. Der
|
||||||
|
String muss mit einem 0-Byte terminiert sein.</li>
|
||||||
|
<li><b>Zeiger auf Autor</b>\n
|
||||||
|
Wie beim Namensstring. Der Autor steht in der Regel direkt nach Header und Name,
|
||||||
|
und muß ebenfalls mit einem 0-Byte terminiert sein.</li>
|
||||||
|
<li><b>Erstelldatum</b>\n
|
||||||
|
Ein 4-Byte-Wert der das Datum der Erstellung der Datei im Format "yyyymmdd" enthält.
|
||||||
|
Eine Datei, die am 1. November 2007 erstellt wurde, enthält also den Wert 20071101.</li>
|
||||||
|
<li><b>Erstellzeit</b>\n
|
||||||
|
Dieser 4-Byte-Wert enthält die Uhrzeit der Erstellung, gerechnet in Sekunden seit
|
||||||
|
Mitternacht. In Kombination mit dem Erstelldatum erhält man so einen Sekundengenauen
|
||||||
|
Zeitpunkt der Erstellung. Der Wert errechnet sich folgendermassen:
|
||||||
|
\code
|
||||||
|
Sekunden + Minuten * 60 + Stunden * 3600
|
||||||
|
\endcode
|
||||||
|
</li>
|
||||||
|
<li><b>Datum letzte Änderung</b>\n
|
||||||
|
Ein 4-Byte-Wert der das Datum der letzten Änderung im Format "yyyymmdd" enthält.</li>
|
||||||
|
<li><b>Zeit letzte Änderung</b>\n
|
||||||
|
Dieser 4-Byte-Wert enthält die Uhrzeit der letzten Änderung, gerechnet in Sekunden seit
|
||||||
|
Mitternacht.</li>
|
||||||
|
<li><b>Komprimierung</b>\n
|
||||||
|
Dieser Wert ist leider nicht genau definiert. Einizig der Wert "0" bedeutet "unkomprimiert".
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
\par Name und Autor
|
||||||
|
Im Anschluss an den Header folgen nun optional Name und Autor der Datei, sofern die
|
||||||
|
Zeiger in Byte 16 und 18 dafür gesetzt wurden. Beide Angaben müssen mit einem
|
||||||
|
0-Byte terminiert werden.
|
||||||
|
|
||||||
|
\par Nutzdaten
|
||||||
|
Danach folgen die Nutzdaten. Deren Aufbau ist durch das PFP-Format Version 2 nicht
|
||||||
|
vorgegeben.
|
||||||
|
|
||||||
|
\par Nutzung
|
||||||
|
Zum Lesen und schreiben eines PFP-Headers gibt es folgende Funktionen:
|
||||||
|
- ppl6::PFPSTRUCT - Struktur zum Bearbeiten eines Headers
|
||||||
|
- ppl6::WritePFPHeader - Header schreiben
|
||||||
|
- ppl6::SavePFPHeader - Header lesen
|
||||||
|
- ppl6::PresetPFPHeader - Header-Struktur mit Defaultdaten fülllen
|
||||||
|
- ppl6::is_pfp - Prüfen, ob sich an der Speicherstelle ein PFP-Header befindet
|
||||||
|
- ppl6::ident - Allround-Funktion zum identifizieren einer Datei
|
||||||
|
|
||||||
|
*/
|
113
src/pplib/docs/formate/PFPVersion3.dox
Normal file
113
src/pplib/docs/formate/PFPVersion3.dox
Normal file
|
@ -0,0 +1,113 @@
|
||||||
|
/*!
|
||||||
|
\page PFPFileVersion3 Format PFP-Files Version 3
|
||||||
|
|
||||||
|
Ein PFP-File in der Version 3 ist in mehrere aufeinanderfolgende Abschnitte aufgeteilt:
|
||||||
|
- 24 Byte langer Header
|
||||||
|
- optionaler 8-Byte langer Komprimierungsheader
|
||||||
|
- Chunks
|
||||||
|
|
||||||
|
Alle 4-Byte Größenangaben sind im LittleEndian-Format!
|
||||||
|
|
||||||
|
\par Header
|
||||||
|
|
||||||
|
Der Header einer Version 3 Datei sieht so aus:
|
||||||
|
\code
|
||||||
|
Byte 0: String "PFP-File" 8 Bytes
|
||||||
|
Byte 8: PFP-File-Version (3) 1 Byte
|
||||||
|
Byte 9: Länge des PFP-Header (24) 1 Byte
|
||||||
|
Byte 10: File-ID, 4 Byte-String 4 Byte
|
||||||
|
Byte 14: Unterversion 1 Byte
|
||||||
|
Byte 15: Hauptversion 1 Byte
|
||||||
|
Byte 16: Komprimierung 1 Byte
|
||||||
|
0=unkomprimiert
|
||||||
|
1=Zlib
|
||||||
|
2=Bzip2
|
||||||
|
Byte 17: reserviert 3 Byte
|
||||||
|
Byte 20: Timestamp der Erstellung (UTC) 4 Byte
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
Im Anschluss an den Header folgen die Nutzdaten. Sofern keine Komprimierung
|
||||||
|
verwendet wurde, geht es sofort mit dem ersten Chunk los. Ist die Datei
|
||||||
|
komprimiert folgt erst der Komprimierungsheader:
|
||||||
|
|
||||||
|
\par Komprimierungsheader
|
||||||
|
|
||||||
|
\code
|
||||||
|
Byte 0: Größe der Nutzdaten unkomprimiert in Byte 4 Byte
|
||||||
|
Byte 4: Größe der Nutzdaten komprimiert in Byte 4 Byte
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\par Chunks
|
||||||
|
|
||||||
|
In einem PFP-File können beliebig viele Chunks vorkommen. Ein Chunk besteht immer aus einem
|
||||||
|
4-Byte langen Namen, gefolgt von einem 4-Byte Integer, der die Größe des Chunks einschließlich
|
||||||
|
des Headers angibt, gefolgt von den Nutzdaten. Abgesehen von den unten aufgeführten vordefinierten
|
||||||
|
Chunks, können beliebig viele Chunks mit gleichem Namen vorhanden sein.
|
||||||
|
|
||||||
|
Ein Chunk muss nicht zwingend Nutzdaten enthalten.
|
||||||
|
|
||||||
|
\code
|
||||||
|
Byte 0: Chunkname, 4 Byte-String in Grossbuchstaben 4 Byte
|
||||||
|
Byte 4: Größe des Chunks einschließlich 8-Byte Header 4 Byte
|
||||||
|
Byte 8: Nutzdaten des Chunks
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\par Vordefinierte Chunks
|
||||||
|
|
||||||
|
Die nachfolgenden Chunks sind vordefiniert, aber optional
|
||||||
|
<ul>
|
||||||
|
<li>\b Author
|
||||||
|
|
||||||
|
\code
|
||||||
|
Byte 0: AUTH
|
||||||
|
Byte 4: Länge des nachfolgenden Strings
|
||||||
|
Byte 8: Name des Authors mit schließendem 0-Byte
|
||||||
|
\endcode
|
||||||
|
Der Name des Authors kann mit der Funktion PFPFile::SetAuthor gesetzt werden.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>\b Name
|
||||||
|
|
||||||
|
\code
|
||||||
|
Byte 0: NAME
|
||||||
|
Byte 4: Länge des nachfolgenden Strings
|
||||||
|
Byte 8: Name der Datei oder Beschreibung des Inhalts mit schließendem 0-Byte
|
||||||
|
\endcode
|
||||||
|
Der Name des Files kann mit der Funktion PFPFile::SetName gesetzt werden.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>\b Description
|
||||||
|
|
||||||
|
\code
|
||||||
|
Byte 0: DESC
|
||||||
|
Byte 4: Länge des nachfolgenden Strings
|
||||||
|
Byte 8: Nähere Beschreibung mit schließendem 0-Byte
|
||||||
|
\endcode
|
||||||
|
Die Description kann mit der Funktion PFPFile::SetDescription gesetzt werden.
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>\b Copyright
|
||||||
|
|
||||||
|
\code
|
||||||
|
Byte 0: COPY
|
||||||
|
Byte 4: Länge des nachfolgenden Strings
|
||||||
|
Byte 8: Copyright-String mit schließendem 0-Byte
|
||||||
|
\endcode
|
||||||
|
Der Copyright-String kann mit der Funktion PFPFile::SetCopyright gesetzt werden.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
\par End of File
|
||||||
|
|
||||||
|
Dieser Chunk ist immer der letzte in der Datei und kennzeichnet das
|
||||||
|
Ende der Nutzdaten.
|
||||||
|
\code
|
||||||
|
Byte 0: ENDF
|
||||||
|
Byte 4: 0
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\par Nutzung
|
||||||
|
Um das Lesen und Schreiben solcher Dateien zu vereinfachen, kann die Klasse PFPFile in
|
||||||
|
Kombination mit PFPChunk verwendet werden.
|
||||||
|
|
||||||
|
*/
|
43
src/pplib/docs/formate/PPLResVersion6.dox
Normal file
43
src/pplib/docs/formate/PPLResVersion6.dox
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
/*!
|
||||||
|
\page PPLResVersion6 Format PPL-Resource Version 6
|
||||||
|
Das Format eines PPL-Resource Files ist mehr oder weniger der Vorläufer
|
||||||
|
der Version 3 des \ref PFPFileVersion3 "PFP-File-Formats". Es hat einen eigenen
|
||||||
|
vereinfachten Header (kein PFP-Header), gefolgt von beliebigen Chunks mit Nutzdaten.
|
||||||
|
|
||||||
|
Alle Pointer und Größenangaben mit 2 oder mehr Byte sind in Little Endian
|
||||||
|
gespeichert.
|
||||||
|
|
||||||
|
\par Header
|
||||||
|
Der Header ist 9 Byte lang und hat folgenden Aufbau:
|
||||||
|
\code
|
||||||
|
Byte 0-5: String "PPLRES" 6 Byte
|
||||||
|
Byte 6: 0-Byte 1 Byte
|
||||||
|
Byte 7: Major Version (6) 1 Byte
|
||||||
|
Byte 8: Minor Version (0) 1 Byte
|
||||||
|
Byte 9: Start der Chunks
|
||||||
|
\endcode
|
||||||
|
Danach beginnen bereits die Chunks.
|
||||||
|
|
||||||
|
\par Chunks
|
||||||
|
\code
|
||||||
|
Byte 0: Size of Chunk incl. Header 4 Byte
|
||||||
|
Byte 4: ID of Resource 2 Byte
|
||||||
|
Byte 6: Size of data uncompressed 4 Byte
|
||||||
|
Byte 10: Size of data compressed 4 Byte
|
||||||
|
Byte 14: Compression-Type (0=none, 1=zlib, 2=bzip2) 1 Byte
|
||||||
|
Byte 15: Offset of Data from Chunk-Start 1 Byte
|
||||||
|
Byte 16: Name of Resource with 0-Byte n Byte
|
||||||
|
Byte n: Data
|
||||||
|
\endcode
|
||||||
|
Nach dem letzten Chunk muss ein 4-Byte großer 0-Wert geschrieben werden, der
|
||||||
|
das Ende der Datei markiert.
|
||||||
|
|
||||||
|
\par Erstellen von Resourcen
|
||||||
|
TODO
|
||||||
|
|
||||||
|
\par Einlesen von Resourcen
|
||||||
|
Zum Einlesen von Resourcen-Dateien gibt es die Klasse ppl6::CResource.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
53
src/pplib/docs/formate/SocketMessage.dox
Normal file
53
src/pplib/docs/formate/SocketMessage.dox
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
/*!
|
||||||
|
\page PPLSocketMessage Format PPL Socket-Message
|
||||||
|
|
||||||
|
Mit der Klasse ppl6::CpplSocketMessage und den Funktionen CpplSocket::Write und
|
||||||
|
CpplSocket::WaitForMessage lassen sich bequem Nachrichten per TCP austauschen.
|
||||||
|
|
||||||
|
Jedes Nachrichtenpaket besteht dabei aus einem Header und den Nutzdaten.
|
||||||
|
|
||||||
|
\par Aufbau des Headers Version 1
|
||||||
|
Version 1 besteht aus einem 20 Byte langem Header mit folgendem Aufbau:
|
||||||
|
\code
|
||||||
|
Byte 0: "V" (1 Byte)
|
||||||
|
Byte 1: Version=1 (1 Byte)
|
||||||
|
Byte 2: CommandId (2 Byte)
|
||||||
|
Byte 4: Id (4 Byte)
|
||||||
|
Byte 8: Bytes Nutzdaten (4 Byte)
|
||||||
|
Byte 12: Flags (1 Byte)
|
||||||
|
Bit 0: Zlib-Kompression
|
||||||
|
Bit 1: Client supports Zlib
|
||||||
|
Bit 2: Client supports MsgChannel
|
||||||
|
Byte 13: Datatype, PPL_ARRAY, usw. (1 Byte)
|
||||||
|
Byte 14: Zufallszahl (2 Byte)
|
||||||
|
Byte 16: CRC-Summe über den Header (4 Byte)
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
Die CRC-Summe wird über die ersten 16 Byte des Headers gebildet
|
||||||
|
(siehe ppl6::crc32). Alle mehrbyteigen Werte müssen in Network-Byte-Order
|
||||||
|
(Big Endian) angegeben werden.
|
||||||
|
|
||||||
|
\par Aufbau des Headers Version 2
|
||||||
|
Der Version 2-Header ist 4 Byte länger, die eine zusätzliche CRC-Summe
|
||||||
|
über die Nutzdaten enthalten.
|
||||||
|
\code
|
||||||
|
Byte 0: "V" (1 Byte)
|
||||||
|
Byte 1: Version=2 (1 Byte)
|
||||||
|
Byte 2: CommandId (2 Byte)
|
||||||
|
Byte 4: Id (4 Byte)
|
||||||
|
Byte 8: Bytes Nutzdaten (4 Byte)
|
||||||
|
Byte 12: Flags (1 Byte)
|
||||||
|
Bit 0: Zlib-Kompression
|
||||||
|
Bit 1: Client supports Zlib
|
||||||
|
Bit 2: Client supports MsgChannel
|
||||||
|
Byte 13: Datatype, PPL_ARRAY, usw. (1 Byte)
|
||||||
|
Byte 14: Zufallszahl (2 Byte)
|
||||||
|
Byte 16: CRC-Summe über die Nutzdaten (4 Byte)
|
||||||
|
Byte 20: CRC-Summe über den Header (4 Byte)
|
||||||
|
\endcode
|
||||||
|
Die CRC-Summe des Headers wird über die ersten 20 Byte des Headers gebildet
|
||||||
|
(siehe ppl6::crc32). Alle mehrbyteigen Werte müssen in Network-Byte-Order
|
||||||
|
(Big Endian) angegeben werden.
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
73
src/pplib/docs/groups.dox
Normal file
73
src/pplib/docs/groups.dox
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
/*!\defgroup PPLGroupInternet Internet
|
||||||
|
\brief Internet-Klassen und Funktionen
|
||||||
|
|
||||||
|
Internet-Klassen und Funktionen
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!\defgroup PPLGroupGrafik Grafik
|
||||||
|
\brief Grafik-Klassen und Funktionen
|
||||||
|
|
||||||
|
\desc
|
||||||
|
Die nachfolgenden Klassen dienen zum Erstellen und Verwalten von Bitmap-Grafiken.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!\defgroup PPLGroupSound Sound
|
||||||
|
\brief Sound-Klassen und Funktionen
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!\defgroup PPLGroupToolkit Toolkit
|
||||||
|
\ingroup PPLGroupGrafik
|
||||||
|
\brief Toolkit zum Erstellen von Dialogen und Eingabemasken
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!\defgroup PPLGroupMath Mathematische Funktionen und Klassen
|
||||||
|
\brief Mathematische Funktionen und Klassen
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!\defgroup PPLGroupDateTime Datums- und Zeit-Funktionen
|
||||||
|
\brief Datums- und Zeit-Funktionen
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!\defgroup PPLGroupFileIO Dateien und Verzeichnise
|
||||||
|
\brief Funktionen und Klassen zur Verarbeitung von Dateien und Verzeichnissen
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!\defgroup PPLGroupStrings String-Verarbeitung
|
||||||
|
\brief Funktionen und Klassen zur Verarbeitung von Strings
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!\defgroup PPLGroupMemory Speicherverwaltung
|
||||||
|
\brief Funktionen und Klassen zur Verwalten des Speichers
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*!\defgroup PPL7_CRYPT Verschlüsselung und Hashes
|
||||||
|
\brief Verschlüsselung und Hashes
|
||||||
|
|
||||||
|
\header \#include <ppl7-crypto.h>
|
||||||
|
|
||||||
|
\descr
|
||||||
|
Auf dieser Seite sind Klassen und Funktion zu finden, mit denen Daten nach verschiedenen
|
||||||
|
kryptographischen Algorithmen verschlüsselt und entschlüsselt werden können, sowie
|
||||||
|
Klassen und Funktionen zum Berechnen von Hash-Werten oder Prüfsummen nach verschiedenen
|
||||||
|
Algorithmen.
|
||||||
|
\par
|
||||||
|
Die Funktionen der Klasse ppl7::MCrypt basieren auf der Bibliothek
|
||||||
|
<a href="http://mcrypt.sourceforge.net/">libmcrypt</a> und sind daher nur
|
||||||
|
verfügbar, wenn diese beim Kompilieren der PPL-Library eingebunden wurden.
|
||||||
|
Die Klasse ppl7::Digest setzt auf <a href="http://www.openssl.org/">OpenSSL</a> auf
|
||||||
|
und ist daher nur verfügbar, wenn diese beim Kompilieren der PPL-Library eingebunden wurde.
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*!\defgroup PPL7_COMPRESSION Datenkomprimierung
|
||||||
|
\brief Komprimierung von Daten
|
||||||
|
|
||||||
|
\descr
|
||||||
|
Mit den nachfolgenden Klassen und Funktionen können Daten komprimiert und entkomprimiert werden:
|
||||||
|
|
||||||
|
*/
|
33
src/pplib/docs/gtest.dox
Normal file
33
src/pplib/docs/gtest.dox
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
/*!\page unittests Unit Tests
|
||||||
|
PPL7 comes with a bunch of unit tests, which are used in continious and nightly builds.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\section Install Google test framework
|
||||||
|
PPL7 uses the Google test framework version 1.6.0. You can download the framework here:
|
||||||
|
|
||||||
|
http://code.google.com/p/googletest/downloads/detail?name=gtest-1.6.0.zip
|
||||||
|
|
||||||
|
Unpack the file somewhere:
|
||||||
|
|
||||||
|
\code
|
||||||
|
cd
|
||||||
|
wget "http://code.google.com/p/googletest/downloads/detail?name=gtest-1.6.0.zip"
|
||||||
|
cd /usr/local
|
||||||
|
unzip ~/gtest-1.6.0.zip
|
||||||
|
cd gtest-1.6.0
|
||||||
|
configure --prefix=/usr/local/gtest-1.6.0
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\section Prepare and start unit tests
|
||||||
|
|
||||||
|
You must specify the installation path of google test during configure of ppl7. So if you unpacked the
|
||||||
|
framework in /usr/local/gtest-1.6.0, you would call
|
||||||
|
\code
|
||||||
|
./configure --enable-gtest=/usr/local/gtest-1.6.0 ...
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
After ppl7 is build, you can call "make test" to run the testsuite.
|
||||||
|
|
||||||
|
*/
|
BIN
src/pplib/docs/header-bg.png
Normal file
BIN
src/pplib/docs/header-bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 206 B |
35
src/pplib/docs/header.html
Normal file
35
src/pplib/docs/header.html
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<title>PPLib - Dokumentation, Version $projectnumber</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="navtree.js"></script>
|
||||||
|
<script type="text/javascript" src="resize.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(initResizable);
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<link href="ppl7style.css" rel="stylesheet" type="text/css"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- Erzeugt von Doxygen 1.7.3 -->
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Suchen');
|
||||||
|
--></script>
|
||||||
|
|
||||||
|
<div id="top">
|
||||||
|
<table style="margin: 0px; padding: 0px; width: 100%; border-bottom: 1px solid #243352;
|
||||||
|
background-image: url('header-bg.png'); background-color: #000000; background-repeat: repeat-x;">
|
||||||
|
<tr><td align="left" width="48">
|
||||||
|
<img align="left" src="ppl7-icon-48x48.png" alt="PPL7-Icon">
|
||||||
|
</td><td align="left" width="100%" valign="bottom" style="font-weight: 700; font-size: 180%; color: #ffffff; text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.9);">
|
||||||
|
Patrick's Programming Library Version $projectnumber - Dokumentation
|
||||||
|
</td></tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
BIN
src/pplib/docs/icecast_status.png
Normal file
BIN
src/pplib/docs/icecast_status.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
234
src/pplib/docs/installation.dox
Normal file
234
src/pplib/docs/installation.dox
Normal file
|
@ -0,0 +1,234 @@
|
||||||
|
/*!\page Installation Download und Installation
|
||||||
|
|
||||||
|
\section inst1 Download
|
||||||
|
Die aktuelle Version und Dokumentation der Library ist hier zu finden:
|
||||||
|
|
||||||
|
http://www.pfp.de/ppl
|
||||||
|
|
||||||
|
Die Sourcen sind dort im Format ".tar.bz2" zu finden. Unter Unix kann dieses Archiv mit tar
|
||||||
|
oder gtar ausgepackt werden (<code>tar -xjf ppl*.tar.bz2</code>), unter Windows eignet sich
|
||||||
|
zum Beispiel <a href="http://http://www.7-zip.org/">7-Zip</a>.
|
||||||
|
|
||||||
|
|
||||||
|
\section inst1a Git
|
||||||
|
Der Quellcode der Library wird bei <a href="https://github.com/pfedick/pplib">GitHub</a>
|
||||||
|
gehostet und kann wie nachfolgend beschrieben aus dem Repository ausgecheckt werden.
|
||||||
|
|
||||||
|
\code
|
||||||
|
git clone https://github.com/pfedick/pplib.git ppl7
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
|
||||||
|
\section inst2 Installation unter UNIX
|
||||||
|
|
||||||
|
Die Library wird mit einem configure-script ausgeliefert, in dem alle optionalen
|
||||||
|
Features ausgewählt werden können. Um eine Basisversion zu erhalten reicht oftmals ein
|
||||||
|
einfaches configure ohne Parameter aus:
|
||||||
|
|
||||||
|
\code
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
Für das "make install" sind ggfs. Root-Rechte erforderlich.
|
||||||
|
|
||||||
|
Das Configure untersucht das System und setzt entsprechende Defines für den
|
||||||
|
Compiler. Optionale Features werden zum Teil automatisch eingebunden, wenn
|
||||||
|
sie gefunden werden.
|
||||||
|
|
||||||
|
Wird eine Library nicht gefunden oder nicht automatisch eingebunden, kann über
|
||||||
|
Parameter beim Aufruf des configure-Scripts nachgeholfen werden. Beispiel:
|
||||||
|
|
||||||
|
\code
|
||||||
|
./configure --with-mysql=/usr/local/mysql
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
Soll eine bestimmte Library explizit nicht eingebunden werden, kann man dies mit
|
||||||
|
"--without-xxx" festlegen, wobei xxx für den Namen der Library steht:
|
||||||
|
|
||||||
|
\code
|
||||||
|
./configure --without-mysql
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
Alle weiteren Details sind im configure zu finden, wenn man es mit "./configure --help"
|
||||||
|
aufruft.
|
||||||
|
|
||||||
|
\subsection inst2compiler Compiler auswählen
|
||||||
|
Sofern nichts angegeben wird, wird der Defaultcompiler verwendet, in der Regel gcc bzw. g++. Sind mehrere Compiler
|
||||||
|
vorhanden, kann durch setzen der Umgebungsvariablen CC und CXX vor Aufruf von "configure" bestimmt werden,
|
||||||
|
welcher Compiler verwendet werden soll.
|
||||||
|
|
||||||
|
\subsubsection inst2compiler_gcc47 Beispiel 1: gcc Version 5
|
||||||
|
Unter FreeBSD kann man verschiedene Versionen über die Ports-Collection installieren. Die installierten
|
||||||
|
Binaries bekommen dann die Version im Dateinamen angehangen, z.B. "5". Das gcc-Binary heisst somit "gcc5",
|
||||||
|
bzw. "g++5":
|
||||||
|
|
||||||
|
\code
|
||||||
|
export CC=gcc5
|
||||||
|
export CXX=g++5
|
||||||
|
./configure ...
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
|
||||||
|
\subsubsection inst2compiler_clang Beispiel 2: clang Version 6
|
||||||
|
\code
|
||||||
|
export CC=clang60
|
||||||
|
export CXX=clang++60
|
||||||
|
./configure ...
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
|
||||||
|
\subsection inst2ubuntu1804 Installation unter Ubuntu 18.04 LTS
|
||||||
|
Wenn man alle Features der Library nutzen will, muß man folgende Pakete installieren:
|
||||||
|
|
||||||
|
\code
|
||||||
|
sudo apt install -y gcc g++ nasm googletest \
|
||||||
|
zlib1g-dev libbz2-dev libssl-dev libpcre3-dev \
|
||||||
|
libmcrypt-dev libgtest-dev libcurl4-openssl-dev libldns-dev \
|
||||||
|
libbind-dev libmysqlclient-dev libpq-dev libsqlite3-dev \
|
||||||
|
libpng-dev libjpeg-dev libtiff-dev libsdl2-dev libfreetype6-dev \
|
||||||
|
libmad0-dev libmp3lame-dev libmpg123-dev \
|
||||||
|
libogg-dev libshout3-dev libmicrohttpd-dev libidn11-dev
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
Ist alles installiert, kann man das configure mit folgenden Parametern aufrufen:
|
||||||
|
\code
|
||||||
|
export CFLAGS="-no-pie "
|
||||||
|
./configure --prefix=$HOME \
|
||||||
|
--with-lame --with-pcre=/usr --with-x --with-openssl=/usr \
|
||||||
|
--with-mysql --with-libiconv-prefix --with-nasm \
|
||||||
|
--with-gcrypt=auto --with-ogg=/usr \
|
||||||
|
--with-postgresql --with-sqlite3 \
|
||||||
|
--with-libmicrohttpd=/usr/local \
|
||||||
|
--with-jpeg --with-libpng=$PREFIX --with-libtiff \
|
||||||
|
--with-libtiff=/usr --with-mpg123 \
|
||||||
|
--with-libidn --with-libldns=/usr
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
|
||||||
|
\subsection inst2debian Installation unter Debian / Ubuntu (Veraltet)
|
||||||
|
Wenn man alle Features der Library nutzen will, muß man folgende Pakete installieren:
|
||||||
|
\code
|
||||||
|
# Kern-Funktionalität
|
||||||
|
sudo apt-get install zlib1g-dev libbz2-dev libssl-dev libpcre3-dev nasm
|
||||||
|
# Kryptografie
|
||||||
|
sudo apt-get instal libssl-dev libmcrypt-dev
|
||||||
|
# Internet
|
||||||
|
sudo apt-get install libcurl4-openssl-dev libldns-dev
|
||||||
|
# Datenbanken
|
||||||
|
sudo apt-get install libmysqlclient-dev libpq-dev freetds-dev
|
||||||
|
# Grafik
|
||||||
|
sudo apt-get install libpng12-dev libjpeg62-dev libsdl1.2-dev libfreetype6-dev libmad0-dev
|
||||||
|
# Sound
|
||||||
|
sudo apt-get install libmp3lame-dev libmad0-dev libmpg123-dev libogg-dev libshout3-dev
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
Ist alles installiert, kann man das configure mit folgenden Parametern aufrufen:
|
||||||
|
\code
|
||||||
|
export CFLAGS="-no-pie "
|
||||||
|
echo "configuring for generic Linux"
|
||||||
|
./configure --prefix=$PREFIX \
|
||||||
|
--with-lame --with-pcre --with-x --with-openssl \
|
||||||
|
--with-mysql --with-libiconv-prefix --with-nasm \
|
||||||
|
--with-ogg \
|
||||||
|
--with-postgresql \
|
||||||
|
--with-libmicrohttpd \
|
||||||
|
--with-jpeg --with-libpng --with-libtiff \
|
||||||
|
--with-libtiff --with-mpg123 \
|
||||||
|
--with-libidn \
|
||||||
|
--enable-gtest=/usr/local/googletest-release-1.7.0
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\subsection inst2freebsd Installation unter FreeBSD
|
||||||
|
\code
|
||||||
|
export PREFIX=/usr/local
|
||||||
|
export CFLAGS="-I/usr/local/include"
|
||||||
|
export LDFLAGS="-L/usr/local/lib"
|
||||||
|
export CPPFLAGS=-I/usr/local/include
|
||||||
|
export CC=clang$CLANG_VERSION
|
||||||
|
export CXX=clang++$CLANG_VERSION
|
||||||
|
|
||||||
|
./configure --prefix=$PREFIX \
|
||||||
|
--with-lame=/usr/local --with-mpg123=/usr/local \
|
||||||
|
--with-pcre=/usr/local --with-x --with-openssl=/usr --with-mysql \
|
||||||
|
--with-libiconv-prefix=/usr/local --with-nasm \
|
||||||
|
--with-jpeg --with-libpng --with-libtiff=/usr/local \
|
||||||
|
--with-postgresql \
|
||||||
|
--with-libidn=/usr/local \
|
||||||
|
--with-ogg=/usr/local \
|
||||||
|
--with-libmicrohttpd=/usr/local \
|
||||||
|
--enable-gtest=/usr/local
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\section inst3 Installation unter Windows
|
||||||
|
|
||||||
|
\subsection inst3mingw Installation mit MinGW32/64
|
||||||
|
Für fast alle unterstützten Module gibt es fertige Pakete, die mit "pacman" installiert werden können.
|
||||||
|
Einzig für mcrypt gibt es keine Pakete.
|
||||||
|
|
||||||
|
\subsubsection inst3mingw_pacman Pakete installieren
|
||||||
|
Um alle Features nutzen zu können, müssen folgende Pakete installiert werden:
|
||||||
|
\code
|
||||||
|
pacman -S mingw-w64-x86_64-SDL2 mingw-w64-x86_64-bzip2 mingw-w64-x86_64-curl mingw-w64-x86_64-freetype \
|
||||||
|
mingw-w64-x86_64-gtest mingw-w64-x86_64-iconv mingw-w64-x86_64-lame mingw-w64-x86_64-ldns \
|
||||||
|
mingw-w64-x86_64-libiconv mingw-w64-x86_64-libidn mingw-w64-x86_64-libjpeg-turbo \
|
||||||
|
mingw-w64-x86_64-libmad mingw-w64-x86_64-libpng mingw-w64-x86_64-libogg mingw-w64-x86_64-libtiff \
|
||||||
|
mingw-w64-x86_64-mpg123 mingw-w64-x86_64-nasm mingw-w64-x86_64-openssl mingw-w64-x86_64-pcre \
|
||||||
|
mingw-w64-x86_64-sqlite3 mingw-w64-x86_64-zlib
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\subsubsection inst3mingw_mcrypt MCrypt installieren
|
||||||
|
Im folgenden wird angenommen, dass wir die 64-Bit-Version von MCrypt erstellen und unter /usr/local installieren wollen:
|
||||||
|
\code
|
||||||
|
export VERSION=2.5.8
|
||||||
|
export PREFIX=/usr/local
|
||||||
|
export MINGW=/mingw64
|
||||||
|
export PATH=$MINGW/bin:$PATH
|
||||||
|
|
||||||
|
rm -rf libmcrypt-$VERSION.tar.gz
|
||||||
|
wget -O libmcrypt-$VERSION.tar.gz "http://sourceforge.net/projects/mcrypt/files/Libmcrypt/$VERSION/libmcrypt-$VERSION.tar.gz/download"
|
||||||
|
rm -rf libmcrypt-$VERSION
|
||||||
|
tar -xzf libmcrypt-$VERSION.tar.gz
|
||||||
|
|
||||||
|
cd libmcrypt-$VERSION
|
||||||
|
grep -v "\-no\-undefined" configure > configure2
|
||||||
|
rm config.sub
|
||||||
|
automake -a
|
||||||
|
|
||||||
|
./configure2 --prefix=$PREFIX --enable-static --disable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
|
||||||
|
\subsubsection inst3mingw_ppl7
|
||||||
|
|
||||||
|
\code
|
||||||
|
export MINGW=/mingw64
|
||||||
|
export PATH=$MINGW/bin:$PATH
|
||||||
|
export CPPFLAGS="-I/usr/local/include"
|
||||||
|
export LDLAGS="-L/usr/local/lib"
|
||||||
|
export CFLAGS="-I/usr/local/include"
|
||||||
|
|
||||||
|
./configure --prefix=/usr/local \
|
||||||
|
--with-pcre=$MINGW --with-bzip2=$MINGW --with-zlib=$MINGW \
|
||||||
|
--with-nasm=$MINGW/bin --with-libiconv-prefix=$MINGW \
|
||||||
|
--with-lame=$MINGW --with-mpg123=$MINGW --disable-freetypetest --with-ft-prefix=$MINGW \
|
||||||
|
--with-libtiff=$MINGW --with-jpeg=$MINGW \
|
||||||
|
--with-libjpegturbo=$MINGW --with-libpng=$MINGW \
|
||||||
|
--with-libmcrypt-prefix=/usr/local \
|
||||||
|
--with-openssl=$MINGW --with-libcurl=$MINGW \
|
||||||
|
--with-libldns=$MINGW --with-libidn=$MINGW \
|
||||||
|
--with-sdl-prefix=$MINGW \
|
||||||
|
--without-postgresql --without-mysql \
|
||||||
|
--enable-gtest=/usr/local/gtest-1.7.0 \
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\subsection inst3vstudio Installation mit Visual Studio
|
||||||
|
|
||||||
|
Visual Studio wird zur Zeit nicht unterstützt.
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
153
src/pplib/docs/main.dox
Normal file
153
src/pplib/docs/main.dox
Normal file
|
@ -0,0 +1,153 @@
|
||||||
|
/*!\mainpage PPLib-Dokumentation
|
||||||
|
\image html resource/ppl7-icon-256x256.png
|
||||||
|
\section Einleitung
|
||||||
|
PPL steht für "Patrick's Programming Library" und ist eine Sammlung nützlicher
|
||||||
|
Funktionen und Klassen für C++-Anwendungen, geschrieben von Patrick Fedick <patrick@pfp.de>.
|
||||||
|
Sie beinhaltet Funktionen aus verschiedenen Bereichen, wie
|
||||||
|
|
||||||
|
- Datei- und Verzeichniss-Zugriff
|
||||||
|
- Strings, Arrays, Listen, Trees
|
||||||
|
- Multithreading
|
||||||
|
- Sockets (TCP, UDP)
|
||||||
|
- Verschlüsselung
|
||||||
|
- Internet
|
||||||
|
- Datenbanken
|
||||||
|
- Zeit, Datum und mathematische Funktionen
|
||||||
|
- Grafik
|
||||||
|
- Sound
|
||||||
|
- Speicherverwaltung
|
||||||
|
|
||||||
|
Die erste Version erschien bereits im Jahr 1997 und bestand fast vollständig
|
||||||
|
aus Assembler-Code für Windows. Seitdem wurde die Library mehrfach umstrukturiert und erweitert
|
||||||
|
und besteht nun zum größten Teil aus plattform-unabhängigem C und C++-Code. Unterstützt werden
|
||||||
|
folgende Systeme:
|
||||||
|
|
||||||
|
- Linux (getestet unter CentOS 6/7, Ubuntu 16.04, 18.04 in der 64-Bit-Version)
|
||||||
|
- FreeBSD (Version 10.x und 11.x in 64-Bit)
|
||||||
|
- Windows 7/10 (mit MinGW in 32- und 64-Bit)
|
||||||
|
|
||||||
|
Als Compiler wird gcc ab Version 4.4 benötigt oder clang ab Version 3.
|
||||||
|
|
||||||
|
Seit Version 6.2.0 steht die PPL-Library unter einer Open Source BSD-Lizenz und darf somit fast
|
||||||
|
uneingeschränkt auch in kommerziellen oder "closed source" Programmen verwendet werden. Die
|
||||||
|
genauen Lizenzbestimmungen sind \ref pplPageLicense "hier" zu finden.
|
||||||
|
|
||||||
|
\section Inhalt
|
||||||
|
|
||||||
|
- \subpage Installation
|
||||||
|
- \subpage ppl7_usage "Verwendung"
|
||||||
|
- \subpage PPLGroupDataTypes "Die speziellen Datentypen von PPLib"
|
||||||
|
- \subpage ppl7 "PPL7 Namespace"
|
||||||
|
- <a class="el" href="classes.html">Die Klassen</a>
|
||||||
|
- <a class="el" href="modules.html">Übersicht der Module</a>
|
||||||
|
- \subpage PPL7_Features
|
||||||
|
- \subpage Errors
|
||||||
|
- \subpage PPLGroupThreads
|
||||||
|
- \subpage PPLGroupMemory
|
||||||
|
- \subpage PPLGroupMath
|
||||||
|
- \subpage PPLGroupDateTime
|
||||||
|
- \subpage PPLGroupStrings
|
||||||
|
- \subpage PPLGroupFileIO
|
||||||
|
- \subpage PPLGroupGrafik
|
||||||
|
- \subpage PPLGroupToolkit
|
||||||
|
- \subpage PPLGroupSound
|
||||||
|
- \subpage PPLGroupInternet
|
||||||
|
- \subpage PPLGroupDatabases
|
||||||
|
- \subpage PPL7_CRYPT
|
||||||
|
- \subpage PPL7_COMPRESSION
|
||||||
|
|
||||||
|
|
||||||
|
- Sonstiges
|
||||||
|
- \subpage unittests
|
||||||
|
- \subpage Dateiformate
|
||||||
|
- \subpage formatstring
|
||||||
|
- \subpage todo
|
||||||
|
- \subpage deprecated
|
||||||
|
|
||||||
|
|
||||||
|
- \subpage PPLHistory
|
||||||
|
- \subpage pplPageCredits
|
||||||
|
- \subpage pplPageLicense
|
||||||
|
|
||||||
|
|
||||||
|
\image html resource/ppl7-icon-48x48.png
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!\page pplPageLicense Copyright
|
||||||
|
PPL7 steht unter der "2-Klausel BSD Lizenz". BSD-Lizenz bezeichnet eine Gruppe von Lizenzen aus
|
||||||
|
dem Open-Source-Bereich. Der Urtyp der Lizenz stammt von der University of California,
|
||||||
|
Berkeley, worauf das Akronym BSD hinweist: Berkeley Software Distribution.
|
||||||
|
|
||||||
|
Software unter BSD-Lizenz darf frei verwendet werden. Es ist erlaubt, sie zu kopieren,
|
||||||
|
zu verändern und zu verbreiten. Einzige Bedingung ist, dass der Copyright-Vermerk des
|
||||||
|
ursprünglichen Programms nicht entfernt werden darf. Somit eignet sich unter einer BSD-Lizenz
|
||||||
|
stehende Software auch als Vorlage für kommerzielle (teilproprietäre) Produkte, wie es
|
||||||
|
beispielsweise bei „JunOS“ der Fall ist, dem Router-Betriebssystem der Firma Juniper Networks.
|
||||||
|
|
||||||
|
Dieses Lizenzmodell unterscheidet sich von der GNU General Public License (GPL) darin,
|
||||||
|
dass es kein Copyleft enthält: Ein Programmierer, der ein unter einer BSD-Lizenz
|
||||||
|
veröffentlichtes Programm verändert und dann verbreitet, ist nicht verpflichtet,
|
||||||
|
den Quellcode seines veränderten Programms mitzuveröffentlichen. Er ist aber verpflichtet,
|
||||||
|
das Ergebnis seiner Änderungen wiederum unter der BSD-Lizenz zu veröffentlichen.
|
||||||
|
|
||||||
|
(Quelle: http://de.wikipedia.org/wiki/BSD-Lizenz)
|
||||||
|
|
||||||
|
Der Wortlaut der Lizenz lautet folgendermassen:
|
||||||
|
|
||||||
|
\include LICENSE.TXT
|
||||||
|
|
||||||
|
Übersetzung:
|
||||||
|
\code
|
||||||
|
Copyright (c) 2013, Patrick Fedick <patrick@pfp.de>
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Weiterverbreitung und Verwendung in nichtkompilierter oder kompilierter Form,
|
||||||
|
mit oder ohne Veränderung, sind unter den folgenden Bedingungen zulässig:
|
||||||
|
|
||||||
|
* * Weiterverbreitete nichtkompilierte Exemplare müssen das obige Copyright,
|
||||||
|
die Liste der Bedingungen und den folgenden Haftungsausschluss im Quelltext
|
||||||
|
enthalten.
|
||||||
|
* * Weder der Name des Copyright-Inhabers noch die Namen der Beitragsleistenden
|
||||||
|
dürfen zum Kennzeichnen oder Bewerben von Produkten, die von dieser
|
||||||
|
Software abgeleitet wurden, ohne spezielle vorherige schriftliche
|
||||||
|
Genehmigung verwendet werden.
|
||||||
|
|
||||||
|
DIESE SOFTWARE WIRD VOM COPYRIGHT INHABER UND DEN BEITRAGSLEISTENDEN OHNE
|
||||||
|
JEGLICHE SPEZIELLE ODER IMPLIZIERTE GARANTIEN ZUR VERFÜGUNG GESTELLT, DIE
|
||||||
|
UNTER ANDEREM EINSCHLIESSEN: DIE IMPLIZIERTE GARANTIE DER VERWENDBARKEIT DER
|
||||||
|
SOFTWARE FÜR EINEN BESTIMMTEN ZWECK. AUF KEINEN FALL SIND DER COPYRIGHT
|
||||||
|
INHABER ODER DIE BEITRAGSLEISTENDEN FÜR IRGENDWELCHE DIREKTEN, INDIREKTEN,
|
||||||
|
ZUFÄLLIGEN, SPEZIELLEN, BEISPIELHAFTEN ODER FOLGENDEN SCHÄDEN (UNTER ANDEREM
|
||||||
|
VERSCHAFFEN VON ERSATZGÜTERN ODER -DIENSTLEISTUNGEN; EINSCHRÄNKUNG DER
|
||||||
|
NUTZUNGSFÄHIGKEIT; VERLUST VON NUTZUNGSFÄHIGKEIT; DATEN; PROFIT ODER
|
||||||
|
GESCHÄFTSUNTERBRECHUNG), WIE AUCH IMMER VERURSACHT UND UNTER WELCHER
|
||||||
|
VERPFLICHTUNG AUCH IMMER, OB IN VERTRAG, STRIKTER VERPFLICHTUNG ODER
|
||||||
|
UNERLAUBTE HANDLUNG (INKLUSIVE FAHRLÄSSIGKEIT) VERANTWORTLICH, AUF WELCHE
|
||||||
|
WEG SIE AUCH IMMER DURCH DIE BENUTZUNG DIESER SOFTWARE ENTSTANDEN SIND,
|
||||||
|
SOGAR, WENN SIE AUF DIE MÖGLICHKEIT EINES SOLCHEN SCHADENS HINGEWIESEN
|
||||||
|
WORDEN SIND.
|
||||||
|
\endcode
|
||||||
|
(Quelle der Übersetzung: http://de.wikipedia.org/wiki/BSD-Lizenz)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\namespace ppl7
|
||||||
|
\brief Der Namensraum der PPLib-Library
|
||||||
|
|
||||||
|
ppl7 ist der Namensraum für alle in der PPLib-Library Version 7 enthaltenen Funktionen und Klassen.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!\namespace ppl7::grafix
|
||||||
|
\ingroup PPLGroupGrafik
|
||||||
|
\brief Namensraum der Grafik-Funktionen
|
||||||
|
|
||||||
|
Im Namespace ppl7::grafix sind alle Grafikfunktionen der Library enthalten.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!\namespace ppl7::tk
|
||||||
|
\ingroup PPLGroupGrafik
|
||||||
|
\brief Namensraum des Grafik-Toolkits
|
||||||
|
|
||||||
|
In diesem Namespace sind die Klassen des Toolkits enthalten, mit denen eine Benutzeroberfläche
|
||||||
|
erstellt werden kann.
|
||||||
|
*/
|
13
src/pplib/docs/pcrenote.dox
Normal file
13
src/pplib/docs/pcrenote.dox
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
/*!\file
|
||||||
|
\note
|
||||||
|
Diese Funktion ist nur verfügbar, wenn PPL mit dem Configure-Flag --with-pcre konfiguriert
|
||||||
|
und kompiliert wurde.
|
||||||
|
|
||||||
|
\note
|
||||||
|
Falls kein UTF-8 angegeben wird, das System auf dem das Programm läuft aber UTF-8
|
||||||
|
in LC_CTYPE konfiguriert hat, wird automatisch UTF-8 verwendet.
|
||||||
|
\note
|
||||||
|
Falls UTF-8 verwendet wird, der zu vergleichende String aber ungültiges UTF-8 enthält,
|
||||||
|
macht die Funktion ein Fallback auf Singlebyte-Zeichen.
|
||||||
|
|
||||||
|
*/
|
3
src/pplib/docs/ppl7style.css
Normal file
3
src/pplib/docs/ppl7style.css
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
body, table, div, p, dl {
|
||||||
|
font-family: Liberation Sans, Bitstream Vera Sans, Arial, sans-serif, Helvetica;
|
||||||
|
}
|
52
src/pplib/docs/pregexpr.dox
Normal file
52
src/pplib/docs/pregexpr.dox
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
/*!\file
|
||||||
|
\arg \c i caseless\n
|
||||||
|
If this bit is set, letters in the pattern match both upper and lower case letters.
|
||||||
|
It is equivalent to Perl's /i option, and it can be changed within a pattern by a
|
||||||
|
(?i) option setting. In UTF-8 mode, PCRE always understands the concept of case for
|
||||||
|
characters whose values are less than 128, so caseless matching is always possible.
|
||||||
|
For characters with higher values, the concept of case is supported if PCRE is compiled
|
||||||
|
with Unicode property support, but not otherwise. If you want to use caseless matching
|
||||||
|
for characters 128 and above, you must ensure that PCRE is compiled with Unicode property
|
||||||
|
support as well as with UTF-8 support.
|
||||||
|
|
||||||
|
\arg \c m multiline\n
|
||||||
|
By default, PCRE treats the subject string as consisting of a single line of characters
|
||||||
|
(even if it actually contains newlines). The "start of line" metacharacter (^) matches
|
||||||
|
only at the start of the string, while the "end of line" metacharacter ($) matches only
|
||||||
|
at the end of the string, or before a terminating newline. This is the same as Perl.
|
||||||
|
When "m" it is set, the "start of line" and "end of line" constructs match immediately
|
||||||
|
following or immediately before any newline in the subject string, respectively, as well
|
||||||
|
as at the very start and end. This is equivalent to Perl's /m option, and it can be
|
||||||
|
changed within a pattern by a (?m) option setting. If there are no "\n" characters in a
|
||||||
|
subject string, or no occurrences of ^ or $ in a pattern, setting "m" has no effect.
|
||||||
|
|
||||||
|
\arg \c x extended\n
|
||||||
|
If this is set, whitespace data characters in the pattern are totally ignored except when
|
||||||
|
escaped or inside a character class. Whitespace does not include the VT character (code 11).
|
||||||
|
In addition, characters between an unescaped # outside a character class and the next
|
||||||
|
newline character, inclusive, are also ignored.
|
||||||
|
|
||||||
|
\arg \c s dotall\n
|
||||||
|
If this bit is set, a dot metacharater in the pattern matches all characters, including
|
||||||
|
newlines. Without it, newlines are excluded. This option is equivalent to Perl's /s option,
|
||||||
|
and it can be changed within a pattern by a (?s) option setting. A negative class such as
|
||||||
|
[^a] always matches a newline character, independent of the setting of this option.
|
||||||
|
|
||||||
|
\arg \c 8 UTF8\n
|
||||||
|
This option causes PregMatch to regard both the pattern and the subject as strings of
|
||||||
|
UTF-8 characters instead of single-byte character strings. However, it is available only
|
||||||
|
when PCRE is built to include UTF-8 support. If not, the use of this option provokes an
|
||||||
|
error. Details of how this option changes the behaviour of PCRE are given in the section
|
||||||
|
on UTF-8 support in the main pcre page.
|
||||||
|
|
||||||
|
\arg \c a anchored\n
|
||||||
|
If this bit is set, the pattern is forced to be "anchored", that is, it is constrained
|
||||||
|
to match only at the first matching point in the string that is being searched (the
|
||||||
|
"subject string"). This effect can also be achieved by appropriate constructs in the
|
||||||
|
pattern itself, which is the only way to do it in Perl.
|
||||||
|
|
||||||
|
\arg \c u ungreedy\n
|
||||||
|
This option inverts the "greediness" of the quantifiers so that they are not greedy by
|
||||||
|
default, but become greedy if followed by "?". It is not compatible with Perl. It can also
|
||||||
|
be set by a (?U) option setting within the pattern.
|
||||||
|
*/
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue